Declare War on Everything with Chaser

November 8, 2009 by andrewjgrimm

Chaser is a new lightweight mutation tester. Mutation testing involves messing up code that’s being tested, and seeing if the unit tests notice anything’s wrong.

Fake APEC passes by the Chaser

You need to detect when something's wrong

The name is based on The Chaser, an Australian comedy team. They’re best known internationally for a penetration test gone horribly, horribly right.

The main ruby gem that does mutation testing right now is Heckle. The folks from Seattle.rb have done a lot of work on it, but sometimes you’re simply out of luck. It doesn’t work on certain platforms – Windows, Ruby 1.9 and the like – because it currently relies on ParseTree. One day, I decided that I wanted to be able to do mutation testing on Windows. Like, yesterday. And thus Chaser was born.

Chaser uses plain old metaprogramming. If you’ve got ruby, and you’ve got test/unit, then you satisfy the requirements for chaser. So far, I’ve played with it on Windows, 1.9 and JRuby.

Bug reports, feedback, new features, and fake beards are welcome.

The royalty-free road to knowledge

February 7, 2009 by andrewjgrimm

If you start on a random Wikipedia article, and click on the first link within the article, and continue the process until you reach a loop, you end up at Philosophy or a similar article.

The composition of Wikipedia ... or is it? (CC-SA)

The composition of Wikipedia ... or is it? (CC-SA)

Considering that Wikipedia has been criticized as having too many articles on trivial topics, it’s surprising. It’s also freaky – how does Wikipedia know that Philosophy is the “ultimate” thing?

Nonplus describes one possibility, saying “It’s nice to think that the articles tend to proceed up to higher and higher levels of generality and abstraction”, and I’m creating a program to analyse how it “funnels”.

The results so far, although not 100% accurate, are plausible enough to be interesting. It’s claiming that the ultimate page is not Philosophy, but Organism, another abstract concept. Other ultimate pages include Communication, Education and Alphabet.

Analyzing what pages get the most direct links, the top ones include “Where”s, such as the United States and Australia, and “What”s, such as Gene, Plant and Fictional character.

Pages passed through on the way to Organism and other pages are also calculated. 4.3 million out of 4.8 million pages ending up at Organism go through Philosophy, of which 3.8 million went through Indo-European languages. Philosophy links to the British A. C. Grayling via a citation of his work, and United Kingdom links to Terminology of the British Isles via an explanatory footnote. (Nothing in the rules against that … yet) We can see that the British Isles refer to islands, and that some islands are atolls, which are made up of coral, which are marine organisms, studied in marine biology, which study organisms.

The pages that merge together mighty tributaries are also listed. A. C. Grayling, passed by over 4 million pages, only adds half a dozen pages to the total. By contrast, Mathematics and Science, although passed by only a few hundred thousand pages, are noted for merging groups of pages together together.

It’ll be an interesting investigation into collective intelligence. And if it isn’t … well anything that’s free and wiki is fun, right?

When your wireless mouse lacks zap

January 4, 2009 by andrewjgrimm

When the batteries of my wireless mouse gave up, I tried seeing if rechargable batteries would work. I put them in, and the red light produced by the laser was visible. But it wasn’t talking with my computer. I tried re-connecting many times, under both Windows and Linux, but it didn’t work.

The next day, I noticed that the light from the laser wasn’t working any more, and therefore the rechargeable batteries had been drained. If the batteries could only last a day, they mustn’t be suitable for mice. So I put some standard batteries into the mice, and both the laser and the communication with the computer worked.

It isn’t always a software problem – sometimes it’s a lot simpler!

About me

September 21, 2008 by andrewjgrimm

I’m a bioinformatics ruby programmer by day, and a rails hacker by night, working on The Weather in London.