2005 2006  2007  2008  2009  2010  2011  2012  2013  2014 


Tuesday 27th of December 2005

Defaults should do nothing


Not, as Outlook does, remove line breaks at will. If I send an email with line breaks in, there's a reason. For example: if my christmas list reads...

Magazines: This, that, t'other.
Teapot
Toolbox

Then that's the way I want to send my email, and the way it should be read. No one should have to wonder if I've discovered a magazine called "Teapot toolbox" and start looking for it. But my parent did wonder, thanks to these "feature" of Outlook.

Pah!

If only I were making this stuff up, it might even be slightly funny...



Digital Archaeology: Looking for Dragons


I'm supposed to be writing an article this holiday, but the words have been failing me. Well, that's the excuse most writers give for laziness! Instead, I've been trying to recover some of my old software from the days when I developed on the Dragon 32. And what a journey it's been.

After grabbing a reasonable sound editor, and sampling the original cassette tape I spent the best part of a hour trying to find the conversion software. I knew it was called DC.EXE (so if the future is without DOS compatibility we'll have problems!) and it came with the PC-Dragon package. Using my traditional collection of bookmarks (probably not available to future generations, either!) and Google I tracked down version 3 of the package. Alas, DC.EXE does not come with version 3, so I had to find version 2.02a.

Google returned over 50 hits, most to shareware archives.

The shareware archives returned over 50 broken links. And each mirror was dutifully repeating the 404.

I eventually tracked down a copy (from http://ftp.man.poznan.pl/pub/simtelnet/msdos/emulate/, if you're interested) and got it working. I doubt the future will be so lucky.

I then proceeded to call it. Luckily, my Windows 2000 machine can handle the DOS compatbility, but the program wouldn't handle the file. I then spent some time tracking down the experience of other users, and found that this article about loading CAS files had a clue which, ultimately, worked.

Granted, 3 hours from my life for one program is a time sink. But I have the process sorted out now, so I can continue grabbing as much of my old software as I can find. This has, however, reminded me of some value lessons which I hope surfers of the future will learn from :)

1. Only geeks like me know what a Dragon 32 tape sounds like. My software was also labelled by what was on it, not what platform, since I only ever developed on one platform at a time. If you're interested a Dragon 32 sounds like this.
2. The software we have is only used to solve temporary problems; only temporary platforms. When DOS compatibility is broken, who's going to re-write all these emulators?
3. Most of the older emulators are binary only -- including one of mine, I'm ashamed to say. We'll be emulating emulators, on emulators, before long. At which point there's more chance of bugs, preventing future generations from experiencing the original software.
4. The documentation for this old software is often very minimal. Only recently, probably with Open Source, has more than one person decided to take on the mantel to help others understand the software. We need to know how it all works, and more importantly, how to pass this information on.
5. Not all of the old work is available. The only Dragon tapes I have found are the earlier BASIC programs which I compiled onto Memorex C90 "Master" tapes. All my work-in-progress, assembler experiments, and other such code is probably gone for good :( But I'm not the only one...

On the positive side, sound editors are now so good are fixing tape drop-outs, that software that was previously thought lost can now be played. And the fact that each step of the chain can be carried out by a numpty such as myself, is reassuring.

Whether the stuff we're saving is any good is a different question. I've decided to archive everything I can. Not because I think it's important, but just because I refuse to censor myself, or decide what future geeks can learn about. Let history decide...

p.s. the first program I converted was a port of Tim Hartnells O's and X's. Which looks rather bland, and curiously enough, has some bad bugs!





Wednesday 21st of December 2005

Warming to the gp2x



It's obvious really, but after a while I'm really beginning to warm to the GP2X, and then I begin hating the really bad quality of software! The only developers out there are early adopters writing 1st generation products to be first to market; which gives plenty of reasons why the software is buggy, undocumented, and generally problematic. So far, I've been encouraged only by sterm, the NES emulator and (obviously) Quake. I haven't downloaded everything, but the above titles account for around 5% of my conent, so I expect the same to be true of the rest of it.

This, too, coming hot on the heals of a rather lack-lustre first set of titles on the Xbox 360. The benefit of the MS console is that there are standards and quality checks that must be followed before release. There is no such thing for the GP2X. Sony and Nintendo also have these checks, but due to open nature of this beast, everyone is free (and encouraged) to produce their own standards. Gamepark should, at least, have provided a set of guidelines. Perhaps I'm missing the point - perhaps the standards are supposed to come from the developers, who will in turn adopt the de facto standards.

Also, despite being an "open" console, the amount of available source code is quite small, and so am unable to fix any of the problems, should I be so inclined.

[I'm working on an article about the gp2x over Christmas, so should have lots more to tell on my return.]






Thursday 15th of December 2005

9986280348253421170679



So, I'm listening to the new Kate Bush album, Aerial.
So, I'm listening to the second track, Pi.
So, I'm on the train, and it's a bit hard to hear all the lyrics, but the song Pi definitely has the first 100 or so digits to the fabled number.
So, I'm geeky enough to wonder if they're all there.

They're not!

So, I'm not geeky enough to be the first person to notice.

So, that made me feel better.

So, 9986280348253421170679 is missing.

So what?
So what message am I missing?



Wednesday 14th of December 2005

The simplest MediaMVP hack


And it is... changing the graphics!

The method the MVP uses to update the interface screen is to call back to the server saying "this button has been pressed, what do I do?" The server then responds with a new bitmap image for it to display. This, IMO, is a bit longwinded, especially for an embedded Linux box with several CPU cycles to spare. While the format of the images has to be BMP (so you can't speed the interface up by using compressed JPGs) it can be changed by overwriting the files in C:\Program Files\Hauppauge MediaMVP\image\English So, create an image for the top half of the screen (600x180, 24 bit, uncompressed, BMP) and one for each of the menu options of music, pictures, radio, settings, videos (at 600x220, 24, bit, uncompressed, BMP) and you can have a customised MVP in a matter of seconds.





Tuesday 13th of December 2005

BBC Backstage



Last night was a social meetup for participates, friends, geeks, and general hangers-on (i.e. me!) of BBC backstage. It wasn't a formally organised event, rather a private room in a pub, with a few quid behind the bar. Since those attending were outside of my usual spheres of Lonix/London PM et al there were a lot of new faces but I was made to feel welcome by those already there, and met some great people: Leo, Tom, Steve, Mark, Mario amongst others. But you all know who you are :)

So, what did I learn? Well, I realised how serious the BBC are about getting their content into the hands of hackers, and how they're looking to work _with_ the community, and not against it. Whether it was by accident or design, I never felt the breath of suits looking to use my ideas to further their bottom line.

I discussed many ideas (and probably over-talked, since I'm guilty of this occasionally, so apologies to the BBC R&D department!) and realised how many people are also looking into the safe areas. It also reminded me how much of my own technology is undocumented; rather embarassing for an author! Therefore I propose to create some more docs, including a full wiring diagram, over the next month. Watch this space!




Monday 12th of December 2005

Numbers for geeks


Twice, over the last week, I've been discussed the London geek community. Specifically, how small it is. Despite having hundreds (or more probably, thousands) members there seems to a very close knit connection between any two members. Think Erdos numbers, or the Kevin Bacon game.

So why is it? Well, probably that anyone of any importance will belong to one of "standard" geek institutions of London, which I propose are: Imperial college, London Perl Mongers, Lonix/Gllug and 2600 (don't laugh!). Many others (such as the PHP meetups, Ruby/Rails communities, etc) have a fairly large enough cross-over membership to be only "two people away" from anyone else.

Last Friday, Billy Abott and myself were discussing this and came up with the Wistow Number. This is like the Erdos number, but for London-based geeks. A Wistow Number of 1 means you personally know Simon Wistow. 2 means, you're a friend of a friend. And so on.

However, Billy highlighted a problem... everyone knows Simon Wistow.

This gives everyone in London a Wistow number of 1. Rather dull, I'm afraid.

So, to counter I propose the Cowfish Number. This is the number of distinctly different ways in which you know someone. So my Cowfish Number for Simon Wistow would be four, as I know him because:
1. he works with my old line manager
2. he's a friend of Dom Giles, who I hired as a games programmer many years ago
3. he's a friend of Billy, who I know independently.
4. I know him anyway (through PM and various tech-based conferences)!

If the same name comes up in two different threads, it's not a different thread!




Thursday 24th of November 2005

Arg prompt


This useful tool, Arg Prompt, was written in 1998 to supply command line arguments to Windows programs, whilst remaining in the GUI. This was one of several short programs I wrote for Windows before seeing the light and moving (almost) full-time to Linux.


It was very simple, but it introduced me (in a very limited way) to the Windows shell and its extensions. It was interesting to learn how it did things. And, truth be told, it still is. I have never been part of the "Linux-only" crowd, and I am all to happy to take ideas, development metaphores and solutions from wherever they come - I'm too much of a pragmatist like that.


However, I hope I still have the source to these utilities around, since this was pre-Open source.



Wednesday 23rd of November 2005

ASCII Pacman


It's retro week on the Blue Dust Blog!
Over the next week I'm going to refresh my memory of all the code I wrote many years ago, and resides, gathering bit dust, on my hard drive.

Todays installment: ASCII Pacman.


The first thing I noticed that I was still using C (as opposed to C++)! That must have been my last project doing so, since I almost can't remember a time when I thought that was sensible ;) Perhaps I wrote it to prove a point - that being, it's a pane to use C.


I think this experimental "just playing" attitude affected in the code in other ways, as there's no braces around one line 'if's. A stalwart of my coding standard for years.


On the plus side, I'm impressed by the modularity I adopted. I'm sure a game as simple as this could've been done in 20 lines (cue memories of Acorn User's one line wonder in the back pages every month) but I've adopted sensible boundaries between components, IMO.



Wednesday 16th of November 2005

Finger frenzy


As a note to self, and for anyone else with too much time on their hands, here's a little typing game yo umight find amusing:
http://www.morpheme.co.uk/frenzy/


What's probably worse, is that I'm glad I was the first person to break the three second barrier. It forced me to stop playing and get back to work :)



Friday 11th of November 2005

More Sony bashing on Slashdot


Now, it appears, there's issues with Sony CDs on the Mac. Basically, running the Sony player re-writes your drivers. Ouch! But, despite wading through hundreds of pages of "I pledge never to buy Sony again" (not realising that Sony make 50% of the CRTs in the world) not one person has signed the pledge at pledge bank. Well except the author. And he's probably one of the aforementioned Slashdot crowd, anyway!



Monday 31st of October 2005

Cenobitic is #1


This is not surprising, since Google has very few videos, and we have such a unique name. But... the word Cenobitic returns our video as the first hit :) As it does for the names of either of its two creators: James Bailey and Steven Goodwin.


This means I’m now #1 for my name in Google, Google video and Froogle. My publicity shot is #2 in Google Imge search. I now just have to get a road named after me to achieve winning status on Google Local. ;)



Friday 28th of October 2005

Cenobitic video uploaded


After too many false starts, broken code, and busy evenings, I have finally managed to upload a version of Cenobitic to Google Video. It’s not the version we broadcast at BBC Backstage (as that ran to 120 Meg) but a MPEG 2 version clocking in at just 40 Meg, so those wishing to download it don’t need such a fat pipe.



Wednesday 26th of October 2005

InSync With Comedy



Last Thursday saw the one-off Point and Schtick: Can Interactivity Make You Laugh? event at 01Zero-One. Coming from a background in computer games, I was hoping to learn some secrets. Instead, I learnt there are more questions I haven’t yet learned to ask.

It began with a brief prologue of the field and the introduction of the main protagonists, but the conversation debate was never contained to those five. The audience comprised mostly of web designers, but also included comedy writers, film makers, BBC producers and game makers. And of these around 80% were active in the debate. Questions such as “Is Nigella Lawson eating ??? funny?” and the application of traditional gameplay mechanics over humorous graphic content. Although the games, web sites and media shown during the evening were fun, and in some cases, truly funny, trying to nail down specifically what it meant to be interactive and funny was more elusive. But it was very lively, and very informative. But obviously, no conclusions were reached - it is a subject that’s rarely, if ever, discussed – but the outcome never mattered. We went for the journey.

Ultimately, so many ideas were discussed that I would be very surprised if no one was commissioned, hired or employed as a consequence of the night’s event. One such winner may well be talking to BBCi, who are looking to commission a number of interactive comedy formats.

Personally, I am still undecided as to whether it’s truly possible to be interactively funny. I still belief it’s not. Not in TV or computer games, anyway. I think it’s possible to make the entertainment funny, and be interactive… but not be funny as a consequence of being interactive. After all, if comedy is the convergence of expectations, it’s very difficult to maintain that pretence when the user has selected an option, or pressed a button.



Sunday 16th of October 2005

Automatic TV guide reminders



Another day, another script using the data from (the now infamous) bleb.org! This one scans the TV listings for two days hence, and emails you a list of all the programmes you might be interested in. The list of search terms, along with your email address, must be entered manually (this isn't Tivo!) but everything else is automatic. Download the tvreminder tarball archive.

There's only one line of set-up you need to do to install it on your system, and that's only required if you're running it automatically with cron. That is, the 'cd' line which indicates the directory in which all the scripts live. Simple!

The archive's readme gives the full working description, but if you're interesting in doing tail recursion in XSL, or want to see case-insensitive searches in XSL, then I suggest you read this code for solutions.



Saturday 15th of October 2005

Creating a TV preview page



Continuing this weeks theme of XSL transforms, and my usual love of multimedia and home automation applications I've decided to release my TV preview scripts. They're very simple, but serve a purpose. Namely, building a web page containing images from each TV station, and describing the programmes. This page is built automatically in the background, so I can idlely channel surf without leaving my web browser. Here's a screenshot of it in action.

The structure is thus:
1. Every morning, at 3.00am, the gettoday.sh script is called which retrieves the days TV listings from bleb.org. This works, as you'd expect, with cron (0 3 * * * steev /my/machine/gettoday.sh).
2. Throughout the day, the tvgrab.sh script is called every five minutes (also through cron) which interfaces with the TV tuner card to grab bbc1.jpg, bbc2.jpg and so on. It also generates the HTML, using the whatsonnow.xsl stylesheet I blogged yesterday to build the textual descriptions.
3. Er, that's it!

gettoday.sh is nothing more adventurous than a series of wget commands to retrieve bbc1.xml, bbc2.xml, itv1.xml and... you get the idea!

tvgrab.sh makes use of the magical v4lctl command that not only lets you set the TV card's tuner, but grab images from it. This magic is encapsulated in the commands:

v4lctl setstation $CURRENT_STATION
v4lctl snap jpeg 160x100 $TVDIR/tv_ch$CURRENT_STATION.jpg

The rest of the code is a feature list: the use of a lock file, the directory into which the files will be placed, the "last updated" information, and the layout. All simple. However, the end result is very effective.

There is some question on the legality of re-publishing images from the TV - even if they are 160 pixels wide, and very fuzzy. I am not a lawyer, but since this page is private, and only accessible from my home network, it should consistute fair use.



Friday 14th of October 2005

What's on TV now?


I, personally, do not know. So I wrote a script that does. It processes an XML file from bleb.org and outputs the currently showing programme. It's not big, nor clever, but it does work!

http://www.bluedust.com/pub/sources/whatsonnow.xsl

It's a bit of code I use in my TV preview script (which I'll post later). It can report two programmes since one programme is consider to start at 12:00 and the preceding one ends at 12:00 (as opposed to 11:59:59). Perhaps I should use less than, instead of less than equals! I'm undecided about this point at the moment.

Linux usage:

xsltproc --param TIME_NOW "'`date +%H%M`'" tvsearch.xsl bbc1.xml

Windows usage:

msxsl bbc1.xml tvsearch.xsl TIME_NOW="1930"

I don't know the Windows "get time now" command, sorry.



Thursday 13th of October 2005

Orphaned projects - The Worlds Biggest Cocktail Collection



Alongside my large selection of "visionary" projects, there are a small
number of interesting side ideas. These get picked up whenever I have time,
or lack the necessary reference material to hand for my larger project. As happens on the train home.

Yesterday I converted a Word document listing of cocktails into a simple HTML file.
The process was simple: Word into plain text. Plain text into XML, courtesy of
Perl. And then XML into HTML with an XSL style sheet.

I first wrote a very simple Perl script that relied completely on the
cocktails list data format, as I saw it. When I ran the script:

perl drinksfix.pl <cocktails.txt >cocktails.xml

against the real data. there were a couple of problems.

The usual problem of & becoming & was easy to fix, the conversion of
ã (and all the variations present) was not. This took about half an hour of to'ing and fro'ing. Oh! for Internet connectivity on South West Trains!

Then I found a couple of oddities in the format itself, which broke the simplistic
Perl code. I fixed the cocktails.txt source, since this was a once off job. The XML was
soon well formed.

It was then a simple case of generating an XSL stylesheet to convert it into HTML. Here you must remember that you need:

<xsl:text disable-output-escaping="yes">


to include HTML tags, like anchors, in the output.

Under Windows, the conversion process is simply:

msxsl cocktails.xml basic_cocktails.xsl >cocktail_list.html

The layout is simple and functional, and I added an index to the end, just for
fun. The complete source code (plus data files) are released under the GPL and held here. With the cocktail list standing at 800K, it is held here, if you want to see the very unpretty output. But it'll be quicker to download the zip and decompress locally.



Wednesday 12th of October 2005

In two days time


One of the joys of Linux is the voyage of discovery. Not just in Linux itself, but the GNU tools that support it. Today, for example, I was working on a short TV reminder script and needed to know the day. Well, that's easy: use date +%A.

I then needed to the day in two days time. I started thinking about using expr, or a Perl script, or something else even more unwieldy. I then discovered (thanks, once more, to Google) this site, which informed me about:


date -d "1 day ago"


Truly brilliant. Now, it's only the GNU tools that do this, but what a great extension. To get my answer of "in 2 days time" it was simply a case of thinking backwards to know that:

date -d "5 day ago"

was equivalent. Although further probing caused me to note:

date -d "2 tomorrow"

This is my prefered solution since I can also retrieve the correct date too, should I need it.



Tuesday 11th of October 2005

Seek and ye shall find


There are no coincidences. Just events that you, as a human, tie together in an attempt to make sense of the ever-growing universe. Over the last 24 hours I've been asked to write for the UKUUG newsletter, contribute to the Free Software Magazine newsletter, comment on my second book proposal, and have been published in the aforementioned FSM. The latter being an article I'd almost forgotten I'd written.

Like I said, there are no coincidences. The UKUUG query prompted my memory of the FSM article, which I duly found, which in turn highlighted the email about the FSM newsletter. The book proposal had been submitted several weeks ago, so feedback was bound to arrive "any day now." Therefore, on whichever day it arrived, everything would suddenly appear synchronous.

I'm not knocking it, though. I've been so busy over the last few weeks finishing up at work, and working on  the proof of concept for a data-driven emulator, that I've had no time to investigate anything worthy of my blog.



Friday 23rd of September 2005

IBM OpenPower Project



Last night was the IBM OpenPower Project event. And what an event!

It started with a gentile gathering in the lobby of the London Planetarium just after 7.00pm with free beer, juice, and decent canapés; duck rolls, chicken teriyaki, and some vegetable thing I ignored – because I’m a carnivore, not because they weren’t good. Handouts of the OpenPower systems were available, along with the obligatory IBM pens. Particularly useful to those of us that, despite taking our own, had left them in the (free!) cloakroom by accident.

At 8.00pm we were ushered into the planetarium dome for a five minute marketing spiel about OpenPower. However, given that the talk was just five minutes long, and featured none of the superlatives usually associated with events of this type, it felt positively charitable!

After a fantastic show (“Voyage to Infinity”, IIRC) there was a short talk on the issues about rendering and projecting films onto a dome of this type. Although the connection between IBM and the films was muted, the presentation was more informative and candid than I’ve come to expect. Top marks to the speaker. As a direct consequence I was (and am) inspired to look into creating my own planetarium dome and software!

We then returned to the foyer for more drinks and food. This time the food came in the form of mash, sausages, pizza, steak and kidney pie and salmon something or other. In all cases it was very good food, and no one I spoke to felt disappointed or hungry. The ubiquitous t-shirt was distributed on exit. But like the rest of the event, it was understated, and very non-showy. I prefer having nice t-shirts that I’ll wear, as opposed to the walking advertisements I usually get given.

IBM have won many brownie points for this evening. It was under publicised, and consequently under subscribed, but I hope this doesn’t stop them from putting on similar events in the capital. This was, IMO, is how all promotions should be. If people are there for the free beer, no amount of preaching is going to win them over, so forget the hard sell. If people are there for the beer and the company, they will make themselves known during the evening and engage in a 1-to-1 discussion with the appropriate representatives. And if you haven’t been preached to all evening, the attendees can spend more time talking about nice things… which usually involves the company (in this case, IBM) and what a good evening they’ve laid on.

Some people will even blog about it…



Thursday 22nd of September 2005

Heineken video movies



Perhaps it's just me, but I've had a lot of bad luck with brain dead web sites lately. These are the type that claim to provide a service, but actually hinder any attempt to use them unless you're running IE. In 1600x1200. In 32 bit colour. On a T3 connection. During the month of August. ;)

My latest gripe is with Bitmove, the backend of the video email messages sent by the Heineken Experience in Amsterdam. The principle is simple and very good; provide a means whereby visitors can send video clips to their mates back home by sending a link to the website. Store and administer the video on a central server by a specialist IT company, and deleted them after 2 months. However, the streaming technology developed for this project suffered under my versions of IE, Firefox and Opera. I could not view, or download, my clips from the exhibitions, so I had to find a way around it. Preferably within 2 months.

Now, I know it works for some people, my gripe is "why not me?"

Refusing to debug their application for them (at least the IT is centralised so any bugs I find will work for all these exhibitions) I opened the JavaScript files to find the movie URLs in question, and then go a wget on the file directly. Naturally, it worked :)

For those having the same problem with Bitmove and Heineken Experience, let me give you the URL constructions:

  • Go to the URL suggested by the email. This contains a UID (which is mapped to a filename on the server, so you'll need do go the web site) and a FORMAT , which you'll need later.
  • View the source of this web page (sorry, you'll need to a be bit geeky for this!)
  • Look for the word "loadBitmover". It will be followed with a name, e.g. steev180905122207.wmv. Make a note of this.
  • If the FORMAT string is WMV (confirm with the filename, above) then visit:

  • http://bluescreen.bitmove.tv:80/wmv/

    and then add your personal filename.

    If the FORMAT is MPG, then repeat but with:
    http://bluescreen.bitmove.tv:80/mpg/
So in truth, it's not that geeky to do. But, alas, you usually need a geek to tell you how. Consider yourselves told! :)



Wednesday 21st of September 2005

Blue Dust blog now on Planet Gllug



I'm now one of the contributers to the planet aggregator at Planet Gllug. I am aware of some date-oriented problems with it, but I hope this is will be one of many aggregators spreading the word of this lowly writer!



Monday 19th of September 2005

Which for Windows



For ages now, I've forloned my ability to find a suitable analog for the unix "which" command, under Windows. Understandably, any Google search containing the words "which", "windows", returns a series of results that are as good as useless. It was consequently quicker to write my own. It currently lives at which.pl. I've saved it with the .txt extension to permit easy downloading, less Windows try to execute the script when you click on it.

For those wanting a more involved description, I suggest you use the source Luke! It's a trivial 30 line piece of Perl, which could no doubt be optimised. It simply splits the path into component directories and checks for the existence of the command by appending each executable extension (.exe, .bat, etc) to the stub name.



Tuesday 13th of September 2005

Literary Spoonerism fun with awk



I read the news today, oh boy. About Natasha Kaplinski, who "wedded her banker." What a phrase for the cunning linguistic! I'm sure the journalist in question knew what (s)he was doing. But it did get me thinking as to how many words had common stems, and which could be used for Spoonerisms.

Well, a few moments in my trusty bash shell, and I came up with this perfunctory piece of Spoonerism code:

( (egrep "^w.*" /usr/share/dict/words | awk '{ printf( "b%s\n",substr($0,2))}') && (egrep "^b.*" /usr/share/dict/words)) | sort -f | uniq -d -i

This produces a list of 328 words that may start with either 'b' or 'w', such as "bring" (valid also as "wring"), "bangle" (or "wangle") or "bounds" (with "wounds"). None of them as amusing as the original, granted, but a useful tool for any Ronnie Barker wannabes.

Of which, I am one.



Wednesday 31st of August 2005

A computer-fiendish game


A friend recently highlighted the site, www.arimaa.com, to me. In short, it details a game which is easy for a human to play and win, but difficult for a computer. This is, the site claims, to make computer opponents hard to write, leaving the field open for humans.

Alas, they're fighting fire with fire. The reason the computer can not play this game very well is the same reason the computer can't play good Go - the number of positions (studied by brute force) is too large a set to study. The game design is uninspiring, and merely an exercise in creating as many branching paths as possible.

As an idea, however, it is very good. Let's ask the question, "What can humans do well, that computers can't" Obvious answers include things like pattern matching, bluffing and other subtle play interactions. I think a version of poker without the element of chance would fulfill the criteria. But I haven't worked out how that would work, since all the information is available to each player. And at that point it's a matter of calculation, so what is the difference between human and computer processes?



Monday 29th of August 2005

My email address


If anyone's interested is:


root@127.0.0.1

I trust the spambots won't spot the deception above! When I created my IGDA profile last week (blog entries passim) I put a link, as requested, to my CV. Well - no one reads it anyone, so I didn't worry people getting hold of it. Until, that is, I realised that spiders might pick up on it, even though the profile is private to IGDA members only. So, as an act of minor insurance, I created an image file with my email address on it to limit spam.

The other methods I considered were some Javascript code (also, blog passim) which creates email address algorithmically, thereby preventing spiders from reading it, splitting the text up with DIV tags, and using the old familar myname@NOSPAM-hotmail.com.

I figured the image was slightly more future proof, since there's a lot of image files on my pages, so a picture called background shouldn't cause suspicion and the shadowing might put off a few OCR tools. But just for safe measure I used the ALT tag to describe the spammers local sysadmin. But having now done it, I'm thinking this might alert spambots to target this particular image. Email me with your thoughts... :)



Wednesday 24th of August 2005

Refactoring for fun and profit


My free development time, this week, has been spent refactoring the SGX core so that my Zinc home automation project, and my 3D engine, can use the same base[0]. I haven't finished it yet, and there's still a long way to go, but I have to stand up and say "refactoring is fun!"

There, I said it. I'm an addict.

But why is it fun? Well, it's a chance to revisit old friends. Code you haven't seen for years (my core engine is nearly 10 years old!) suddenly arrives in your editor and you think wistful thoughts. You get to fix those niggles you didn't last time around, and you're able to implement better solutions because your skill has increased since you first wrote it. This sense of achievement, and of having progressed, is fun.

But why is it profitable? Because you learn. In truth, you revise. Developing any project over a long amount of time will cause you to forget things. A refactoring will cause you to remember or learn those things, giving you a better "big picture" idea of the project and inspire you with new confidence in the project as the flakely bits are isolated and added to your TODO list. The minutea of assumptions made within old functions can be verified and checked. And all the bugs that rely on these assumptions will disappear. Face it: bugs exist because something you thought was true - isn't, and this eliminates that.

In fact, refactoring is so much I propose some bi-annual refactoring time (BART) for any large project. So let me re-start: My development time, this week, has been spent doing a Simpson... :)

[0] They started using the same base, but grew apart when I refactored part of the code to make the structure of the book flow better.




Tuesday 23rd of August 2005

IGDA profiles


I've finally got around to creating my Steven Goodwin - IGDA Member Profile profile! It's not something that I expect to use, bring me fame and fortune, or introduce me to beautiful women :) but it might remind people that I'm still around in the industry!


My reason for doing this is not the usual round of "self-promotion" blogging. Rather, IGDA provided a service I wanted, and while I was configuring it I thought I might as well take the time and produce a basic profile. "Which service had they provided?" you may well ask. Email forwarding! Yes - the addition of something so simple as a vanity email address (@member.igda.org) was enought to coax me out of my shell. My excuses are:


  • I don't need another email address, but a forwarded account is useful

  • It's good to get an easy to remember email. Having the IGDA suffix is good, and everyone in the industry knows it. Being able to use my real name (without fancy formatting, or being called steve_goodwin_with_a_V_57) is also good.

  • It provides a nice abstraction so I can tell where people know be from, without resorting to igda@steev.myhomeip...

  • I've already paid my membership so I might as well use it :)



All of the above affect my decisions. But in what order, I'm not sure...



Sunday 21st of August 2005

My javascript money. My javascript mouth.




I suppose it's inenvitable - you blog about your love of JavaScript, and then you start wistfully thinking of all the "good old days" you had. Most of the code I once wrote had since been retired by Firefox plugins that do the same, or a very similar job. Or someone else has released the same idea, consigning mine the "bandwagon" folder. And if it's one thing I hate more than someone chastizing my development, it's someone doing so to highlight another technology that came after mine and still failing to notice my original work.

Here then is ComCo, some code that's still sat on my toolbar folder. ComCo scans the current URL and replaces the .com part of the address with .co.uk. Or vice-versa. I wrote it because I was continually checking the sales rank of my book under both Amazon.com and Amazon.co.uk. The book's been out a while now, and sales are dropping, so I don't bother keeping such a keen eye on the figures. That's not to say it isn't useful anymore. It's just a case of geek bragging rights. Open this page and then click and drag the link into your toolbar, or add it your bookmarks, you can use it as I have done. Just
click on it whenever you want to switch between sites.

The code is quite simple, and so released under the GPL and BSD licenses; whichever you prefer.
Perhaps some other author will find it similarly useful...

Note: this trick only works because Amazon URLs (after the domain name) are identical between sites, and even then not all pages will work.



Saturday 20th of August 2005

Old technology never dies


Particularly when it's good technology. Particularly when it's old, maligned, technology - like JavaScript!

JavaScript has been one of my favourite languages for just 'dipping into'. Not because I'm a web monkey, but because I'm a programmer. And most programmers have spent years maligning JavaScript and it's inability to anything useful, but I've been doing fun, interesting things with it for years.

That is, some programmers have maligned it. It seems many got burned with the idea of making dynamic web sites using it, but never got beyond page four of "Crap JavaScript for Muppets" and learnt nothing more than how to add two numbers together, only to find them concatenated as two equivalent strings would be. The never realised that JavaScript was an object-oriented language, with regular expressions, and a means to controller the browser dynamically. I bet the same programmers that beat me up for my lunch money in the playground are now emailing links to Google Maps of the schools where they tortured geeks like us for admitting to like JavaScript.

Now, however, we have Ajax, so JavaScript is becoming trendy again. At last! Perhaps I should dust of my CV and my "experimental code" folder to find some old code people might find useful :)

And even in typing that paragraph I've discovered something... this is the first time in ages I've been excited by the existence of a buzz word. Thanks to the word Ajax (not the technology - that's been around for ages), we're able to revisit technology now present in every browser, without downloading plugins, installing ActiveX controllers or making other hacks to the browser.



Thursday 11th of August 2005

Who downloads music?


So Zdnet has an interesting statistic that 12.3% of all the music files traded on P2P networks are in Ogg format. That's good for the Free Software community, and the Vorbis people.


A more interesting statistic has almost slipped under the radar: 11.34% of the p2p traffic is audio. This is either a sign of more people having broadband, and wanting to download video in preference. Or a sign that legally available MP3s make the illegal p2p trade dead in its tracks. It's probably a bit of both. But it's no surprise really. Now is the time for the TV and film companies to realise this, and provide a method whereby we can watch TV shows by hooking in to a torrent. They should become the next ISPs.



Monday 25th of July 2005

Cenobitic - OpenTech 2005 Presentation



On Saturday I presented Cenobitic at the BBC Backstage event, Open Tech.

The presentation went well with no technical hiccups (other that my co-creator, Jim, not being present!) although my laptop was slightly too slow to present such a large AVI file (140 meg for 4 minutes) and so it juddered in places.

The film was premiered during the afternoon break, but we still retained an audience of just over 50 people. Not only that, about 48 where still left at the end of the film :)

It's too early to be expecting a call from Steven Speilberg, but so far Billy Abbot has provided two images of the presentation calling me Pretentious Film Maker and inspiration for "The Fonz". Which, funnily enough, was the look I was going for :)

Photo #1
Photo #2



Wednesday 20th of July 2005

Why buy a TV license?


For those outside the UK, let me just start by mentioning that we have to pay about 130 pounds, per year, to own a television. This money is paid to the BBC and is compulsory, regardless of what we watch. The "is this justified?" argument is an old one, and I'm not prepared to re-hash it now. But I will, however, add a new spin by asking "is it necessary?"

If you have a TV without a tuner (getting less difficult to find, these days) you don't need a license. If you don't have a video (which also has a tuning circuit) you similarly don't need a license. So, with a decent flat panel and a DVD player you can watch most good TV series without paying the license by buying or renting them on DVD. This is all legal.

After all - why do I need a TV?

My news comes from the radio and the Internet (no license required), and any big sports events will be on at the local pub. Current affairs are covered by my daily dose of the papers (<£1 each, or less if you travel on the right trains ;)

Now, with Amazon's DVD rental costs (£7.99 per month, for 4 DVD rentals) this equates to 2 quid per DVD, or £4 DVD per season of CSI (my current favourite). If I also rented 24, Futurama, The Simpsons, FarScape and Doctor Who, it'd still cost me 6 months of rentals which only clocks in at £48. That's almost a third of the license fee! And I'd still have the opportunity to rent several other DVDs within their '4 DVDs a month' budget.

Add in additional DVD rental companies, film rentals from the local store (for those Saturday night blockbusters we get on terrestial :) ) and the initial cost of a decent TV without a tuner, and you can profit by dumping your license! Those with satellite TV or cable can save on the rental, at the expense of other up front fees.

