Tuesday, November 13, 2007

C++ FQA

This very good read takes the form of responses to answers on the C++ FAQ Lite. The author makes no attempt to hide his contempt for the language, and for well-explained reasons (for example, that the C++ grammar is actually undecidable and thus parsing it can sometimes have bizarre results).

I'd recommend this to anyone caught in the popular grip of C++, rather than finding out (or being caught in denial) about the pain awaiting programmers of any level. Hint: lack of garbage collection, extreme, multi-pronged lameness of templates and not-exactly-encapsulation feature heavily.

Personally, I've been working in Java for the last while anyway, but I've promised myself I'd get into (Smart)Eiffel for a while now, which seems like a much, much simpler and unambiguous language with garbage collection, a decent string class and no poxy operator overloading, and still reasonably efficient in the general case, compared to C++. Also, the D programming language may be worth a look, which seems to have some good built-in string handling (but no multiple-inheritance. Meh?).

Friday, November 09, 2007

Backflip

Everytime I try a backward somersault or handspring, I chicken out as soon as I start to fall back... like so:

How are you supposed to override that annoying reaction?

Thursday, November 08, 2007

Mac an Leabhair... the Macbook

Another fairly large skip in blogging activity... so, as part of my scholarship funding, IRCSET allow first year research students to buy a computer and put the tab on their expenses account, to the tune of €1500. Naturally, I arranged things so the computer and components came to €1490 or so - almost a bin-packing problem, but easily approximately solved.

The Macbook, a 13" white one (why pay 200 quid just to have it in black? pfft.... that'd only absorb heat and burn your err... legs, anyway) with a 2.16ghz Core2 Duo, 2 gigs of RAM (the most I've ever had in a machine before was a sad 512 megs) and a 160 gig hard disk (for research... and anime and music... not porn. Fine, for porn - are you happy now?).

Unfortunately, it came with two problems:

  1. The lock the sales guy sold me over the phone, which he assured would fit my machine, didn't fit the machine. In fact, it damaged the side of the case while I tried to gently fit it to the Macbook's lock slot.
    This is kind of an understandable mistake - it looked almost exactly the same as another lock that did fit, and I didn't see anything on the Apple website about which lock fits which machine.
  2. The version of OS X, which the salesman assured me would be 10.5 "Leopard" when I specifically asked him (and the previous salesman on the phone), turned out to be 10.4 "Tiger". Not that Tiger was bad, I was still delighted with its performance compared to my Windows XP, Ubuntu XFCE/Gnome and Mandriva KDE experiences. It was ridiculously fast, smooth and yes, things "just worked", to appropriate a shitty phrase.

So, for a couple of days I tried to get in touch with the sales guy, who seemed to suddenly go on annual leave, then I eventually got on the phone with another agent in Apple Education, who, when I called her for the second time 5 minutes later, told me an install disc for Leopard was on its way and I could keep the incompatible lock for which they had already sent out a compatible replacement, both without charge.

That just leaves the slight damage on the case from the weird lock, but I'm pretty impressed by their helpfulness, especially compared to Acer, who I dealt with when one of their firmware updates killed my old laptop's flash BIOS (those useless assholes charged me over €300 to replace the entire motherboard, because they apparently have no mechanism to recover from flashing the BIOS with an image from an 'incompatible' revision of the same motherboard model. The Taiwan guys sent me a text file describing some Phoenix BIOS "bootblok" recovery procedure, but either that wasn't implemented or the Official-Acer-Repair-Shop-Off-The-Naas-Road-Dublin-12 engineers were ripping me off).

Apple.getInstance().respect++;