Click here to Skip to main content
15,879,535 members
Articles
(untagged)

Half the Code in Twice the Time

Rate me:
Please Sign up or sign in to vote.
3.94/5 (9 votes)
6 Aug 2008CPOL3 min read 16.9K   9   2
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 bottomline 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 sometimes even the business.

License

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


Written By
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.

Comments and Discussions

 
GeneralInteresting Pin
Chris Maunder6-Aug-08 8:31
cofounderChris Maunder6-Aug-08 8:31 
GeneralRe: Interesting -- & so true Pin
fwsouthern6-Aug-08 16:07
fwsouthern6-Aug-08 16:07 

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

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