Archive for the ‘Programming’ Category

Turing CODEBREAKER film available

November 13, 2013

In November 2012 I posted about the centenary of Alan Turing’s birth and mentioned the film CODEBREAKER about his life and tragic death. It’s finally available for general sale!

Update: I’ve just ordered my copy; looking forward to having this resource!

Alan Turing: a household name?

November 25, 2012

A hundred years have elapsed since the birth of the mathematician, codebreaker, and father of computer science, Alan Turing.

Due to space restrictions, a drastically shorter version of  what follows appeared on page 16 of the November/December ACS Information Age magazine.

In response to an online petition in the lead-up to the centenary of Alan Turing’s birth, the British PM, Gordon Brown, said in 2009: “Turing was dealt with under the laws of the time, and we can’t put the clock back, his treatment was utterly unfair. On behalf of the British government and all those who live freely thanks to Alan’s work, I am very proud to say: we’re sorry. You deserved so much better.” [1] This statement concerned the appalling treatment Turing received for “gross indecency”, the charge made against him as a homosexual person living in the UK in the mid-20th century. His choices were chemical castration and jail. He chose the former, which affected his concentration and self-esteem, undoubtedly contributing to his apparent suicide via a cyanide-dipped apple in 1954.

It would be an understatement to say that Turing achieved much in his 42 years. He contributed to a fundamental problem in mathematics, in the process becoming the father of computer science prior to the existence of general purpose computing machines. He played a pivotal role in the Second World War as a Bletchley Park cryptanalyst for which he was awarded an OBE, wrote a seminal paper on the modeling of biological growth, worked on pioneering computer projects, and founded the field of Artificial Intelligence (AI).

For anyone in the computing field, Turing’s most important contribution was his 1936 paper “On Computable Numbers” and in particular, the abstraction he described and used to present the halting problem, now known as the Turing Machine, the conceptual essence of a general purpose computer.

Turing was keenly interested in algorithms and applications, independently arriving at the utility of the subroutine library. He wrote and optimised early library routines e.g. for long division, random number generation and investigated numerical analysis problems such as rounding errors. He wrote code relating to number theory for the Manchester computer. He also wrote a chess program that was only simulated on paper due to a lack of computer time being made available.

For those with more pragmatic inclinations, from 1945 to 1951, after his time at Bletchley Park, contemporaneous with ACS founder John Bennett’s work on CSIRAC, Turing was involved with pioneering computer projects including the design of the Automatic Computing Engine (ACE, later built as the Pilot ACE), The Manchester Baby or Small Scale Experimental Machine (SSEM), and the Ferranti Mark I, for which he wrote the Programmer’s Manual in 1951. The Pilot ACE is on display in the London Science Museum. His design frequently changed, was optimal in terms of hardware, but complex to program. Turing said: “In working on the ACE I am more interested in the possibility of producing models of the brain than in the practical applications to computing”. [2]

Early insights into the nature of AI set down in a paper entitled “Computing Machinery and Intelligence”, published in the philosophy journal Mind in 1950, led to his notion of an “Imitation Game”, the now famous “Turing Test”, a means by which to determine whether a questioner is communicating with an entity with human-level AI.

The ACM presents the Turing Award annually to someone who has contributed something that is judged to be of major and lasting importance to the computing science field. One of its recipients, Alan Perlis, in 1966 said: “On what does and will the fame of Turing rest? That he proved a theorem showing that for a general computing device—later dubbed a “Turing Machine”—there existed functions which it could not compute? I doubt it. More likely it rests on the model he invented and employed: his formal mechanism. This model has captured the imagination and mobilized the thoughts of a generation of scientists”.

Arguably, Turing is to Computing as Einstein is to Physics. In 2005, there were celebrations worldwide of Einstein’s “year of miracles”. This year there have been similar celebrations of Turing’s birth 100 years ago. [3] Einstein and E=MC2  are well known, but can the same be said of Turing and his Machine? Is he a household name along with Einstein? Many take for granted the existence of the computer, smart phones, and a myriad other computationally-enabled devices found in virtually every facet of our modern lives. We, as computing professionals, should strive to make better known the work of Turing and his contemporaries, and more generally, the broader history of our field.

I looked into the possibility of an Adelaide cinema screening of the film, CODEBREAKER, about Turing’s life (via TodPix) but received a response to say that there are no plans for a theatrical release in Australia; it was screened on SBS One in June 2012 on a 3 year contract, so perhaps it will be aired again.

Update (November 2013): CODEBREAKER is now available for sale on DVD!


  2. Lavington, S. (ed.), 2012, “Alan Turing and his Contemporaries”, BCS
  6.  “The ACM Turing Award Lectures: The First Twenty Years”, 1987, ACM Press

