Monthly Archives: December 2010

Doctor Who – Robot

With the newly regenerated Doctor behaving violently, Brigadier Lethbridge-Stewart and UNIT have to contend with the theft of the plans for the new disintegrator gun by what seems to be a mechanical monster. The theft is the beginning of a plot to hold the world to nuclear ransom. The culprits are certain members of staff who work at the Scientific Reform Society who have stolen the beast and taught it to kill. This Doctor Who episode aired in 1974/1975.

Part 1

Section 1.1

Section 1.2

Section 1.3

Part 2

Section 2.1

Section 2.2

Section 2.3

Part 3

Section 3.1

Section 3.2

Section 3.3

Part 4

Section 4.1

Missing, unfortunately.

Section 4.2

Section 4.3

Doctor Who – The Ark in Space

This Doctor Who episode aired in 1975.

Part 1

On board a space station orbiting Earth, something opens up a compartment containing a sleeping human and enters it. Years later, the TARDIS materialises in a darkened room on board the station, and the Fourth Doctor, Sarah Jane Smith and Harry Sullivan emerge.

Section 1.1

Section 1.2

Section 1.3

Part 2

The Doctor notes that the alien insect has been dead for a long time and is almost mummified. Just then, one of the pallets activates and a woman revives from suspended animation. She introduces herself as Vira, a senior medical officer, and demands to know who the Doctor and Harry are.

Section 2.1

Section 2.2

Section 2.3

Part 3

The High Minister’s voice echoes through the Ark, identifying it as Space Station Nerva, praising the passengers for their efforts and encouraging them to rebuild human civilisation. Noah manages to fight off some of the alien influence and orders Vira via the communications system to expedite the revivification and get everyone off the station before the insect aliens (called the Wirrn), absorb them and take over the Earth. The Doctor and Vira go to find Noah while Harry and Sarah revive the rest of the technical crew.

Section 3.1

Section 3.2

Section 3.3

Part 4

Fortunately, Vira and Sarah have followed the Doctor. Vira shoots at Noah, allowing the Doctor to reach them. As they back out of the room, Noah tells Vira to leave the station in the transport ship, or else the Wirrn will hunt them down when they emerge. Noah explains that a thousand years ago, the Wirrn were driven from their home, Andromeda, by human space settlers. Since then, they have drifted through space, looking for a new world, and have now claimed the Ark for their own. While the Wirrn can live in space, their breeding colonies are terrestrial, and they need humans as hosts. They intend to absorb all human knowledge, achieving revenge for the loss of their original home and becoming an advanced technological species within a single generation.

Section 4.1

Section 4.2

Section 4.3

Inger Programming Language

Back in 2003, a small team of students in the Netherlands worked on a new esoteric programming language called Inger. It was modelled after C, but with some syntactic sugar that made it more readable:

  • Inger forces braces for every block statement
  • The parameters and result of a function are specified in funcional notation:
sum: int x int y -> int
{
  return x + y;
}

Inger was created specifically to accompany the book “Compiler Construction – A Practical Approach” which discussed the development of a compiler from the ground up.

The open source project is still available at Sourceforge here. Also, the book may be downloaded from the Inger project page or, more simply, here (PDF, 2.14 MB).

A Word Search Tool for Creating and Solving Puzzles

crossword
Crossword

I wrote a little tool today that others may find useful. This tool allows you to load a list of words (could be a big list, like a dictionary), and then search it using a regular expression. I needed it to help me create some puzzles (letterfind, swedish and crossword styles).

The program was written in C# and requires .NET 2.0 on your machine. It comes with two sample word lists: one with almost a million words from the Portuguese language, and one with 50 names of trees in Portuguese (of course the program can handle words in different languages!).

Be sure that your wordlists are plaintext with one word per line, and in UTF-8 format, e.g.:

desk
computer
mouse
blackboard

See the included word lists for samples. The alphabetic order in the file doesn’t matter. The program will ignore diacriticts in its searches (i.e. acção = accao). You can use wildcards like % and . in your searches:

  • %cao” returns everything that ends in “cao” (or ção, since diacritics are ignored)
  • “a..ba” returns everything that starts with “a”, then two random letters, and ends with “ba”
  • The query “….” returns all four-letter words.

Here’s the tool for download: Dict.zip (2.1 MB).

If you don’t have the .NET framework installed, you can get version 2.0 here (higher versions will also work – I tried to keep the requirements low).

As a bonus: this (PDF, 286 KB)  is something that was made using with gathered using this tool.

Free Charts Library Development

It’s happened a number of times now that I’m writing a piece of software that needs charts of some sort. Sometimes I’ll need a line chart, sometimes a bar chart, a pie chart, maybe even a Gauss diagram. There are cases that I’ll need a tiny chart that’s not too accurate but shows a tendency, shown as a bitmap (what seems to be called “sparklines”), and sometimes I’ll need a detailed line chart of visitors to a site by month, or number of pushups by day for a member of a gymnasium, or even a world map with data by country. I’ve done projects needing such charts in C#, in PHP, and in Flash.

There’s a problem: there doesn’t seem to be any (quality) free charts package out there. Good packages for PHP are commercial (i.e. JpGraph), but there’s open source stuff available (e.g. pChart) but this is obviously not portable to C#, or Flash. The Google Charts API seems to be the most flexible thing out there, but obviously it’s only available on the web and only for sites that are actually online, i.e. not for intranets. Yet Google Charts is exactly what I want: well thought out, easy to use, very flexible.

Since the backbone of a charts library is some math that allows us to calculate the axes, projection of points on the chart, creating the legend etc., it should be written in a portable way so that it becomes available and reusable in multiple programming languages. Google’s Charts API could be the basis for how charts are specified.

What I’d really like to do is write the algorithms to produce various chart types in pseudocode, so that they could then be implemented in various programming languages, possible then using the Decorator pattern to add features that are language-specific (lots of interesting things can be done with Flash, like mouseovers and zooming).

This’ll be a pet project for a while…