Thursday, May 8, 2008

Lazy Programmer

They say a lazy programmer is a good programmer. Because such programmers use their minds to minimize their work that to just do rigorous hard work. Most of the software problems can be solved by either of two methods. One is to try a lot of permutations and combinations. The other is to first sit down and analyse the different possible solutions and then go for the most optimal one. Each has it's own positive and negative traits. The good and lazy programmers know exactly what to choose or rather what combinations to choose depending on the time and technical constraints.

Lazy programmers really hate to do repetitive stuff. So here's what they will do. Whenever there is a problem, try to find already existing solutions to that problem and solve it. If the solutions do not exist, they break the problem into many smaller problems and try to find if solutions exist for the smaller ones. Lazy programming does not mean not doing work but it means doing smart work and concentrating on stuff which will enable them to learn something new rather than repeat the same work which they already know. This helps them to concentrate on finding solutions to newer problems than going into a monotonous loop of doing that which is already done.

One example can be provided with STL in C++. Suppose we have a task of maintaining a dynamic list of entries of the employees in an organization and processing that list. A programmer who does not know about STL will start writing his own logic, probably linked list implementation. After he spends time in that, he will have to test and debug the errors from that. Still it might contain bugs. A lazy smart programmer will use STL, probably vectors or linked lists. He saves his time of implementation of linked lists by using existing code. And there will be no major bugs in it since it is provided by the ANSI standard and already tested. So he saves additional time. Now he can concentrate on processing that list and complete his work in a fraction of a time than the first programmer. This helps him to finish his work on time with good quality and provides him time to perform the tasks he enjoys.

So be a programmer but be lazy and be smart.

Monday, May 5, 2008

Best friends



Last weekend as some of my friends will have known I had spent time introspecting upon the concept of best friends. The only way to get more information was to ask some friends what best friends means to them. Now you may ask why best friends when we have friends. Well, seems like one best friend is more precious than a 100 friends put together.

Now I will just put a gist of the points that seem to validate this statement.

1)Being there:
Most important thing I found was that best friends are there for each other. By being there I mean physically, mentally, emotionally or all put together. If one wants to share his life whether good or bad, best friends are always available. There is no wait for some time or wait till tomorrow. Best friends seem to have an instinct not to encroach on each other's time but at the same time they seem to know to be there for each other whenever the need for it arises. And that is what makes best friends, always ready to provide a shoulder to lean on to, always ready to listen.

2)In touch:
Best friends are always in touch with each other. Many a times best friends communicate with each other on a daily basis. As I mentioned sharing life seems a priority for them. But then I also found out that best friends might not be constantly in touch whenever boundaries like long physical distances are present. But they seem to make up for it through other means of communication and really make it count whenever they communicate.

3)Have fun:
Best friends have a lot of fun together. There is no disappointment most of the time. As I mentioned best friends seem to have an instinct on what time is favorable for them. Imagine wanting to go to a movie or a picnic and being sure that you best friend will always be ready to go with you anywhere. A best friend sees no better way to spend time than with his friend. That is so very cool :)

4)No boundaries:
This is something I think about. I heard best friends have no boundaries. By boundaries I mean age, gender, religion, etc. While many best friends share a lot of their characteristics and interests, it is also that such things are not necessary and a lot many people are best friends because they be there for each other. Even when their ideas and views differ their hearts do not.

I'm sorry if I left out some points but right now I can recall the above ones. Thanks to friend Heena for kind of encouraging me to write this post about best friends.