Skip to main content

Posts

Showing posts from 2010

Why do Christmas lights all go out when one bulb blows? (and how to find the broken one)

The answer is rather simple: traditional Christmas lights (I'm ignoring newfangled LED varieties) were typically connected directly to the mains power supply and wired in series like this: Only if the filaments of all the bulbs are intact will a current flow around the circuit; if one bulb breaks then the circuit is broken and all the lights go out. The reason the bulbs are wired in this, inconvenient, manner is that it's convenient for the manufacturer. Although the supply voltage is 230v (or 110v) the bulbs are rated for a much lower voltage. At home I have a string of 20 lights like this with 12v bulbs. This works because of the rules of series circuits . In my home lights there are 20 bulbs each with some unknown resistance R. The total resistance of the circuit is 20R and the entire circuit is a sort of voltage divider . The current flowing through the entire circuit is I = 230/20R and the voltage across any individual lamp is V= R * 230/20R or 230/20. So my 2

My password generator code

Some people have asked me about the code for my password generator . Here it is: use strict; use warnings; use Crypt::Random qw(makerandom_itv); use HTML::Entities; print "<pre>\n "; print join( ' ', ('A'..'Z') ); print "\n +-", '--' x 25, "\n"; foreach my $x ('A'..'Z') { print "$x|"; foreach my $y (0..25) { print encode_entities( chr(makerandom_itv( Strength => 1, Uniform => 1, Lower = >ord('!'), Upper => ord('~')))), ' '; } print "\n"; } print '</pre>';

Royal Festival Hall condundrum

When I went to record Shift Run Stop at the Royal Festival Hall a few weeks ago I noticed that the display on the 5th floor lift was not showing 5 but a bit pattern. I snapped a quick photo and decided to look into it later: And here's a close up of the top of it. If you look carefully you'll see that there are 8 columns of on or off squares. I transcribed the squares with on = 1 and off = 0 to get the following list: 11111111 11000100 11011000 11101100 00000000 00010100 00101000 01001110 01110100 10001000 10011100 10110000 11000100 11011000 11101100 00000000 00010100 00101000 00111100 01010000 01100100 01111000 10001100 10100000 10110100 11001000 11011100 11110000 00000100 00011000 00101100 01000000 01010100 01101110 10001110 10110100 11001000 11101110 00000010 00010110 00101010 01010000 01111000 10001100 10110010 11001110 11101100 00000000 00100110 00111010 01100000 10000110 10011010 11000000 11010100 11111010 00100000 01001100 01101100 10000000 10010100 10101000 1011

Write your passwords down

Here's my advice on password security based on the collected opinions of others: 1. Write them down and keep them in your wallet because you are good at securing your wallet. ( ref ) 2. Use different passwords on every web site because if you don't one site hacked = all your accounts hacked. ( ref ) 3. Use passwords of at least 12 characters. ( ref ) 4. Use mixed-case, numbers and special characters. ( ref ) Research says you need 80-bits of entropy in your password so it needs to be long, chosen from a wide range of characters and chosen randomly. My scheme gives me 104 bits of entropy. My passwords are generated using a little program I wrote that chooses random characters (using a cryptographically secure random number generator ) and then printing them out on a tabula recta . If you were to steal my wallet you would find a sheet of paper that looks like this in it (I have a second copy of that sheet left with a friend in an envelope): I use that sheet as follows

Plan 28 gets some professional PR

Last week I announced that Doron Swade had joined Plan 28. I'm happy to say this week that we're getting some professional help with our announcements (and more) from global PR firm AxiCom . AxiCom handles clients such as Dell, Panasonic, Ericsson, Fujitsu, Logitech, McAfee, Qualcomm, Salesforce.com and more. And now, on a pro bono basis, they are handling Plan 28. Here's their official blog announcement of their involvement. Having professional PR is another big boost for the project because it takes a load off my shoulders and AxiCom can reach people and places I simply can't. I expect that their involvement will help Plan 28 enormously. Expect to see more news stories about the project over the coming months and more announcements about additional support for the project. As always there's lots more going on, once details are finalized I'll announce. And please remember that Plan 28 still needs your financial support to make it a reality.

Don't write to me asking me to support your crusade against global warming science

I've received yet another email indicating that the author thinks I don't believe man is responsible for global warming. This comes about because of an insidious sort of tribalism that has turned conversations about climate change into a "you're either with us or against us" situation. For the record, my reading of the scientific literature and my own reproductions of Met Office data convince me that (a) the world is warming and (b) the most likely reason for this is man. Much of the 'debate' about climate change reminds me of the pro-choice/pro-life non-debates in the US. Once you split down what look suspiciously like faith lines you're no longer doing science at all. Many people seem to mistake my criticism of the quality of source code used by UEA's CRU as indication of some underlying belief on my part. Poppycock. To be clear, I think the code I saw from CRU was woeful and had many easily identified bugs. I also think that source cod

Shift Run Stop

Some time ago I recorded a long interview with the fine folks at Shift Run Stop . The interview covered all sorts of topics, but focussed on Plan 28 with detours through Kinect hacking, GAGA-1 , Tron and The Geek Atlas . The podcast comes out this Thursday, but here's a sneak preview. John Graham-Cumming from shiftrunstop on Vimeo .

Backgrounder document on Plan 28

Doron and I have prepared a short document that describes the background and goals of the project. This is primarily intended for use with third-parties (such as sponsors, institutions and the press), but in the spirit of openness here's a copy that anyone can read. A brief introduction to the Plan 28 Project by John Graham-Cumming/Doron Swade is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License .

If you want to understand the Analytical Engine, start with the Difference Engine No. 2

There are large similarities between Charles Babbage's Difference Engine No. 2 and the Analytical Engine. Critically, Babbage designed the Difference Engine No. 2 after the Analytical Engine and it incorporates improvements discovered during the design of the Analytical Engine. And the printer that's part of the Difference Engine No. 2 is identical to the printer needed for the Analytical Engine. Babbage said that the same printer would be used for both. The memory of the Analytical Engine is very similar to the figure wheels in the Difference Engine No. 2. Here's Doron Swade demonstrating and explaining the Difference Engine No. 2: And here's a lovely video of the machine in motion. Now try to imagine the Analytical Engine which will have 8x the number of parts and be vastly bigger.

Babbage books as stocking stuffers

If you're following along with Plan 28 (the project to build Charles Babbage's Analytical Engine) then you might like to do some background reading. Here are four suggestions for stocking stuffers for the coming holiday: 1. Doron Swade's The Difference Engine (also published with the title The Cogwheel Brain). This is Doron's account of the Difference Engine No. 2 as envisaged by Babbage and as built by the Science Museum in London. 2. William Gibson and Bruce Sterling's The Difference Engine . A fancy based that imagines what would have happened if the Analytical Engine had been built in Babbage's time. 3. Cultural Babbage A set of essays inspired by the Difference Engine No. 2 that discuss the cultural significance of Babbage and his life. 4. Charles Babbage's Passages from the Life of a Philosopher Babbage's autobiography. More background reading here .

