10. April 2015

PHP’s traits vs. ruby’s modules: Battle of the mix-ins

A mixin is a class-like language construct meant to add functionality to another class. They are not meant to stand on their own, and generally speaking they cannot. Mixins can be used to give different classes the same interface. Mixins can be compared to multiple inheritence in what they let you accomplish, but they don’t work the same way. Rather than inheriting from multiple classes, you mix them in. (Hence the obvious name.)

more

14. February 2015

Android Game Development

Wanting to expand my horizons a little, I decided to give android game development a try. I quickly prototyped a game in canvas + js called protect your thing to give myself an idea of how it would work on the android platform. This was a natural prototyping choice for me because I’ve been working with JS code daily for at least a decade now, and I love playing with canvas. (I frequently will whip up a little graphic in canvas reminiscent of my early QBasic coding days, but flavoured by the years of studying mathematics that followed).

more

14. February 2015

A Whitespace + Punctuation Tokenizer

In my previous post, I discussed some tokenization techniques and mentioned that a whitespace-only tokenizer will make tokens that are sub-optimal for indexing. I also mentioned that a simple solution to this is created a whitespace + punctuation tokenizer.

more