Lurker News
A 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 comments
coldcode2 replies#
You will never get a group of programmers to agree on such a list. Like the old Jewish saying (paraphrased) for every 3 Rabbis there are 4 opinions. In the end you have to find something that you believe in but be willing to alter if something isn't working, assuming you can tell.
danesparza#
"for every 3 Rabbis there are 4 opinions"

Thanks for making me smile.

_asummers#
"Strong opinions, loosely held."
Poiesis#
Make it easy to verify what you have written works. This can be done in several ways, and which ones to use depends on the people you're working with and what access to the production code you have. Debug log levels are a popular way to do this.

* 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.

calafrax#
Don't think you are smart. Remember that you are average and that for everyone who you might think you are smarter than there is someone else who is equally smarter than you.

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.

jamesmishra#
When you see something you don't understand, find out how it works.

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.

Load more comments