Paul Johnson points out an interesting fact. It’s so basic that few in the software industry notices it and to anyone outside the software world it seems very strange: We don’t know how we program:
To anyone who has written a significant piece of software this fact is so obvious that it seems to go without saying. We were taught to program by having small examples of code explained to us, and then we practiced producing similar examples. Over time the examples got larger and the concepts behind them more esoteric. Loops and arrays were introduced, then pointers, lists, trees, recursion, all the things you have to know to be a competent programmer. Like many developers I took a 3 year degree course in this stuff. But at no point during those three years did any lecturer actually tell me how to program. Like everyone else, I absorbed it through osmosis.
Software development has processes and design patterns for everything except actually writing an algorithm. All computers are basically Turing-complete, so they can perform every operation that any other computer could possibly perform. This may be at a faster rate, but the same amount of things are possible. Computers don’t create and therefore can’t program themselves.
The source code is the design
If you look at other professions which involve design work (like writing a song or painting a picture), you’ll notice they don’t have a process for design either. Nobody does. The closest thing we have is “The Feynman Problem-Solving Algorithm”:
1. Write down the problem
2. Think very hard
3. Write down the answer
The bottleneck in writing code isn’t in the writing of the code, it’s in understanding and conceptualising what needs to be done. Programming (like mathematics) is the creation of original designs and once a problem is solved, it should never be solved again. (Except for didactic purposes, or finding a more general/elegant solution, but the point still stands).
Brett Morgan sums it up:
There is another profession that trains by copying ever previous works. Starting with small exercises and working upwards. It’s called art school.
And the reason is simple.
Most of the skills that most professionals use are basically analysis skills. They have a bunch of rules for breaking things down and then reacting. — -
But all design is synthesis. Take a set of inspirations and a set of constraints and create something new that fits in the hole.
That is why programming is unpredictable. Some people can see the solution, and some can’t. And a whole lot of variation on the quality of the solution envisaged by those who can.