It's almost ironic. The only way to persuade people to keep their tunable TVs and pay the license fee is by dropping the radio, their on-line presence and all their DVD releases - all of which are essentially funded from the license in the first place!



Monday 18th of July 2005

ICE


In the wake of 7/7 a new initiative has been worming its way around London. ICE. Not the overly loud drum and bass eminating from socially inconsiderate teenagers (that's ICE as in "in-car entertainment", although the definition of "in" is a bit of a misnomer), but the ICE meaning "In Case of Emergency".

This is a number you put in your mobile phone and is the one used if you run into problems. It's a layer of indirection to "Mum" basically. But naturally, it doesn't need to be your mum, it can be your partner, house mate, boss or porn buddy.

I'm currently thinking of a proposal for individuals who act as their own sysadmins, where their 'root' passwords can be held in escrow, and the list of people to contact in case of emergency/fatality can be held in a similar fashion. I have a lot of on-line contacts my family know nothing about, and I would want them to know should something happen to me. In fact, I have a lot of on-line contacts most of my other on-line contacts don't know about.

Any solution needs to be secure (the idea of a "Dave is dead" prank is horrific), and have total integrity. I guess some 'dead man login switch' could be constructed with very little Ruby-on-rails code. For the moment, I'm relying on a hidden page on my web site, with the same name as the phone number of my ICE, and a few basic instructions. In this way, you can only fake my own death by knowing two personal things about my life (and by stealing my phone). But that isn't secure enough for me.

Any ideas?





Friday 15th of July 2005

Godwin's law and Goodwin's law


To quote Wikipedia,



Godwin's law (also Godwin's rule of Nazi analogies) is an adage in Internet culture that was originated by Mike Godwin in 1990. The law states that:


As an online discussion grows longer, the probability of a comparison involving Nazis or Hitler approaches 1 (i.e. certainty).


I consequently propose my own law, that as an online discussion grows longer, the probability of discussing the link between Saddam Hussein, uranium from Africa, and Weapons of Mass Destruction approaches 1. While the fact that any of it actually occured approaches 0.


Ok - so I've seen this type of thread develop twice in the last two days, so it's very much "of the moment" and will make no sense to the history books. But this is a blog, so I'm saying it anyway!



Thursday 14th of July 2005

Stupid variable names


As all programmers know, you don't call your variables 'Gandalf' or 'Frodo' since that makes no sense. Similarly, over use of Hungarian notion leads abonimations like g_pszifnivpfVariable :( However, there are several innocuous variables I would like to ban. For example:

count [very easy to miss an 'o']
hit [because all scalars in Perl are prefixed with $]
CUnity [unless your a nun, you will misread this!]
flick [the L and I when placed together in _any_ context will blur]





Tuesday 28th of June 2005

Cenobitic web site launched!



Artists have historically suffered. Suffered for their art. Suffered for their rights. The copyright law has prevented creative innovation and derivation until 70 years after the artists death - at which time their peers have similarly expired.

With the advent of the Creative Commons license however, writers, musicians and artists now have a means whereby they can share their work for others to adapt and build upon; without fees or licensing agreements. Their art is able to live before their death.