A boost for Plan 28

Up until a couple of weeks ago Plan 28 was a one man show. Although Plan 28 has received enormous press coverage and many people have pledged money, services, material and time, the project was still just me. I'm happy to say that that's no longer the case. Doron Swade , the pre-eminent Babbage expert, who, as curator of computing a the Science Museum, masterminded the project to build Babbage's Difference Engine No. 2 has joined me on the project. Doron and I now share responsibility for finishing Babbage's work. Doron and I met over coffee a few weeks ago to discuss the Analytical Engine and it was clear that both of us had been dreaming of building the physical engine for public display. Happily, Doron had been doing a lot more than dreaming. His deep knowledge of Babbage's engines and his continuing study of Babbage's plans and notes have placed him in the unique position of being the key figure in any attempt to build the world's first digit

GAGA-1: The Camera Hole

This weekend's work on GAGA-1 was mostly around mounting the camera inside the capsule . The capsule walls are 95mm thick so a hole had to be cut all the way through for the thinnest part of the lens and then part way through for two other parts. A second trench had to be cut into the polystyrene for the part of the camera where the batteries are held. The other thing I worked on was the positioning and mounting of the computers and where the batteries will sit. Here's a shot inside the box showing the camera pushed into place and flush against the capsule sides. There's a single battery pack in roughly the spot where it will be fixed and the recovery computer on the wall opposite the camera. The two gold connectors are the GSM and GPS antenna SMA connectors. And here's a show showing the hole pierced through the capsule wall to allow the camera to take photos (yes, I have checked that the capsule wall is not seen in the photos). The recovery computer can be

