Archive for October, 2009

Kanjilish is making my brain explode slightly less

In love with Kanjilish atm, a Firefox extension that transliterates what it can from English into an appropriate Kanji form. hrm, if only it could translate Romajji instead it would be the perfect tool for mastering the Onyomi vs Kunyomi readings as well. Still – this is GOOOOOD. げんき! げんき!

Writing a simple Cassandra CRUD class in PHP with ThriftInterface

NOSQL – so hot right now. As part of my own learning curve, I’m building a simple abstract and schema-less Factory Patterned CRUD class for Cassandra, and shoe-horning it in with Apache Thrift.  There’s a very thorough blog by Evan Weaver to help dealing with the RDBMS to Cassandra conceptual jump. If you haven’t dealt with Cassandra before, it may be a good place to start. For a very decent cluster setup example, check here, and for Thrift just grab the source and follow the instructions I guess, but if you’re using debian/ubuntu I’ve written a quick install guide.

Dubbed Pandra, it will be maintained via github. Requires PHP 5.2, Cassandra 0.4, and latest Thrift Interface.

Cloud may be billed like a utility but consultants will never be free

You need to a flashplayer enabled browser to view this YouTube video

for fun, Euler Solution 11 (PHP)

A bit bored so knocked up a solution to this Project Euler problem :

11: What is the greatest product of four numbers on the same straight line in the 20 by 20 grid?
More >

Finding the first and last instance of a date sorted pkey

Came across a bit of a strange problem with an ad-hoc query. Basically I have a log of categorisation actions against a realm dataset for which I needed to find a list of realms in the last month where the last action on a pkey group (realm + userid, realms can multiple userid’s) different from the first action, and the first action was ‘A’. Luckily there’s an indexed ‘logdate’ field, otherwise I would have no idea how to find this data in a single query – so I’m extremely keen for feedback from anyone who could do it with elegance! Ne’er a dirtier subselect has ye seen :D
More >