Two filmmakers are taking this concept one step further, and producing an Open movie called “Cenobitic” where the materials used in the production, and the technology involved, is Open. Open source. Open content. Open art.

Visit http://www.cenobitic.org/ for more information, along with a description of the word!



Monday 27th of June 2005

Lego on brickshelf



I've created myself a login on BrickShelf.com to expose some more of my Lego work. This is for two main reasons:

  1. It saves me creating specific web pages for them
  2. It gives a wider audience to the work
My famed Lego Tori Amos even has some new pictures.



The financial cost of writing a book



One of the problems with writing a book is that the questions never stop. Everyone’s interested in the process because, I guess, everyone wants to be a writer. One question that I haven’t answered yet is how much it costs to write a book. Not in terms of emotional stress, or the pains it puts on your life, but the physical, monetary cost.

When I started writing, I was paying my way through magazine articles, web site design, and the occasional bit of software consultancy. However, the money doesn’t last forever, and the time taken to find new work vies for attention with the time for writing. This resulted in me getting a “proper job.”

This in turn has an additional knock-on effect. Namely, I needed to buy a laptop. Despite being a computer geek of many years standing I’d never owned a usable laptop. They were for non-geeks to do spreadsheets or play solitaire on the train while trying to look cool. (Note to self: it’s not!) Since I’d be writing, a could save money with a low power, low specced machine. But, since part of the book was on graphics programming I needed to test my graphics code on the machine too. This instantly increased the cost of my laptop, but it still came in around the £600 mark.

