08 September 2007

Fun With Java

One of the "refresher" courses I'm taking this month is on Object Oriented Design. I put refresher in quotes, because I've never done anything with Java before, so it's more of an introduction than a refresher. I mention it because our textbook is O'Reilly's "Head First Java."

It's the best text book I've ever had.

It's funny, snarky, engaging and wonderfully illustrated. In fact, I'm even taking a quick break from reading it to blog about it.

Here's an example of why I love the book. They're explaining that "methods can return values," and the example they provide looks like this:

int theSecret=life. giveSecret() ;
int giveSecret() {
return 42;

This example is hilarious in a geeky, rather subtle & obscure way. Do you see the humor there? If not, you probably haven't read Douglas Adam's Hitchhiker's Guide to the Galaxy. That book reveals that the secret to life is 42...

Little things like that really make me pay attention to the examples, looking for more hidden reference to geek pop culture, etc. It's a remarkably effective approach to this whole thing. It's a great design.

OK, back to studying now.

No comments: