—From John Graham Cumming.Programming is much closer to a craft than a science or engineering discipline. It’s a combination of skill and experience expressed through tools. The craftsman chooses specific tools (and sometimes makes their own) and learns to use them to create.
This is the best description of programming that I’ve ever read. It’s never felt like an art or a science to me, and it hasn’t gotten easier with more time, reading, or research. The only modest strides I’ve made in the past few years with becoming a better programmer have involved building actual things, solving actual problems.
My brother, a craftsman — an industrial electrician— spends his days fixing million dollar undersea pumps, huge diesel generators, and motors of all shapes and sizes. In the past few years, I’ve noticed a trend in how he talks about the things that he works on — he compares them. This pump works like that pump, but has this kind of motor in it, for example. Things like that. Every problem he runs into is thought of in the context of a similar problem that he’s already encountered.
As I’ve learned more and more these past few years about PHP and Javascript, I’m finding myself do the same. I first look at a problem not in terms of exactly how I get started or what steps are involved, but instead I try and find a previous solution to compare it to. I’m sure as time goes on this will become automatic and not conscious, but it’s really become my first step now.
Thinking about this as a craft — a combination of skill and experience — instead of just as a pure you-have-it-or-you-don’t skill has been extremely helpful to me.