Next was the requirement to have a decent printer. It didn’t need to be portable (although many good models are now available) but it needed a reasonable fast pages-per-minute count for the last minute editing session I knew I’d be doing in the final week. I also bought a replacement toner cartridge ahead of time. Just in case. It turns out I didn’t need it, but it was the most practical £45 insurance policy I’ve ever taken.

For those that have never heard of me or my publisher (and that will be most of you, I suspect) I should mention that I am English, living in England. My publisher is American, in America. What does that mean for the writer? Other than the fact you need to change your spell checker to American-English? Well, it means to be legally compliant with the contract, and to correctly guestimate the page count you need to use American paper. US Quatro, to be precise. And not A4. So now longer can I use my 27 reams for £2.50 paper I have been up to now, but must switch to US Quatro – at £21 a ream!

Additionally, while on the topic of geography, remember that the cost of postage to American by courier is greater that Royal Mail recorded delivery to London. While the latter can be had for the price of a decent take-away, couriers cost money. For example, it cost £30 to return the contract for counter-signing. If your book comes with a CD, like mine, you will have to pay customs on the CD too. This pushes the price to a whopping £40. I was lucky when posting my second CD, as the courier only charged me £29, but I still poorer.

We should note two things here. Firstly, Royal Mail do deliver to the states, but the timing is not guaranteed, and can take up to a month to arrive. Secondly, most couriers will not collect from your door unless you have an account with them; and that means plying them with a lot of business. So you may still have to pay for a bus trip to the nearest big town, or city, first.

The final cost rarely considered is of pampering. The stuff you buy yourself to keep going, or to treat yourself for doing so well. This varies depending on who you are, and how frugal you can be. Personally speaking, I have a very sweet tooth, and treated myself to a bucketful of sweets. I also treated my proof readers to beer and curry at the book release party. It all mounts up.

So, how much did I spend? £1058 When you consider that £725 (the laptop, printer and toner) is available for my next book, that’s not bad. It equates to £333 in cost. Alas, if I included mortgage repayments, food and travel in that sum I don’t see how I’d make it as a full-time writer.


Laptop600
Laser printer80
Toner45
US quarto (£21 per ream)42
Postage: contract30
Postage: final manuscript57
Postage: CD-ROM40
Postage: 2nd CD-ROM29 (charged in error, should have been 40)
Celebration sweets10
Proof readers beer & curry125
Total£1058

The incomings are much easier to total. You get the advance cheque(s) and then, if you’re like most computer books, you be thankful for it, since most won’t make back their advance.

Two things to remember when estimating incomings, don’t forget your bank charge you to cash foreign currency. This cost me £8 per cheque, or £24 in total. Additional, the exchanges vary over time which, when there’s nearly a year between first and last cheque can be anywhere from 50 to 100 pounds. Not a lot when you’re JK, but worthwhile cash when you’re me!

1st advance cheque 554.98
2nd advance cheque 783.56
3rd advance cheque 1329.76

