Ben Poole

“It is a very sad thing that nowadays there is so little useless information.”

Weblog by month (October 2003)

Back Head First!

Quite a while back now, I mentioned O'Reilly's Head First Java book. Well, I still haven't finished it. I like to take my time with geek books, playing with all the code, and generally letting stuff sink in. As I'm sure other dads can appreciate, I also find my spare time taken up with myriad other activities, so Java books often have to wait! But this book really merits a review of sorts, even if I haven't finished it.

Loads of people have reviewed this book in detail. So I will simply give a summary for other busy dads out there: if you're interested in moving out of the Domino world, and learning something else, this is for you. If you're the kind of person who needs some kind of direction when teaching yourself stuff, this is for you. Dabbled in Java but want to go further? Oh yes, this book is for you. It's a thoroughly entertaining read, and it's that rarest of rare things: a geek book you can just sit down and read. Yes, it's right up there with The Pragmatic Programmer!

I love the chatty style of this book — it really gets stuff across without being condescending or too "basic". Everything you need to know gets covered, and I'd even venture to say that using this book would help significantly if you're going for the Sun Java Programmer certification: I'm pretty certain everything in the syllabus is covered. If you're still a little shaky about that, then the Sun Certified Programmer & Developer for Java 2 Study Guide should alleviate any lasting issues you might have (also written by the authors of Head First Java). The style of learning promulgated by the Head First series is well worth investigating, and makes a lot of sense: I only wish I'd heard of this stuff when I was at school! It would appear that the first instalment of the Head First series has been successful, because O'Reilly have just released a new book, Head First EJB Certification.

Further reading

Word for the day after all this: "metacognition": thinking about the way you learn.


Doing the Frank

Doing the Frank for a bit. Back soon!

"Doing the Frank" = Frank Bough, rhyming slang for "I'm off."


Now THAT’S thorough!

Mark Pilgrim has filed an incredibly detailed overview of Panther at his site. Well worth a read now that Panther is with us. Will I be upgrading? Hmm... not sure. I started my love affair with OS X last August when Jaguar came out (i.e. v10.2), and it's certainly given my aged iMac a new lease of life. I'm not sure whether 10.3 will greatly improve the experience for me though — there's only so far one can go with a Mac this old!


Eh?

This evening, whilst persusing my newly-recovered data courtesy of our firm's PC back-up system (a shame about my c:\java directory, but there you go...), I inadvertently clicked on a PDF file. Gah! I haven't yet optimised Acrobat Reader, so was just waiting for my hard drive to stop whirring and generally buggering about when... hang on. I got a Microsoft Windoze installer message. Riddle me this: why does attempting to open a PDF — which is associated with the Acrobat Reader executable on my machine — compel WinXP to install Windoze Journal Viewer? I am perplexed.

Unrelated reading:

Finally, Microsoft's Dave Fester: what a silly billy:

Lastly, if you use Apple's music store along with iTunes, you don't have the ability of using the over 40 different Windows Media-compatible portable music devices. When I'm paying for music, I want to know that I have choices today and in the future.

Still enjoying iTunes on the PC: along with TextPad, it almost makes using Windoze a pleasure [smiley BigGrin]


What amazing features!

Microsoft have leaked some amazing details about the next version of Office:

The latest version of Microsoft's popular Office software will, the company claims, allow users to send e-mails that will "self-destruct" after a set time.
...
Microsoft says users will also be able to restrict who is allowed to read an e-mail - and prevent recipients from forwarding messages to other users or printing them off.

More at the BBC... Well done M$. Thinking "outside the box" as usual eh?


For Volker

New-look comments form at benpoole.com


Windoze iTunes tip

Just discovered this and thought it might be useful. If you get this message on starting up iTunes:

iTunes for Windows - Warning! The iTunes service for importing and burning CDs and DVDs has not been started. Please restart the service to enable burning and importing.

... the the service you need to be looking for on your machine is called "GEARSecurity". For reasons best known to themselves, Apple decided not to include this information in the help file that comes with iTunes. A shame, because the package — as far as I can tell at this stage — is otherwise excellent. What truly impressed me was the speed with which my StinkPad and the Mac "saw each other" when iTunes was loaded up. Given that the Mac only has a 3GB hard drive (!) and the StinkPad a significantly larger one, this could come in very handy when working from home... [smiley BigGrin]

