Coding School: Week 4

The easy way or the Karate Kid way…

In the Karate Kid Danielle spends weeks painting fences and waxing cars, believing he is wasting his time rather than learning how to fight. Only afterwards Mr. Miagi demonstrates that during all those hours of doing simple and repetitive actions Daniel had ingrained the fundamentals of Karate (Does that violate child labor laws? Meah…)

For weeks I have been learning how to manipulate the DOM using only Javascript, without the help of underscore and jQuery, as demonstrated by my simple Painter Project. I even wrote some of the underscore and jQuery functions in Javascript.

Reload the page for a new random color pallet

That’s nice but it took more lines of code than I would have liked and way too many iterations. Well, this week I finally stopped waxing those cars and started doing some f*@~ing ka-ra-te…

Now with the full power of jQuery I made this calculator using about 70 lines of code. Now we are talking.


It would have probably shaved at least 1 week from this class if we started to learn underscore and jQuery from the beginning, but in the long term that would have limited our understanding of how those libraries actually worked. Learning the fancy stuff first just makes it harder on you when it breaks and you don’t understand enough of the underpinning code to fix it. Now, back to working on my crane kick…