So this friday, as I was thinking if I should learn the Go programming language, or I should comtinue working on my current project first, my good friend Bob give me a challenge: complete the book <Seven Concurrency Models in Seven Weeks>, over the weekend.

That was a interesting challenge. With my confidence in my coding skills & reading speed, and without much thinking, I took the challenge. Further more, in order to show my confidence, I’ve provided a very good offer:

  • If I made it, Bob would treat me a 10SGD worth of meal
  • If I did not make it, I’ll treat Bob a 20SGD worth of a meal
  • I’ll set up a repo for the challenge. The repo is here

It is the night of Sunday now.. and I can say, I didn’t make it – actually, I only read until week two. Partially because the book is actually.. quite hard: at week 1, it’s making use of a variety of classes from Java concurrency library, and I’ll have to look them up in order to understand exactly what is going on; while in week 2 it’s already in another language, Clojure.

I have a good background with functional programming (since I’ve used Prolog & Ocaml before), but I am not really familiar with the syntax of Clojure. Although.. Clojure is actually quite easy to learn, because it seems to be a dialet of Lisp.. but what taking time is the build steps, the standard libraries, etc.

Althought I failed the challenge, I feel this idea of weekend-challenge is a good idea afterall. Several highlights about this challenge:

  • the bet is important. It is a good motivation for one to work harder
  • It helps one to focus on one single thing
  • even if one lost the challenge, the experience gained out of the challenge is far more valuable than the bet lost.

However, thoughout this challenge, there’re several things I can improve… next time:

  • throughly assess the difficulty of the challenge – make sure it is hard, but not impossible. One can do this with a good overall plan of the challenge, before making a bet.
  • put in more efforts. Frankly speaking.. I didn’t put much efforts into this challenge. Over this weekend, I played quite lots of games, cooked nearly all the meals, chatted with friends in various channels - WeChat, Facebook, etc; and also checked the WeChat Friends Moments lots of times. Lots and lots of distractions are here.

Other than the chanllenge itself.. there are some other things I’ve gained out of this challenge

  • Clojure is a nice & beautiful language. So there is one more thing in my reading list now: <Clojure for the Brave and True>. It’s a pretty nice book, and far more easier to read than the <Seven Concurrency Models in Seven Weekss>. I’ve finished the first three chapaters in order to gain a basic understand with Clojure.
  • The idea of reading a book is really nice. If you want to get started with a topic, the fastest way is to pickup an introductory book and start reading (and follow examples along the way). If after reading that book you’re still feeling vague.. then you can read several more. I’ve used this technique to learn about MongoDB, and it works out quite well.
  • Thinking about scalability, Concurrency / Parallel is important. I should complete this book. Functional language is interesting & useful, in two ways:
    • it solves the problem of currency well
    • code is clean & short
    • with no state, the pure functional code is also easier to test

So as a conclusion (if we really need one).. although I’ve failed the weekend challenge, I believe I should really do it more. Actually not limited to weekend, do more with the idea of challenge. (and also write some blog post)