The best solution – a programming concept

Below you will find a little ‘bit’ that I was about to put into a forum post. I then decided it was off topic from the question I was asked. There was lots of good info that I didn’t want to forget I said though, so I am going to keep it here for posterity’s sake. Enjoy!

-MikeL

To find the best way to do something there are many issues you have to deal with. I like to divide the issues into three seperate categories: delivery of functionality, efficiency of code, and ease of implementation.


Delivery of Functionality

The most important of these is of course "delivery of functionality." If the solution doesn’t do everything you need it to do than it isn’t even worth thinking about. Another aspect to think about is will it be able to easily deliver you functionality that you may need in the future. In other words you have to look at the extendibility of the solution. For instance, suppose you are working on the next great e-commerce application for your new client. You may have only been asked to provide support for collecting address information for their US customers. However it is often common that e-commerce sites will eventually want to go international, so when looking for the "best" way to store address information you will want to consider whether a potential solution will also allow you to store international addresses even though you don’t need that specific functionality now.

Efficiency of Code

The next item to deal with is "efficiency of code". If your code adds a significant amount of processing time to each page this is just going to get compounded as your site or application gets more popular. Most efficiency problems CAN however be fixed utilizating code optimization and various caching techniques. Having to implement these technologies does add to the amount of time it takes to implement the solution however so there is a definate trade off when you aren’t using an efficient solution.

Ease of Implementation

Now ease of implementation involves how long it is going to take you to create the code to implement the solution. In an ideal world customers would be understanding of our need to find the best way to solve there problem and we would never be nagged by desired release dates or deadlines. This is unfortunately an imperfect world and I have yet to meet a client who would shake my hand and say "take your time i’m in no big hurry." Accordingly we may have the best possible solution that is the most efficient one available but because it will take over two months to implement it is not a feasible solution at that time.

Leave a Reply

Your email address will not be published. Required fields are marked *