Sunday, June 21, 2015

"You don't see people casually become neurosurgeons in their spare time"

From James Hague, Organizational Skills Beat Algorithmic Wizardry via John Cook, The most important skill in software

This is the reason there are so many accidental programmers. You don't see people casually become neurosurgeons in their spare time--the necessary training is specific and intense--but lots of people pick up enough coding skills to build things on their own.

Yeah, why is it that so many professional programmers are self-taught? So a brain surgeon is the top of the charts, but even a family practice doctor, the front line of medicine, still has the education and training of a rocket scientist.

So that's a bit tantalizing 'This is the reason...'. But Hague doesn't really give a reason. OK he sorta does. Previously he says:

To a great extent the act of coding is one of organization [not algorithmic wizardry]. Refactoring. Simplifying. Figuring out how to remove extraneous manipulations here and there.
Except programmers don't get hired because they show how well they can reorganize things, but by how they write an algorithm (classic interview questions). Sure, I bet there are some refactoring questions in some places (and I think those are just as useful a measure as the algorithm questions). But what gets you hired is your knowledge of the syntax of a programming language and maybe its libraries. But that's interviews and hiring.

It seems that Hague is saying that 'refactoring well' is the key to successful programming, not algorithmic wizardry. Historically, programming was algorithmic wizardry (a la CLRS) because that's what computers were good for, calculating extremely difficult mathematical or combinatorial computations. What is the shortest path that visits all nodes in this special graph? (greedy just doesn't work) How do you solve for a vector in a matrix equation using Gaussian elimination without using extra space? (space was at a premium). Those tasks needed wizardry, the kind of thought that goes into solving a Rubik's Cube, having good memory for a few examples, seeing patterns in them, seeing in the patterns, always an eye for optimization.


How do you get that one yellow orange edge piece in place without messing everything else up? Figuring that out takes a lot of 3D imagination ability, a lot of memory, and a lot of trial and error, but eventually you come up with a set pattern to follow like "U' L' U L U F U' F'" (ha ha that's technical, and not doable without, but that's what algorithms are). But once you have the pattern, it's straightforward to compose with other patterns (which you have to figure out possibly totally different from the patterns for the above or maybe somewhat similar)

But nowadays it seems lots of those difficult algorithms have been solved. They're in a library. You don't have to reimplement red-black trees to create a database index, you use the library. Programming today is more like 'Rush Hour', where you're moving a small set of pieces, some blocking others, but maybe the first are blocking the latter and you have to plan ahead.


You're rearranging a bunch of pieces to make the whole thing come out. For a webapp, you need some forms on the front end, communicating via http calls to a backend with a database, but your webapp needs to run on a smart phone and a tablet, too. All straightforward large pieces, but to make sure that you make it easier for yourself to modify later, you want to separate the pieces well.

What makes a good programmer, and allows so many without academic education in it to perform well, is that this kind of large piece thinking is usually amenable to anybody with a technical background, engineering, math, science. Most of such fields promote detail-oriented, symbolic thinking and memory (all of which is good to grasp the computational nature of programming) but also the

So the answer to the original question? Not everybody is an algorithms wizard, can figure out Rubik's cube, there's lots of special talent needed for that. But most technically oriented people, without specific experience, can program nowadays, can solve Rush Hour problems. It's not easy (especially for the more difficult layouts), but most technically oriented people can plow through it. You don't need to know linear algebra to do a website, you just need to read a few docs in order to move a handful of pieces around.

No comments: