Too Busy For Words - The PaulWay Weblog
19 05 2006

Fri, 19 May 2006

Hitting the Hacker Button
I did a bit more research today on Bluetooth headphones, since I seem to be using my new phone as a media player more (and this will only increase when I get the 1Gb MMC card for it). The Nokia wired 'phones have the soul of an epileptic octopus - they seem to tangle themselves up at the slightest provocation and their slightly rubbery cord, while more pleasing than hard plastic, makes them much more difficult to untangle. So wireless 'phones it is.

I found the BlueTake BT-420ex Bluetooth Sports Headphones a while back. They come with the BT430 'audio out to bluetooth' converter dongle that would make these ideal for listening to my Rio Karma or the TV without wires. If they were comfortable then this would be great for Kate. But according to IpDepot, the sole distributor of BlueTake gear in Australia, they're not available in Australia despite being listed on their website. Bummer.

A bit more prodding turned up the BlueAnt X5 stereo headphones. These seem to come with the same type of converter dongle, and function as a headset to boot. Getting a good, comfortable set of earphones that I can use for my home computer, my phone, and to talk on both my phone and on Skype (Linux version of course!) would be excellent. So naturally I'm hesitant at buying a pair from some internet company, trying them on, finding them uncomfortable or difficult to use and then finding that in fact I can't send them back and get a refund. Being forced to join the ranks of dodgy people selling badly-designed half-working things on eBay in order to get a bit of value back on the $200 or more I fork out on these things is not my idea of fun.

So I send off a few emails to a few suppliers asking what their return and refund policies are. I get automated responses from them, but one simply contains the text "RGVhciBWYWx1ZWQgQ3VzdG9tZXINCg0KVGhpcyBpcyBhbiBBVVRPTUFURUQgUkVQTFkgdG8gdGhhbmsgeW91IGZvciB0YWtpbmcgdGhlIHRpbWUgb3V0IHRvIHByb3ZpZGUgdXMgd2l0aCB5b3VyIGVucXVpcnkuICBXZSB2YWx1ZSB5b3VyIGJ1c2luZXNzIGFuZCB3aWxsIGdldCBiYWNrIHRvIHlvdSB3aXRoIGEgcGVyc29uYWwgcmVzcG9uc2Ugd2l0aGluIDI0IGhvdXJzLiANCg0KVGhhbmtzIGZvciB2aXNpdGluZyB3d3cubXJnYWRnZXQuY29tLmF1DQoNCkJlc3QgUmVnYXJkcw0KTXIgR2FkZ2V0IEF1c3RyYWxpYQ0KDQpQaDogMTgwMCA4MzMgMzE1`". Hmmm. The fact that it has '[Auto-Reply] <the original subject of my email to them>' as a subject line indicates to me that it's just an automated reply and something's borked out in it. I send off a quick note to their feedback line telling them that something's wrong.

But the Hacker Button has been pressed, and the desire to know exactly what was in that email and what format it's in has diverted me from doing anything else. A quick play around with Perl's unpack() function (the Camel book includes a miniature Base64 decoder as an example) reveals it to be Base64. The MIME headers on the document say that it was supposed to be Content-type: text/plain; charset=utf-8 and Content-transfer-encoding: 8bit, so obviously it's been mislabelled. The Base64 decoding, however, doesn't elucidate the entire content, however - something's broken in the decoding that causes it to lose sync about a quarter of the way through.

A bit more coding and I have a command-line Base64 encoder in Perl. I recode the start of their message; it looks like they've missed out a character. Paste that in and it makes the next bit come out in plain text but a bit before is now broken. At this stage I've read enough of the message to know that it is an automated reply, so I can at least give up on trying to fix it for now. But at least I'm armed if their actual reply comes out in this format too.