Total £2668.3



Saturday 25th of June 2005

DVD subtitles


For the first time today I watched a DVD with a good subtitle selection screen! I have no idea why it's taken someone else so long to realise the problem with this.

Think of the usual DVD menu. It reads, "Subtitles On." Does that mean the subtitles are already on, and this is a toggle button? Or does it mean that by selecting this option the subtitles will be switched on. Naturally, this logic isn't standard, and some DVDs take the alternate approach to what you think is standard. Also, the default of whether the subtitles are on varies between disks. I find this incredibly annoying.

This DVD solves the problem by having the screen say, in a different style to the buttons, "The subtitles are on." There is also a button which says "Turn the subtitles off." Simple, uncluttered, and completely unambiguous. It doesn't even need the services (and therefore salary) of a professional writer, but it improved my enjoyment no end.

And the name of this high technology DVD? The Box of Delights. Yes, the BBC childrens programme from 1984. Wonderful nostalgic stuff. Made better by the technology working for me, not against me. Perhaps everyone should just design for children.




Friday 24th of June 2005

The little things


I've had some speed issues with my laptop of late. Nothing major, but I've been putting it down to an overly large swap file. But despite a 1/2 gig swap doesn't seem that excessive, particularly for a Windows box, I put it down to "just one of those things," and moved some more of my ever-increasing download collection to another partition.

One of these downloads, however, was Sequoia. This is a disk usage utility which shows graphically where all the space on your harddrive has been used. It was also one of the many download utilities I hadn't gotten around to installing yet. Upon doing so, I found the cause of my slowdown... a 1.4 GB (yes, gigabytes) logfile in the middle of my eDonkey program files directory! This had caused my drive to overfill, and thereby limit the size to which my swap could grow.

I deleted the file, and defragged the harddrive. Whoosh! Not only the sound of my deadlines as they pass me by, but also the speed of my newly invigorated laptop.




Tuesday 21st of June 2005

More news on my book



Well, it seems there is no rest for the wicked! My publisher has just sent me an email asking whether I'd be available to write some course notes for one of the American game schools. They're using the book in one university on their porting course, and want some notes to aid the other 18 campuses.

By my reckoning that's a lot of students. Each buying a book. Every year.

Ok - so it won't happen like that, but I'm interested to see how the sales are affected, or not, by this.




Monday 20th of June 2005

The last Gllug (or, what I did on the 11th of June)



Saturday 11th of June saw the welcome return of GLLUG. Packed to the proverbial rafters with 65 techies, sysadmins, newbies, geeks, developers and normal people, GLLUG presented an impressive array of 5 speakers over a four hour time slot.

It opened with the double act of Christian Smith and Stig Brautaset discussing Automake, Autoconf and libtools. Christian gave a good overview and history of these tools, and mentioned their place in todays development process. This was partnered with Stigs live demonstration, using both the ubiquitous "Hello World" example, and the more complex GGTL library. And unlike some live demos, this one actually worked!

Second on the bill was Chia-liang Kao from Fotango who discussed "Version Control without the Headaches". The headache pill in question revolved around the use of svk. Mr Kao is a fervent presenter and gave an animated talk on a subject not generally known for its energy. In addition to helping software developers, he detailed the use of version control to hold previous copies of the /etc directory - surely the bane of many sysadmins - and demonstrated candour by admitting the drawbacks and issues associated with the task and tools. Thanks to his talk, the use of cp for version control has been banished to the past.

Bytemark were good enough to lend GLLUG the services of Matthew Bloch for an hour to talk about Ruby on Rails. He highlighted the method by which sysadmins can use this programming framework to handle and process databases with the minimum of coding. This, as one guess pointed out, was ideal as sysadmins are not generally great programmers. Matthew showed that Ruby on Rails makes these tasks very easy, consisting only of a few lines of Ruby code.

The final talk was by Ian Pratt of Xen. He gave a full discussion on the different types of virtualisation, the technical method by which they work, and their relative merits. Naturally, Xen came top of the benchmarks he demonstrated, but then, once the projectors were fixed, he proved his point by giving a live demonstration from his laptop. It was loaded with 2 gig of RAM, and was successful in running 5 versions of Linux at the same time, with little-to-no discernable performance hit.

Afterwards, the well-trodden path to the pub beckoned. All of the speakers accompanied the usual GLLUG crowd and answered follow-up questions from their sessions... And accepted the free beer of grateful geeks! The speakers then left for a sponsored dinner (courtesy of Outcome Technologies) as the rest of us experimented with more beer!

Ubuntu CD's were available as promised, and all talks ran close enough to time that no one was imposed upon unduly.



Saturday 18th of June 2005

Using a search engine to search for "search engine"



Just as thought, I typed "search engine" into Google.

What did it find? searchenginewatch.com - ok, fair enough. Not Google,
but still useful. Followed by, AltaVista and then Lycos.

Hmmm.

Well, it amused me :)

p.s. AltaVista's first search engine result is for Google, so I guess
they're returning the compliment



Friday 17th of June 2005

My book diary, part 8 : 8th March 2005



Writing your first book is not something you forget about very quickly. And every day I wondered when I would see the physical proof of my hard work. This came on the 8th, two days before my work colleague had his first book published. After the initial euphoria of showing my colleagues (including the ones who hadn’t realised the extent of my evening endeavours) had died down, I reverted to a normal life. It was then a waiting game for the other books (I was contractually obliged to receive 10) to arrive, so that I could arrange a “thank you” curry, for my gallant proof readers. The books came on the 12th April, whereby the next available Friday was booked in… the 13th May!

The final advance cheque arrived on the 10th May, just in time to save me from a financial embarrassment when the curry bill arrived! The left over cash was put to good use, offsetting the financial cost of writing the book.

What a journey! I hadn’t seen the book on a shelf under the 2nd May 2005, and even then it appeared a little surreal. Possibly, because my first sighting of it was the spine. And I hardly ever looked at the spine, before or since. The book currently sits face up on my coffee table at home. Eventually it will be resigned to the bookshelf, as I’m looking forward to the next project, but it’s still something I’m proud to have accomplished.



Thursday 16th of June 2005

My book diary, part 7 : 28th January 2005



On Friday afternoon I received a complete set of page proofs. These are the printouts of the entire book (less index) for my review. It is my last chance to ensure that no typos or misplaced diagrams appear in the text. After attending a geek meeting on the 29th, I started reading early in the morning of the 30th. I stopped reading, disgusted, mid-morning on the 30th! There was a mistake on at least every page. Simple things, mostly, like the chapter titles in the page headers, any monospaced word appearing as the word “monospace” and so on.

And I still hadn’t had a chance to review the test CD sent to me on the 27th January.

In typical fashion, the CD was broken! The last minute change to split chapter 7 had an unfortunate side affect on the source code… but only on a virgin machine. Every one of my test machines had ch07/network.hpp hidden somewhere in the include path. But a clean room test highlighted the issue. I had to accept responsibility, and pressed another CD to send on the 1st February. This was duly re-mastered and returned to me on the 8th, along with a 2nd set of page proofs (this time on PDF.)

This time, everything was fine, and the book went to print on the 11th February 2005.



Wednesday 15th of June 2005

My book diary, part 6 : 4th January 2005



I returned to life in the new year, with an unpleasant shock – the publishers hadn’t taken a holiday! And on the only day between Christmas and New Year (the 29th) they had sent me a zip file of changes. These were grammatical changes I had to verify and apply to my master copy of the text. Basically, it involved checking that the new words didn’t alter the meaning. I read this on Tuesday morning. The changes had to be made by Thursday. The same week.

So, thanks to two and half evenings, every train ride, and my lunch breaks (which I took in their entirety for the first time in years) I managed to make a reasonable review of all the changes. This was one of the first times the time difference between UK and the states actually worked to my advantage, as it meant that I would work until late Thursday evening, knowing the US office was still open.

After this manic spurt, all was quiet for the rest of the month. I checked over the 50 or so words on the cover on the 17th January 2005, and saw the first full cover PDF on the 21st. I then had a whole week “off” until the page proofs arrived, during which time I enjoyed the spoils of war by cashing my second advance cheque, on the 20th.



Monday 13th of June 2005

My book diary, part 5 : 11th November 2004



