Thursday, August 25, 2011

What's the right time to Optimizing your code?

Some people claim that it is always better to defer tuning until after the coding is complete. This advice will only make sense if your team's coding is of a high quality to begin with, and you already have a good feel of all the performance parameters of your application. Otherwise you will be exposing yourselves to the risk of having to rewrite substantial portions of your code after testing.

My advice is that before you design a software application, you should do some basic benchmarks on the hardware and software to get a feel for the maximum performance you might be able to achieve. Then as you design and code the application, keep the desired performance parameters in mind, because at every step of the way there will be tradeoffs between performance, availability, security and flexibility.

Also choose good test data. If your database is expected to hold 100,000 records, avoid testing with only a 100 record database – you will regret it. This once happened to me; we did not detect the slow code until much later, causing a lot of wasted time as we had to rewrite a lot of code that worked but did not scale.

What do you think. Any comments on this post is much appreciated.

Monday, December 8, 2008

20 Things I Wish I Had Known When Starting Out in Life

There comes a time in your life, when you wish you knew a few things before you started out in life. But as they say "there are no retakes in life". You only get a single shot at life. You cannot change things the stuff you have gone through, but at least I can keep in mind few things, so I do not make same mistakes in life again.


1) Few days back, while reading a book I came across a sentence that captured my attention. I kept thinking about it over and over again. The quote was :
"Our biggest problem is not indifference its inaction."
This has been so true in my life. All problems that I have gone through in life is not because of indifference but because of inaction.