Two koans and an Euler walk into a (foo) bar…

Javascript Koans CompleteIn order to suck less at Javascript, I went searching for some more practice problems in the same vein as the js-assessment project I completed a couple months ago.  Luckily, there is no shortage of instructional material on Javascript these days, and two enterprising individuals have taken it upon themselves to construct sets of Javascript koans.

The koan projects are set up as a series of failing unit tests – much like the js-assessment project.  The object of the activity is to open the test file, then fill in the blanks so all the tests pass.   I couldn’t decide which set of koans would be most beneficial, so I did both.  Practice makes perfect, right?

Javascript Koans Complete 2I tackled the set from mrdavidlaing first.  There are fewer test files, and it seemed to me at the time that the concepts were a bit more advanced.  I was right. The koans got right into fun ideas such as protypal inheritance, functional scope, and advanced array functions like map and reduce.  The inspiration for these koans are from Douglas Crockford‘s, Javscript: The Good Parts.  These koans are a nice set of exercises to complete if you are  coming to javascript from another programming language, or are a beginning javascript developer, but already know the basic programming concepts.

The koans by liammclennan were more numerous, but covered roughly the same topics as the other set, plus a few more of the basics.  This is definitely the way to go to brush up on javascript, or try out javascript as a beginner.  I didn’t get as tripped up with these exercises as I did with Mr. Laing’s, but perhaps it was because I did them second that I felt they were easier.  Either way, they were nice exercises and very worthwhile.

Finally, I really decided to test my mettle by signing into Project Euler and make an attempt at the first few problems in the ever-expanding set.  I’d heard a lot about this site, but never really looked into it until now. I thought it would be a nice, fun set of exercises intended to help beginners learn about programming concepts.


Project Euler SolutionsProject Euler is for computer science and math geeks bent on stretching their brains to the limit.  The difficulty curve here is very nearly a vertical line placed millimeters from your nose.  Problem 1 is basically a fizzbuzz variant, and a warmup (tease, perhaps).  After that, you will be humbled.  What I thought would be a nice afternoon activity turned into a two week affair.  Basic concepts like looping and conditional statements just won’t cut it – unless you feel like waiting several hours for an answer to compute.  I had to turn to Google to learn more than I ever wanted to know about the Seive of Erastosthenes and Pathagorean triples.  But even if I didn’t figure out they mathy parts myself, I still managed to craft unique (to me) solutions in javascript based on the pseudocode or general algorithms discovered by others.  After reaching problem 10, though, I’m done. For now.

My GitHub Repos:

Fork of mrdavidliang’s koans

Fork of leammclennan’s koans

Project Euler answers (executed via Jasmine)


  1. Hi Eric,

    Glad you enjoyed the koans. I agree that they are easy. When I wrote them I had a specific goal that each koan should be easy and that people should not get stuck.

  2. You did a great job creating them. Much appreciated!

Leave a Reply

Your email address will not be published.


© 2018 Eric Terpstra

Theme by Anders NorénUp ↑