The end! After spending the entire previous weekend reading, and re-reading, every nuance of prose, I posted the final draft first thing in the morning. I didn’t get much sleep the night before: not because I was worried, but because I was on the phone for a couple of hours with one of my proof readers, and going through the networking section. My Internet connection was broken, and so edits were made in the slowest possible manner: the spoken words of “Page 4, line 12, 2nd word” This was made tortuously worse by the fact that our two versions no longer corresponded. We somehow managed it.

By the end of the month (29th) I got my first editorial review of the draft. The first major change was to split chapter 7 (System I/O), into separate sections for Audio, Graphics, Input and Networking. This was something I’d thought about myself, and was good to have it confirmed. In addition to renaming all the chapters, I had to re-order all the diagrams and update all the inter-chapter “see chapter…” links. The other change was actually the addition of a CD-ROM.

We had originally intended to release no disc with the book, even though it had been budgeted for. The amount of source code was fairly minimal, and totalled less than 100 KB. But due to pressure, I caved in, and tracked down my list of “interesting things to fill up a CD.”

The second draft was submitted on the 8th December 2004, with the CD-ROM following afterwards on the 21st.

I then took a well-earned Christmas break.



Friday 10th of June 2005

My book diary, part 4 : 22nd June 2004


The book had started as six chapters. We then split it into seven (the memory & CPU chapters, since you asked!), meaning the content of the first submission, due on the 22nd June, changed. It was still intended to be half the book, but that then became 3 ½ chapters, instead of 3. Neverless, as I’d spent the previous 2 ½ months writing full time I was already past the half-way mark, and consequently didn’t bother me. In fact, by the time I’d received my first feedback on the 28th June, I was on the last two chapters. And by the time my first advance cheque (for a massive $1000 on the 20th September), and the first technical commentary had arrived (September 29th) I had almost finished the book! This was all a welcome relief, since I had recently begun a new job, and undergoing a gruelling 2 ½ hour commute… each way. Normally, this would provide ample time to write, and get the book finished. Alas, using a laptop while standing up is more difficult than I’m prepared to attempt, so I managed less than 16 hours a week on the book. Progress throughout this time was frustratingly slow, and I had to sacrifice many weekends to put in a solid 20 hours of work.



Tuesday 24th of May 2005

99 Bottles of beer



Following on from Sundays code, I then sought to dig out my version of 99 bottles of beer. My 'final' version used 184 bytes. It handles "No", the problematic double \n but NOT the non-plural "1 bottle.”

