Ask HN: What habits make a programmer great?
518 pointsA quote by Kent Beck:
I'm not a great programmer; I'm just a good programmer with great habits.
So what are the habits I should cultivate to be a great programmer or even a good one? What are the bad habits that I should drop?
Comments (183) 79 threads
Earlier commentsThanks for making me smile.
* Always make a way to examine the data that's coming in (over network, arguments, whatever) to make sure your code is receiving the input it expects, and to be able to predict output/state changes.
* Similarly, have a way to see the data/state changes produced by what you wrote.
* Don't log all this by default.
* ...except for unexpected outcomes. By all means, check your inputs and loudly complain if they are garbage in a way that's unrecoverable.
* Be judicious about how much of this you normally expose to a user; don't overwhelm a user with unactionable noise.
You will move in the direction you face. If you look down on people your skill will diminish. If you look up to people your skill will improve.
Be a dilettante. Do general study of many different fields but recognize the limitations of your knowledge and show the appropriate respect to specialists and experts in their respective fields.
Pay close attention to your errors. Do root cause analysis on every error you make and formulate a plan of action to avoid it in the future.
Analyze your own habits and the habits of your peers. Seek to adopt practices that work for others where possible but only if they prove to work for you as well.
There are varying definitions of "understand", but I am confident that I understand something when I can give a lecture on it with no preparation... or when I can code it without checking any references.
All comments shown.
Couldn't load more comments. Check your connection and try again.