Second Citizen Sky Workshop and ASV Talk

September 12, 2010

From September 2nd to 5th I participated in the second Citizen Sky workshop in San Francisco, attended by a mix of professional astronomers, amateur astronomers, and Science educators. The event was held at the California Academy of Sciences (CAS) in Golden Gate Park.

On the way back home I gave a talk about Citizen Sky and VStar to the Astronomical Society of Victoria as part of the yearly ASSA/ASV speaker exchange. I was made to feel welcome by members of the ASV, some of whom took me out to dinner prior to the meeting. I appreciated the opportunity to give this talk, which seems to have been been well received.

The San Francisco workshop was packed with sessions but we had two hour lunch breaks encouraging lots of interaction between participants.

I gave two talks: a practical VStar session and a summary of the VStar Team’s activities. The team gained a few new members during the workshop. See the VStar Team page for more details.

There was plenty of interest and discussion regarding VStar throughout the workshop with a couple of professional astronomers and a new data analysis group (formed during the workshop) planning to make use of the tool for specific projects.

Some Citizen Sky participants adopting the VStar pose after the last session (courtesy Joan Chamberlin, pictured 2nd from left next to the author).

Some Citizen Sky participants adopting the VStar Pose after the last session. Courtesy Joan Chamberlin, pictured to the left of the author.

Use of VStar by a participant with a European locale revealed an important class of bugs that needs to be fixed relating to numeric input when VStar is used on machines configured with non-English locales. It’s something I knew I had to address, but being presented with it by a user has raised its priority in the SourceForge tracker.

The workshop agenda was diverse and, apart from the sessions mentioned above, included topics such as:

  • Update on the status of the Epsilon Aurigae eclipse
  • Disks in astrophysical objects
  • Evolutionary status of the binary based upon recent measurements
  • Analysis of Epsilon Aurigae spectrum monitoring by a college (San Mateo) student team
  • Precision, accuracy, and uncertainty in data
  • Light curves of different types of variable stars
  • Basic and intermediate time series data analysis
  • Choosing topics for Scientific investigation
  • Scientific paper writing

All sessions were captured on video, and will be made available, along with the accompanying slides, on the Citizen Sky website.

One of the CAS roof-top garden domes.

One of the CAS roof-top garden domes.

Participants had the opportunity to see two shows in the CAS Morrison Planetarium, in addition to the premiere of the Citizen Sky planetarium trailer.

Morrison planetarium dome

Morrison Planetarium dome

I also had a bit of time to look around San Francisco and was fortunate to see the Golden Gate Bridge when it was clear of fog. Joan Chamberlin (leader of the Southern Gems Team) and I took a walk on the bridge and had wonderful views of the Bay.

David on the Golden Gate Bridge, September 2010

Author on the Golden Gate Bridge

Attendance at the second Citizen Sky workshop came after months of VStar development in my spare time. It was great to get together again with people I’d met at the first workshop in Chicago last year, as well as getting to know new people.

Dinner out after the last day of the workshop

Dinner out after the last day of the workshop

Other than catching up on sleep, there is still plenty of work remaining to further improve and extend VStar and to apply it to data analysis activities emerging from the second Citizen Sky workshop.

Apart from the palpable general sense of camaraderie, a participant named Bob Miller captured the spirit of those assembled at Citizen Sky via the debut of his song We are the stars, a video of which was played just before lunch on the second day of the workshop.

Bob Miller at Citizen Sky 2

Bob Miller at Citizen Sky 2

Other than catching up on sleep, there is still plenty of work remaining to further improve and extend VStar and to apply it to data analysis activities emerging from the second Citizen Sky workshop.

If you are in the least bit interested, I would suggest monitoring the Recent Posts section of the Citizen Sky site, and of course, feel free to ask me for more information.

I want to say a big thanks to Rebecca Turner, Aaron Price, and AAVSO in general for organising the workshop. It was awesome.

Explaining how computers work with the TEC-1

May 30, 2010

I was recently asked to give a talk to my son’s primary school class about how computers work.

The Powerpoint slides from the talk consist mostly of pictures and towards the end, a small Z80 machine code program (to add a number to itself) for the TEC-1 single board computer.

TEC-1 image from Issue 10 of Talking Electronics Magazine

TEC-1 from Issue 10 of Talking Electronics Magazine cover

My wife and I created a short video showing the program being entered and executed multiple times via the TEC-1’s hex keypad.

