The subjective experience of coding in different programming languages
17.22, Tuesday 5 Dec 2023 Link to this post
Different programming languages feel viscerally different, right? I can’t be the only one. It’s so embodied.
When I’m deep in multiple nested parentheses in a C-like language, even Python, I feel precarious, like I’m walking a high wire or balancing things in my hands and picking my way down steep stairs. It’s a relief to close the braces.
Like if I’m trying to cover all the conditions in a complicated state machine or a conditional, I’m high up. I often hold my breath.
Functional languages are the opposite.
I haven’t done much Haskell but what I did felt like crawling underground through caves and tunnels. Writing a text adventure game engine felt similar. Like I was making a map in the dark, kinda, and having to hold it in my head.
When I’ve written firmware, counting ops in the interrupt, it was precision work while being squeezed. To be typed with first fingers only, deliberately.
When I’m ssh’d into a device on my shelf and I’m writing code actually on the board, my sense of self is teleported over there and also I’m really really small. Opening a terminal window to a distant server is like reaching through a hatch with my arm, but a long way; ssh tunnel is well named.
Writing code with GitHub Copilot and Typescript in full flight feels like, well, flying, or at least great bounding leaps like being on the Moon. Coming back to typeless Python after writing Typescript is like stumbling drunk. It makes me feel unreliable but also hilariously giddy.
I feel tense and unsteady if I venture too far over my skis from a git commit.
Is code synesthesia a thing? If so mine is visceral, kinaesthetic.
Look, this isn’t the strongest synesthesia in the world. Oliver Sacks wouldn’t have written a book about it. It’s faint. But it’s present, that connections between code and embodiment. And at least some forms of it are common, right?
When I’ve been underwater in code all day it takes time to return to the surface. But also, halfway in a function even briefly, it takes a while to get my head up if anyone asks me a question. It’s confusing if it’s too abrupt. The bends.
And that experience I know is shared! The annoyance at sudden context switching I mean. You need a minute to move your mental stack somewhere safe.
But the overall synesthesia? I have no idea. I assume that most people have some form of it? As unfounded as that is.
Does it help?
I mean, I doubt it helps. The best physicist I knew during undergrad told me he saw equations in colour. He was brilliant. I feel claustrophobic in a while loop if I haven’t typed a break yet. But I’m a midwit engineer. So from my n=2 study there’s no correlation.
Then again: when I’m interviewing a founder or reviewing a pitch deck or otherwise working to understand how a startup works, the system hangs together like a clockwork or a loop of flows, and I feel like my ability to zero in on the critical part or recognise missing connections comes from a visceral sensation of the cogs clashing or the circuit not closing or the engine cycle not turning. I rely on that sense of rightness. And that systems understanding sense is a very embodied sense for me, in proxemics terms it sits in my “intimate” perimeter, right up close with my eyes and hands, and I don’t think I could do that kind of work without it.
Maybe really great engineers have a totally different way of seeing code, in the same way that great chess players feel patterns and potential fields on the board?
Maybe the design of my code editor should learn from great engineers and amplify whatever synesthetic intuitions they might have: inner loops should appear crisper on the screen; editing compound conditionals should wobble just enough to make you seasick.
Are there any studies of the subjective experience of programming?
I’d love to read some.