I just want to wait until after Christmas before making any decisions. Of course by that time the Intel dual core laptops will be just around the corner. Rockdirect have been selling dual core laptops for a while. I need to see some reviews about them. Fun for all the family.
New music Wednesday
I decided I needed some more music today so I went out and bought the Sigur Rós album Takk… and the Tori Amos album The Beekeeper. The Sigur Rós album was purchased because I heard the track ‘Glósóli‘, Tori Amos, quite simply because I have no choice in the matter.
This coming weekend I’m in London. A bit of interviewing and a few drinks with the big sister (followed by the usual life advice).
I wanted to browse the iTunes library XML file. The problem is that Dreamweaver crashes before it loads the file; consuming > 600Mb before falling over. GoLive has churned up about 1.5gb of VMEM usage and is still scanning the document – after about 30 minutes. I haven’t the patience to see what the microsoft development environmnent does, but as you can guess, none of them are optimized towards large file editing (about 30mb doc).
Song for the coldclones
Fintan, this one is for you… Everything sounds like Coldplay Now. By a band called Mitch Benn and the Distractions.
When you don’t know, then you need is a little magic(5)
What’s in a file? If you’re to believe Windows, a .doc file is a Word Document, a .xls is a spreadsheet, a .jpg is a jpeg file. The reality is in the business you will encounter a bunch of anonymous files. If you’fe fscked a file system or ran chkdsk /f you can end up with a bunch of unlabelled or labelled badly files. Identifying them is a bit tricky. Some people don’t care, they just wipe the recovered files, but if you care, probably the first thing you want to do is figure out what file type they are.
For Unix and Linux we have the file command. This command determines what a file is based on the content of the file. How it does this is based on the contents of the /usr/share/file/magic file, which describes in simple means how we identify the file. It’s not 100% accurate, and regularly makes a pigs ear out of identifying text files properly (curses and your free format), but it works most of the time for images, programs and most of your annoying microsoft files.
Convenience aside, most of the work on the file command is actually performed by the libmagic library. You, as an application developer can take advantage of this library to provide useful information about a file to the consumer.
Apple Macs (and PalmOS devices) have it easy. Each file carries along with it identifying marks of it’s creator application and file type. This information is stored in the resource fork of the file, which for Macs can mean problems when transporting it from platform to platform. Self identification goes a long way though. As creator codes are registered with Apple, it means you generally avoid treading on other applications and co-opting their file types, as happens on windows all the time.
The search for a slogan for Motorola mobile phones
Here I am with a shiny new Motorola phone which I find really really shiny and nice, but as you may have guessed from the previous blog entry, I’m not happy with the software. I must hearken back to the past when we had a separate Sony and Ericsson phone company. Sony manufactured really pretty phones, with good user interfaces, but the hardware behind the phone itself sucked. Ericsson created technically good phones, but their software and look sucked. When they came together it has been good for the both of them. The phones look good, they have good software and they make good calls (for the most part, don’t buy the low end phone models). With Motorola they’ve always had technically good stuff, it’s worked well, but their software has always made me want to hurl. My first phone was an old Timeport. It had an IR port, Bluetooth didn’t exist at that time. I thought that the phone software was good. Oh foolish, foolish me. I went back to have a look at it again recently. What a piece of shite. The menu system is incomprehensible and performing the simplest of tasks on the phone is a nightmare. Fast forward to today. The menu system has improved significantly, but they’ve still got things wrong in the most critical of ways, the extra click here, the missing option there. The fact that practically all the configuration in the phone is accessible through the initial setup screen. I mean really folks, the purpose of an initial setup screen is to get enough information to use the phone – like a wizard. Ask the person if they want to set the date/time or use auto-update (missing on the Vodafone branded ones; I think it’s because they can’t actually get the network clock correct – lazy buggers!), then off they go with their new phone.
How do I configure Bluetooth? Menu -> Connectivity -> Bluetooth Link (only option, I know there’s a possibility of truesync and IR, but if there’s only one then take the fucker and don’t ask me) -> Setup
How do I compose a text message? Menu -> Messages -> New Message -> New Short Message. Considering that 85% of all phone messages are text messages a shortcut to go straight to a compose window would be nice.
I won’t even pretend to understand how the Speed No ‘feature’ works, it really is that bad; mind you the Sony one wasn’t much good either for the non-smartphone models.
I regularly have to switch my phone to silent and back to my regular profile. How do I do this on these phones? I have to navigate through to the specific profile for silent, or else change the volume for the current profile using the volume control keys.
The phone book. Again, multiple entries for each name, the only thing identifying them is the tiny logo in the corner. The ‘preferred number’ feature is laughingly ineffectual, as far as I can tell it just puts one number ahead of the others.
Let’s see, now for the slogan: Motorola, solid phones, shitty interfaces.
Bad Motorola, no cookie for you
My old, unreliable mobile phone died a couple of days ago, and I needed to buy a replacement. I’m not able to upgrade my phone for another 2 months so I decided to buy a pay-as-you-go phone and just slip my SIM into it (same network, no issues with locking). People who know me, will understand that I have a liking for flip-phones, so I went for the Motorola V3 (Razr). Aargh! christ, but the phonebook is the biggest piece of shit I’ve ever come across. I understand this misbegotten need to have the phone book maintain some compatibility with the SIM, but for christ’s sake, they need to get their act together on this. Practically every contact in my phone book has two entries, in fact most have 3. On the motorola phone book every contact is a separate entry on the person list. This means I have to wade through 2+ entries per person to scroll from one person to the next. Factor in that I store people’s full names on the phone, in surname order, wading through the 9 Shanahan’s in the book takes a long time. It always integrates the SIM contacts onto the phone book. There is no visible option to disable this ‘feature’ (my SIM contacts always were a backup of my phone entries), so I end up with loads of duplicates (or purge my SIM). I can’t send my entire contact details to someone, I have to send it piece by piece. It shows the email addresses interspersed with the phone numbers which is pointless most of the time.
The next complaint is really a bit of a click-fascist thing. You know what I mean by this – it just seems to take an extra click or two to perform some tasks. Just enough to annoy perceptibly.
Then there’s the syncing software. Following the really annoying splash screen – slow, irritating and serving no purpose, we are presented with a rendering of my phone on the bottom right corner of the screen, a bunch of icons and no idea what does what without mousing over one of the icons and seeing what it does, based on the tooltip! Come on people, tooltips cannot replace text! Apparently I can dial numbers from the number pad (never would have guessed at that). The only way to pop up the menu is to hit a box that’s about 20 pixels square, replicating the menu button on the phone itself. Too small to hit easily, and there is no keyboard navigation, unless you can guess at the magic hotkeys. Most of the hard work is farmed off to other applications, none of which share details of the current state of the phone (contacts, calendar), each sub-application launch causes the data to be re-read, which takes ~30 seconds each. None of these sub-applications are keyboard navigable (bugbear of mine). Quitting the application requires either clicking on the really small off switch, or doing the acme Alt+F4 close the window trick. Practically everything visual about this application could do with a rewrite.
On the plus side, it does synchronize, which is it’s primary role, but I just wish it wasn’t so annoying about it.
Badly implemented phonebook aside, practically everything else about the phone is good. It’s small, neat and call quality is great. I’ve not tested the bluetooth functionality very much so I can’t say either way on it. Over all, I’d consider it a good replacement phone, but unless something good happens with the phone book, I’m not planning on buying another Motorola phone in the forseeable future after this one.
Now if only I could make my own phone book. I wonder if it’s even possible on these kinds of phone. Maybe I should check this out.
iTunes, explorer, context menus and stalled music
Ooh! this one really annoys me. I’m using iTunes for syncing with my iPod. But when I’m playing music on the desktop if I right-click on anything in the explorer and don’t select something really fast iTunes stops playing the music. What a piece of junk.
Java webstart – absence of errors, absence of forms
This one is beautiful. If you get an unhandled run-time exception in the public void main(String args[]) method then your application simply won’t launch. You should make sure to intercept all exceptions in the main class and then throw up a simple error dialog.
Of course this doesn’t work if you are missing a class in the distribution, the exception happens before you get to the main method.
Quick tip: enable and show the java console (JavaCPL on linux, java control panel under windows) it’s under Java console in the Advanced tab.
More phishing
I got an email purporting to be from paypal, asking me to download a security tool that will help protect my computer. Well guess what, it doesn’t (well duh!). It turns out to be changing the NameServer entries for all the interfaces in in the registry keys under SYSTEM\ControlSet001\Services\Tcpip\Parameters\Interfaces to something else. Firing up a disassembler, we find out that the value it’s trying to set is:
aRstpuucpuucpur db 90h ; DATA XREF: start+Ao start+101o ... db 98h ; db 92h ; db 8Fh ; db 93h ; db 93h ; db 96h ; db 8Fh ; db 93h ; db 93h ; db 96h ; db 8Fh ; db 93h ; db 90h ; db 99h ; db 0 ;
Not surprisingly, this is not a kosher string, it’s been encoded. One of the first things the code does is decode this, using the following bit of code
sub_0_40107E proc near ; CODE XREF: start+Fp arg_0 = dword ptr 4 mov eax, [esp+arg_0] mov ecx, eax mov dl, [eax] loc_0_401086: ; CODE XREF: sub_0_40107E+15j test dl, dl jz short locret_0_401095 xor dl, 0A1h mov [ecx], dl mov dl, [ecx+1] inc ecx jmp short loc_0_401086
<sarcasm>Terribly complicated</sarcasm>. The code xor’s each value in the string with 0A1h. We can step by step this, or you can trust me that it’s 193.227.227.218. A traceroute reveals that it’s probably somewhere in romania (.ro top level domain)
Tracing route to 193.227.227.218 over a maximum of 30 hops 1 1 ms <1 ms <1 ms 10.0.0.71 2 57 ms 21 ms 23 ms b-ras1.lmk.limerick.eircom.net [159.134.155.24] 3 21 ms 22 ms 20 ms ge15-2.corea.lmk.limerick.eircom.net [83.71.114.97] 4 36 ms 36 ms 35 ms 83.71.112.94 5 36 ms 40 ms 39 ms london1-br2-fe0-0.rdsnet.ro [195.66.226.46] 6 54 ms 53 ms 52 ms fra2-cr1-ge5-0.539.rdsnet.ro [62.231.127.89] 7 * * * Request timed out. 8 89 ms 90 ms 87 ms constanta1-cr1-vlan25.rdsct.ro [212.93.137.51] 9 94 ms 88 ms 96 ms constanta1-fo-vlan10.rdsct.ro [212.93.137.10] 10 89 ms 101 ms 90 ms 81.196.163.89 11 95 ms 95 ms 101 ms cr1.micos.ro [193.227.226.254] 12 91 ms 96 ms 97 ms 193.227.227.218
The short answer is never run code that you’re uncertain of the origin of, and 2. never run code that you’re uncertain of the origin of.
Quick XOR tutorial. Exclusive OR. Either A is true or B is true but not both. so 0 xor 0 = 0, 0 xor 1 = 1, 1 xor 0 = 1, 1 xor 1 = 0. Each hex digit is a run of 4 binary numbers. 0 = 0000, 9 = 1001, A = 1010, F = 1111.
90h xor 0A1h == 1001 0000 xor 1010 0001 = 0011 0001 = 31
Conveniently, 30h = ‘0’, 39h = ‘9’ and 2eh = ‘.’, so it’s easy to translate them.
Broken hard drive again!
Again with the broken hard drive. Oi! I should invest in a RAID solution at this rate. Lost a few desktop configuration items, but other than that everything seems to be hunky dory. Adobe products needed reactivation again! Activation of software bites the big one.