As I told the kids during that talk, if you want to understand how a computer really works, you need to get close to the machine-level and talk about processors, memory, buses and so on. So we did, and despite leaving out a lot of details, I think the idea of going from X = X+X to a sequence of simple instructions and a numeric representation palatable to a Z80 made some sense to many of the kids, and at least provided a source of fascination to most. Apart from that, I think it was fun.

We also spent a lot of time talking about the extent to which computers now pervade our lives and how much we take that and the people whose ideas and work made it all possible for granted, including Babbage and Lovelace, Leibniz, Boole, Turing, and so many hardware and software pioneers.

Like many hobbyists in the 70s, 80s and beyond, the idea of building a simple computer from components in a kit was alluring. I’ve been doing paid software development for almost 30 years but was a hobbyist for more than a decade or more before that. I was introduced to the Joy of Computing in Year 10 due to the purchase of a PDP-11/04 by my school (Norwood High in Adelaide) in the late 70s. Along with a love of astronomy that continues to this day, I maintained an interest in programming throughout the 80s, during which time I was a nurse. I eventually decided to convert one of my hobbies into a profession, but still maintain the attitude of a hobbyist, developing open source software such as my current project: VStar.

My hope is that I’ve instilled in at least some of those kids a hunger to know more about computers and programming.

Scala Talks at AJUG

January 1, 2010

In 2009 I gave two talks to the Adelaide Java User Group about Scala, the functional object-oriented programming language for the JVM.

The first was an introductory look at Scala in which I:

  • talked about problems with the type systems of languages such as C++ and Python;
  • implemented a Prolog interpreter and compared it to a Python implementation on which it was based.

The second talk was about the Actor model (message passing style) of concurrency.

Here are zip archives containing code and slides for the introductory and actors talks.

The slides and code for both talks are also available from the file area of the ajug-adelaide-announce Yahoo group.

VStar development update

December 31, 2009

VStar development has continued since my August entry after returning from the first Citizen Sky workshop. For the last several weeks, the VStar Development Team has been been making weekly releases that are available via WebStart (TM) from the Citizen Sky VStar Team page (see “Download VStar Now” button).

See also the SourceForge site for more information regarding ongoing activities.

My main focus is still upon code and unit test. Phase plots can be created but further integration with all views is required. This has most of my attention at the moment but numerous other bugs and improvements have also been addressed (see bug and feature tracker).

The plan for the early New Year is to bring phase 1 to an end and move on to period analysis and other functionality.

This and other matters were discussed during the annual AAVSO meeting in Boston in November into which I Skyped for a VStar session. Sara Beck, Michael Umbricht, Grant Foster (developer of the original VStar), and from, Geir Klingenberg and Michael Kran. The possibility of adding photometrica as another data source to VStar was discussed. Grant shared his ideas regarding period analysis algorithms. Michael Umbricht also gave a presentation about VStar to AAVSO meeting attendees.

A  relatively recent development is that along with AAVSO staff members and Michael Umbricht, I’m an author on a poster paper to be presented by Arne Henden at the January meeting of the American Astronomical Society: “Statistical Software Development as an Example of a Citizen Sky Participant Team”.

In February 2010, I will be giving a talk to the Astronomical Society of South Australia about VStar, Citizen Sky, and Epslion Aurigae.

I would again like to acknowledge the ongoing assistance of Sara Beck, Michael Umbricht, Adam Weber, others at AAVSO and Citizen Sky participants who are using VStar.

All the best for the New Year.

CitizenSky Workshop and VStar Software

August 21, 2009

I attended the CitizenSky Workshop at Adler Planetarium in Chicago from August 5th to 7th 2009. CitizenSky is a collaboration between the American Association of Variable Star Observers (AAVSO), amateur astronomers (or “volunteer astronomers”, as one participant suggested) like myself, professional astronomers, and educators to encourage more of the general public to get involved in Science, to become “Citizen Scientists”.

The focus of the workshop was to communicate the fundamentals of variable stars and the observation of such objects (and of one star system in particular) to participants who could then take what they had learned back to their local schools, astronomical societies and other groups. The particular star of interest is Epsilon Aurigae, a strange variable star system that undergoes an eclipse every 27 years that lasts for about a year and a half. You can find out more about Epsilon Aurigae and the ongoing campaign to study the imminent next eclipse from the CitizenSky website.

It’s not an ideal object from South Australia. In mid-December it will be about 11 degrees above the northern horizon in the late evening, and that’s about as high as it gets from Adelaide. Use a program like Stellarium to determine its visibility from your location, e.g.

Epsilon Aurigae (circled) from Adelaide, South Australia, 19 Dec 2009 at 10:30pm
Epsilon Aurigae (circled) from Adelaide, South Australia, 19 Dec 2009 at 10:30pm CDT

