Skip to main content


Showing posts from January, 2010

£1,000 for Bletchley Park thanks to The Geek Atlas

When The Geek Atlas was published in June 2009, O'Reilly's UK arm decided to pledge to donate 50p per copy sold in the UK to help fund Bletchley Park . O'Reilly has now made good on that pledge and with almost 2,000 copies of the book sold in the UK it has donated £1,000 to Bletchley Park. And the 50p per copy pledge continues. All copies of The Geek Atlas sold in the UK result in a 50p donation to keep this wonderful place alive.

Price drop on GNU Make Unleashed

I've dropped the price on GNU Make Unleashed to €15.00 (for the printed book) and €10.00 (for the PDF). And I'm working on a version for the Kindle.

Update list of my GNU Make articles

A reader pointed out that the GNU Make article list on by writing page is full of broken links because CM Crossroads has reorganized their site without providing backwards compatibility. So you are faced with a choice: you could buy a copy of my book The GNU Make Book  which contains all the articles (and more!), or you could use the following list (which I've newly updated): May 2008: Usman's Law March 2008: GNU Make user-defined functions, part 2 February 2008: GNU Make user-defined functions, part 1 December 2007: GNU Make path handling October 2007: GMSL 1.09: A look inside the tweaks and updates September 2007: Makefile Debugging: An introduction to remake July 2007: GNU Make escaping: a walk on the wild side June 2007: Painless non-recursive Make May 2007: Atomic Rules in GNU Make April 2007: GNU Make meets file names with spaces in them February 2007: GNU Make's $(shell)/environment gotcha December 2006: Makefile Optimization $(eval) and macro cachi

Mendelian Randomization: getting genes to run randomized trials for you

One of the core elements of my day job is dealing with causal relations: we try to understand what cause caused an effect. An area where much work has been done in understanding causal relationships is medicine where randomized controlled trials are used to understand the relationship between taking a medicine and some outcome. But some things are hard to perform a trial on. It's all very well if you have a medicine to try out, but what if you want to know if, for example, having low serum cholesterol is associated with an increased risk of cancer? That's not an idle question, the Framingham Heart Study , was thought to have shown a relationship between serum cholesterol and cancer (e.g. The serum cholesterol-cancer relationship: an analysis of time trends in the Framingham Study ). But the question is: given that there appears to be a relationship, is it causal? Does low serum cholesterol cause cancer? It could be that it's the other way around (called reverse c

Simplifying my OLPC XO-1 Temperature Sensor

Back in 2008 I wrote about a little circuit to turn the OLPC XO-1 Measure application into a digital thermometer. That circuit required two 9 volt batteries, 11 components and a PCB (plus connectors) A few weeks ago I got asked about making a commercial version of the probe which naturally led to thinking about how to simplify the circuit. I've now got the entire circuit down to a single component that costs 50p in bulk. I've eliminated all the rest (except the connectors) and the circuit is entirely powered by the OLPC itself. I actually tried a total of four designs for this circuit. Design 1: The Original The original circuit looked like this: It works, but it's a bit awkward since it requires those external batteries. Design 2: Dump the op-amp One simple thing to do is just make a parallel adder with a few resistors and a reference voltage (the original 0.45v from Design 1) from a voltage divider and not worry about all the stability that the op-amp brings.

The Ikea Lillabo Processing code

By popular demand... here's the code, written in Processing that actually draws the train sets . I hadn't released it because I didn't think it was very interesting, but you are welcome to it. // -------------------------------------------------------------------------- // // Small program to draw pictures of Ikea Lillabo track layouts using // instructions derived from my Perl program. // // Written by John Graham-Cumming ( ) // // Released under the General Public License, version 2 // // -------------------------------------------------------------------------- // This is the cursor position (x, y) coordinates and angle to the // horizontal float x, y, a ; // The length in pixels of a single straight piece float len = 40 ; // See the Perl program for a full explanation, but there are 8 curves // in a circle and from that the radians of curve arc, the length of the // straight line between the curve ends and the curve angle to t

More fun with toys: the Ikea LILLABO Train Set

As further proof of my unsuitability to be a child minder (see previous post ) I found myself playing with an Ikea LILLABO 20-piece basic set train . The train set has 16 pieces of track (12 curves, two straight pieces and a two part bridge) and 4 pieces of train. What I wondered was... how many possible looping train tracks can be made using all 16 pieces? The answer is... 9. Here's a picture of the 9 different layouts. The picture was generated using a little program written in Processing . The bridge is red, the straight pieces are green and the curves are blue or magenta depending on whether they are oriented clockwise or anticlockwise. The curved pieces can be oriented in either way. To generate those layouts I wrote a small program which runs through all the possible layouts and determines which form a loop. The program eliminates duplicate layouts (such as those that are mirror images of each other). It outputs a list of instructions for building loops. These in