Friday, August 20, 2010

Mountain climbing as analogy to programming.

I just had vacation and I do not know why, but suddenly I got to think that walking/climbing a mountain (as that is one of my favorite things to do at vacation) could be used as an analogy for programming and learning programming.

As a starting point we have a geek that have no physical ability to talk about (because geeks seldom do sports or go outside the house).

Start with easy tracks

To be able to climb a mountain you need to be fit. If you start with a very steep path without being fit, you will get exhausted or fall down and die.

Also keep the distance short so you do not overuse your muscles. you may want to take a hike to morrow as well and with aching limbs it will not be that easy or fun.

That is to programming: start learning an easy programming language, do a little bit of learning every day, and eventually you will get it. Doing to much makes your brain tired and you may be so bored with the stuff that you may quit and do something else.

Increase the difficulty gradually

Having started the tracking experience, it may be boring to do the same path every time and after a while your fitness will tend to stagnate and adapt to what you are doing. That is, walk longer paths, and also more steep paths, the body tends to adapt to be able to handle the demands, but not more than necessary. We need to increase the work load to be able to handle more and more.When we are fitter, we can handle more difficult paths. However, even if it is good to challenge yourself a bit, do not overdo it (you may fall down and die). When you climb the mountain higher you will get a more panoramic view, it is beautiful and you can also start to see the path you took, and maybe also see different paths you can take to get to the same place.

That is to programming: Do not just learn the basics, they are good to have but can not help you in the long run, specially not if you want to have it as a profession. do the basics, repeat them, but when you feel comfortable with them, increase the amount of code you write, and also the difficulty of the code: that is, start doing design work, object oriented programming etc. Knowing the basics may help you write simple routines, but climbing higher will give you a better view of the surroundings and starting to put things together or how to do different designs to get to the same result.

Walk different mountains

No we may not have made it to the top of the first one yet, but does that really matter? Not really, the last part of getting to the top of a mountain may be easy, but it is usually not. Take Matterhorn, or Mount Everest for example. A lot of people climb them, but not all of them go for the top. you can go to the mountain and go as far as you have the time to do, or as high as you have the strength to do. this does not mean that you do not have a meaningful experience or doing a bad work. You doing as much as you can do or are willing to do, and even if its it not to the top, you may reach much higher than most people will do in their lifetime.

If you think that you did a mountain as good as you can or that you did it long enough to get bored. Try another one, it will give you another view, different tracks. It may have paths that is easier then the first mountain, but also paths that is harder. Maybe it will get you higher quicker and let you see more, maybe the paths are harder but the view is more rewarding than the first one.

That is to programming: Learn different programming languages, the first one you learn may not be a very good one to use professionally, but it may be a good language for learning basic programming. The new language may give you more opportunities to solve things quicker than the first one you learned. It may also be harder to do stuff in it, but when they are done, it may be better, quicker to do what you want it to do. for example Java may be easier to learn and use than C++ but performance wise, some C++ programs do better. On the other hand Java is more platform independent than C++, so it may be a better option for some companies. 
Different language can solve things easier than in other languages, or have better performance. the choice of language depends of the application you want to make. Learn more than one to widen your options and you will be better at your work.

So when do I get to the top?

Ok, lets be realistic. You may never get to the top. It depends on the mountain you decide to climb. Take Mount everest for example, it is the highest mountain we have, only a few made it to the top, and even fewer without injuries.

Take most mountains that is not a walk in the park, you may never reach the top, but you can get far enough to be satisfied with the experience and the rewards it give.

For programmers: not all programmers learn absolutely everything about one single programming language. they leave the top part for experts, that are fit to do the advanced stuff. 

Anyway programming is not really about doing the most advanced stuff or the most dangerous stuff. It is about doing stuff that other can follow. someone is coming after you and may have to maintain stuff you did. If it is to difficult they may not be able to go all the way, or understand how the heck you were able to get up to that cliff. programming is about leading the way for other to follow, you take a path that is fairly easy, sometimes not so easy but still manageable, you draw a map so that other can take the same path and continue from there.

So what are you waiting for, go out and climb a new mountain today!