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 commentsEvery programmer I admire has worked on their chosen field for years. You can keep flitting between languages and frameworks, but mastery ultimately comes from hankering down on one thing and advancing our collective knowledge a bit further. You can achieve mastery in any field - it can be a business domain - as mundane as a Time Tracking or a Todo list app, or it can be a technical domain - like compilers or databases or browsers. You however can't achieve mastery by consuming what others produce. Becoming an expert in CSS and its quirks is a good vocational investment, but you're no closer to a fundamental understanding of the field by just consuming an API.
You should spend years working on a problem domain that interests you. Look at prettydiff (https://github.com/prettydiff/prettydiff). It is a diff tool, a parser, a pretty printer, a minifier, all rolled into one. It is the most comprehensive publicly available tool in terms of language and dialect support in the world right now. Its code is not the most modular and new contributors might have trouble getting in, but its author has been at this problem for years, and if you called a conference for pretty-printing, he would be one among the few thousand people in the world to meaningfully participate.
Consider blueimp's jQuery File Upload plugin (https://github.com/blueimp/jQuery-File-Upload). While this isn't as foundational a work as prettydiff, the project spans seven years and a thousand commits. It solves a mundane problem, but the sheer effort that has went into it makes it a formidable solution.
Consider Martin Odersky, watch Compilers are Databases (https://www.youtube.com/watch?v=WxyyJyB_Ssc). He has been writing compilers for like forever. He's worked on the field for decades, and has written compilers for everything from Fortran to Java to Scala.
You don't have to be a genius to be a master. You just need to go as deep into a field as you can. Here are a few interesting links you might want to read:
The Joys of Having a Forever Project: http://web.archive.org/web/20130125011224/http://www.dev.gd/...
Rich Hickey on becoming a better developer: https://gist.github.com/prakhar1989/1b0a2c9849b2e1e912fb
You and Your Research by Richard Hamming: http://www.cs.virginia.edu/~robins/YouAndYourResearch.html
(...Don't polarize on one end of the Specialist vs Generalist debate.)
Since improvement of experience and quality of output is roughly logarithmic, it is (depending on the specialisation of the task at hand) better to have a person that has worked ten years to be 7/10 in 5 displines than 10/10 in one and 2/10 in the remaining 4.
Of course, if you only care about the one discipline, get the 10/10 guy. But in real use cases, things are only occasionally atomic, and lack of understanding of adjacent processes and disciplines can prove fatal.
Once everything is working then, if it's warranted, change the algorithm.
Usually great programmers are good at some of the above but never all, so you have to be clear about what you mean by great. After that its easy :)
All comments shown.
Couldn't load more comments. Check your connection and try again.