Programming is an art. It's a way of expressing yourself through abstractions, also making a computer do your bidding while constrained to the limitations of a glorified Turing machine. And like any art, the product can be beautiful and inspiring.
It's frustrating though that anyone can see how a drawing is pretty, or at least part of its beauty, but most people can't appreciate a good piece of code.
8 years ago, a friend told me he wanted to learn how to program. I was excited, because I would be able to finally explain to him why is it so cool. The best I could do was an analogy with joining a music band, something that he knew a lot about.
Programming is like music. It can be something fully functional, designed to be used in a lift, or you can do it just for the sake of it, because it's beautiful. You are going to meet people that plays Jazz, but they will teach you Pop. When you are ready, they'll teach you Blues, Rock, and finally all the nuances of Jazz, and you will be able to jam with them. You still don't even know why Jazz sounds like Jazz, but you will.
And when you can finally Jazz, you will be able to talk with me, and other people that knows the maths, and we'll talk to you about prog music. You will destroy music, taking it to the limit, and you will create things that people can't even fathom. Your most delicate themes will be just "noise" for outsiders, but you won't care, because you will love prog.
And when you can play prog and you are forced to compose music for some lift to pay the rent, you won't be able to see your melodies the same way. Every little bar, every chord, will have a color that you had never seen before.
There is a whole world of music out there, and they they are teaching you, note by note, how to listen to it.
The world has changed since then though. Or maybe me. Or maybe I have been programming professionally for longer, I don't know. But it's not the same anymore; too many times beauty is not the first thing that crosses my mind when I start typing.
The commoditization of code
I have been reflecting on why has this happened, especially as of late. And the issue seems to be that software is being commoditized at a faster rate than ever, in big part due to LLMs. And as part of the commoditization process, software gets stripped of its identity, and becomes swappable.
I've been forced to reckon that people don't have such a poetic view on programming, and lots of them don't mind this commoditization at all. The same way that some people don't care what's hanging on their wall as long as it's nice to look at, they don't mind anymore what their computer is running as long as it produces what they want.
I have a poetic view of code. I care about the painting, and about the author, and about the process that produced it. It's part of my personality, a personality that is dying for other programmers too.
Code is not poignant anymore, and people takes pride in faceless monsters like Go, designed from the ground up to be and read like Java-esque corporate slop.
When I open a code file, I don't want to be able to read it fast. I don't want the intern of the team to be able to modify it effortlessly. I want to laugh, I want to feel awe. Because I'm a human, and the company can go and pound sand; I want to feel, and if we deliver value to the shareholders a week later they can go cry on their yacht.
As more and more code is needed, the tooling has shifted from tools that amplify and augment the programmer (IDEs, autocompletion, better abstractions) towards tools that allow you to cobble something together with tweeds and good wishes (or just plagiarize previous code altogether). Like some libraries and frameworks, but especially LLMs as of late.
Code has no face anymore, in the way that projects like suckless, Doom or Emacs leaked the personality of their programmers. It's just a gigantic mass of strings that fit whatever purpose $BIGCORP needs at the moment. It's all a blur, gray plumbing that nobody wants to see.
Writing beautiful code is a way of fighting this commoditization. An act of resistance against the capital taking a form of art and wrangling it into just an instrument of further accumulation of wealth. A way of restoring the face of code, and rebuilding the social ties that code had. When code is beautiful, you don't use "a" fast square root function, you use Greg Walsh's fast square root function.
IKEA furniture
Programming is far from the only field being commoditized. I'm a code artisan, I build "furniture" slowly, line by line, with my hands, but now LLM's make us managers of a damn IKEA factory churning out thousands of tables per minute.
This is an example of a beautiful table, handcrafted by a human that actually cares about their output:
require 'open-uri'
open("https://en.wikipedia.org/wiki/Philosophy") do |f|
f.readlines.grep(/greek/i).count
end
I'm literally open'ing Wikipedia like a damn book. It's just a file. So I use open. Because that's what the internet is, a bunch of files in other peoples computers. Then, I'm reading the lines, looking for "greek" and counting. I'm reading the book and annotating how many Greek philosophers are there.
It's so beautiful I want to cry; it's short, evocative, it's damn artistic.
I love it.
The manager will hate it, the intern will throw a fit because I'm not using some stupid buzzword Tokio-pilled multithreaded framework that they saw in Hacker News, and the lead of the team will ask me to take it down a few notches and write maintainable code.
But it's pretty, and I'm proud of it.
Now the Claudeslop IKEA 4 dollar table:
# give me a ruby snippet that checks how many times the word
# "greek" appears in https://en.wikipedia.org/wiki/Philosophy
require 'net/http'
require 'uri'
url = URI.parse("https://en.wikipedia.org/wiki/Philosophy")
response = Net::HTTP.get(url)
count = response.downcase.scan("greek").length
puts "The word 'greek' appears #{count} times on the page."
This fully rejects the idea and the intent of the author (open the book, read it, annotate how many times we see the word greek) and because a bunch of cogs churning the result:
- URI what? What do we even have computers if they can't handle this for us? Of course you need to parse it, where do you think you are going to
.getyour HTTP from otherwise? - Net? HTTP? Can we go back to the encyclopedia?
- Proceeds to get the encyclopedia page, and downcasing it in a spare sheet of paper. What a waste of trees. Just read the book. The clanker seems to have lots of free time I guess.
scanfor "greek". Sounds cool. Fair, you get 1 point.length? I don't care how tall the results are, can you pleasecountthe occurrences please?
This. Is. Ugly. It's written for a machine, not a person.
This is also the code that 100% is going to end in the production codebase. And we will all die inside a little bit because of it. We will have lost a bit of the childlike wonder that we brought to our job on the first day, only for it to be subdued in favour of the corposlop machine.
The damn capital, it's always the damn capital
It's no accident we ended up like this. I do believe in people, and I'm a firm believer that, if left to their own devices, they will end up doing the correct thing.
The only reason the second code is more common that the first one, is because it's optimized for one thing: produce value as fast and cheap and possible. Optimizing for human happiness in the code of some stupid SaaS online search addon is not going to make the line go up.
It's just yet another example of capitalism corroding the outputs of some poor human in the benefit of a company. Some lonely soul being forced to churn option B because they have a lot of TODO's and they need to produce X features or they will be fired and won't be able to pay the rent. Because the truth is that the pretty table takes longer to produce, and holds your glasses all the same as the shitty IKEA one.
If we didn't need to pay the rent, people would write the beautiful table code. They would take pride on their code. Because art is just an expression of our humanity, and we are all beautiful inside.
Fighting it all
I’m an artisan. I'm a hacker. And I don’t care about IKEA, because building nice tables makes me happy.
It’s my life, it’s my art. And people will yell about how I can be replaced by ClaudeSlop Ghostv42.6. But that's because they are stuck learning pop, and they still can't jazz.
And in any case, they are missing the point. I don't program to get things to beep boop in my machine. I program because I like to create, and the point is the work itself.
And I will keep creating, and I will keep making my code pretty, slowly, line by line. And I will die painting beautiful scenes that I will be proud to hang in my corridor.