On the last day of the workshop I demonstrated the latest revision of VStar, an open source, multi-platform (courtesy of the Java programming language) variable star data analysis application I’ve been developing since early May this year. This software is intended to be an easy-to-use variable star data visualization and analysis tool. The initial motivator for VStar is the CitizenSky project.

It all started as the result of a conversation I had with Arne Henden, Director of the AAVSO at the 2008 National Australian Convention of Amateur Astronomers (NACAA) in Sydney. I asked him the same kind of question I ask most astronomers I get the chance to talk with: is there any astronomical software you need developed? I have developed free software (e.g. ACE BasicPICCLIBothers) since 1991, but for a long time I had been looking for a way to apply my software development experience to benefit of the Scientific Community in my spare time. On the one hand I have an interesting and challenging software engineering day job, while on the other, I have a need to do something more than just contribute to a company’s bottom-line.

Arne said that they wanted to do a Java version of an old Visual Basic tool called VStar. This tool is referenced in AAVSO’s online tutorial material, but AAVSO wanted to replace it with a newer version that could be targeted at multiple platforms, not just Windows, in addition to adding new functionality.

Arne, Aaron Price and I corresponded after NACAA and talked about a number of projects including VStar. Initially AAVSO made the decision to develop VStar internally, but several months ago, we started corresponding again and I took it on as a volunteer effort. AAVSO provided Sara Beck as liason, and for the last few months, VStar has consumed my spare time and lead me to appreciate the benefits of energy drinks. I’ve communicated often with several other AAVSO staff and they’re a friendly and encouraging crew, in particular, apart from Sara, Arne, and Aaron: Richard ‘Doc’ Kinne, Matthew Templeton, Rebecca Turner, and Elizabeth Waagen.

VStar is still very much a work in progress but is being implemented in phases starting with basic features such as:

  • input from a the AAVSO International Database, AAVSO download and simple file formats;
  • light curve and mean plots;
  • individual observation inspection;
  • printing, saving.

Much of the above exists and is usable now. There’s a bug list in the project SourceForge tracker that I’m working on currently.

Next will come phase plots, period analysis algorithms, and the intent is to have a plugin architecture so that new algorithms can be added by anyone. Full functionality should be available by around March next year in time for another Citizen Sky workshop at which analysis of data on Epsilon Aurigae will be the focus.

There are no formal releases yet (since VStar is not mature enough yet), but you can download the “bleeding edge” trunk of VStar anytime, or you can download more stable tagged versions. Here are some download options:

To download the latest Vstar archive (tarball):

  2. Click “Download GNU tarball”

To download the latest VStar via Subversion, issue this command from a shell or DOS prompt, or use a graphical Subversion tool such as TortoiseSVN.

  • svn co vstar

To download a specific frozen (or “tagged”) version such as DEV-17Aug2009 (a post CitizenSky workshop version, before new major changes), use a command like this:

  • svn co vstar

In each case, the top-level ReadMe.txt file tells you what additional Java libraries to download, where to get them from, and where to put them. I would like to include these on the SourceForge site as part of the download, but we’re still trying to determine the legality of that for each library.

Then it’s just a matter of running a batch file or shell script as described in the ReadMe file.

Ultimately VStar will also be available as a Web Start ™ application on the AAVSO web site. Parts of it may also be used as Java applets on the AAVSO web site.

There is plenty left to do. Testers are always needed, so feel free to help out with that. Michael Umbricht, another CitizenSky participant has done a lot on that front already. He is also keen to improve the currently sparse documentation and write tutorial material. Please let us know if you would like to help with testing, proof reading, or if you would like to get involved in some other VStar development activity.

I look forward to the next several months of VStar development!

Programming Quotes

May 19, 2009

Adam Pope recently wrote about Classic Programming Quotes. This reminded me that I’ve collected quotes on this page for several years. Lambda the Ultimate also has a quotes section.

Here are some of my favourites:

If one character, one pause, of the incantation is not strictly in proper form, the magic doesn’t work. Human beings are not accustomed to being perfect, and few areas of human activity demand it. Adjustment to the requirement for perfection is, I think, the most difficult part of learning to program. (Frederick Brooks)

You think you know when you learn, are more sure when you can write, even more when you can teach, but certain when you can program. (Alan Perlis)

Increasingly, people seem to misinterpret complexity as sophistication, which is baffling – the incomprehensible should cause suspicion rather than admiration. 
(Niklaus Wirth)

APL is a write-only language. I can write programs in APL, but I can’t read any of them. (Roy Keir)

