Features UNIX Has That Life Needs

It’s come to my attention that there are a lot of things that computers in general – and, in particular, UN*X-flavoured operating systems – offer that are sadly lacking in Real Life. I’m hoping that Life 2.0 will include a number of these features. (Life 2.0, of course, will not be like Web 2.0 – there’ll be no more rounded corners and glowing effects than usual, thank you.)

The most important features I think are missing are as follows:

grep
I’m sure I’ve said it before, but life really lacks a grep command. grep is used to search for given text within a greater text (usually files, but stdin is equally valid). Whetever I use a ‘treeware’ book as a reference, I invariabley find myself disappointed at my inability to search it’s contents, leading me to favour the web and e-books as sources of information. How much easier would it be if I could simply write a regular expression that represented the kind of data I wanted to find? Johnny 5 could do it – why can’t I?
ctime
The other day, I was trying to remember the exact date that Claire and I moved into The Place. I couldn’t remember exactly, but I did remember that the note pinned to the kitchen noticeboard was written on that day. Had my life been more like a computer filesystem, it’s likely that I’d have been able to check the “modified date” of the piece of paper, and I’d have known exactly when we’d moved in.
dd
How great would it be if you could make a nice backup of the world before you had to make any kind of decision without knowing the outcome… It’d be like a “saved game” of life. Plus, with enough storage space we could keep incremental backups of the entire planet at various times, and restore them onto virtual machines (well, virtual planets) as an aid in teaching history. Although I’d like to make sure that only sane, rational, trustworthy people like me had superuser access, or else it wouldn’t take long before somebody typed dd if=/dev/null to=/mnt/universe and destroyed the universe. Or, perhaps more interestingly, /dev/random.
kill
At this point, you’re probably expecting me to imply that killing people is a good idea. But I’m not going to. After all, what a well-executed kill -9 does is merely removes the resources (processor cycles and memory) from a given process. And I’m sure we’ve all wanted to be able to steal memory from somebody, particularly when they’ve just heard us say something particularly embarrasing.
perl
Yesterday, I was heating a pan of noodles, checking it ocassionally to see that it wasn’t at risk of boiling dry. What I’d far rather have been doing while the noodles cooked, of course, would have been to be playing Paper Mario: The Thousand-Year Door, which I’m playing through again. But to do that would have involved me leaving some smart process in charge of the pan. Something like this:

#!/usr/bin/perl
while ($panwaterlevel > 10) { wait(1000); }
sprint("Dan! Come fix these noodles!");

Shouldn’t be so hard to implement once the other features in this list have been writeen.

As soon as I can find the address of the manufacturer of Life 1.0, I’ll be writing a letter of complaint.

Microsoft Visual Studio 2005

Would you like to share your setup experience with Microsoft?

What is a “setup experience”? And why do Microsoft want to share it with me, anyway?

Improved performant!

I can’t actually find a definition of the word “performant” – can anybody help?

× ×

LiveJournal Needs To Tighten Security

Hmm… as part of my ongoing work with Abnib v3.0, I’ve noticed a couple of interesting little quirks in the way that LiveJournal handles security for “friends only” and “private” posts. In fact, I’m pretty sure I’ve found a way to – for any given user – produce a list of the times, dates, and URLs of all posts made by anybody – even ones to which I don’t have access. Not terribly disturbing news, as I still can’t get access to the content of the posts or even the comments to them, but it’s an “opening” – a “way in” – which could potentially lead to a full-blown exploit.

For example, I can tell you that there is a post on Andy’s blog that I’m not allowed to read, that he wrote on the 17th of Januaryat about quarter past four in the afternoon (I hope you don’t mind me using you as my “guinea pig”, Andy – you’re the first person I came to who had a “recent” private post).

The numbers near the end of LiveJournal post URLs are supposed to be semi-random to prevent people from just “guessing” their way to posts, but it turns out this isn’t necessary. I’ve e-mailed LiveJournal to try to explain their flaw to them, but as I can’t be arsed to debug it myself (hey: not my weblog at risk, here), I don’t know yet how much of a priority they’ll make it.

Ho hum.

Edit: Further investigations have revealed that I can easily get the title (but not the content or the comments) of any LiveJournal post, including protected ones. For obvious reasons, I’ve now stopped using my friends’ weblogs as testbeds, and I’ve set up a couple of “play” accounts to try things out with. I wonder if I can get the content of posts? That’d be an interesting challenge.

