When I implemented dated URLs for the blog, I mentioned that I had a particular idea that I wanted to implement. This idea is simple enough – an easy, convenient way for a reader to find entries in the archives. The basics of the idea are explained, in Michael’s discussion on his recent redesign. He calls it a “Digging archive system”, for lack of a better term. Think of it as a “lite” version of Apple’s Finder, but for you weblog archives.

Since Michael explained what he was looking, I’ve been thinking about the problem a lot. It’s an incredibly cool/good idea. The trick is implementing it. The page shouldn’t reload as you dig through the archives, which excludes a purely server-side solution. That leaves XMLHttpRequest (ala Livesearch) or preloading all the data on the page when it loads.

As cool as XMLHttpRequest is, I can’t think of an efficient, graceful method of achieving the desired look ‘n’ feel (if anyone wants to show me a way, feel free!). Instead, I’ve been leaning towards a mixture of CSS and DOM to provide a solution

By using nested lists, we can build up a semantic structure of the archives. In my example it is structured by date, but I can also imagine things working for the standard section/category structure of a standard Textpattern site. Consider this (very) basic structure:

[image lost]

Obviously this would be far larger depending on the size of the archives. The classes are there to allow you to style the lists in case javascript is turned off. If javascript is available, we add a second class to the <ul> elements, otherwise they are left alone. Graceful degredation is good. In the same vein, the idea is to not have to use onclick="..." attributes in our XHTML, but to use DOM to add the event listeners. Gotta keep the code clean!

I can imagine the system working like this:

  • The latest year/month/posts are displayed by default
  • Only years/months that have posts are listed.
  • When a reader clicks on a month, the relevant posts are displayed and previously displayed posts are hidden
  • When a reader clicks on a year, all the previously displayed months are hidden and the relevant months are displayed
  • Clicking on a post title takes the reader to the entry.

Toggling the visibility of a list is handled by setting its display property to either “none” or “block”. All other layout is controlled by the stylesheet. So we could end up with something that looks like the following (top is what it looks like with javascript enabled, bottom is how it would display otherwise, if CSS is still enabled) –

[image lost]

That’s the theory, anyway. The problem is that I haven’t got that much in the way of DOM/Javascript “m4d sk1llz”. Is there anyone out there that might be able to point me in the right direction or otherwise help out?

What’s that? A bloody good game based on Warhammer 40,000? Are you sure? Well, wonders never cease…

It’s true. I’ve just finished playing the beta version of Warhammer 40,000 – Dawn of War… and by jove it’s good. Bit tricky to play on a laptop with just a touchpad, but damn good none the less!

It’s about time that the Warhammer 40,000 franchise had a decent computer game. It’s one of the richest fantasy worlds since Tolkien came up with Middle Earth. The back history is exceptionally compelling; the story of a massive yet fragile Imperium of Man that stretches far across the Galaxy – and of the Alien races that it rages constant war with. As the line goes: “in the grim darkness of the far future this is only war”.

On the surface, the game itself seems a pretty standard RTS. Be thankful they didn’t go for a turn-based game like the table-top game. That would’ve been a disaster. By going realtime, the game is far more exciting and faster to play. There are a few neat tricks to it though.

Graphically the game is gorgeous. Everything is in complete 3D. You can zoom right in on an individual trooper if you want and marvel at how detailed he is. Explosions and weapon effects have a good feel to them – you can really appreciate the rain of fire tearing through an enemy squad when your Space Marine Heavy Weapon Squad let loose a volly.

A fairly novel difference to most RTS games is the resourcing aspect. To gain more resources for building more troops or getting upgrades you must capture and hold onto sections of the game map. These are either “Strategic” points (run-of-the-mill areas that it’s good to control) or “Critical” points. Critical points tend to be the basis for some mission objectives.

There are four races available in the full game: Space Marines, Orks, Eldar and Chaos. Only the Marines are available to play as in the demo. Space Marines are the finest troops of the Imperium; genetically modified, heavily armed and armoured. They have the most balanced and versatile troops and heaps of killer vehicles. The Space Marine Dreadnought is absolutely lethal against most troops and vehicles. Space Marines also tend to not run away much – another vital aspect in the game.
Orks fight in huge mobs and use low-tech weapons salvaged from scrap left on battlefields. Ork tactics tend to be to grind the opponent down with wave after wave of troops, backed up by their “Big Gunz”.
Eldar are Elves in space. Highly advanced technology but not many of them around to use it. The Eldar have tend to use fast troops that hit hard then get away before you can retaliate properly. They can also upgrade squads to specific tasks such as close combat or ranged fighting.
Chaos are the real baddies of the game. The legions of Chaos are Imperial troops seduced by the Gods of Chaos. As such, they fight much like the Space Marines but with one big difference – Daemons!

