What are you doing in front of the computer all day?
Posted on 27.07.2010 02:15 am
I found out recently that I have quite a few non programming readers and I've wanted to do a "What is programming?" post for a while now. I also found out that writing about programming without using programming as an example is tricky but I hope this helps.
Lets start with my favorite quote. It's from the book "Dirk Gently's Holistic Detective Agency" by Douglas Adams.
If you really want to understand something, the best way is to try and explain it to someone else.
That forces you to sort it out in your mind.
And the more slow and dim-witted your pupil, the more you have to break things down into more and more simple ideas.
And that's really the essence of programming. By the time you've sorted out a complicated idea into little steps that even a stupid machine can deal with, you've learned something about it yourself.
I love this quote, since it not only explains programming in a simple way, but it does so in a much better manner than I could ever do. It also sheds a light on how you can learn more about any subject.
Another great quote is by Ernest Rutherford.
An alleged scientific discovery has no merit unless it can be explained to a barmaid.
So this is for all you barmaids out there.
What do you do every morning? If I asked you that, a common answer might be that you wake up, take a shower, brush your teeth, eat breakfast and get dressed.
These are all concepts that we understand, because at some point in life, we were taught these things. So someone defined for us what taking a shower was, and since then, we know what taking a shower is.
But programming lies within that definition. You don't go into a shower consciously thinking about every step. You probably did at first or when you changed the definition of a shower to include or exclude some steps, but otherwise you go about your business of showering with little thought.
So what is within this definition? We could say that a standard showering definition is to get reasonably wet, apply soap to body until clean and then rinse the soap off... and perhaps repeat but that is a joke for later.
Three steps that we understand just as well as the original shower definition. So lets look at the first step in taking a shower. Getting wet.
Are there any steps in getting wet in a shower? Well yes. First you might have to remove any article of clothing that you might be wearing, since you don't want to make them wet as well. Then you have to enter the shower and turn the faucet to some level that is not too hot or cold, and then let the water cover your body.
You might be thinking. "Isn't this getting a little too specific?" and you'd be right. But for programming, you can never be too specific. Because if you had to program these steps for some sort of a showering robot, then you would have to specify every single step of taking a shower to the smallest detail, or else the robot will not perform correctly. This is going back to the stupid machine quote.
When creating programs you can not take anything for granted. In some programing languages you might have access to a set of tools that make your life easier and solving the task simpler but those tools only exist because someone methodically defined them for your benefit, and it is very likely that he also used some other tools that someone created to make his life easier.
We can keep going like this until we hit the core of the system. But programmers rarely work at such a low level since it can be very time consuming. They work with simpler tools that have been abstracted in such a way that they only have to focus on their current task.
So when building your showering robot. Someone else might have created some method of removing a single article of clothing and it is your task to program in when the robot should do this, in what order and you might call this functionality "Remove Clothes" for someone else to use to simplify the removal of clothing.
You might say that the core of programming is to solve problems. But the way that we do that is by creating systems and tools that aid us in solving those problems and hopefully help others in solving theirs.
Oh and if you're wondering about the project I talked about in the last post, you can ask Tom Cargill and Jon Bentley why I haven't talked about it yet.
0 4 Like it or hate it? - Comment (0)
Process time: 0.008485 seconds