What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against? (Larry Wall)

Beware of bugs in the above code; I have only proved it correct, not tried it. 
(Donald Knuth)

Any code of your own that you haven’t looked at for six or more months, might as well have been written by someone else. (Eagleson is an optimist, the real number is more like three weeks.)

Niklaus Wirth has lamented that, whereas Europeans pronounce his name correctly (Ni-klows Virt), Americans invariably mangle it into (Nick-les Worth). Which is to say that Europeans call him by name, but Americans call him by value.

Real programmers don’t comment their code. It was hard to write, it should be hard to understand.

A LISP programmer knows the value of everything, but the cost of nothing.

Old programmers never die. They just branch to a new address.

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. (Kernighan)

I saw `cout’ being shifted “Hello world” times to the left and stopped right there. (Steve Gonedes)

Programming is understanding. (Kristen Nygaard)

Computing Science is no more about computers than astronomy is about telescopes. (Edsger Dijkstra)

Lisp’s 50th birthday

October 29, 2008

John McCarthy‘s Lisp programming language —is 50 years old (October 2008). Lisp is the second oldest programming language still in use today, next to Fortran.

John McCarthy

John McCarthy

Lisp50 at OOPSLA 2008 celebrated Lisp’s contributions.

I celebrated by giving a talk to the Australian Java User Group in Adelaide about Clojure, a new dialect of Lisp for the JVM.

There’s a lot of interesting material to be found by Googling, but here are a few relevant links:

A decade ago I developed LittleLisp for the ill-fated Newton PDA.

There’s a nice parody song called The Eternal Flame which is all about Lisp, and here’s some amusing xkcd Lisp cartoons:
Lisp still looms large:
  • in Emacs as e-lisp;
  • it has mature free implementations (e.g. take a look at PLT Scheme);
  • and active commercial implementations (e.g. the LispWorks mailing list is very active).
Lisp refuses to lay down and die. In his 1979 History of Lisp paper John McCarthy said:

One can even conjecture that LISP owes its survival specifically to the fact that its programs are lists, which everyone, including me, has regarded as a disadvantage. 

In ANSI Common Lisp, Paul Graham points out that Lisp has always put its evolution into the hands of its programmers, and that this is why it survives, especially via the macro systems as found in some dialects (e.g. Common Lisp, Clojure), which make the full power of the language available to generate Lisp code at compile time.

Irrespective of how widely used Lisp dialects are today, we should continue to remember its contributions to programming: code as data, higher order functions, application of functions to the elements of a list, an emphasis upon recursive solutions to problems, erasure of abandoned data (garbage collection), the Read-Eval-Print Loop (REPL), to name a few.

As for the future, it’s always uncertain. Here are some notes about the future of Lisp from the OOPSLA Lisp50 session, which suggests that Clojure may be a big part of that. Next year’s International Lisp Conference has the working title “Lisp: The Next 50 Years”. 
I’ll end with a quote from Edsger Dijkstra:

—Lisp has jokingly been called “the most intelligent way to misuse a computer”. I think that description is a great compliment because it transmits the full flavor of liberation: it has assisted a number of our most gifted fellow humans in thinking previously impossible thoughts.

Replacing an iPod Nano’s battery

July 24, 2008

I bought a first generation iPod Nano more than 2 years ago. I use it every work day (see also, but the battery has been on the way out over the last few months. In the end it was holding charge for less than an hour, irrespective of charge time, often dying before my walking trip was over.

Getting it replaced through official channels would’ve cost in excess of AUD $100, about a 3rd of the device’s original cost. So instead, I spent AUD $20 on an iPod replacement battery kit from JayCar (I’ve seen them advertised elsewhere on the web too).

It came with the 3.7V Li-ion Polymer battery (400mAh instead of the original 340mAh), two plastic tools to pry the case open, and a brief but effective instruction sheet.

The most painful part was getting the case open. The plastic tools from the kit only get you so far and I pretty much wrecked mine. My wife Karen and I took turns carefully prying open different sections of the case with a small flat blade jeweller’s screwdriver (not suggested by the instruction sheet, but effective nonetheless), in addition to using the plastic tools.

Once the back of the case was off, the battery was easily removed, and I used a fine-tipped soldering iron to remove the three wires from the PCB, and fine solder to connect the new battery’s wires in place before putting the case back together.

I replaced the battery on the weekend and didn’t have to charge it again until 3 days later. Hopefully this will make my Nano last another 2 or 3 years, by which time it will probably be time for an iPod upgrade. It won’t owe me anything by then, that’s for sure.

Now, all I have to do is stop breaking earphones.