I write code in my spare time for the fun of it, so most of these projects are incomplete. Check out the source code, though; I have put a lot of time into these babies over the years.
Lately I have been working through Mazes for Programmers, by Jamis Buck. The book is written in Ruby, but I have been reimplementing the algorithms in Clojure. In Ruby, you get to implement the algorithms more or less the same way you might do them in C++, but Clojure requires a very different style. This has been a pleasant challenge.
A life counter for the Yomi card game. Try it out at yomicounter.com: choose two characters, hit “Start Game”, then hit a few of the damage buttons and see what happens. Tap a life bar to change the target. The timing behind the combo damage accumulation and application is all done with core.async, Clojure’s equivalent of Go’s channel abstraction.
I wrote this because I didn’t like adding up damage mentally and tracking it on paper while playing the game. A great example of solving real-life problems with programming.
Raise Your Game
Although this project is intended to become a Youtube annotation site, I got deeply sidetracked into Clojure database and testing code. Check out the server-side code and its tests for a good example of hand-rolled Clojure account management.
If I had to do it over again, to be honest, I would just use Rails with some plugins. The client side was going to be the really interesting part of this project! However, I will say that there is something really satisfying about slowly building up a framework of well-tested code.
At Paperless Post, at one point, we needed to populate the
attribute for thousands of paper graphics. We could not simply compare the width
and height of the graphics, because transparent and nearly-transparent pixels
greatly complicated the issue. Ultimately, we realized that a human would need
to evaluate each image.
To evaluate each image at a glance, instead of laboriously clicking through our
internal CMS, I created
Wrongtangular!, a ClojureScript application which would
display image after image to its user. With fingers on the home row, the user
hits any right-side key to approve the image, and any left-side key to reject
it. Kind of like Tinder, but for whether graphics are rectangular.
Later, I realized that it might be useful to have such an application for any
arbitrary dataset and any boolean attribute. Hence
Wrongtangulizer, a gem
meant to be used in the Paperless Post Rails REPL to generate instances of
A simple port of most of underscore.js 1.3. This was extremely handy back when ActionScript was relevant, and I am still proud of a few of the hacks I used to get the concepts working in AS3’s less flexible runtime.
Everything Else on Github
There are a lot of barely-started projects, sample code, and so on, but none of it is really worth reading.