I'll happily sit in front of a computer for hours trying to describe the best algorithm for solving some tedious problem in an esoteric syntax that barely resembles human language, and it only resembles normal language because it uses a smattering of English words. Why is that? What is it about programming that makes it so enjoyable, and dare I say, fun? Here are the best reasons I can think of, and they make up what I consider to be the essence of programming.
Creative Problem Solving
Every programming problem is a new challenge to wrap your head around and solve. Even if it's something you've done before, there will be parts of it that create new issues for you to deal with. You'll be implementing something in a new context, or you'll have to scale it up for massive throughput or millions of users or incredibly low power. Those issues require creativity to overcome.
Any programming you do is inherently new, at least to you, because otherwise you would be using software that you already built. In many cases the problem you're trying to solve is new to a lot more people than you. Otherwise, someone would have already solved it, and you would be using their software instead of writing your own. As you're solving these new problems, you're also learning. You're learning about the problem domain. You're learning about the requirements and constraints. You're learning how best to solve the problem at hand.
This whole process involves so much creativity. Design rules and coding guidelines are all well and good, but they will never be enough to address every situation or produce solutions for any of the more interesting problems. Programming is first and foremost a creative process, and the more knowledge you have, the more associations you can make to come up with novel solutions to these hard problems.
Expression of Ideas
It's not enough for a solution to be creative if it's incomprehensible. It took me a while to understand this, but good programming is as much about good writing as it is about creative problem solving. I used to think that if the code was well formatted and did what it was supposed to, that was enough, but programming is so much deeper than that.
There is an elegance to good code that goes beyond merely telling the computer how to do something. If that was all there was to it, we would still be writing in machine language. No, well-written code clearly expresses the ideas and intent of the solution so that it can be immediately understandable to other programmers, including your future self. When it's done well, it exists at a much higher level than a list of executable instructions.
Expressing ideas well in code is incredibly hard. It's as hard as it is to clearly express ideas in writing, and both take a lifetime to master. If you continue to work at it, it's possible to improve at this aspect of programming for your entire life.
Empathy for Others
If the software you're making will be used by other people, empathy is a necessary ingredient for a successful product. If you can put yourself in your customer's place and really feel the pain and frustration she has for the way things are, then you are much more well equipped to help make her life better.
Software interfaces can be terribly complex or refreshingly simple. They can be maddeningly inconsistent or pleasantly well-thought out. The better you are at imagining your target audience, the knowledge they already have before using your software, and the needs and desires they have to get stuff done, the better you will be able to design software that they will love.
Making something that people appreciate and depend on is incredibly satisfying. To do that, you need to know their motivations, and for that, you need empathy.
Analytical Thinking
Another fundamental part of programming is thinking about problems analytically. Going off of your creative instincts is not good enough. Creativity can generate the ideas you need to find your goal, but cold, hard analysis will be the compass that keeps you pointed in the right direction and the marker that lets you know when you get there.
Knowing what's important to pay attention to, being able to take good measurements, and interpreting results correctly are all critically important to developing performant software. Analytical thinking is all about developing good judgement and applying it when and where it matters most. It's a skill that can mean the difference between wasting weeks or months messing around with irrelevant optimizations and quickly ascertaining the bottlenecks in your software and eliminating them.
Elimination of Tedium
If there's anything that software does well, it's automating away tedious tasks. Think about the software that you need the most, the programs that you use every day. Imagine what you would have to do by hand to reproduce what they do for you, and you can appreciate the sheer amount of error-prone tedium that software has eliminated from your life.
Having an intense desire to remove other tedious tasks from your life gives you a great ability to imagine new software to do just that. You can even use programming to eliminate tedious programming tasks, and in fact, a lot of software is created by programmers for programmers to streamline programming as much as possible. And programming can go well beyond that, removing all kinds of tedium from your life when you have the motivation to create the software to do it.
Any of these things - creative problem solving, the expression of ideas, empathy, analytical thinking, and automation - apply to any number of human endeavors, but taken together, they are the essence of programming. They also encompass the reasons why I love programming. Where else could I engage in something so practical, rational, and creative all at the same time? I can't imagine anything else I'd rather be doing right now.
No comments:
Post a Comment