## In Software Development, Nothing is Real

Posted 2015-07-08 08:42 PM GMT

Photo by: https://www.flickr.com/photos/wadem/

In my book, Learning to Program, I use a lot of metaphors and analogies. I compare runtimes and interpreters to player pianos and piano players (pianists?); I compare arrays to a bunch of cardboard boxes; I compare data structures to the Simpsons. I love analogies, and I use them all the time to better understand the world, but I use them in software more than anything else. I am not alone. On a daily basis, software developers build pipes, trees, graphs, and objects, but none of them are real. In software development, nothing is real.

## Object Oriented, but Without Objects

I don't know that I have ever been as confused as when I first tried to understand Object Oriented Programming (OOP). As a new developer, I understood an "object" to be something real—something that can be held, touched, or at least seen. A keyboard is an object, a mouse is an object, a CRT monitor is an object. But now I was learning that objects in programming are not really objects, but the idea of objects. And a class is a generic version of an imaginary object—the idea of an idea.

Then, as if I wasn't already confused enough, the tutorial I was reading used the example of a Dog class with a bark method and an eat method. See, a dog is a real object, and barking and eating are real things that real dogs really do. So, are these software objects real objects or not? Is object oriented programming just for programming robots? Is this tutorial teaching me to build a robot dog?

Honestly, I don't blame the tutorial for my confusion. Programming concepts can be hard to grasp, especially for those of us clinging to reality.

## It's All in Your Head

Everything we do in programming is in our minds. Everything is an idea; nothing goes beyond the conceptual. Even code is just a codified representation of the idea; bugs are where the idea and code diverge. All of the analogies, the metaphors, the koans, the whiteboard drawings, the notebooks sketches, and rubber ducking are attempts to make the ideas in our heads more concrete and more understandable. So, if you think programming is hard and confusing, just know it's all in your head. And that's exactly why it's so hard.

• programming
• thought