Breaking the Reddit code

A few days ago an entry on Reddit asked for help breaking a code . Because I was laid up in bed yesterday with something chesty and nasty I couldn't help but wonder about the decryption of the message (see also the Fermilab code ). At the time no one had broken it. I managed to break it; here's how. The original message was written on paper like this: So I did my own transcription of the message and obtained the following four lines: SSNTTNNDERPEVEEEHNOTONNAAEWMAEEMUDRITRNTNDOAWNETOHTVEEDMRMRTTFOGT HUUFSHIIEMAHVOIANRTOARRSJRGEHHIEREELSEANMSTEMEWYEOHAMDEOMITTIECI OLCHHIMDBRPPCAPROMRADIMEOSISLTSTYMEIATYOOEDSTHIEVLVEOBECWGEOORYA TYERNOAEONLWRSLESKEEHTAEYIODSAAOIHWIUTMNWEONTHATPLVRLAPLIEOAAOUN There were a couple of things that stood out immediately. Just eyeballing the text it looks like it's English (lots of E's, T's, etc.) and so I ran it through a letter frequency checker and sure enough it looks like English. So given that, the code was most likely so

GAGA-1: CoCom limit for GPS

One problem for high-altitude balloon projects is the CoCom limit on how high and how fast a GPS will operate. To prevent GPS modules from being used in very fast moving weapons (such as ballistic missiles) GPS receivers are not allowed to operate at: 1. Higher than 60,000 feet 2. When traveling faster than 1,000 knots The second restriction doesn't matter for GAGA-1, but the first does. GAGA-1 will have a maximum altitude (balloon dependent) of more like 100,000 feet. Different manufacturers implement the CoCom limit in different ways: some use an AND rule (>60,000 ft and >1,000 knots) and others use an OR rule (>60,000 ft or >1,000 knots). For high-altitude ballooning it's ideal if the GPS uses AND. Unfortunately, this information is shrouded mostly in mystery and it's only through actual flights and testing that people have managed to determine which GPS receivers are AND and which are OR. For GAGA-1 I have two GPS units: one in the Recovery Comp

GAGA-1: Capsule insulation and antenna mounting

A bit of physical stuff on GAGA-1 this weekend after the Recovery Computer software last time. I'd previously painted the capsule for high visibility, but hadn't started cutting it or sticking on parts. After the successful test of the Recovery Computer it's time to put some bits on the box! The three antennae visible on the box (as with the other components) are hot glued in place. I pierced holes in the box using a long metal skewer and a chop stick. Here's a close up of the top of the capsule. The top two antennae are for the two GPS modules (one in the Flight Computer and the other in the Recovery Computer). The long thin antenna is for the GSM connection that's part of the Recovery Computer. The other two parts are a small red straw and a large black straw. The small red straw is simply there to allow the pressure to equalize between the inside and the outside of the capsule. Since the pressure is very low in the stratosphere it would be danger

Notes on Kryptos Part 4

Copy of message I sent to the Kryptos group on Yahoo! for anyone whose working on Kryptos but not in that group. Given Elonka's notes mentioning that K4 uses a cipher system not known to anyone else I decided to investigate other possible ways of attacking K4. Specifically, I wondered if the BERLIN crib might not be as simple as NYVTT turning letter for letter into BERLIN. First I assume that this is something that's breakable by hand as was the rest of Kryptos and thus would simply be based on MOD 26 arithmetic of letters and might involve transposition of characters. So I went to see if there's a word that could be permuted to create some permutation of BERLIN from NYVTT. There is: it is SILENT NYVTT ENTSIL ----- RLINBE More strikingly this works if you are sliding SILENT from the start of K4, it falls in just the right position to make BERLIN OBKRUOXOGHULBSOLIFBBWFLRVQQPRNGKSSOTWTQSJQSSEKZZWATJKLUDIAWINFBNYPVTTMZFPKWGDKZXTJCDIGKUHUAUEKCAR SILENTSILENTSILENTSILEN

