Another One Bites the Dust
My iPod just died. It's very sad. It just won't turn on at all,
even if it's connected to my machine (so it isn't just that the
battery's dead).
Either I've had extremely bad luck with my iPod, or they just
plain suck. I bought it less than a year ago and it's already been
replaced once. In addition, it skips on mp3s that xmms, mplayer,
rhythmbox and my Rio Karma all manage to play just fine.
slatepelican also
had her iPod die recently. And I notice that everyone seems to have
a pretty new iPod around here; either the nano or the video. You
don't see very many minis or pre-video full-size pods. Either
people really love upgrading their iPods all the time (Apple's marketing is really good, so
this is possible, I suppose) or I'm not the only one experiencing
iPod distress.
Is it unreasonable to expect a gadget to last more than a year? Or
are iPods and the like just the latest thing to become disposable?
MTA Hates Me
The MTA (aka the NY transit people, aka
the only people I know who actually use a .info TLD) hate me. The past
few weeks, the train I take home (the L) train has not been running
between midnight and 5am. For those who know me, you can understand
that this seriously cramps my style. Bastards!
But now, to rub salt in an already painful wound, they've decided not
to run the L train all weekend. So I'm essentially stranded in
Brooklyn unless I want to spend an altogether rediculous amount of time
taking the G and J trains. Grr!
Head First
Design Patterns
I bought this a little while after GUADEC and being inspired by
pvanhoof. It's pretty good. I've
actually used most of the patterns in some way, shape or form before
but it's good to put a name to them and get the formal definition in
my head. However...
Rant: UnsupportedOperationException
So I touched on this a while earlier
but today my hatred for UnsupportedOperationException
got some more fuel when I was reading the design patterns book.
In the composite pattern they actually recommend using this exception
so an implementation can avoid implementing some of the methods from
the interface. They do mention that not implementing some of the
interface methods is bad, it's a tradeoff, etc. Fine.
What's evil about UnsupportedOperationException
is that
it's unchecked. Meaning the compiler doesn't warn you about it if you
don't try to catch it. So here you are, coding against some interface
and unbeknownst to you some of the methods are just going to bail on
you and your app will crash, and you would never know that this will
happen by looking at the interface specification or from compiler
warnings. Lovely!
Please, people: stop using UnsupportedOperationException
!
If you really need to leave some interface elements unimplemented make
your own checked exception like UnimplementedException
or something and explicitly indicate which interface elements
are optional by using throws
in the declaration.
Unchecked exceptions should really only be for serious
runtime errors, like NullPointerException
,
ArrayIndexOutOfBoundsException
or ClassNotFoundException
. IMO
UnsupportedOperationException
is a gigantic hack that
should never have existed in the first place. And now we're all screwed
by it.. sigh.