Sundarrajk's Weblog

Archive for the ‘Quote’ Category

“It is good to be plain happy; it is a little better to know that you are happy; but to understand that you are happy and to know why and how and still be happy, well that is beyond happiness, that is bliss” – Henri Miller
A very nice presentation on Presentation based on the film “The Kings Speech”. Haven’t watched the movie as yet. Seems very interesting and should make it a point to watch it. Two quotes which I liked the most in the presentation.
1. You are only as great as the people you surround yourself with.
2. Be genuine and don’t be afraid of your flaws, they are what make you human
My take is that if people are honest and speak about something they know and if they believe in it will make the presentation very easy. The problem comes when one has lie through ones teeth or speak about something that one does not believe it.
Martin Fowler in the Book Refactoring has to say the following:

“Any fool can write code that a computer can understand. Good Programmers write code that humans can understand”

Wonderful statement. I wish this is made part of our academics (in India specifically) and this fact should be drilled into the heads ot students who are expected to write programs in their careers.

“Computer Science is a discipline that believes all problems can be solved with one more layer of indirection”. This statement was made by Dennis De Bruier.

The problem with flexible solutions is that flexibility costs. Flexible solutions are more complex than simple ones. The resulting software is more difficult to maintain in general, although it is easier to flex in the direction I had in mind. Even there, however you have to understand how to flex the system.

How right and and one hopes that one’s clients understand this fact.

In the book the authors talk about presence of bad code to bad smells and give details of how to identify bad code equating to bad smell. One statement that they make stands out. “Watch out for comments”. It is not that the authors are against comments, it is just that presence of comments indicates a high possibility of bad code. This is what the authors have to say about comments in code.

 “We are not saying that people should not write comments. In our olfactory analogy , comments are not bad smell; indeed they are a sweet smell. The reason we mention comments here is that comments often are used as a deodorant. Its surprising how often when you look at a thickly commented code and notice that comments are there because the code is bad.

Comments lead us to bad code that has all the rotten whiffs we’ve discovered. If we refactor the comments will most likely become redundant.

If you need a comment to explain what a block of code does, try Extract Method. If the method is already extracted and you still need a comment to explain what it does, use Rename Method. If you need to state some rules about the require state of the system use Introduce Assertion.

A good time to use Comment is when you do not know what to do. In addition to describing what is going on, comments can indicate areas in which you are not sure. A comment is good place to say why you did something. This kind of information helps future modifiers, especially the forgetful ones.”

Absolutely brilliant summary about comments.

Read the book

http://rcm.amazon.com/e/cm?t=chintanaigal-20&o=1&p=8&l=bpl&asins=0201485672&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr

Arthur Schopenhauer (1788-1860) was a German philosopher known for his philosophical clarity. He has made one of the most valuable observations on the shifting of human views on truth as he stated that all truth goes through three steps:

1. First, it is ridiculed.
2. Second, it is violently opposed.
3. Finally, it is accepted as self-evident

This is true for all areas of life.

Death is nothing to us, since when we are, death has not come, and when death has come we are not. – Epicurus


Categories