Pretty-printing XML with Emacs’ NXML-mode

Did you ever get a stream of XML out of a log file, or in a data stream, and it’s all mashed together without line-breaks so that it just appears as gobble-de-gook? If there’s a data error (not an XML parsing error) then you have to read it so that you can find where the error is, but you don’t have XML-spy and NetBeans is overkill or takes forever to fire up…

Emacs to the rescue! Benjamin Ferrari wrote this increadibly useful (and simple) elisp function to pretty-print a block of XML code:

 Continue reading 

Microsoft Vista keyboard?

I spotted a “Vista compatable” keyboard in K-Mart the other day, which set me thinking… what would a Vista keyboard actually do that a “non-Vista” keyboard can’t?

Then I Googled for “Microsoft Keyboard Vista” and found this ad from Microsoft (Google Cache).

What the? “Designed to make it easier than ever to control PC media from your desk, your lap–or even from the comfort of your couch”. So… if I use this keyboard’s Play button to try and play media that Vista’s DRM system thinks I shouldn’t be playing, does it administer an electric shock? What if I have the keyboard in my lap 😀  Ouch! No so comfortable now…

Thanks, Microsoft, but … ahem, no thanks!

Mystical jargon

I’m sure this observation has been made elsewhere, but I can’t find reference to it online.

Have you ever noticed the prolific use of mystical/fantastical words in computer jargon? I’m sure there is a significance, or at least a tongue-in-cheek pointing to the wizardly ways of early and contemporary computer experts. It is funny I suppose, and when you look at how wide-spread it is, it may be revealing of the hacker psych.

Continue reading

Dvorak keyboards

I prefer Dvorak keyboards to QWERTY, which confounds my work colleagues no end 🙂

I’ve been typing on Dvorak for about 3 years now. The main reason I use the Dvorak keyboard layout is because, after 15 years of six-finger typing on QWERTY, I decided to learn to touch-type, and Dvorak is very easy to learn (I learnt it in 2 weeks, back to my old typing speed after a month).

Continue reading

Crashed Linux


Crashed Linux

Originally uploaded by milliped.

This is a pretty neat shot of the in-flight entertainment system on an Airbus A330 having a boot-up issue. Note, the kernel is Linux.

This photo has a big rant in the flickr comments about whether or not it’s a Linux crash. Well, what’s a Linux crash? Most of the public Windows crashes do not involve the Windows kernel (except for blue-screens) but they get called Windows crashes. So, to be fair, this is a Linux crash, even if it appears that the kernel itself is fine.

Updated my geek code

New geek code block follows. I think it’s a Good Thing™ to update this once a year, although some of the categories are becomming quited dated (e.g. OS/2?)

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/MU d(-)>+ s:+ a C+++(++++)$ ULS*++++(+)$ P(+) L++>+++ E(+++)>++
W++(+++)$ N- o? K- w--()$ O- M+>++$ V PS+(++) !PE !Y PGP+(+++) t+(++)
5++(+++) X- R tv(-)>-- b+++(++++) DI++(+++) D+(++) G++ e++ h----> r+++
y++++
------END GEEK CODE BLOCK------

You can decode this code by copy/pasting it into the text box at this address.