A proper Dr.

I wrote in my bio for The Geek Atlas that (speaking about myself in the third person) "Because he has a doctorate in computer security he's deeply suspicious of people who insist on being called Dr.". I am very suspicious of people who shove their PhD in your face, or who insist on being called Dr. In fact, like a British surgeon, I would much prefer to be called Mr. (which I suppose is a form of snobbery) mostly because it's what I've done after my doctorate that I'm most proud of. Which brings me to the case of "Dr." Gillian McKeith . I only became aware of her because of the wonderful Ben Goldacre who has taken her to task about her qualifications and claims. In an old article Goldacre talks about McKeith's qualifications and her legal threats against people who criticize her. He makes the very good point that it's easy to validate real credentials (e.g. if you want to check that I've really got a DPhil from Oxford you just ne

GAGA-1 Recovery Computer Ground Test

Today was the first live test of the GAGA-1 Recovery Computer and it, at least initially, didn't go well. The result is much improved, fully working, code in the repository . This is why I'm obsessed with actual testing of the components of GAGA-1. First the good news: the module ran on 4 AA batteries for 9 hours without showing any problems caused by power. For over 3 hours the module was getting GPS location information and sending SMS messages. This is very reassuring. Here's the module sitting on the kitchen table ready to go: Here's the commit message for the code changes: Significant changes based on live testing of the code on the Telit GM862-GPS module: 1. The module does not support floating point and so the gps2.get() function has been modified to only use integer arithmetic and thus not do conversion of latitude and longitude. This leaves most of the returned elements as strings. Except altitude which is needed for comparisons. 2. The main loo

I guess Hacker News doesn't do meta very well

(which is ironic for something written in a Lisp variant) Recently, I've grown tired of stories about the TSA on Hacker News . So I posted and item saying that I was taking a break (the title was "Au revoir Hacker News") with text saying that I was fed up with the TSA stories (and in particular the Ron Paul story in the top slot) and that I was going to take a temporary break. It ended saying I'd see everyone in the New Year once things had blown over. It was at this link but it was nuked by someone. Not made [dead], simply expunged by a moderator. Feels a bit uncalled for to me, I'd have been happy for the community to shoot me down. (Actually it is [dead] so it was the community that killed it off) I guess I'll be back in the New Year.

The things make got right (and how to make it better)

make is much maligned because people mistake its terse syntax and pickiness about whitespace for signs of being an anachronism. But make's terseness is what makes make fit for purpose, and people who design 'improvements' rarely seem to understand the fundamental zen nature of make. Here are some things make does well: 1. make's key use is in the expression of dependencies. make has a compact, syntactic cruft-free way of expressing a dependency between a file and other files. 2. Since make is so dependent on handling lists of dependencies it has built-in list processing functionality. 3. Second to dependency management is the need to execute shell commands. make's syntax for including dependencies in shell commands is small which prevents the eye from being distracted from the commands themselves. 4. make is a macro-language not a programming language. The state of a build is determined by the dependency structure and the 'up to dateness' of files.

GAGA-1 Recovery Computer

Finally, got some time to work on the GAGA-1 Recovery Computer that uses a combination of a GPS and a GSM module to send position updates via SMS to a cell phone. The complete code is now in the repository in the gaga-1/recovery/ folder. The recovery computer itself is a Telit GM862-GPS module mounted on a board that supplies power from four AA batteries. It has two external antennas: one for GPS and one for GSM access. Here's a shot of the computer before installation in the capsule (clearly the cables are going to have to be shortened and the power supply cleaned up before the real flight). The GPS antenna is square and the GSM is the long thin bar. The GM862-GPS has an integrated Python interpreter so the control software is a set of Python modules that handle getting GPS information (and sundry information like temperature and voltage) and sending SMS messages at appropriate times. Here's the key piece of code for the recovery computer: # The recovery computer

