1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
Historian Oswald Spengler called our age the age of abstraction. Nowhere is this more apparent than in programming, where abstraction isn't just a conceptual convenience, it's absolutely necessary. Programmers like to talk about their tools as a stack. At the top, the surface most of us encounter first, are simple descriptive languages, HTML being the best known. At the bottom is the "bare metal" of the machine. Thus there is a hierarchy and the further down in the stack you go, the closer you get to the metal.
It's not really metal of course. It's sand. Impossibly thin layers of silicon dioxide that conduct electrical impulses in ordered patterns we experience as a screen currently showing you a white rectangle with black text on it, flickering images, and so on. You can see how Spengler, though he died before the age of the digital computer, was on to something when he called our age one of abstraction. No one is keeping 1s and 0s in their head, and yet we all manipulate them every day using abstractions.
The danger of living in the age of abstraction is that it's easy to mistake the abstraction for the world as it really is. This, I think, is why programmers often keep diving deeper into the stack as they progress through their careers. We think maybe at the bare metal it will finally be real.
I started like most. At the top of the stack. HTML. 1995. Geocities. Angelfire. Blink tags. Marquee. I'll admit it. I loved me some marquee tag. I loved it so much I ran straight out of HTML to the welcoming arms of Flash. Blame the Matrix website. Coolest animation ever.
Flash was not really programming. Or, it didn't start that way. It was an animation app, with keyframes and the whole metaphor. An abstraction descended from Loony Toons. But then someone shoehorned a scripting language in there and next thing you know I was writing quadratic easing equations rather than playing keyframes (turns out my high trig teacher was right, I was going to use this stuff one day).
I was drawn to elegance and simplicity of writing code in a text file rather than clicking and dragging things around. This felt like the way things should be. Write code. Things happen. But with Flash there was a very limited amount of things that could happen. I wanted to go lower in the stack. I wanted fewer abstractions.
The true antidote to abstraction is getting your hands dirty. Digging in the dirt, machining metal, turning wrenches in your engine. For me, at the time, I escaped the abstract world of programming with a day job running a restaurant kitchen. There's nothing abstract about the Friday night rush in a restaurant kitchen. Oddly enough, this is where I was when I figured out how to get deeper into the stack.
It was 2004 when my best dishwasher, Aaron, a young man who enjoyed solving unsolved math theorems in his spare time (yes it was a lot like working with Good Will Hunting) told me, if you want to go deeper in the stack, learn Python. That was all he said. Learn Python. His solution was Python. He was smarter than me, so I wrote it down. Learn Python.
The problem with learning in any programming language is that there's a sharp learning curve that involves a lot of drudgery and bashing your forehead into the keyboard when things don't work. There was no Code Academy or Stack Overflow in 2004. We bought books from the likes of O'Reilly and No Starch Press. I bought Learning Python and a skimmed the first few chapters. I had no project though. Without a project that obsesses you, you'll never learn to program.
I also didn't learn Python then because running restaurant is an all-consuming, life-sucking thing to to do. There is no spare time in which you are not thinking about food. After another year I was burned out. I scraped together what money I had, bought a couple of plane tickets and headed off to lose myself in Asia. Hey, it worked for the Beatles. Sort of.
At some point in my travels I fell in with a couple of English travelers who were not familiar with the great Jazz guitarist Django Reinhardt. For shame. Back then we all traveled with iPods, there was a limited amount of music anyone would carry at any one time. I did not have any Django Reinhardt myself. For shame.
I went down to the internet cafe below our guesthouse in Bangkok to search for some Django Reinhardt music. The problem was that the keyboard, naturally enough, was Thai. I could change the layout in Windows settings, but the symbols on the keys were still Thai, which made it hard to type. I figured Django was a distinctive enough name that that was all I needed (this was back when Google's index held useful information rather than content farm spam. It was also before the movie Django was released.) I typed in Django and sure enough, Reinhardt was right there in the first couple of results.
That's not what caught my eye though. What caught my eye was a website for something called Django, "the web framework for perfectionists with deadlines." (here's the [early 2006 version of the site](https://web.archive.org/web/20060410074810/https://www.djangoproject.com/) as I discovered it). I didn't have any deadlines, but perfectionist? I can't tell you how many times I messed with tabs and spaces to make sure my hand written HTML was properly indented when you viewed source, something no one was ever going to see except my fellow perfectionists. God bless you if you ever viewed source and were appalled by the sloppy unindented source code that confronted you. Was there, possibly, a web framework for people like us? For people like me? Tell me more.
It was the subhead that got me: Django is a high-level Python Web framework. Learn Python. If this were a movie there would have been a bad flashback here where Aaron's face cuts through a cloud of Southeast Asian traveler haze saying, *Learn Python*, *Learn Python*.
But I didn't learn Python just then because I was busy building Flash websites. I know, I know, but you have to pay the bills. Sometimes you have to stick with what you know to get on down the road. Not very perfectionist of me. Maybe I wasn't ready for Django. Maybe I wasn't ready to go deeper into the stack.
Six months later, back in Los Angeles, a friend asked me to build a website for a bike charity, Wheels4Life. I agreed to do it, on the condition that I build it using Django. I had a project.
That website turned out well. It led to another. And another. Eventually I built a small business building Django-based websites. It took a couple of years, but I wrapped my head around Python and got to the point where, given a problem, I could work out a way to solve using Python. I am not an expert in Python, but I am capable of creating tangible things from its abstractions.
So while Python did bring me a little closer to the metal, I never went any deeper. Django, and Python more generally, turned out to be all I ever needed to build anything I ever wanted to build. Along the way, I discovered there are other things that mattered to me more than getting all the way down to the bottom of the stack.
I went to the first Django conference, ostensibly [covering it for WIRED](https://www.wired.com/2008/09/djangocon-the-long-winding-road-to-django-1dot0/), but I was also there to meet the founders and learn from the community. What I found was a welcoming group of fellow nerds and programmers all working together to solve problems and build cool stuff. It was all very concrete and not abstract at all.
When a project is new, as Django was at the time—it released version 1.0 just before the conference—learning can be painful. While the Django documentation was excellent from the beginning, there is always going to be a gap between documentation examples that help the largest possible audience, and the idiosyncratic problems of your project. In the beginning there aren't many users out there solving problems for you, that's on you.
This experience of self-directed struggle and then asking others for help creates a tight-knit community of users that help each other out. Or it should. Since Django was the only large project I'd ever participated in I just assumed that was always the case. Later forays into JavaScript frameworks showed me the error of my ways. But in 2008, I thought every community was like the Django community and they were all good. Why would I ever want to use anything but Django and Python? For me, the answer to the question was, I have no idea?
To say that we live in an age of abstraction can be pejorative. Abstractions aren't based on first principles and we tend to view that—often rightly—with suspicion, but I don't see it that way. We live in a world of abstraction. That is neither good nor bad. It's just where we are. In an age of abstraction, you're going to need to work with abstractions. So far as I know, Spengler never commented on this, but it seems me that the quest to get to the bare metal at the bottom of the abstractions is an urge born of earlier ages, when abstractions got in the way.
For us, for programmers living now, the abstractions are the world. For me, Python provided all the tools I ever needed to create what I wanted.
|