How To Repair A Nintendo GameCube

For the last few months, Claire and my GameCube has been broken. It broke at one point, which I attributed to the drive motor being jammed up with dust and hair and crap, so I opened the lid and wiggled a knife-blade around inside it for awhile, which seemed to fix it… but a couple of weeks later, it was dead again. I decided to have another look into this, yesterday, and a little bit of research online revealed that the problem was probably that the strength of the laser had degraded, rendering it unable to read any discs. This is, apparently, one of the most common causes of death for the GameCube (and I’ve seen a good number of ‘cubes go on eBay which would appear to have exactly this problem). Thankfully, there’s a really well-written guide on lens calibration for the gamecube, which helped a lot. However, the thing that’s lacking online is a photographic guide: so, as part of this ‘blog entry, I’ve written one.

Usual disclaimer: following this guide will void your warranty. Plus, if you do it the way I did it, you risk electrocution, exposure to laser radiation, and worse yet, you may break your GameCube beyond repair.

I recommend that you read the guide to lens calibration for the gamecube – it’s far more in-depth than this blog entry. However, this blog entry has prettier pictures.

Symptoms

  • GameCube fails to load games – it claims that the disc is missing or unreadable, and will only load up as far as the “configuration cube” screen with the funky ambient noises.
  • Open the lid and detach the clips under the lid to release the circular plastic Nintendo-branded thing that sits on top of the lid: this will allow you to watch the disc spinning while the ‘Cube is running, even with the lid closed. Try again – the disc will start to spin (so, it’s not a broken drive motor) but then stop (when the system finds it can’t read the disc).

Problem

The power output of the laser which is used to read the surface of the disc has reduced with age. This is a common problem in GameCubes, apparently, between two and five years old. It can be repaired by a Nintendo engineer, but the price is prohibitive (you might as well buy a working second-hand one). However, we can fix it ourselves. [if you can’t see the rest of this article, read it here]

Tools

I didn’t have all the tools to hand that the author of the guide I followed had, but I made do. Here are my tools:

 Screwdriver and ball-point pen
  1. Screwdriver – this is a standard “size 0” (small, but not really small) Phillips-head screwdriver. This particular one cost me 45p from my local hardware store.
  2. Ball-point pen – mine was a WHSmiths-branded one with blue ink.

Method

First step is to prepare the tools as you’ll need them. The four main case screws that prevent you from taking a GameCube apart are a strange custom design deeply recessed within deep holes on the underside of the device. You can apparently buy a specialist tool for manipulating these screws, but I couldn’t be bothered, so I made one: remove the ink tube and nib from the pen, so you’re left with a long plastic tube. Then, using a hot flame (I used a gas ring) melt/ignite the end of the tube you’d normally write with (where the nib was, before you removed it). It will probably catch fire, but just blow it out while trying not to breathe in too much of the toxic black smoke you’re producing. It needs to be molten enough to be malleable. Then, once it’s hot, put it down into one of the four deep holes on the underside of your upside-down GameCube.

 Upside-down GameCube with holes highlighted

Push it down firmly but evenly so that it points directly up, and hold it there for a minute or so while it begins to take shape. What you’re doing is moulding the shape of the screw head into the molten plastic of the pen, so that when the plastic sets you will have a tool that exactly fits them. Of course, if then pen snaps, you’ve buggered any chance you had of ever getting into your GameCube, so be careful! Once it’s standing upright by itself, leave it for four or five minutes to finish cooling. Now’s a good opportunity to read the rest of this guide, if you haven’t already.

 The strange-headed screws that you need to remove

You should now be able to use your new tool to unscrew the four screws that hold your GameCube together. That’s the hard bit over with. Flip your GameCube the right way up again, put your hands on it’s sides, and pull upwards to remove the cover. If there isn’t one already, put a GameCube disc onto the spindle. This will serve two purposes: it will allow you to test the GameCube without reassembling it, later, but more importantly it will help to protect the laser lens from damage when you turn the drive mechanism upside-down, later. Next you need to remove the front and rear panels. These are attached by small plastic clips in the corners of the cube, as shown below.

 Howo to remove the front panel from a GameCube

