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.



Comments (17)

  1. Page says:

    That’s deep.

  2. Richard Acton says:

    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.

  3. At last, a great prose to break the monotony of blog style of writing at this site.

  4. Frank says:

    Time for Reflector?

  5. 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.

  6. Tim Scarfe says:

    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.

  7. 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 …

  8. DarthPedro says:

    I know exactly what you mean. After enough familiarity, it’s as if you become one with the code. Kind of eery…

  9. We need more stories like this one. The truth is programming is an abstract 3 dimensional art. And so much…

  10. theb0x says:

    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.

  11. Matt says:

    If you fail to see programming as an art, you fail to see programming.

  12. Meri says:


    Depends what level of money you’re talking about. People who see programming as an art usually make much much better designers. And yes, they are more likely to get hired for designing than for just being a code monkey … but hell, it’s probably what they’re best at and they’ll get paid more.

    That kind of approach helps immensely when you’re trying to get onboard with new projects, just as much as if you’re adapting someone else’s source code. Beautifully said, Matt.

  13. Anna says:

    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