Sponsored By Kids In Touch

Learning "Eloquent JavaScript"

I've been "developing" in JavaScript for nearly 10 years. To be honest, I've mainly been using libraries and frameworks like jQuery, prototype(gasp!), mooTools, Ext JS, and AngularJS.

There's been a lot of criticism of frameworks recently. Some feel that frameworks are simply too costly in terms of performance. However, I've felt that frameworks are a great way for novice and experienced developers to actually accomplish something in a reasonable amount of time. Sometimes, performance isn't the only thing that matters.

At the same time, frameworks / libraries certainly can become a crutch to a developer. In the last few months, I've really come to realize that my basic understanding of the language is lacking.

I finally started doing something about my skills gap. I'm reading through Marijn Haverbeke's Eloquent JavaScript course via the Watch and Code course from Gordon Zhu.

Gordon has packaged the content of the book into a step by step guide. He's added code explanations and a commenting system to make it more of a course than just a book. With Gordon's system, I'm more engaged and likely to work the examples than if I were just reading a book.

As I've just started, I'm not very far into it yet. I'm trying to devote 30 minutes to an hour on just learning each day. While working on today's sample, the assignment was to generate a chessboard from hashes (#) and spaces. The end result should look like:

 # # # #
# # # # 
 # # # #
# # # # 
 # # # #
# # # # 
 # # # #
# # # # 

Doing this sample really shows how difficult teaching a programming lanuage can be. There are literally limitless ways to approach this problem. The solutions from Marijn and Gordon focus on the for loop. Of course these solutions work, but I find them too complicated LOOKING.

I've found that I completely prefer using while over for. For me, it's more understandable and readable. I
think a beginner would be a bit scared off by a bunch of for loop constructs interspersed with %.

Here's my solution:

Again the beauty (and the curse) of programming in any language is the limitless possibilities for solving problems. If you are like me and need to harden your core JavaScript skills you can't go wrong with the teachings from Marijn and the great learning tools from Gordon.

FYI: If you are interested in learning AngularJS and Firebase, Gordon has an excellent course that will get you up to speed in no time.