Tribes of Programming (2017)

downbad_1 pts0 comments

3 tribes of programming

03 May 2017

3 tribes of programming

There's an old joke that computer science is a lie, because its not really about computers, and its not really a science.

Funny joke. Everyone laughs, then someone says "Yeah but it sort of is about computers though, isn't it?". Feet shuffle awkwardly. Someone clears their throat and before you know it you're talking about Category Theory and looking up the history of the word algorithm.

Out in the wild, these arguments look like this:

I think I agree, and am looking forward to hearing Joe's take on it #deconstructconf pic.twitter.com/j7H2QWG0Tr<br>β€” Andy Lindeman (@alindeman) April 21, 2017

I'll happily renounce "programmer" in favor of "applied mathematician" or something, whatever it takes to avoid C https://t.co/DsIEo5x4uI<br>β€” Chris Martin 🐘🎺🍍 (@chris__martin) April 21, 2017

The speaker was making the point that the whole modern stack in our computers (Kernel, OS, browser, VM) is written in C + ASM. So you should know C and ASM.

Is that really important? Serious question, are programs foremost lists of instructions, or expressions of logical ideas?

#deconstructconf pic.twitter.com/V2lGXwmaJM<br>β€” Justin Falcone (@modernserf) April 21, 2017

Or maybe its neither, and programs are just things we make for other humans. A message is fundamentally meaningless without an audience who reads it. Are programs meaningless without reference to the outside world they interact in?

A friend bragged to me once about how he could prove that most programs were correct and completely bug-free using Ada. I asked him if he could prove that this function was correct:

fn sub(a, b) { return a + b }

He said "Of course, thats easy". So I asked how his prover would discover that the function had the wrong name, and he got delightfully flustered.

Tribes

Programs, obviously, hold all of these properties. But I think there's fundamentally 3 architypes of programmers, divided by which ideals we hold in highest esteem:

You are a poet and a mathematician. Programming is your poetry

You are a hacker. You make hardware dance to your tune

You are a maker. You build things for people to use

We self-select into communities of our peers based on these ideals. We use coded language to express these ideals to our peers.

I think each group has its own conferences, and its own subreddits. Its own programming languages, heroes and its own villains.

Programming as applied mathematics

The first camp views programming is fundamentally an expression of thought - a kind of mathematical poetry which we can gift with life. The fact that we execute them on von Neumann machines is an implementation detail.

With this mindset, these details are important:

Source code : The source should read like poetry - dense, with very few lines of code needed to express an idea. Once understood, the terse program seems like a beautiful and obvious description of your program. It is more important that the source code is simple than the execution is simple or fast. High level languages are better than low level languages because they let you express your intent more clearly.

Execution : How the program is executed by the computer is an implementation detail of the compiler. It is more important that the code is simple than the execution is fast.

Correctness : A program is correct if it implements the spec exactly. The best programs use tools like Ada to formally prove correctness.

UI : How the code interacts with humans is a separate consideration from its implementation. Beautiful code is more important than beautiful UI.

Examples: Rich Hickey, Brett Victor

These programmers are probably the least common, although that might be because its hard to get a job working like this. Haskell has the highest weekend/weekday usage ratio of all languages on stackoverflow.

Most (arguably all) of the modern advancements in programming languages come from people in this camp. If you've used React to make a website, you should know that the model of immutability and expressing your view as a pure function from data to DOM came from functional programming. Actually, most modern language features are invented by people who think of programming as thought. Years (or decades) later, those features get copied into the more popular languages and get treated as new ideas.

I have a friend who spent months loving J. He eventually wrote a little game in J. He described his code as this perfect, beautiful crystal. Later he wanted to make it multiplayer - but to do that he would have to deal with lag. And that would require ripping apart some of the beautiful internal flow. He couldn't stomach it, so instead he abandoned the project entirely.

That story is funny, but I'm a little jealous of my friend. I bet he learned a heap and had a great time. Experiences like that make us better programmers.

I did a Haskell short course late last year and I challenged the main instructor. I told him "this is all well...

programming code like programs languages important

Related Articles