Jan 28 2005

RTFM Anyone?

Published by at 1:26 pm under Programming

This is an old article and the information contained within it may be out of date, not reflect my current views and/or contain broken links. If you feel this article is still valid and requires updating, you can use the contact form to let me know. However, I make no guarantee that it will get updated.

It seems to me that I have come across a few people (if you’re reading this its probably not you I’m talking about) that have learnt a programming language without actually knowing when the language reference manuals are for that language.

The seem to think that all the information that they’ll need can somehow be “absorbed” by reading a Wrox or a SAMS book…. a few have even tried programming after reading one of those damned “… For Dummies” books and that you somehow need to have a PhD to be able to find (let alone read) a reference manual for a programming language.

Personally I think that this mentallity is very dangerous. You end up with loads of people writing code in a very set way simple because “thats the way the book told me to do it!”. People seem to forget that the method in the book is there probably because it is the simplest method to read, explain and understand. This normally results in a method that is over simplified for a real world task, is very inefficient in the real world and uses far more resources than are actually required to get a task done.

Another problem with going with the book only learning approach is that you’re more likely to ask other people for help rather than sit down and work though the problem for yourself. I have seen many posts to forums asking how to perform a simple programming task, if only they had RTFM they would have found an example. I beleive that simply reading the book reduces your ability to logically work through the problem to find the best solution for the situation.

I’m not saying that you should read books to help you learn a programming language. In fact books like SAMS and Wrox are very well written. But they should be used simply to get you started. Once you’ve got going in the language one of the first things you should do is to find the manual…. it really isn’t as scary as you think it might be.

Also, don’t assume that the method in a book is the best method for doing something. It probably isn’t. Learn to be critical of your code! Is it written in the neatest way? Is it readable? Is it using more reasources than it needs to? Can you string functions together rather than declaring variables all over the place? Is the code that you’re writting in the right place? Is your code reusable else where in your program? Is your code reuseable outside of the current program? And finally (esp. if you answered yes to any of the above)….

Is there a better way?

4 responses so far