I’ll stop rabbiting on now. I’ve already gone into far more detail than I planned to! This has turned into a mini-review… Suffice to say that I’ll be going out later today to buy the full version of the game.

Sometimes you just can’t ignore the temptation to tweak and tinker with your work, especially when it’s a personal site…

One thing about web development that I have a love/hate relationship with, is the desire to constantly tweak and fiddle with what you’ve done.

Even something that you’re immensly proud of and happy with; you’ll get the urge to go back and change a little bit here, improve a bit there.

This is especially true of blogs/personal sites. Because it’s yours, you can do what you want with it.

Take here for example. A few days ago I had a design I was reasonably happy with. Then for some reason I decided I wanted to try my hand at porting Kubrick to TXP. Boom-baddah-bing and here we go. Most of the site now uses the Kubrick style (albeit with a number of changes) and I’ll be moving the rest over as and when.

Once I get this distraction out’ve my system, I’ll get back to the XML-RPC script. Promise.

Now that I’ve got the awkwardness of the first post out’ve the way, we can move on…

Ever since moving into the new house (about 3 months ago), I’ve been rethinking my computing needs. I’ve got a pretty big under-stairs cupboard that’s being eyed-up for conversion into an office. While it may be larger-than-average, cupboard wise, it’s not quite big enough to accommodate all of my hardware, so something has to go.

Deciding what was to be turfed out meant evaluating exactly what I use a computer for when at home. Do I need a big, gaming orientated desktop, when I have two games consoles that aren’t exactly getting worn out by over use? Do I need a high-spec Centrino laptop when I’m never more than 2 meters from a power socket? What about that Epia-based Media Center that’s gathering dust in the removal box?

It’s all a bit OTT, really.

Once you start looking at the hardware, attention inevitably turns to the software/OS side of things. Do I like WinXP? No, definitely not. Does it have good software? Yes. Do I like Linux? It’s better, but a pain to setup/manage – particularly on my laptop. Does it have good software? I guess, but not so far as web development stuff goes, IMHO. What about Mac?

Ah. Mac. I’ve never used a Mac before. I know nothing about Macs. Other than they look pretty. Really pretty. Actually, I do know something – they have a fair bit of good web development software. If all else fails, Macromedia Studio MX is available on Mac.

A Mac is sleek and sexy. A Mac is powerful. A Mac is… how much…? A Mac is expensive. Or maybe it’s just me. Getting onto the bottom rung of Apple systems will cost £600. That’s the very bottom, barebones eMac. Prices then go astronomical once you start adding features like AirPort, Bluetooth, SuperDrive or even just bigger RAM or harddisk. But that PowerBook looks so damn sexy…

It’s all a muddle and no mistake. What would you do in my position? Stick it out with the laptop + whatever OS you think is best? Get a new PC/laptop? Get a Mac? I need help choosing people – influence my weak mind!

[Editors Note] This was the first post on my Pixel Meadow blog, but obviously not my first ever blog entry.

Writing your first line is hard. From English classes to blogs, everyone has struggled to write the opening sentence. This short entry recognises that fact and pays tribute; looking back at how others have started before me.

Writing the first line is the hardest part of the writing process. Remember back in school? You could sit for hours trying to come up with the opening sentence for the essay your English teacher wanted in the following morning. The rest of the essay was always easy by comparison.

It was the same with that love letter you wrote to your sweetheart; the first line in your million-dollar film script; the first post in your blog and every post after.

I was curious to what other writers had put in the first posts on their blogs.Dan@SimpleBits alludes to an older version of his blog and how this one will be different. So does David@MezzoblueJon Hicks welcomes you to his lab.Dunstan wrote about Paris. “First Post!” is all Michael had to say. Othershumbly welcome you to their blog and explain why they’ve started writing. I nearly joined them. Some write to share information, others write to get better at writing.

This entry is a tribute. At least, I’d like to think so. A tribute to the first line; the opening sentence; the first post. I’d like you to think back to where you started from. That mountain of effort that started your blog. Share what it was like.

Welcome to my first post.

Malarkey has just posted a fine summery of the pitfall of the various “badges” that currently litter a lot of “standards compliant” websites. You know the ones – they point to the various validators.

