Be a minimalist

Development Tips

Don't use 10 steps when 9 will do. Don't select 10 fields when you only use 9.


Date : 2006-06-14
Write compact, elegant code. The best programmers simply will not use a solution that is not elegant. If, because of time restraints, you are forced to deliver a solution that is not as elegant as you would like at least make sure it is as compact as possible.

This attitude is important in many aspects of programming but especially in database queries you can see a marked speed improvement in applications where the programmer has taken the time to only select the fields they need. With some database records you may not notice much difference and it may even be difficult to measure the difference. Records that use large text areas, or many unions will see a marked improvement by leaving behind the fields you don't need.

Often times it helps to work out a solution get everything working and then go back through and rethink the process. This is sometimes referred to as "optimizing" and it requires an extra step in your development process but it is always worth it. I first realized this when I had finished a nice chunk of code back in the mid 80's and my PC died. It took several hours to get it going again only to find that my work had been completely lost. I pulled my hair out for a few minutes and then started rewriting the code, to my surprise the coding went very fast and the end result turned out better than the original. I do not suggest throwing out your first copy but it is beneficial to think through a problem twice.

Writing smaller, simpler processes will make you a better, more logical programmer.

Comments :

No comments yet
  • Search For Articles