(Later I realised that I could possibly play around with the message content in Thunderbird's mail store, making it look like Base64 encoding, and see what Thunderbird does. But I'll save it for the real message. And besides, it's much more important to blog about it now...)

posted at: 18:40 | path: /tech | permanent link to this entry

Gain? Questionable. Pain? Absolutely!
I finally got to the Ultimate Frisbee practice session that the ACTUA website reckoned didn't exist but my friend Hugh (who used to play before the knee reconstruction - a warning to others?) thought was on Thursday nights at the Willow oval in ANU. This is, of course, not just a pick-up game, but it's a serious attempt at training for playing in the leagues. At least I wore the shoes I had that would provide the most grip on wet grass out of the pairs I owned, but I still felt a little odd standing around in jeans when everyone else is about ten years younger or more and wearing shorts and training gear. And cleats. Having more grip on the ground would have definitely been useful.

They were very gracious about having a new person turn up out of nowhere, and Ian and Tom did a great job fitting me in and making sure I wasn't too confused or outclassed. We did a warm-up run, some stretches, some practice defence and skills exercises, and then played a good-spirited game. And I had a great time. Fortunately my throwing and catching skills are pretty good, so despite learning a few new techniques I was still getting accurate passes, even sometimes under pressure. Finally we finished up and I realised that I had 13 minutes to get to the opposite side of the campus for the ANU Film Group's screening of Wild Parrots of Telegraph Hill, which I wanted to go to and at which Kate and a friend would be.

Boy, was I knackered by the end of it. I couldn't keep up a jog across the campus, my neck had picked up some crick that adrenaline had neglected to mention to me before, and I could feel the aches and stiffness beginning to set in. I had to have several new parts attached just so I could be knackered in them as well. I'm seeing a chiropractor so that the grievances in my neck can be partially sorted out, and will try to do some stretches and exercise over the weekend to iron things out. And it was pretty obvious that I wasn't keeping up with the Fit Young Men that I was marking in the game, especially towards the end. I can at least be proud that, despite not having done a lot of fitness training before then, I kept up throughout the whole session.

And I can't wait to go to the pick-up game on Sunday... :-)

posted at: 15:20 | path: /personal | permanent link to this entry

Recycling bytes the easy way
On Tuesday I rebuilt a machine for a friend on Tuesday. Windows 2000 had decided that something in its boot process was sufficiently adgered that the drive would stop responding after a bit and would lock up the machine. Funnily enough, booting into the System Rescue CD was able to see the entire drive and copy all of the information off it with no lock-ups or obvious problems. Trying to boot into the Windows 'Rescue' tools on the 2000 install CD locked it up as well, which I assume was because it tried to access the drive in a funny way that the drive was no longer having a bar of (and which Linux didn't do, at least in its System Rescue CD configuration).

So, one trip to Harris Technology later, we have a new, faster, 80GB drive (and an ADSL modem for the upcoming move into the modern world of broadband for the Armstrong house). While Rob gets on with his actual work, I install Windows, install all the motherboard drivers and add-ons that Windows natively doesn't find, install all the Service Packs, and do so in only three reboots. Finally we copy everything back with the help of Explore2FS (because the only room on my 80GB portable drive was in the ext2 partition). Then, because half of this is client data that Rob's never quite got around to putting on the Raid-1 80GB SATA drive pair that is supposed to be his work drive, I have to shred the contents of this directory on my portable drive.

If only shred came with a -r option.

So, one small Perl script later, we have a mechanism that will span across multiple directories, shredding every file that it can find and then removing the directory after itself. I did a bit more work on it this morning to fix its remaining bug: not being able to cope with names with spaces in them because of the way Shell.pm throws parameters around (i.e. it creates a small shell script and passes the parameters into that, which then gets reinterpreted for spaces).

And then I found wipe.

But, hey, who needs a reason for reinventing the wheel?

(I also plugged the drive into the USB2 connector rather than the USB connector and increased its speed by an order of magnitude...)

posted at: 14:57 | path: /tech/perl | permanent link to this entry


All posts licensed under the CC-BY-NC license. Author Paul Wayper.