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
krosaen#
There are so many frameworks, tools and layers of abstraction out there that I find it helps to dip down a layer and taste what life is like without framework or tool X. Ideally, it's quite painful and you immediately appreciate what the tool is getting for you. You also might learn that the tool would be very helpful for circumstances you do not currently face (e.g large scale software engineering when you are exploring via a side project), and hang out in the lower layer until further motivated to climb back up.

Some concrete examples:
- you are using THREE.js. Try out raw webgl to draw a square. Run frighted back to THREE.js' arms and have some appreciation for what it is doing for you
- you are new to web development. Try working with the DOM directly. Then try something like knockout or angular that helps track dependencies between your view model and the dom. Then try out React. React has achieved wide-spread acceptance for a reason, I think it's the best pattern. But it's also the most abstract from the reality of what's happening underneath the hood, so taking steps up to the top can really help
- you are playing with scikit-learn and throwing various models at a classification problem. try implementing basic logistic regression using only numpy arrays. Try to understand how you could adapt your implementation `fit`, `transform` and `predict` interface used by sklearn.
A couple of recent articles that show this habit in practice:
https://zapier.com/engineering/how-to-build-redux/
https://medium.com/@karpathy/yes-you-should-understand-backp...

wiremine#
1. Get good at decomposing problems.

2. Be attentive to "flow" and how you achieve it. Space/surroundings, time of date, amount of time, etc.
3. Be aware of your energy level, and match the task to your energy level. Get away from the keyboard and get your brain engaged in other activities to keep you fresh and excited about programming.
4. Write great documentation. This takes as much practice as programming itself. Understand "great" is not equal to "a lot"
5. Don't overbuild on the first pass. Refactoring is your friend.
6. Prototyping is very valuable, but be aware the prototype that doesn't die. I tend to use languages that force the prototype to be thrown away.
7. Profile.
8. Always be learning about your craft and related areas. Business, design, security are all handy when you're a programmer.
9. Don't be a jerk.
10. Learn a variety of languages. You'll likely have a few favorite languages, which is fine, but always be picking up new ideas.

lukeholder1 reply#
Read other peoples (good) code.
hultner#
And read bad code as well so you'll know the difference.
p0nce#
Don't think that cognitive biases don't apply to you.

Load more comments