Anyway, suffice it to say Musicmatch has left the building.

(Yes, the StinkPad has been rebuilt. Some loss of data, admin passwords not worth the disks they were written on, alas!)


Apples & Pears

My work StinkPad (term copyright Volker Weber) is dying, and can't do anything with our domain controller. The upshot of this is that I can no longer log in to the machine. Domains are a thing of the past. Poof, no more administration rights, nothing.

Great. So, things have gone pear-shaped in the PC department.

The Mac, on the other hand, has just upgraded itself with iTunes 4.1 and the latest version of QuickTime. Splendid. I knew they were coming, so I had Software Update look out for them. The PC won't miss out completely though. Just as soon as I've resurrected it, I guess I'll be dumping iTunes for Windows on it!


The CVS book

I've been meaning to delve further into CVS for some time now, if only to synchronise my wee bits of Java between my work machines and also my Mac at home (OS X has CVS built-in). To this end, I've been reading about CVS here, there and everywhere. This resource, the free CVS book looks like a good bet! Via Tom Klaasen.

Update: Ed Wrenbeck has also set up a CVS server.


Errors & exceptions

OK, so I know I'm a newbie at this object oriented thang, but I remember when I first learned about exceptions in Java, and how they work. As someone who was getting pretty tired of On Error Goto lblErrs..., it struck a chord let me tell you! Why clutter your code with error handlers and logic based on what error is thrown? The concept in Java, that exceptions are instances of / sub-classes of the core java.lang.Exception class makes real sense. De-couple your error handling from your code! Yes!

For me this works, I like it. I nodded all the way through Ned's article Exceptions vs. status returns even though I don't have the programming legacy he has (i.e. dealing with status returns in C or C++).

I was amazed therefore to see Joel Spolsky's article, Exceptions, in which he promotes the use of status returns in one's code, rather than exceptions. Indeed, he likens throwing and handling exceptions to the dark old days of "Goto". Which is kind of strong... [smiley Wink]:

The reasoning is that I consider exceptions to be no better than "goto's", considered harmful since the 1960s, in that they create an abrupt jump from one point of code to another. In fact they are significantly worse than goto's:
  1. They are invisible in the source code. Looking at a block of code, including functions which may or may not throw exceptions, there is no way to see which exceptions might be thrown and from where. This means that even careful code inspection doesn't reveal potential bugs.
  2. They create too many possible exit points for a function. To write correct code, you really have to think about every possible code path through your function. Every time you call a function that can raise an exception and don't catch it on the spot, you create opportunities for surprise bugs caused by functions that terminated abruptly, leaving data in an inconsistent state, or other code paths that you didn't think about.

With regards point one: yes, exception handling (not the exception itself) is indeed invisible to your code. That's the point innit? Now to point two: in Java, if I code something that could go wrong, my LS background tends to kick in I must admit. I find myself performing basic tests or asserts with regards an object or variable's state, before continuing with my code. My bad? Perhaps. But for stuff that can throw an exception, I wrap it in a try... catch block. Isn't that what they're there for? I am somewhat bemused.

Further reading:


Baby Got Back

As someone who studied Latin between the ages of eight and eleven, then again from thirteen to sixteen, I cannot describe the enormous pleasure I felt at reading this page, De clunibus magnis amandis oratio (Sir Mix-A-Lot's Baby Got Back):

mehercle!
Rebecca, ecce! tantae clunes isti sunt!
etc.

Marvellous. Via Charles Miller.

Addendum: Slightly Less Common Latin Phrases.


Crikey

Just published an article. That's two articles / tips this month! I'd better go and lie down...


NetNewsWire Lite

Woo hoo! One of my favourite OS X applications, NetNewsWire Lite has been updated. Version 1.0.5 is now in sync with the full application in that it uses WebKit, supports gzipped content, and so on. Splendid!


Wahey!

He's done it! I bet the cheeky blighter was just waiting for me to find him in my referrers... Welcome aboard sir! Not sure about this bit though:

... He also encouraged me to start up a blog, repeatedly. So it's actually all his fault.

[smiley BigGrin]


Geek humour

Well, it is Friday. My favourites are the "Simpleton" and "Fromage" resign patterns. [smiley BigGrin]

Resign Patterns: Ailments of Unsuitable Project-Disoriented Software by Michael Duell. Via java.net.