A few pitfalls are identified –

  1. They’re pointless if your site doesn’t quite validate for whatever reason (which is subjective with the accessibility validators anyway)
  2. They offer the Average Joe absolutely no explanation as to what they’re about. Instead, they just plonk them in a highly confusing, jargon-filled site.

He then offers a far better solution – link to an internal page that explains what the buttons mean. That way, you can still claim your site validates while actually informing people what it means.

It’s a solution I agree with – expect to see it in use here shortly.

Ever since I joined Technorati and “claimed ownership” of this blog (and Gentooist), my Technorati Profile has always read “No Verified Blogs”. What exactly do I have to do to change this? I thought the instructions were something along the line of:

  1. Signup to Technorati
  2. Add a Blog
  3. Embed Technorati profile link in pages
  4. Setup MovableType to ping Technorati when posting an entry
  5. Write

Am I missing a magical step? I’ve done all that, written several entries since joining and yet there’s been no change. The mind boggles!

Hopefully a more enlightened user will hear my call and be able to shed some light..?

Just came by this massive list of great web standards articles by way ofSimplebits (where you can also find this list).

I think, out’ve the 450+ links, I’ve read around about 30 or 40 of them…
Time to get reading!

For posterity, I’ve duplicated the full list below.

Mahoosive List O’ Links

I just discovered this wonderful series from Asterisk*.

Being as I have worked with bands before (while I was still a young wasterstudent), and still have a bit of interest in the local music scene, I’ve struggled along trying to create a website that promotes a band image, is useful to the users and is basically… something to be proud of. I must admit, looking back, I failed everytime.

Looking at someone else’s design methodology is always refreshing and inspiring, especially if you can identify with the subject.

Hmmm. I (almost) fancy doing just one more band website…

There is one thing on the internet that is – without a doubt – causing more buzz than anything else at the moment. No, not the new Harry Potter film (worth going to see, by the way). I’m talking about Gmail.

For weeks since it was announced, the blogosphere has been buzzing about it. Some have snorted in derision, some have placed it high upon a pedestal. Gmail isn’t even fully open to the public yet – it requires an “invite”.

These invites are highly desirable, so it would seem. All over the place, I’ve seen various contests to win an invite. Some ask you to come up with something funnyOthers just want a link (so can I have my invite now? 😉  ). The slightest mention of having a spare invite prompts a deluge of people you don’t even know asking for it. Googling for “Gmail Invites” returns page after page of people pimping this strang type of gold dust.

I guess it’s this process of invitation only accounts that are making everyone want Gmail so badly. To be in an “exclusive club” is quite a draw for some.

If it’s not that though, what is the draw? Is Gmail any good? I’ve put out the feelers (ooh-er) for an invite, so I’m hoping to be able to find out for myself, but maybe someone could enlighten me?

Isn’t just another web-based email service?

Last Updated: 27/May/2004

The Samsung X10 was, for a long time, the thinnest notebook available. It’s also silver and all shiny. Obviously, I just had to have one! Specifically, the XTC1400 which boasts a Pentium-M 1.4GHz, 512Mb RAM, 40GB disk, CD-RW and wireless networking (it’s a Centrino notebook).

By default, it comes with WinXP Professional. Obviously, that just will not do! Unfortunately, it’s not the easiest laptop in the world to install Linux on. I’ve done a number of installs with several distros and have had wildly differing results – even between reinstalls of the same distro! Eventually though, Gentoo won the day…

Not that it was an easy process, mind you. Indeed, as I type this, a few features are still not working (read: ACPI). But by and large, the laptop is fully usable for day-to-day tasks. Even my Girlfriend can use it, so it must be ok!

