I don’t think that the general public really understands what programmers do. (Although to be fair, I doubt the general public knows what any particular worker really does on a day-to-day basis.) From talking to non-coders, it seems that people think that coders spend all day writing in cryptic languages and doing extremely complicated high-level math. It is as if by figuring out the next digit of Pi, that they can suddenly invent the next Facebook. Let me assure you, coding is not like that.
First of all, during my day-to-day as a coder I do virtually no math like the stuff you learned in High School. (This isn’t true for all programers but it is common for web developers) Many of the modern day programming languages (i.e. PHP) are so far abstracted from the ‘computing part’ of computers that it is very easy to go a whole day without thinking about a traditional math equation. (That’s what standardized code libraries are for ;-p)
So then What Goes on in My Head While I Am Coding?
Coding is a lot like putting together a jig-saw puzzle. Imagine you want to create a jig-saw puzzle with a photo of the Empire State Building. You have your vision for what you want to create and know you just need to craft all of the pieces to get there. Some will need to be square shaped and you know a lot of them will need to be grey. With that knowledge you start coding up Classes and Methods in languages that computers understand so that they can reproduce the smaller pieces of the bigger picture you see.
The problem is that describing these pieces is very difficult. That one sort of looks like the outline of California and that other one kind of looks like a Cheerio. The difficulty arises when you start to put these pieces together. Clearly, you can’t put the California shaped one inside the Cheerio shaped one, it won’t fit. So you go write another piece to connect the two. As you can imagine, this process gets ugly very quickly. You end up with a lot of oddly shaped pieces that don’t really contribute to the bigger picture in your head.
As such, you go back and see if you can standardize some of the pieces. Maybe, instead of a Cheerio shaped piece, you will just make a bunch of circles. This is simple enough and will likely solve a lot of problems going forward. Perfect, you have now created some reusable code. Other programmers give you 5 nerd points because they now can understand some of your code. (Circles are universal.)
You then continue building your masterpiece but eventually realize you are going to need to add a really complicated element. In our example, this might be the clouds that surrond the skyscraper. You know that these are really complex and would rather just use someone else’s code. In the eyes of the programmer this would be the same idea as coding the concept of a truly random number. (Random numbers are hard to produce on computers because computers are logic based machines and the concept of something truly random is difficult to compute logically.)
Luckily, programmers share a lot of work! Much more than any other industry I have ever seen. (This is part of the idea behind Open Source). You go on Google and find that someone has open-sourced a Library of code that produces clouds. Perfect, You can now create all of the clouds you want, super easy!
Then you notice a problem. The cloud Library you found creates puzzle pieces that look like triangles. Triangles are not going to work very well with your circles. (These type of inconsistencies are the reason you see coders swear under their breath so often.) As such, you create some more standardized pieces that are just the perfect shape for connecting circles to triangles. This skews your bigger picture a little but gets you closer to your end goal.
This is the game that goes on inside my head while I am sitting with my laptop writing code. Every day I make progress toward my final goal but at the same time I run into obstacles that I didn’t see coming.
Enter The Real World
Now imagine that you get mostly done with your massively complex puzzle and you realize that instead of the Empire State Building, you would prefer your puzzle to be of the new One World Trade Center. (Your business partner and you realize your project will be more popular that way).
Okay, well you have the puzzle pieces to craft an image of the Empire State Building, it can’t be too hard to switch to different skyscraper. This happens all the time in the real world as project requirements change often.
This is the test of the real quality of your code. If you really did write code in a way that was modular and standardized, it won’t be that hard of a conversion. Unfortunately your code was sloppy (your pieces were shaped weirdly) and you know have to rewrite a significant part of your codebase.
You go through this same process with each project you build and over time you learn to write extremely elegant, reusable and maintainable code. Hooray! You now think you are a master.
Unfortunately, this illusion vanishes one day when you start peel away the levels of abstraction and start to understand how the lower levels of computers work. At that point, you unveil the lower level programming languages. (These are the ones that require a lot of traditional mathematics) This is when you realize that the puzzle you have been crafting all of this time is not actually like a two dimensional jig-saw puzzle, it is more like a three dimensional jig-saw puzzle. Mind blown.
This unbelievable complexity is the reason why some of the smartest people on the planet dedicate their entire lives to writing code. It is a puzzle with unparalleled complexity but also offers nearly limitless rewards for those who can solve parts of it.
So now if you see me sitting somewhere in the world in a cafe or co-working space with a curled brow and I am cussing under my breath, you now know what is going through my head. It isn’t green letters flowing down a screen or mental chalkboards filled with complex equations, instead it is me trying to build puzzle pieces in a way that will eventually produce my bigger vision. It is extremely frustrating and complex but like others have noted, I get to wake late, leave early and can work from most of the places on my bucket list. Put all of those elements together and you know know what it feels like to be a coder.
For those interested, I still pay my bills by doing SEO consulting. I have been doing this for a relatively long time so I am now becoming more interested in web development. While traveling, I have been teaching myself Ruby on Rails. That is the framework my startup website is built on. Five years from now, I hope to be a triple threat of a thought-provoking and truthful writer, a clever marketer and an elegant programmer. I don’t know how long it will actually take me but I am enjoying the journey thus far.