Wakatta!

Like Eureka!, only cooler

Psychic Modeling

In the Algorithm Design Manual, Stephen Skiena entertains, edifies and educates his readers with so called “War Stories”, that is, interesting implementation challenges from his own experience.

The first War Story is Psychic Modeling, an attempt to exploit “precognition” to improve the chances of winning the lottery.

Concrete Mathematics Chapter 1 Exam Problems

It took me longer than I thought, and the outcome is slightly disappointing: I failed to solve two of the problems, and I solved the remaining ones way too slowly, so in a real exam conditions I probably would have solved just one or two…

Seven Databases in Seven Weeks CouchDB Day 2

Day 2 is about Views in CouchDB, which serve as an introduction to the more general MapReduce support.

It is another fairly short day, as much of this section is actually about the complexities of XML parsing…

Seven Databases in Seven Weeks Redis Day 2

Performance tuning with Redis can be achieved in different ways, as we see today. First there are basic changes in the client side (such as pipelines), then configurations options (frequency of saves, …), and finally distribution of load.

Seven Databases in Seven Weeks Redis Day 1

After a long winter hiatus, the elves at Pragmatic Bookshelf delivered a late but welcome present: the third beta of Seven Databases in Seven Weeks. The book is not complete yet (the chapter on CouchDB is still missing), but it now covers Redis.

Redis is basically a key-value store, like Riak, but while Riak is agnostic about the values, Redis values can be data structures (lists, queues, dictonaries, …, or even messaging queues). This allows Redis to act as a synchronized shared memory for cooperating applications.

Concrete Mathematics Repertoire Method

The repertoire method is never really explained in the book, or anywhere else I could find on the Internet. There are a couple of posts on this subject, so I though I should add mine.

The repertoire method is really a tool to help with the intuitive step of figuring out a closed formula for a recurrence equation. It does so by breaking the original problem into smaller parts, with the hope they might be easier to solve.

ANTLR3 Maven Plugin - Eclipse Setup

Setting up Eclipse and Maven is getting easier, but some cases require a bit more search and work. As I was experimenting with the ANTLR Maven plugin, I found the default behaviour to be pretty much useless: Eclipse knew nothing about the grammar files or the generated classes, so the rest would not compile; even after adding the relevant source folders I still had to run explicit Maven commands after modifying the grammar files and refresh the workspace…

I eventually found a better way, which I document here.