Here’s a quick run-down:

  • Kernel – currently 2.6.6 love4. Seems very stable and relatively nippy. Edit 27/May/2004 – Now using 2.6.1 + a handful of patches.
  • Display – The biggest stumbling block for the X10 at one point. Using XOrg X11 + the latest Nvidia Kernel & GLX (5336) from Portage works a treat.
  • SoundALSA’s a bit temperamental at the moment. I had it fully working at one point, but forgot the fix when I did a reinstall. Normal users get a “Cannot find /dev/mixer” error. I know it’s fixable though, but I want to get other pieces working first.
  • Networking – The wired LAN card works a treat straight off the bat. The WiFi card took a bit of work though. Read this post on Centrino Wireless + Gentoo to get it working. I’ve had no need to use the modem, so I don’t have a clue if that works or not… From what I’ve read, it might only work with a 2.4 kernel.
  • ACPIThe major stumbling block at the moment. Some things are working, others aren’t – at the moment, only the AC adapter and battery aren’t being picked up. The problem lies with the common (missing?) ECDT error. I’ve tried adding the several potential patches to the kernel, but none have ever installed properly. Edit 27/May/2004 – fixed by reverting to 2.6.1 kernel + patches. Guide Coming Soon.
  • Speedstep – I’m not going to try the CPU frequency scaling until I’ve gotten ACPI properly working. Just in case.
  • Touchpad – Using the Synaptics touchpad driver, everything works apart from the scrollwheel/middle button. No matter of tinkering could get this to work. The driver does provide features that make up for this, but in the end, I installed a MS Bluetooth mouse instead… (guide coming soon)
  • Keyboard – Not tried to get the extra keys going yet. Last time I installed I couldn’t get them working, but I didn’t exactly try hard.

Currently I’m running Gnome 2.6 and find it very responsive. Apps load up quite fast, although I’ve not been doing anything particularly strenious with the machine since I installed Gentoo.

This page will be updated as I get more things working (and write the guides for the fixes)

Centrino is the big thing in laptops at the moment. Longer battery times despite more powerful processors and inbuilt 802.11b wireless. Unfortunately, Intel have yet to provide Linux support for the wireless component of Centrino and are a little cagey as to when it will be available.

Thankfully, the open-source community is a crafty community. NdisWrapper provides a method of loading Windows drivers to enable the wireless card.

At the time of writing, there are ebuilds in portage for NdisWrapper (latest version is 0.6-rc1). Unfortunately, they seem to be quite buggy and I’ve yet to get them to work. Instead, what I found to work best was to get the latest version from the NdisWrapper site and compile it from that source. At this time, the latest version is 0.7. Then follow the steps below to release yourself from your cat-5 tether!

Note 1: as a prerequisite, you need to emerge wireless-tools.

The Driver

  1. Download the latest source tarball to your system from the Ndiswrapper Sourceforge Project and unpack the archive.
  2. For the Intel PRO/Wireless 2100 (standard Centrino wireless card), download this driver. Otherwise, consult the NdisWrapper homepage.
  3. Open up a terminal and su to root then cd to the directory you extracted the source to.
  4. make install
  5. Unpack the Windows driver and check for a .inf file. In the above package, it should be “w70n51.ini”.
  6. ndiswrapper -i /path/to/win/driver.inf
  7. Once that’s done, type ndiswrapper -l. The name of the inf file should be listed. If not, you may have mistyped the path, so try again.
  8. modprobe ndiswrapper to load the driver. Providing there are no errors, typing dmesg should return “wlan0: ndiswrapper ethernet device…”

Configuring Your Card

The next bit will either be straight-forward or trial and error. It just depends on your setup. I had a bit of bother getting the right combination of authentication settings before I got my card to work.

iwconfig should list your card and its current settings, which will be all empty. To change this, you need to do the following:

  1. iwconfig wlan0 mode Managed if you use and access point. Otherwise, set mode to “adhoc”.
  2. iwconfig wlan0 key restricted <wifi key> will set your authentication key (hex format). Pass the -s option after key to type the key in ascii format. Depending on your setup, you may have to subsitute “restricted” for “open”.
  3. iwconfig wlan0 essid your_essid sets your network ID.
  4. ifconfig wlan0 up should now bring your wifi card online. If not, fiddle around with the settings above. Also take a look at the other options you can set through iwconfig.
  5. DHCP users should type in dhcpcd wlan0 to assign an I.P. to your card.
  6. Alternatively, to assign a fixed I.P. you need to copy /etc/init.d/net.eth0 to /etc/init.d/net.wlan0 and edit accordingly. Then type in /etc/init.d/net.wlan0 start.

If you were to ping Google or similar, you should see your connection working.

Final Steps

The tricky bit is now out of the way. All that should be left to do, is to get the card to come back up at boot time:

  1. Add ndiswrapper to /etc/modules.autoload.d/kernel-<kernel version>
  2. If using DHCP, add the five steps in “Configuring Your Card” (above) to /etc/init.d/local.start.
  3. Otherwise, you’ll probably want to add the net.wlan0 file to startup with rc-update add net.wlan0 default.

