Wednesday, January 23, 2008, 5:00am
Learn To Write Eloquent JavaScript (And To Think Deeper)
I know this post won’t be for everyone, but it’s certainly been helpful to me. Marijn Haverbeke has written an online book called “Eloquent JavaScript” that outlines best practices and good habits for the JavaScript programmer, although most of the advice Marijn relates is easily applied to other programming languages as well. Here’s a snippet:
To some of us, writing computer programs is a fascinating game. A program is a building of thought. It is costless to build, weightless, growing easily under our typing hands. If we get carried away, its size and complexity will grow out of control, confusing even the one who created it. This is the main problem of programming. It is why so much of today’s software tends to crash, fail, screw up.
The book goes on to provide a detailed look at the JavaScript language, complete with simple and complex examples of each point Marijn mentions. I found the content to be very well-written and extremely useful.
I am motivated by books like “Eloquent JavaScript” because they provide me with a reality check of sorts; they make me realize there’s always a more efficient or more logical way of doing things, I just need to figure it out. Sometimes a better solution will take some deeper thought, but if you actually take the time to really investigate it you’ll come out much better than you did going in.
Photo by Andrew Dupont.