The most common objection to my 'releasing scientific code' post

Is ... And why dismiss so casually the argument that running the code used to generate a paper's result provides no actual independent verification of that result? How does running the same buggy code and getting the same buggy result help anyone? Or as expressed at RealClimate : First, the practical scientific issues. Consider, for example, the production of key observational climate data sets. While replicability is a vital component of the enterprise, this is not the same thing as simply repetition. It is independent replication that counts far more towards acceptance of a result than merely demonstrating that given the same assumptions, the same input, and the same code, somebody can get the same result. It is far better to have two independent ice core isotope records from Summit in Greenland than it is to see the code used in the mass spectrometer in one of them. Similarly, it is better to have two (or three or four) independent analyses of the surface temperature station

All Plan 28 Media Coverage

This is the 2010 archive, for 2011 see 2011 Plan 28 Media Coverage I'll be keeping this page updated as new stories are posted. Articles with * next to them are the most in-depth. October 3, 2010 The Independent: One of the great inventions that never was – until now? * The Independent: Start the Engine October 4, 2010 The Daily Mail: Campaign to build Charles Babbage's steam-powered 'Analytical Engine' - 173 years after he designed it O'Reilly Radar: The 100-year leap * October 5, 2010 The Register: Legendary steampunk computer 'should be built' - programmer THINQ.co.uk: Geek plans to build Babbage compute October 6, 2010 iProgrammer: Plans to build Babbage's Analytical Engine October 7, 2010 Fudzilla: Babbage's analytical engine should be constructed October 8, 2010 e-Katalog: Британский энтузиаст намерен построить паровой компьютер October 9, 2010 Der Standard: Dampf-Computer von 1837 soll Realität werden Octo

A Plan 28 completion date

Today in 1871 Charles Babbage died. 11 years from now it will be 150 years from Babbage's death. He kept working on the Analytical Engine up until his death. Let's make sure that his Analytical Engine is built by October 18, 2021. Help get the word out about Plan 28 .

Plan 28: the first 10 days

So, it's been 10 days since I posted the Analytical Engine PledgeBank and the total number of signatories stands at over 2,700 with many people pledging £50, €100 or even $1,000. The PledgeBank estimator reckons I'll hit 42,435 pledges (84.9% of target) by the target date. Given how much more than $10/£10/€10 many people are pledging I'd imagine that my goal isn't unrealistic, but please keep spreading the news. As well as pledges of money I've received pledges of professional design and manufacturing help, document digitizing, CAD software and more. These are super-helpful. In addition there's been a lot of media interest. The best articles are the BBC's Campaign builds to construct Babbage Analytical Engine and The Independent's One of the great inventions that never was – until now? . If podcasts are your sort of thing then you can listen to the excellent session about Plan 28 on TWiT #269 . There's also been some nice tweet-support fro

What Nature didn't say

Nature has a nice article about scientific software which starts by mentioning the hacking of the Climatic Research Unit and the release of software from the hacked files, and then goes on to talk generally about the state of scientific software. My summary would be that it's generally a mess because software engineering has crept up on scientists and now they need to get educated about things that have been common in the commercial software world for years. Which is pretty much what I said on Newsnight in December 2009. The article begins: When hackers leaked thousands of e-mails from the Climatic Research Unit (CRU) at the University of East Anglia in Norwich, UK, last year, global-warming sceptics pored over the documents for signs that researchers had manipulated data. No such evidence emerged, but the e-mails did reveal another problem — one described by a CRU employee named "Harry", who often wrote of his wrestling matches with wonky computer software. "

Plan 28 (Analytical Engine) FAQ

Answers to your questions about the Babbage PledgeBank : 1. Can I pledge more than $10/£10/€10? Yes, of course! Many people have done so. The system doesn't have a box where you can enter an amount, but you can contact me and let me know, or, even better, publish a public comment with your pledge amount. 2. Can I pay you the money? Not yet. Currently, I'm working on building up enough pledges to make sure this is viable. Once I have enough you'll receive an email detailing the new Plan 28 organization and how to actual send in the money. 3. Do you really think you can get 50,000 people to pledge? Yes. Last year I got over 30,000 in the UK alone to sign the Alan Turing petition. This campaign is global and so I am confident that with the right exposure in the media and the help of enthusiastic people over 50,000 will pledge. 4. The Plan 28 web site is ugly. Yes, I know. This is being actively worked on by a professional designer. 5. I have another idea about