That should be it! I’ve been happily connecting with the card in my Samsung x10 since I reinstalled Gentoo about a month ago.
One point – DHCP users might want to try the net.wlan0 method of configuring/bringing the card up/down instead of using local.start. It seems to be the “correct” way to do it and a lot “cleaner”.However, I had no success getting this method to work with Ndiswrapper 0.7 (0.4 worked, IIRC). That’s not to say it won’t work for you, it just didn’t work for me… Give it a try by all means, then let me know how it went by leaving a comment.

This post was originally inspired by this thread on the Gentoo Support Forums.

It seems that SPAM is forever on the increase. Daily, our inboxes are flooded with offers of riches, pills, or other such junk. Dealing with SPAM can take a long time – time that would be better used on something more productive (like Unreal Tournament 2004…)

There are tools for helping to automate the task. Nearly all mail clients allow you to setup filters to direct messages that match certain patterns to certain mailboxes. With the all the different tricks used by spammers, this can lead to a lot of filters having to be setup! Some clients (such as Mozilla Thunderbird) have built-in anti-spam filtering. Depending on the level of mail that you receive, these might be perfectly adequate for your needs.

Sometimes though, you just need a little bit more power…

SpamAssassin is a powerful program for filtering SPAM from your mailbox. I’ve seen it used a lot on the server-side – filtering messages as they come into a mail server. It can also be used client-side, which is the method we’re going to setup today.

Evolution is the mail client/calendar/task list program from Ximian (now part of Novell). It’s a pretty powerful app, on a par with Outlook in most respects, but with none of the flub. It offers a lot of options for filtering your mail, including one very useful option in particular: “pipe message to shell command”.

Can you guess what we’re gonna do? That’s right. Use Evolution’s filters to pass incoming mail to SpamAssassin, then decide what to do with the message based on its spam score. Ready? Then lets begin.

emerge evolution

Let it churn away…

emerge SpamAssassin

More churning…

When all the compiling is done, add the spamassassin daemon (spamd) to the default run level so it starts at bootup:
rc-update add spamd default

If you haven’t already done so, set up Evolution with your e-mail account(s). Next comes the laborious part – setting up the quarantine area, the training area and the filter.

Create a new folder in Evolution, called Quarantine. This will be where messages marked as spam will be put. Now create a subfolder under Quarantine called SPAM Training. This is where we will manually place SPAM mail that SpamAssassin misses and later use it to train SpamAssassin to catch it next time.

With the folders setup, lets create our filter. Filter options can be accessed under Tools > Filters. Create a new filter called “SPAM” (or similar). The settings for this filter should be:

IF
pipe message to shell command spamc -c returns greater than 0
THEN
move to folder "Quarantine" in "Local Folders"

That should be it. Instantly, you’ll find less spam in your inbox as it gets filtered into your quarantine folder instead. You could set it to delete spam instead of quarantining it, but there’s always the chance of false positives, so I like to double-check the quarantine area every couple of days in case there’s something there that I might want to keep.

Inevitably, some spam will get through. To deal with this, we need to train SpamAssassin into a lean, mean, spam-eating machine. Remember the “Spam Training” folder we set up? Now’s when it comes in useful. When SpamAssassin misses a message, manually move it into the training folder. Then, type the following command, changing @@ with the path to your home directory: sa-learn --spam --mbox "<home dir>/evolution/local/Inbox/subfolders/Quarantine/subfolders/SPAM Training". This command tells SpamAssassin to look in the folder and that everything in it should be classed as spam from now on. After a few days/weeks of training, the amount of spam in your inbox should drop to next to zero!

If – like me – you do a lot of “tinkering” with your Gentoo installation, you’ll invariably end up typing a lot of commands over and over again.

Aliases save you from having to remember/repeatedly type in these commands. Aliases, in case you are new to them, are command line shortcuts. As such, they can save you a fair bit of time when working in the terminal.

To set up an alias, you use the alias command:
alias aliasname='command'

There are a couple of Gentoo specific aliases that I have set up:

  • unstablemerge—a shortcut to ACCEPT_KEYWORDS="~x86" emerge
  • retrymerge—saves typing in emerge --resume
  • rc-add—instead of rc-update add
  • rc-del—instead of rc-update delete

Got any more? Leave ‘em in the comments!

From The Register

Computerised lamp posts look like being the basis of the biggest data network ever, as the world’s traffic monitors set about controlling cars with wireless. And the result could be an absolute windfall for a startup company which, it seems, owns all the relevant patents.

The whole article reads like some sci-fi nut’s dream… but it could become very, very real. If an entire city or town or even a simple road was a big, internet connected wireless hotspot, you could pretty much access information anywhere. How cool/scary is that?