January 07, 2003

A maze of twisty classes and interfaces, all different.

So I've been working to understand the Java code I need to extend at work. And it's quite a bit of culture shock after being a Perl Hacker for the last... well, a long time. I've done Perl in some capacity now for over nine years.

Java folks love abstraction. Thanks to Kasia's blog entry on Interfaces, a bit of chatting with her, and reading up a bit, I now get interfaces. They're Java's answer to multiple inheritance. The provide a contract of sorts between various objects. And object that implements interface foo must provide (at least) all the methods defined in the interface. It's enforced at the language level. Very good.

The downside is that folks can get carried away, building so much structure that the real workings of a system end up obscured and hidden behind so many layers of indirection and abstraction. It makes my head hurt a bit. I've spent a bit of time manually drawing out some inheritance diagrams (anyone have a free tool to automate it) based on reading the code and associate javadocs.

I suspect that once I get my head wrapped around all the interfaces, I'll be far more productive and have a real understanding of the system's design.

The other thing I've noticed is that Java folks are big in infrastructure and re-usability. Really big. I'm starting to wonder if I'll ever see code that looks like someone wrote it to actually get some work done--without much regard for the random person who might want to sub-class it someday, maybe.

Don't get me wrong. This isn't bad, but it sure is different. It takes some getting used to. Instead of learning a new language and gradually putting it use, I'm forced to also learn several large frameworks along the way. It's a bit of a double hit. I feel like I've been thrust into a foreign country where I need to learn the language and function as a useful member of society--once with a lot of unwritten and complex rules that I just need to figure out.

Hey, I could have written about Apple's various MacWorld announcements but it seems like blogspace has that covered very well without me today.

Posted by jzawodn at 09:04 PM