Programming in the Brain
I’m staring at source code again. This time it’s not mine. I’m not looking for a flaw. I’m not trying to fix something. I’m just trying to understand; hundreds of files, thousands of functions, millions of lines. I stare at them and I read them, not line by line. I skip over those and glance at declarations. I see words stitched together into names with parameters and types. I’m not sure what they mean yet, unfamiliar with the pattern. I don’t really know what the code inside does, but that’s just details. I see the names to know who they are, where they are. I’m building a roadmap in my brain.
Soon the code takes shape to me. It might have been hours or days, but eventually it is there. I can now feel the code, a sensory perception on the periphery of what is real. I know how the code is defined, what its facets look like, where they are placed. I scroll through the files once more, seeing them again, like photographs of old friends. I look into each and see references to others. Look, there’s that same little guy. He’s over here too. I don’t know why, but now I see how. The code becomes three dimensional, linked together in a graph, woven together like a tapestry; function upon function, hierarchical and ordered.
It’s only now that I begin to understand what it is that the code actually does, a portrait forming in my mind, full and complete. I had some idea going in, but that was a base perception, a rough image painted with broad strokes. Now I see the details, the intricacy, the patterns and the truth. I walk through the code and feel it react. I know where it is going and I know where it’s been. I don’t need a machine to tell me this. It happens all inside my head as I sit in the car driving to and from work, as I shower in the morning, as I lay awake at night.
But that's just me.
Matt
Comments
- Anonymous
May 20, 2004
That's deep. - Anonymous
May 20, 2004
neat, thanks. - Anonymous
May 20, 2004
you've just described the weeks that follow after taking on support of another application. You write it up much better than I ever could of course.
Another great read. Cheers Matt. - Anonymous
May 20, 2004
At last, a great prose to break the monotony of blog style of writing at this site. - Anonymous
May 20, 2004
Time for Reflector? - Anonymous
May 20, 2004
I know what you mean. After a while, chunk of code ceases to be a stream of characters on the screen, becomes more of a stream of consciousness - I want to go change a declaration, my mind doesn't go "PgUp to the beginning, find the declaration and change the last word to X" - my mind goes "Change the declaration", and my hands do the work themselves. I don't even have to be looking at the code for that, sometimes. The code is but a persistant dump of the structure in your mind.
Sometimes the problem is trying to translate that little, simple nudge in your mind into actual code that works. Sometimes the code is so big you can only hold part of the structure, paging the rest out. Sometimes you have so many versions of the code, half of which are present and commented out, so that you yourself don't know what you're seeing.
But the important thing is not to think of it as lines of code, but as a construct in your mind. Make the changes in your mind, serialize them into code. - Anonymous
May 20, 2004
That was beautiful.
No amount of documentation will let a non-artist truly appreciate the intricateness of an solution such as a software application. I discovered recently, that I am a bit of an artist, but not in any way I would have known of some years ago.
You're an artist too Matt. I appreciate that. - Anonymous
May 20, 2004
Hi,
In what time-space you are living ? I want to get there, really. To say, write or even thinking about what I'm doing right now, I have to go to toilet or for a long meeting...
Nice thought anyway, thanks for this ... - Anonymous
May 21, 2004
I know exactly what you mean. After enough familiarity, it's as if you become one with the code. Kind of eery... - Anonymous
May 21, 2004
We need more stories like this one. The truth is programming is an abstract 3 dimensional art. And so much... - Anonymous
May 25, 2004
programming isn't an art you monkeys. it's a discipline. people who treat programming as an art are the ones looking for jobs. no employer wants to hire an artist to write software. - Anonymous
May 25, 2004
If you fail to see programming as an art, you fail to see programming. - Anonymous
June 07, 2004
The comment has been removed - Anonymous
July 06, 2004
I'm failing miserably to grasp programming, so I typed in to the internet 'programming and the brain" to see if that would help. I was looking for brain scans to show what part of the brain did it but your prose Matt was much more instructive and I am pleased to hear that a person that is creative and soulful can not only understand programming but understand on a profound level. I probably still wont be able to do it but at least I have a new technique to try
Thanks Matt
Anna