Paul John­son points out an inter­est­ing fact. It’s so basic that few in the soft­ware industry notices it and to any­one out­side the soft­ware world it seems very strange: We don’t know how we pro­gram:

To any­one who has writ­ten a sig­ni­fic­ant piece of soft­ware this fact is so obvi­ous that it seems to go without say­ing. We were taught to pro­gram by hav­ing small examples of code explained to us, and then we prac­ticed pro­du­cing sim­ilar examples. Over time the examples got lar­ger and the con­cepts behind them more eso­teric. Loops and arrays were intro­duced, then point­ers, lists, trees, recur­sion, all the things you have to know to be a com­pet­ent pro­gram­mer. Like many developers I took a 3 year degree course in this stuff. But at no point dur­ing those three years did any lec­turer actu­ally tell me how to pro­gram. Like every­one else, I absorbed it through osmosis.

Soft­ware devel­op­ment has pro­cesses and design pat­terns for everything except actu­ally writ­ing an algorithm. All com­puters are basic­ally Turing-complete, so they can per­form every oper­a­tion that any other com­puter could pos­sibly per­form. This may be at a faster rate, but the same amount of things are pos­sible. Com­puters don’t cre­ate and there­fore can’t pro­gram themselves.

The source code is the design

If you look at other pro­fes­sions which involve design work (like writ­ing a song or paint­ing a pic­ture), you’ll notice they don’t have a pro­cess for design either. Nobody does. The closest thing we have is “The Feyn­man Problem-Solving Algorithm”:

1. Write down the prob­lem
2. Think very hard
3. Write down the answer

The bot­tle­neck in writ­ing code isn’t in the writ­ing of the code, it’s in under­stand­ing and con­cep­tu­al­ising what needs to be done. Pro­gram­ming (like math­em­at­ics) is the cre­ation of ori­ginal designs and once a prob­lem is solved, it should never be solved again. (Except for didactic pur­poses, or find­ing a more general/elegant solu­tion, but the point still stands).

Brett Mor­gan sums it up:

There is another pro­fes­sion that trains by copy­ing ever pre­vi­ous works. Start­ing with small exer­cises and work­ing upwards. It’s called art school.

And the reason is simple.

Most of the skills that most pro­fes­sion­als use are basic­ally ana­lysis skills. They have a bunch of rules for break­ing things down and then reacting. — -

But all design is syn­thesis. Take a set of inspir­a­tions and a set of con­straints and cre­ate some­thing new that fits in the hole.

That is why pro­gram­ming is unpre­dict­able. Some people can see the solu­tion, and some can’t. And a whole lot of vari­ation on the qual­ity of the solu­tion envis­aged by those who can.