It took 29 bytes to manage the "No" bit :( :( :( So there must be a better way.

b=99;n[3],*p=" bottles of beer",*q=" on the wall";main(){while(b--)sprintf(n,"%d",b),printf("%d%s%s.\n%d%s,\nTake one down,pass it around.\n%s%s%s.\n\n",b+1,p,q,b+1,p,b?n:"No",p,q);}

Note: everything is on the same line in the actual code.



Sunday 22nd of May 2005

The 12 days of Christmas



One interest of mine is obfuscated programming. It’s not something I practise in real life, of course, but is one of those intellectual challenges, that really highlights how much you don’t know about a programming language. In reviewing some old emails, this code snippet came to light, and I thought I should share. It produces the entire lyrics to “The 12 days of Christmas” in just 388 bytes.

i,j;char*p,*t="
12 drummers drumming
11 pipers piping
10 lords a leaping
9 ladies dancing
8 maids a milking
7 swans a swimming
6 geese a laying
5 golden rings
4 calling birds
3 french hens
2 turtle doves and
a partridge in a pear tree
";main(){while(i++<12){printf("On the %d%.2s day of christmas my true love sent to me
",j=i,&"thstndrd"[i<4?i*2:0]);for(p=t;*p++>31||++j<13;);puts(p);}}

Obtuse! If you’re geek enough, you may be interested in the use of %.2s, and the snippet:

&"thstndrd"[i<4?i*2:0]

to produce the correct ordinal. Own up. Who else know this :)

However, this is not the shortest! The colleague of a friend of a friend came up with this:

main(i){char*q,p[]="thstndrd 12 drummers drumming 11 pipers piping
10 lords a leaping 9 ladies dancing 8 maids a milking 7
swans a swimming 6 geese a laying 5 golden rings 4 calling
birds 3 french hens 2 turtle doves and a partridge in a pear
tree";for(;q=strrchr(p,9);printf("\nOn the %d%.2s day of christmas my true
love sent to me%s\n",i,p+(i<4)*i*2,q),++i)++*q;}

Most of the same ideas are used, but this uses tabs to break the song into the appropriate lines (invisible here, alas), and strrchr instead of my manual for loop.



Saturday 21st of May 2005

Say it loud – I’m geek and I’m proud



There was once a time when “geek” was a four letter word. In the nasty sense. Now it’s a decent salary and moderate job security (for those blessed with a clue stick, at least). No longer are geeks the social outcast they once were. No longer are they “obviously” single, substituting hex life for sex life. In my inner social circle, consisting of around ten geeks, five are married and most of the rest have girlfriends or partners. And we’re not alone. So the old “single” stereotype doesn’t fit.

Geeks have formed their own social networks and met each other in real life. What may have started as an experiment in social software, resulted in genuine in human interaction. That is, meetings in pubs between geeks. And consequently between geeks and non-geeks. The proliferation of computers in the workplace has required the sysadmins to come out of the server room and make themselves known to the staff. Those that are still in work are there because they can interface with non-geeks. So the old “anti-social” stereotype doesn’t fit.

Geeks have opened up their software. Through the benevolence of sharing, be it Free Software under the GPL, Open Source (through one of the ever increasing licenses), or plain old shareware, others have benefited from the geeks work. Public web forums allow non-geeks to interact with geeks as never before. And the non-geeks probably don’t realise. So the old “sad” stereotype doesn’t fit.

Ok – so most of us are still male. But the social aspect of geekdom has meant an increased visibility, if not a true increase, in the female contingent. But still, the stereotype of “single, anti-social, sad, male” no longer applies so I say it’s time to reclaim the word. I have been self-promoting myself as a geek at user groups since 1999. In the beginning there were a few raised eyebrows, as if I were invoking an ancient curse on the group by summoning a demon by mentioning the word. The following month, however, no curse had befallen the group, no members had been squashed to death by an Egyptian dung beetle, and society hadn’t protested or demonstrated against us. So I used the word again. It is only word, after all.

I am a geek.

Say it loud.

I’m geek and I’m proud.



Wednesday 18th of May 2005

Odd little Windows bug; with DOS, edit and long filenames



I've only just discovered this, but if you're at the command prompt in Windows you'll see something akin to this:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\sgoodwin>

Now, if you use edit (which has it's legacy in 8.3-oriented DOS), and return to the command line, the path will have magically changed to:

C:\DOCUME~1\sgoodwin>

Not sure if I'm apalled or intrigued by this. Either way, I'd have added it to the buglist.



Tuesday 17th of May 2005

USB on the go



There’s a handy gadget I should tell digital photography enthusiasts about. It’s called “USB on the go”, and I found mine for £30 in my local Maplin store. The box is minimal, features two USB-A sockets, a toggle switch, and a “Go” button. The premise is simple, you plug a digital camera (acting as a memory device) into one side, and a USB portable hard drive (also acting as a memory device) into the other. You then press the button and it copies the entire contents of the camera onto the hard drive. Each copy goes into a differently named folder so you don’t lose information, but you do have to merge the contents manually.

If both devices show up on your Windows PC with their own drive letter, or your Linux box mounts them normally as sda, then this box should work fine. However, if you need to determine whether your devices are compatible then only buy from places that offer no quibble returns… technology is a fickle beast, and any incompatibilities can originate from anywhere.

Since I was sceptical about the device, and the solidity of my hard drive, I adopted the following working principle.

 

  • Fill up the memory card
  • Copy it to the hard drive
  • Delete the obviously less good pictures
  • Re-fill the memory card, and re-copy
The box will copy either the entire source contents (“disk” mode), or just the “copybox” folder from the root directory (“folder” mode). The destination data is placed into folders called Copy001, Copy002, and so on. The directory structure and filenames are maintained during the copy. I adopted the folder mode, and I recommend that for most applications, since HD space is so cheap.

On a recent real-world test I used my Nikon 5700 in combination with a Lacie USB external hard drive. In theory I could have taken 114,000 pictures, but limited myself to 1200. They were taken over two weeks, and dumped to hard drive in several batches. It worked flawlessly. Although when the “USB on the go” batteries run low its lights flash in an undocumented fashion. In this case, just reload batteries and re-copy, and everything should be already.

Note that each device must have its own power source, as the three AAA batteries in the box are only powerful enough to flash the LED on the box itself and last for around 4 hours. My camera, a Nikon 5700, (along with many others) creates a unique name for every picture taken. This remains true even when pictures have been deleted. So even if you have several numbered CopyNNN copy folders on your hard drive you can collate them all by moving each directory into a common folder, since any duplicate filename will truly be a duplicate file.

p.s. I have no affiliation to any of the companies mentioned in this entry.



Saturday 14th of May 2005

My perfect job - a culture evangelist



The question I always get asked at interviews is “What’s your perfect job?” Hypothetical questions annoy me at the best of times; because if I were working in that situation the problem would never have existed in the first place. Or, at least, would not have escalated to the proportions stated in the question. Alas, an answer is necessary.

So, for the record, my perfect job is a "Culture Evangelist."

Never heard of it? Neither had I until I heard the words roll off my tongue. Allow me to explain.

Companies spend a lot of money marketing themselves to others. They also spend a lot of money on recruitment consultants and headhunters. When the industry is technology based, these two target groups of people are largely the same. That is, they’re trying to attract “geeks.” This is a group known as “people with values” and are the hardest to advertise to. However, there is a very simple way to make contact with them… through other geeks. Some major companies have realised this, Red Hat and Google among them.
Red Hat hire so many Linux Kernel programmers that they do, in effect, control a large part of the Linux development process. This gives big business the security they want when buying a Linux solution (as Red Hat can point to specific people who will solve their problems). This move also promotes the company through personal signatures and blogs of their employees, and provides a good feeling in the community when they see intelligent, clueful, people working on the software they themselves want to use. Geek trust is so hard to attain, and personal geek accountability goes a long way to achieve this. A million marketers and their promotions budget, can not achieve what one geek can with a well-worded blog entry on how they improved their product. Replete with technical details.

Google, on the other hand, allow employees to work for 20% of their time (1 day in every week) on personal projects. This is a very geek-friendly policy, and means that every geek on the planet wants to work for them. Google recruitment no longer needs to be pro-active; they can just sit back and watch the best CVs from all over the world flood in. Consequently, they’ll have the best choice of the best people in the world without paying anyone to find them.

So back to the “Culture Evangelists.”

A culture evangelist is one that is employed by a company largely to work on his (or her) own personal projects. Their skill is that they are clueful people that other people can look to for answers and/or inspiration. They will generally be bloggers, authors or other community figures. They maintain full ownership over each of their projects, but are obliged to mention their company in the documentation. This is similar to the patronage monarchs bestowed on composers in the 1700 and 1800’s. Typical projects of the culture evangelist could range from book reviews, to mailing list activity, to various source forge projects, or books and articles.

As their work, whatever it may be, disseminates through Slashdot, NTK, The Register and the like, their company gets brownie points for hiring a clueful person (which attracts others), a higher Google rank due to the increase in links to their site, and kudos and awareness for the company and product in general.

I suggest that a grade 1 culture evangelist would spend 1 day a week on personal projects, which could ramp up to a grade 5, according to time with company and/or successful projects.

So if someone wants to hire me, my perfect job is a culture evangelist. Ok?



Saturday 30th of April 2005

The blog is back!



I have now retrofitted my previous blog entries into the database. I hope I got the days right, so that any permanent links will still work. Apologies in advance if I failed.

During the process I discovered that SimpleBlog does not have a backdating feature. This minor drawback was eliminated by reading the source and noting a dateToInt that counts the minutes since the 1st January 2001. A check of the database revealed by previous entries to be at 2254320, 2265840, 2274480 on the 16th, 24th and 30th of this month, respectively. A quick confirming calculation meant I simple had to add 2880 and 4320 for the two and three day gaps. Easy! It also showed that the hours and minutes were ignored in the calculation.

Without the source code this would have been a longer scrabble with numbers. The lessons learnt are that source code is good. Open file formats are good. And that with the abundance of other software available there’s more chance of switching vendor at the first sign of trouble, especially early on in the deployment cycle. After all, if you find a problem in the first month of use, and it takes longer to diagnose and/or fix the problem that it does to trial some other software –what stopping you?

Long live free software!



Sunday 24th of April 2005

Blog will back to normal soon


Unfortunately, my hosting company decided to play around with their servers this week. Consequently I have lost of my previous blog entries, and will have to rebuilt it from my original documents :(

This will take sometime, as I'm very busy this week. Hopefully everything will be back after the bank holiday.




Thursday 21st of April 2005

Ego-ogle



What used to be called “ego surfing” is now manifest in the verb, “ego-ogle”. This means to look for yourself on Google to see how popular or famous you are. Obviously, this works on other search engines, but lacks the ego-ogle/Google wordplay.

Ego-ogling is something I’m guilty of. About once or twice a month I will see how I fair in the ego-ogle stakes by searching for my name, and some random term with which I have a connection. The terms might be "Steven Goodwin" Linux (with the quotes) to see where I’m known in the Linux community, or Steev Amiga to see if there’s a resurgence of interest in my old shareware (there isn’t, by the way.)

As well as the ego stroking value, this can help in more constructive ways. For one, some people will reference you or your work, without linking to your site. This is consequently likely to be a page you’re interested in also, but without a link Google won’t make the connection.

Secondly, it can provide feedback on your previous work when the critic didn’t contact you directly. Depending on how you take criticism this can be a good or bad thing, but this method enable me to find a positive review of my old C programming tutorial.



Monday 18th of April 2005

Word patterns by typing on left and right


It was an idle question, “What’s the longest word you can type using only the top row of the keyboard?”

The answer (to be found at the end of this entry, and many puzzle websites) was found with a little intuition, and a lot of trial and error. But it’s a good question, with an interesting answer. However, it is now a standard word puzzle and finds its way onto many “101 things you know you didn’t know” email circulars. Most people now know the answer.

I then posed an alternative question, “What’s the longest word you can type using only the middle row of the keyboard?”

This proved more tricky since there’s only one vowel (the ‘a’) and no obvious consonant pairs (‘g’ and ‘h’, or ‘g’ and ‘l’ are perhaps the only two.) I therefore took to cheating and enlisted the help of my local friendly Linux box, loaded with text processing goodies such as grep and awk. I rustled up this code:

steev$ grep -i -E "^([asdfghjkl])+$" /usr/share/dict/words | awk '{ printf( "%5d: %s\n", length( $0 ), $0 ) }' | sort -r | head

Answer at the end.

I then got to thinking about the bottom row. And the left hand side of the keyboard only. And the right hand side. And the left hand side, followed by the right hand side. And the right hand side, followed by the left. And so on. I had many ideas, all solved by changing the regular expression in the above code, as the following example (which deduces the “left, then right” words) shows:


steev$ grep -i -E "^([qwertasdfgzxcvb][yuiophjklmn])+[qwertasdfgzxcvb]?$" /usr/share/dict/words | awk '{ printf( "%5d: %s\n", length( $0 ), $0 ) }'| sort -r | head

Ok – so the bottom row has no vowels (and I was unprepared to compromise by using the period as an ‘o’) and so resulted in a trivial solution. The other solutions were more interesting.

Note that I split the keyboard into left and right along the ‘t’, ‘g’ and ‘b’ axis. Note also that the dictionary doesn’t include every word in the English language, which is why “lollipop” isn’t included for “right only”. Nor does it include plurals that can increase the length by one or two letters. If plurals were allowed, the best answer for “left only” would actually be “Stewardesses”.


Answers:

Top line: Typewriter
Middle line: Galahad (or alfalfa)
Left only: vertebrates (with 7 others)
Right only: monopoly or Honolulu
Left then right: authenticity
Right then left: proficiency



Saturday 16th of April 2005

Why did I start a blog?



It was on a trip to FOSDEM that I first considered the issue of having my own blog. My friends and I were in a restaurant and I was losing the argument. Badly. I was trying to explain why, despite my web presence in other areas, I didn’t have my own blog. My only line of reasoning wasn’t holding up well. My belief was that I had nothing of interest to say. However, if that was true, why did I talk to people about my ideas, thoughts, opinions, and why did I argue my case?

This then is the start of my blog. It will be technology-focused as my personal beliefs with respect to politics and religion have no bearing on the subject. However, the politics of technology is a worthy topic and is likely to appear over the forthcoming months.

For what it’s worth, I am a software engineer, tutor and writer with experience in games development, Open Source software, Linux and web technologies.