1,000 people sign the Plan 28 pledge

A few moments ago I checked the Plan 28 pledge page to find that it had passed the 1,000 people mark. That took just 6 days. Thank you to everyone who's pledged so far (Peter Zuidhoek was the 1,000 person). But even more heartwarming than the 1,000 are the comments people have been leaving on the page. You can read them all on the pledge page , but here are a few highlights. Many people have said that they'll pledge more than $10/£10/€10, with some going as high as $1,000. Brilliant. Worth it just for the first step. Do it for the next generation. -- Matt Doar Put me down for a hundred quid. -- Aidan Karley I have been hoping for years that someone would do this. I contributed to the construction of the Difference Engine and am proud to be able to contribute here. -- Raymond Woodward K3VSA I'll pledge $100 - Roston McGregor Great idea and willing to pledge more 50$ when the time comes -- Marcus Jaeger Great endeavor, sign me up for $50 USD. -- Robert Huwar I&

A big boost for Plan 28

Last night I appeared on TWiT with Leo Laporte and John C. Dvorak and guests. We talked about a lot of things late into my night, but mostly about Plan 28 . Leo encouraged listeners to pledge money and made the stunning offer of personally pledging $1,000 to the effort! And so, on top of Leo's pledge the number of people pledging has tripled! Thanks Leo.

Geek Weekend: Kew Bridge Steam Museum

So, I managed to persuade the people around me that it would fun to go and visit Kew Bridge Steam Museum , and it was brilliant! The museum is one of the places that was on the list for The Geek Atlas but got cut for space. Nevertheless, it's really worth visiting. On weekends and other special days the folks at the museum set the machines running (including the massive 90 inch engine). I got there early enough to see most of the engines demonstrated and the staff were great. Got a good explanation of the operation of the triple expansion engine used for pumping water for London. Here it is in action: Another nice engine is the Dancer's End engine that was used for pumping water on the estate of Lord Rothschild and was moved to the museum in the 1970s. And makes a lovely noise as the condenser water can be heard bubbling away. Here it is. And finally, it's not all steam. There's a collection of Diesel engines. Here's a small one in action

1,000 (bad) ideas

Tidying up my messy corner in the basement I unearthed one of my older "ideas books" in which I write down the random ideas that flit through my head quite frequently. Flicking through it I noticed that this book contained idea number 1,000 written on October 3, 2006. Most of these ideas never get implemented but they are fun to go back and read. Idea 1,000 was In-ear headphones that automatically pause music when removed . The details mention using either a proximity detector to discover when the headphones are in the ear, or a strain gauge to detect the pressure of the ear canal. The previous idea was Brake lights that show the severity of braking . The idea there was to replace the current 'high-level' brake lights in cars (that are typically a horizontal bar), with a triangle of lights. Under normal braking just the top, horizontal red bar would illuminate. Under heavy braking the triangle would illuminate warning drivers of an emergency situation (part

The Analytical Engine vs. The ZX81

Many people got started with computing in my age group with the Sinclair ZX81 (which in the US was sold as the Timex Sinclair 1000 ). Reading through Allan Bromley's excellent papers on Babbage's Analytical Engine (as described in 1847) I thought it might be fun to compare the two machines. The ZX81 has 1KB of memory in which programs and data had to be stored. The Analytical Engine as first imagined would have had 50 variables capable of each storing a 30 digit decimal number. That's equivalent to each variable having 100 bits and hence the memory for the Analytical Engine would have been 5000 bits (675 bytes). Later Babbage proposed much larger memory sizes with up to 50 decimal digits per variables and 1000 variables: that would have been a memory of 166 bits per variable or over 20 KB of memory. Critically, the Analytical Engine's programs would be stored on punched cards and executed directly from them so that entire memory space was for data (not the progr