Be careful not to detach the cables that connect the front panel to the rest of the GameCube, as these ribbon cables are very difficult to re-attach without damaging them! Now you’re ready to start removing the chassis screws (which are holding the fan in place and preventing you from getting at the underside of the disc drive. There are 14 screws to remove, in the areas shown below, but 3 of these are concealed underneath the fan and the 2 holding the fan in place will need to be removed to reveal them. Why did Nintendo see fit to use 14 screws where 6 would have done is beyond me.

 The 14 screws

By now you should have something that looks a lot like this:

 The 14 screws

A GameCube with the top, sides, and fan laid bare, and the screws removed from the main chassis. Now’d be a good time to have a closer look at what goes on when your ‘Cube turns on. This is optional, but I think it’s interesting. If you look near the back of the GameCube, on the right-hand side, you’ll see two plastic forks. This is the switch that detects whether or not the lid is closed (as a safety precaution, the disc will not spin and the laser will not turn on if the lid is opened).

 The switch that makes the lid work

Danger: laser radiation – do not do this! Connect the GameCube’s power (it connects to the back of the fan module) and output (where it normally is, albeit without the faceplace), to test it. Hold the “lid switch” (above) backwards to tell the GameCube that the lid is closed and press the power switch (it’s on the fan module). You should see the following happen:
  1. The power LED will turn on.
  2. The disc will start to spin.
  3. The laser, under the disc, will turn on. You should be able to see it shining through the disc. Now stop looking at it; you’re irradiating your eyes.
  4. The laser will move back and forth to try to “read” the disc.
  5. At this point, the laser will probably turn off and the disc will stop spinning – this is because the GameCube you’re using is broken. If it was working, the game would load. You can use this test later on to see if you’ve successfully fixed the device without having to re-assemble the entire thing!
  6. Don’t leave it running too long, because by this point the fan will be in the wrong place to help cool the unit.

Next, you need to remove the four long screws behind the ports (above the memory card slots).

 Four earthing screws need to be removed

 

This will also release two strange bits of metal which are held in place by these screws. I don’t know what they do, but I’m sure they’re probably important, so make sure you put them back after you’re done! Right; time to detach the disc drive. Lift the entire upper part of the system up and away from the base: there’ll be a little resistance as a plug becomes detached, but if you find you’re having to pull hard, you’ve probably left a screw in somewhere. The whole metal plate with the drive on top will come away in one piece. This is the bit we’ll be working with. Flip it over. Now, you’ve got to remove six small screws, highlighted in red on the photo below. I’ve also highlighted (in blue) the connector that links the drive to the bottom half of the console.

 Underneath the upper chassis

Removing the screws allows you to detach the metal plate and gain access to the circuitboard underneath. This is what we’re looking for. Again, I’ve highlighted the connector port in blue to help you navigate.

 Circuitboard

What you need to do is to turn the screw (highlighted in red) about 3 or 4 degrees anti-clockwise. This will increase the power given to the laser and fix your problem. If you turn it too much, your laser will overheat and burn out. If you turn it too little, the problem won’t be fixed. I recommend that you turn it a little at a time to find how short a distance you can turn it (anti-clockwise) to have the console begin to work again (i.e. so it “barely” works)… then turn it an extra 2 degrees or so to be sure. Be gentle!!! When you’ve made the adjustments you want to, re-assemble the thing so far as you need to to test it. You don’t need to put any screws in or even put the fan or panels back on – just hook it up to the TV and try not to look directly at the laser lens. If it still doesn’t work, go back and turn the screw a little more anti-clockwise (to boost the power some more). Hope that helps you get your GameCube back up-and-running again: it did mine! Feedback is welcome, but if you need more information I still highly recommend Lens Calibration For The Nintendo GameCube, which also has pointers on some of the other things that could be wrong (if this fix fails), what tools you need to do it without melting pens, and tips from somebody more-experienced on how far to turn the circuitboard screw. Good luck!

Abnib, Version 3.0

Abnib Version 1.0 was a funny little beast. It was built to accomodate for about half a dozen bloggers, but ended up with about nine or ten. It worked, though, and the principle of aggregating the blog entries of our friends and our friends’ friends took off. Abnib 1.0 had a few major flaws: firstly, it only showed a summary of the post. This was partially because all but two of the bloggers thereon were using free LiveJournal accounts, and a limitation of free accounts at that time was that you could only get the first couple of hundred characters of a post at once. Another limitation was that the site design was columnular – each person had a column of their own, which dramatically reduced the space available and made in-post images impossible. Furthermore, Abnib 1.0, which updated itself wholly or partially every time it was visited, was as slow as a dog.

Abnib died when I accidently deleted a few key files for which I didn’t have backups, and that was the end of that. However, with Gareth‘s help, it was reborn in August 2004 as Abnib 2.0. This was powered by Planet, a Python-driven flexible feed aggregator which is used in all kinds of places for just the kinds of purposes we use it for. Jon went a step further and added an interesting new style to it, and we added the Abnib Gallery (Abnib 2.1), a place for all things Abnib to share photos. Abnib became a real “centre” for our fun little crowd, gathering information on Troma Night and the RockMonkey wiki, as well as the usual weblogs. The release of Abnib 2.2 brought extra abilities much-requested by users, such as the ability to “hide” the community feeds. That’s where we are now.

However, all is not well. There are a few key things I’d like to see improved in Abnib:

  • Several LiveJournal users have commented (Paul comments, Matt comments) that sometimes, when they make multiple posts in quick succession, Abnib only picks up on the most recent of them. I’m not sure what’s causing this, so it’s probably Planet.
  • Some people like to make lots of “friends only” posts (a LiveJournal feature whereby you can restrict visability of your posts to specific other LiveJournal users). As more and more people use Abnib as their “quick window” onto Aber blogs, people are finding the need to make superficially-pointless posts (like this one) in order to ensure that people realise that they have made a “friends only” post that might otherwise be overlooked.
  • Abnib 2.2 still isn’t quite doing so much for the community as I’d like it to be; it isn’t as interactive or as inspiring as I feel a weblog aggregation portal should be.

So, in order to fix these problems (among others) and implement some new features, I’ve begun work on Abnib 3.0. This new version of Abnib will:

  • Correctly deal with multiple posts in quick succession from LiveJournal users.
  • Better integrate with Abnib Gallery.
  • If permitted (by individual bloggers – either overall or on a case-by-case basis), advertise when you have made a “friends only” post, and how to go about reading it if you have permission.
  • Load faster by holding content back until requested (for example, only the 20 most recent posts are shown by default, but more can be displayed without a page refresh: up to 80!).
  • Hold meta-information on members such as a short description, which can be updated by that member only.
  • Allow readers to ‘hide’ any or all feeds, in order to focus on the things that matter to them.

It’s all powered by a new weblog aggregation engine called Phatnet, which I’ve been building for the last few weeks specifically for this purpose. And it’s pretty damn gorgeous. But that’s not all. Experimental features which might end up part of it now or later include:

  • Tighter integration with RockMonkey – see what pages other people are reading.
  • Ajax-powered “keep me posted” features, such as a checkbox that, when checked, automatically adds new posts to Abnib as they are written – right in front of your eyes.
  • Comment counting: know how many comments have been made on standards-compliant blog posts.
  • A couple of other things I’ve been playing with.

Hopefully, I can get Abnib 3.0 finished and released later in December. If you want to see what’s been done so far and how it all fits together, take a peep at the Abnib 3.0 Preview (it updates every few days, so it’s no good for actually reading blog posts on, but it should give you an idea about some of the features: try clicking the “More Posts…” link at the bottom or on people’s names in the sidebar). It’s ugly as sin, but hey. Feedback appreciated.

Chef

Those who found themselves confused by my programming recipe the day before yesterday can now be a little less confused (hopefully): here’s the explanation.

The program is written in an esoteric programming language called Chef, who’s sole purpose is to be able to write computer programs that look like recipes. There are even competitions to write programs in it that can also be cooked as real dishes. It’s a strange world. Each of the ingredients is a primitive kind of variable (for the non-programmers: a named entity [eggs, penne pasta, etc.] that can contain a value). The values that these variables can be instantiated with are numbers, and the numbers are given at the start of the line. Therefore, at the start of the program, eggs=3 and penne pasta=56.

These are “put” into the mixing bowl one at a time. The mixing bowl is a stack – the things put in to it first appear at the bottom, with other things on top of it (for the non-programmers: stacks are immensely useful in almost all programming languages, so programmers tend to have no trouble with being told “the mixing bowl is a stack”). So, when the first item (penne pasta) is put into the mixing bowl, it (and it’s associated value, 76) sits at the bottom of the bowl, ready for other things to be “put” on top of it.

However, we do some more complicated things, such as “adding” a birds-eye chilli. “Adding” is not the same as “putting”. When something is “added” to the mixing bowl, the value of it’s ingredient is added, mathematically, to the value of the thing at the top of the bowl. So, for example, when we add “1” birds-eye chilli to the mixing bowl which contains only “76” grams of penne pasta, we end up with a mixing bowl containing just “77” grams of penne pasta.

“Combining” is another Chef operation. After we’ve put the fresh ginger (17) in, we combine it with the cinammon (5), which results in a multiplication of the top item in the bowl, resulting in 85. “Removing” the birds-eye chilli (1) reduces this number by 1, because the “remove” operation means “reduce the value of the ingredient from the value of the ingredient in the top of the mixing bowl”. Later, we “stir”, the mixture, which moves some of the values in the stack around (read the spec if you care). And eventually, we “liquefy” the contents of the mixing bowl, which turns the numbers into their Unicode equivilent (typically letters): N, A, M, T, A, C, and S.

The baking tray is the output buffer (buffet?) in which things must be placed to be output to the screen, and the “serves” directive indicates which baking tray (we only have one in my recipe, but the language specification allows for multiple bowls, trays, and even delegation of sauces and other side dishes to other chefs – see the recipe for Fibonacci Numbers with Caramel Sauce [and notice the recursion – “caramel sauce should be served with caramel sauce”]) we output to the screen.

Jon earns himself a pint from working through the program, the mad fool that he is. There was a flaw in his logic, though, that made him come up with “NAMTACS” as the answer: he forgot that the baking tray, too, is a stack, and that the order of the ingredients is not changed in the transfer from the mixing bowl to the baking tray (check the spec!)… when popping ingredients out of the baking tray, they come out in reverse order. A pint to Paul for spotting his mistake. The correct output is “SCATMAN”.

Thanks to David Morgan-Mar for this fantastic programming language. He’s also the man behind LenPEG, an image compression algorithm which, for selected images, can achieve lossless compression at a ratio of 6,291,456:1, and HQ9++, an object-oriented language which provides the most code-efficient possible method ever to write test programs such as Hello World, 99 Bottles Of Beer, and the Quine program, although nobody has ever successfully written a Fibonacci generator or a Towers of Hanoi solver in it.

A Challenge For My Programmer Friends

So you think you’re a dab hand at learning new and unusual programming languages: even the most bizarre of them. You can get your head around Perl, and you might have even looked at LISP. Well, let’s see who’s first to correctly tell me what the output of the following computer program is. It’s unique (I’ve just written it, and you won’t find it elsewhere on the ‘net), so you’ll have to first work out what the programming language is. At that point, you’ll need to either find a platform on which you can run it, or “whitebox” decipher it by hand.

A pint, and my respect, to the first person to solve it. If nobody solves it, the pint’ll go to whoever seemed to be most on the right track.

Scatman Dans Pasta Bake.

A quick and tasty meal for programmers everywhere: baked pasta with a spicy
kick. Cook and drain the pasta first, and pre-heat oven to 175 degrees Celcius
(gas mark 4).

Ingredients.
76 g penne pasta
75 g fusilli pasta
65 g grated cheddar cheese
64 ml vegetable stock
21 g courgette
17 g fresh ginger
11 g crushed garlic
8 teaspoons olive oil
7 g parsley
5 level teaspoons cinnamon
3 eggs
2 sliced new potatoes
1 birds eye chilli
1 pinch hot chilli powder

Cooking time: 30 minutes.

Method.
Put penne pasta into the mixing bowl. Add birds eye chilli. Add hot chilli
powder. Put crushed garlic into the mixing bowl. Combine parsley. Put fresh
ginger into the mixing bowl. Combine cinnamon. Remove birds eye chilli. Put eggs
into the mixing bowl. Combine courgette into the mixing bowl. Add sliced new
potatoes. Put vegetable stock into the mixing bowl. Add eggs. Put fusilli pasta
into the mixing bowl. Add olive oil. Put grated cheddar cheese into the mixing
bowl. Stir for 5 minutes. Liquify contents of the mixing bowl. Pour contents of
the mixing bowl into the baking dish.

Serves 1.

Warning: do not try to cook this dish as if it were a genuine recipe!

The Rails Cafe

This Rails Cafe article made me smile. Rails really is a lot of fun. If SmartData gets the upcoming project I hope it does, I’ll be pushing for Rails to be the development platform: the project would lend itself very well to it. Perhaps I’ll hammer out a hundred lines or so in advance, in order to demonstrate my point when the discussion comes. Again, assuming the client takes our quote.

I’m limping a lot better today, almost up to a normal walking pace, and my foot hurts a lot less (except when I walk for more than ten minutes on end).

Claire‘s made a great start on looking for a new place for us to live, finding a few possible places already and arranging for us to visit one this evening. This possible new place sounds fantastic, but might be a little beyond our budget. We’ll have to do the maths this evening.

Not Quite Where We Planned To Be

Claire and I are in Preston. Let me explain how this came about.

As I mentioned, we spent Friday night and most of Saturday in Gregynog, a beautiful stately home owned by the University of Wales and used as a conference venue. Every year, the Computer Science department ships almost the entirety of the second year out there to learn how better to get a job, in anticipation of hopefully getting an industry year placement the following year. Claire, as a department staff member, was invited along to help organise a group of students. I was invited along as an representative of the computer industry, there to give mock interviews to students of the kind that they might expect when applying for computer science related jobs for their industry year or for graduate positions.

It was a lot of fun. I met some interesting people and, with their help, got to grill students. Perhaps my favourite part was successfully catching out students who had… how shall we say it… exaggerated a little on their CVs. One fellow, I remember, had, while boasting about his web development proficiency, stated that he was familiar with HTTP. So I asked him what the fundamental differences between a GET and a POST method were. I’d have accepted something about request parameters being visible on the address bar, but no: no such luck. It was also good to be pleasantly surprised, such as by the database-proficient claimant I met who successfully, with a pause, disassembled the huge database relationship diagram I gave to him. My co-interviewer says I’m evil. I replied that I was merely thorough.

On Saturday night, in accordance with our plans, we continued on to Warrington to visit Gareth and Liz‘s new place. Gareth didn’t seem quite ‘with it’. But the food was good and I regretted eating so well at Gregynog that I couldn’t guzzle more, and the company was even better. After the party came to a quiet end, we dropped off Jimmy at his home in Runcorn, and decided to move on up to Preston to say “hi” to my folks.

Needless to say, my mum was at least a little surprised when Claire and I waltzed into her bedroom. We didn’t waltz, mind. More of a polka. But she was surprised, regardless. My dad returns from Vietnam today, so we’re hoping to catch him and have lunch before we return to Aber.

Paul: I bet, despite her trying to remind herself on several occasions, Claire’s still forgotten to call you to tell you that we’re unlikely to make the 2:30 screening of Howl’s Moving Castle at the Arts Centre, so I hope you read this before then.

Ah; Friday…

In the words of Bender, “…another pointless day where I accomplish nothing.” It’s feeling a little that way. Last night’s brownout knocked computers offline, and this morning BT severed a cable, depriving us of phones and internet access. It’s an hour and a half into the day already and I’ve got nothing done so far.

The worst bit is, having been told that the phones were down already: when I discovered that the outbound fibre optic link was down, I picked up the phone to call the facilities manager. Whoops! In an age when everything is connected and digitial, it’s easy to forget that things don’t always work as they should.

Add to this the fact that I’ll be leaving early today, and you’ve got a recipe for underproductivity. Which is a word, now, thank you very much. I’m off this evening to Gregynog, a University of Wales conference centre, as a guest interviewer, to give mock interviews to second-year Computer Science students. These interviews are supposed to be reflective of those given in the industry, in order to better prepare them for ‘real’ interviews and give them feedback… so I’ve been devising a list of some of the nastiest Comp. Sci.-centric interview questions ever devised. Here’s some of my favourites:

  • How would you explain a database to a 10-year-old child?
  • When choosing between programming languages with which to implement a specific project, what are the most important factors and why?
  • Pseudocode me an algorithm to detect whether two rectangles (with known top, left, bottom and right) overlap one another.
  • What is bytecode? Can it be reverse-engineered?
  • What is the sum of all numbers from 1 to 1000?
  • Do you make mistakes? Tell me about one of them.
  • Are you smart? Why do you think that?

I can’t write too many of the really nice fun ones here, because (a) there’s at least one person I’ll be interviewing who I know reads my weblog and (b) I’ve got some questions which depend on demonstratable code samples, which I can’t be arsed to upload anywhere.

Anyway; things look like they’re all booted up now, so I’d better get on with some work.

Duality

Duality, my main desktop PC at home, has been misbehaving, and I’ve had to take it to pieces, both virtually (tracing driver DLL calls – yum!) and physically (computer components littering the floor, etc.). It’s been two years since it’s last reformat/reinstall, which is a pretty long time for a Windows XP box treated the way I’ve treated it, so it’s definately time for a rebuild.

Shame I couldn’t have done it sooner/later, as it’s put a dent both in my NaNoWriMo writing and in my ability to investigate some code for a client I’m dealing with “on the side”. It’s going to be a busy little weekend.

In other news, I’ve been playing with Gosu, a sprite animation/drawing layer module for Ruby. Ruby’s execution speed (within an object-oriented paradigm) lends itself well to 2D animation and games. Here’s a Flash animation showing a recording of what I came up with:



Yes, that really is the sprite for Dan in the Dan & Alex comic.

If you’re really sad (and using Windows – I haven’t tested it under other operating systems and can’t be arsed packaging up the C-layer stuff for them, yet), you can actually have a play. Just install Ruby 1.8.2-15 For Windows (15MB) and the game itself (740K).

If I get really bored or suddenly find a lot more free time, I might actually finish making a game out of the engine I’ve put together.

Edit: The download link for the game has now been fixed. If you downloaded it and just got error messages when you tried to run it, try again now.

E-Mail Server Configuration For Dummies

Well; I feel like a wally.

SmartData‘s taking on a new client for a content-managed web site, web and e-mail hosting. In anticipation of the domain transfer going through without a hitch, I reconfigured our web and e-mail servers to already be ready to accept connections to their “new” web site and for e-mails to come through. This is a wise move, because not all of the computers on the internet appreciate moving domains at the same time, and so for a day or so, e-mails will be going to both the old e-mail server and the new one: the new one needs to be ready to catch these before the first computers start sending e-mail to it.

Unfortunatley, I underestimated the intelligence of the configuration tools and the anti-spam mechanisms of our e-mail server software.

So, I send an e-mail to our client, who we’ll call bob@our-new-client.com, from my @smartdata.co.uk address. It goes out through our mail server. This is where it all goes wrong. Normally what our mail server would do would be to look up where on the internet our-new-client.com’s e-mail is kept, connect to there, and deliver it, but our mail server is a little bit lazier than that. It thought to itself, “Hey, I am the e-mail server for our-new-client.com: I know this, because I’ve been configured to accept mail for them,” and so it happily filed all my mail to bob@our-new-client.com… on their new mail server.

And then the news came through that there were complications in the domain name transfer, and it would be a few more days before they could easily pick up said mail. So, I’ve happily e-mailed them a request for their deposit on their hosting package with us, and they’re wondering why we haven’t asked for it yet, so they e-mail us. Here’s what happens:

Their e-mail server contacts our e-mail server and says “I am our-new-client.com, and I have an e-mail for dans-real-address-goes-here@smartdata.co.uk.”
And our mail server thinks “Hang on, this server is pretending to be our-new-client.com, but I know that I am responsible for our-new-client.com’s e-mail. This must be a filthy spammer trick.”
But our mail server was configured by me, so it’s a little devious. It responds (to the real our-new-client.com mail server): “Okay, I believe you, give the the e-mail.” (so those filthy spammers have no idea whether their mail got through or not) Then it shreds the e-mail and buries it in virtual concrete.

And so, for the latter half of this week, neither our newest client or us have been able to e-mail one another, and it’s only today that I’ve noticed.

Bugger.

Black & White 2 Installer

I’ve just been installing Black & White 2, and was quite impressed by the following screenshot:

'everything.stuff' file

Guess nobody told Lionhead about using meaningful file names, eh?