Explicitly and without apology a marketing vehicle MaryMaryQuiteContrary

Friday Sep 03, 2004



Friday Free Stuff* everybody!

official business first.

banner for NC04Q3

this is your finger on the pulse of what's new at Sun Microsystems. September 21; 11 a.m. EDT. free admission.  sign up for a reminder.

now let's see what we've in terms of a fabulous package of prizes*.

this week's prizes

holy cow, (no offense intended) would you look at that! it's a t-shirt, a frisbee, three Java pins, a card that gets you a free ringtone on java.com, a yellow foam java.com mini armchair (don't really get that one), a Java Everywhere button and a Java watch (ladies model; sorry guys)!! full disclosure: minor issue with the watch. but it doesn't keep it from being the singular-must have fashion accessory for the fall.

oh, can you believe it! it's a regular cornucopia, people. one of you lucky* readers is going to get this package of prizes* shipped to your doorstep, gratis.

I was thinking that this week I'd pick the winner* using a centuries-old, tested, rigorous methodology.

But then Click and Hack said they'd officiate!

(See,  I'm responsive. Manjunath tells me he wants more meat in this blog. I get all over it.)

Here is your chance to win* the Friday Free Stuff grand prize*... Please join me in savoring this week's puzzler! (Courtesy Click and Hack)

Way back in 1998, a bunch of thread primitives were deprecated because they were unsafe. A particularly heinous example of what could be done with one of these primitives follows:
 public static void sneakyThrow(Throwable t) {
Thread.currentThread().stop(t); // deprecated
}
This nasty little method does exactly what the throw statement does, except that it completely bypasses all exception checking by the compiler: You can (sneakily) throw any exception (checked or otherwise) from any point in your code, and the compiler won't bat an eyelash.

Now, the puzzler: It turns out that it is still possible to write a functionally equivalent method without using any deprecated methods. In fact, Click and Hack know of two ways to do it, one of which takes advantage of Tiger (JDK 5.0) features. Can you come up with either or both? Extra points if you discover a technique unknown to Click and Hack.

post your answers as comments to this blog. you've got till Tuesday. (Monday is a holiday here in the U.S.)

happy Friday, everybody!

mary

* Friday Free Stuff is not a contest. It's me giving away stuff that I personally own to somebody I choose. I pay for shipping with stamps that I buy at the post office. Sun employees can play but are not eligible to win* the prize.*



For many weeks now I've been wearing the Yellow Jersey on blogs.sun.com.

tour de france

The peloton has caught me. And while I will continue to pedal furiously, I'm not going to win this race. (Not that rankings matter. Nobody pays attention to them. They're actually terribly unimportant).

So as a thank-you present for indulging me with your attention, I would like to give (the first 20 of) you a full color poster ....

picture of concept map

of the Java Technology Concept Map (online version available free to anybody who wants it)

and...

picture of java pin

the hottest pin in Olympic Village.

just post a comment that tells me to give you the map and the pin. and i'll get in touch with you to work out details. i pay for shipping.

you guys thanks bunches and bunches for reading the blog.

i sincerely thank you.

mary