Click here to Skip to main content
Click here to Skip to main content
Go to top

Half the Code in Twice the Time

, 6 Aug 2008
Rate this:
Please Sign up or sign in to vote.
The concept of “Half the code in twice the time” may seem backwards until we realize that there is a difference between the number of lines of code and the amount of functionality a given application provides.

Introduction

The time spent in giving thought to an application and coding well can greatly add to the longevity and bottom line of an application.

The concept of “Half the code in twice the time” may seem backwards until we realize that there is a difference between the number of lines of code and the amount of functionality a given application provides. The willingness to invest time into producing a simpler architecture and cleaner code can have dramatic paybacks during the life of the application.

It is quite a challenge, especially for someone in middle management, to make the case that the smaller application is more valuable to an organization than the larger counterpart. When your salary or budget is dependent on the number of lines of code you produce or manage, inefficiency will rule the day, and you should stop reading here.

Less code to pass to other developers

Code is often passed to other developers, and sometimes assumed by someone who has no contact with the original developer. Less code is less to learn. However, sometimes, tight and efficient algorithms can use techniques that are not easily apparent in the code, and therefore, documentation in the code is required. Documentation is not more lines of code; rather, it augments the code’s readability.

Smaller footprint

While most applications take up less space than a single photo or audio file, there is more to size than disk space. A smaller application will typically start up faster. This can be especially true where compile steps are required, such as with a Microsoft .NET application.

Faster to deliver over the web

When the application is delivered over the Internet, larger applications take longer to download, and that doesn’t aid in user acceptance. Some of the clients may not have a high speed connection, and for those that do, it still takes longer to load 10M compared to 10K.

Fewer places for security issues to hide

The more complicated the application, the more places leaks can appear for the unsavory to find. Do not consider validation code as something to remove to shrink the code. That could cost you dearly. You should code simple algorithms with the appropriate validation done such that it doesn’t distract from the ease of reading the code’s primary purpose.

Potential performance increase

When fewer steps are used to accomplish a given task, less time is taken. More often than not, a smaller implementation will execute faster. However, there are cases where more complexity in part of the code can be more efficient. Knowing your application will help in balancing simplicity, readability, and efficiency.

Easier to enhance

The additional functionality that invariably comes is easier to add when there are fewer lines of code to impact. The quick fix is a danger with any enhancement to existing code. We need something added, so a quick tweak is done without giving enough thought of the whole of the application. Sooner or later, poorly thought through enhancements can turn a clean design into your competitor’s advantage.

Longevity of architecture

The tools you use to develop your application will probably continue to advance. The smaller and cleaner the design, the more agile you are to move to updated tools and environments. In a competitive world, this could mean long life instead of sudden death for your application.

Summary

It may be impressive to manage a massive project, but those who value sheer size, and not the complete picture, probably stopped reading this article by the second paragraph. A well thought out, small, and agile application can add greatly to the bottom line over the life of the application as well as extend the life of the application, and sometime even the business.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

ShofarNexus
Founder ShofarNexus Corporation
United States United States
ShofarNexus™ is software project started in 1998 with a lot of testing and rejecting of methodologies. Our goals were fast startup and execution, a clean presentation and reliable data distribution. We take ReST to the extreme. We focus some on eye-candy and mostly on the meat and vegetables that are good for business.
 
ShofarNexus™ mentality is well described by Antoine de Saint-Exupéry who wrote “Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.”
 
ShofarNexus™ is single-handedly written by John Kozlowski, with over 35 years of software development experience and a lot of hardware design in the first two decades.

You may also be interested in...

Comments and Discussions

 
GeneralInteresting PinadminChris Maunder6-Aug-08 8:31 
GeneralRe: Interesting -- & so true Pinmemberfwsouthern6-Aug-08 16:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140922.1 | Last Updated 6 Aug 2008
Article Copyright 2008 by ShofarNexus
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid