Zen and C++
»From the learning and programming part of the brain.
A programmer walks into a C++ Kung Fu Studio and has the following conversation with the resident master1.
Programmer: I want to learn C++. I’m willing to spend time and money learning. How long will it take me to master C++?
Master: It will take you 10 years to master C++.
Programmer: But master, I cannot wait that long. I will do anything you tell me to do. I’ll even work for you for free.
Master: Hmm, well in that case, it will likely take you 30 years.
Student: Master, first you said 10 years, then you said 30 years. I will work far more intensively than anyone else. How long would it take me?
Master: Well in that case you will have to remain with me for 50 years. Someone in such a hurry as you are to get results seldom learns quickly.
I don’t know about you, but whenever I need to learn a new language, there’s such a strong temptation to buy a dozen “Teach yourself XYZ in 24 hours” or “Learn ABC in 30 Day” books.
Overcome it.
As Norvig writes in ”Teach Yourself Programming in Ten Years,” it takes a lot more to be successful at programming. Some ingredients I can relate to:
- Do it because it’s fun. Seriously, if you’re going to have to put in 10 years, you really need to find programming fun.
- Talk to other programmers.
- Write code often. More importantly, improve code often.
- You don’t have to be the best programmer on all projects. It’s ok to be the worst, provided you learn what the best ones do… and what they don’t do.
- Maintain software. By doing so, you will inevitable curse, spite, and learn how to design your programs to make it easier for those who will maintain it after you.
- Learn different programming languages. Different paradigms (OOP, functional, parallel, declarative) allow you to think differently.
- Participate, but be careful, in a language standardization efforts. Don’t shave the yak.
1 老子/孔子, 请原谅我.