Subscribe: Ztuff
http://radio.weblogs.com/0100683/rss.xml
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
american  based  catch  data  day  don  exception  exceptions  football  home  interesting  java  lot  problem  stack trace  things  time 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Ztuff

Ztuff



The ebb and flow of personalized information whatever falls out of my brain on a given day.



Last Build Date: Mon, 03 Feb 2003 18:48:15 GMT

Copyright: Copyright 2003 Dave Ely
 



More on Java exceptions

Mon, 03 Feb 2003 18:46:38 GMT

Bill de hÓra replies to my exception comments. His article has a lot of interesting details to think about, more so because of the external links:

A very interesting article by Bruce Eckel on Java and Checked Exceptions and notes by Robert Di Falco in this thread.




Java exceptions don't have to be useless!

Sun, 02 Feb 2003 09:58:04 GMT

Bill de hÓra has started a very interesting thread in Exceptions considered pointless. Bill says: Three rules of thumb are forming in my mind around exceptions: don't swallow exceptions (with two exceptions) avoid using exceptions avoid inventing exceptions The first many Java developers will understand. Rarely, you know an exception is not going to be thrown, but you have to catch it anyway, and sometimes you have to catch InterruptedException as part of normal program flow. The last two are maybe controversial. Although I understand where this feeling comes from, I disagree with the whole darned concept. Exceptions are one of the more powerful and well done refinements that C++ introduced to C. They allow us to enforce the idiom of one entry point, one return point unless things go badly wrong. When done well, they also allow method level determinism of what can and can not be dealt with, and for more advanced applications, turning a problem into a solution. I agree completely with the comments by Bob McWhirter, where he says: I truly think that the idiom of using String messages as parameters for an exception and the getMessage() method have contributed to the uselessness of many exceptions. This is same darned problem people still have in the C++ world, and most of them have never figured it out. String based exceptions are completely useless unless you employ parsers at every level of the application (and they make internationalization nearly impossible). Java has further contributed to the problem by making exceptions have some sort of context (a stack trace for example) but has not allowed developers to easily construct one exception type from another and retain that context. Inexperienced (and seasoned) developers alike are liable to create new exception types at the drop of hat for reasons I've never been able to fathom. Our solution to this problem has been a complex exception type (that builds its getMessage() string based on internal data, whatever that might be). We also override printStackTrace(), so that we can capture the original stack trace of the primary exception (when an exception is created from another exception). There is some overhead associated with this that we'd like to avoid, namely capturing stack trace data that we may not use, but as it turns out, we nearly always use it because getMessage() sticks the first line of the stack trace onto the end of the message data; and the nice thing is that we capture the data the first time we need it, minimizing the impact the next time around. My understanding is that 1.4.1 solves this particular problem, we shall have to see. All of our exceptions (in one current 60K+ line application, we have three exception variants) descend from the complex exception. Unlike your typical Java application which has catch blocks from hell (or just passes on everything), we have the ability to make judgments based on the exception type (generally, we only catch one or two types at a given module level) and the semantic data within. Which leads to ... Swallowing exceptions is not unusual at all. Consider anything which implements a try/catch/finally block. I certainly hope that you swallow all exceptions in the finally block, or else the original exception is going to get lost in the noise. Also, if you throw away rules of thumb two and three, you are going to have normal operations (hopefully rare), in which an exception is simply a way of communicating a normal error condition, so you'll swallow it and try something else based on the context information in the exception. The single biggest problem with rich exceptions is that everything starts to bubble into them. You need to be careful to keep things well defined and when exceptions become too complicated, factor them back into an inheritance tree that everyone can live with.[...]



Crab Soup

Fri, 31 Jan 2003 04:13:07 GMT

If you are the delicate type, I'll warn you ahead of time; don't venture below. Animal kingdom does not have shots like this, that's for sure.

With that warning out of the way, I offer you Crab and Pipeline. Somehow, it reminds me of the phrase: "livin' in a world of hurt". (thanks Kurt!)




Clearing the stop bit...

Fri, 31 Jan 2003 03:22:23 GMT

Sometimes I guess I need a kick in the rear end to get things onto the weblog. This week, it wasn't really my fault. I was all set to put up the previous story about Jon and the family at Magic Mountain on Sunday when the vomiting began.

First it was Jonathan. Every twenty to sixty minutes, for hours. We tried Pepto a couple times but that wasn't staying down any longer than anything else. We (mostly Sarah) finally got him calmed down enough to get to sleep and first thing in the morning, Stephen joined in while Jon moved back into full rejection mode. By Monday evening when I got home from work, Adam was part of the crowd. We had a pack of sick kids, so I worked from home on Tuesday where we had a few interesting incidents before Sarah came home to rescue us all.

By Wednesday (yesterday) morning, things had more or less settled down, but Adam and Jonathan were sore and wrung out from stomach gymnastics, so they stayed home again. Adam ended up having his seventeenth birthday while feeling pretty blah. He was happy non the less when we talked just before he went to bed; he'd gotten his present two weeks earlier (we are insane, we bought him a car; then again we are also tired of being a chauffeur service, and he wants to work part time).

So anyway, a friend sent me something funny today that I wanted to post. To do that, I had to clear the stop bit, and get all this stuff out of queue so that I could move on.




Coaster Crazy

Fri, 31 Jan 2003 03:20:02 GMT

I believe that I've mentioned before that my family in crazy about roller coasters, especially Stephen.

On Sunday, they outdid themselves. I knew that Steve was a member of American Coasters Network (ACN), but now I've learned that we have added a family membership in American Coaster Enthusiasts (ACE) as well. Sarah took the two younger boys to Magic Mountain and they joined up with a bunch of fellow ACE members.

Apparently, some of the kids were filming Point of View (POV) movies during the rides. Somehow, someone talked Jonathan into doing a POV filming of Goliath Jr. (he's still just six so he can get on) which he did. From what I've heard (we still don't have the movie), it's a little shaky, and sometimes dark as the camera points down, but it works. Later in the day, Jonathan was in the first car on Ninja with an ACE member who was filming a Point of View (POV) movie there and had a blast.

Jon came home very proud of his work to support their efforts...




Korea was Slammer'd?

Sun, 26 Jan 2003 11:12:40 GMT

This Reuters story appears to verify earlier (and often fuzzy) reports that the "SQL Slammer" worm (given its operation, it seems more like a viral agent than a worm) hit Korea hard.

As to the why? I'll hazard a guess.

High broadband penetration means that there are a lot of Windows based systems sitting on the net with little or no protection. The same kinds of systems often used for other types of DDoS attacks because its easy to get control of a process there.

Microsoft has officially divorced itself from responsibility, stating that everyone should have applied SQL Server Service Pack 2 six months ago. What's not completely clear yet is whether this would have been effective. Service Pack 3, released eight days ago seems to work, but we'll have to wait and see if the claims from Redmond are valid. This particular incident could have political ramifications for Microsoft.




Floatsam

Sun, 26 Jan 2003 00:19:40 GMT

I don't remember where these came from, but here they are:

Motivational Quotes of the Day
SlashNOT
Todays SlashNOT is humorous (Microsoft completes purchase of Klez) when considering last nights problem with MS SQL DDoS attacks.



Radio Comments

Sun, 26 Jan 2003 00:05:16 GMT

Thanks to Phillip Pearson and his Comment Monitor [via Nicholas Riley], I understand the format used by the Radio comment server a whole lot better.

Here are the Ztuff Comments and the raw dump from the Radio comment server.




Super Bowl XXXVII Letdown

Sat, 25 Jan 2003 23:45:16 GMT

I just realized that we're going to have to listen to John Madden for three plus hours if we want to watch the Super Bowl. I listened to one Monday Night Football telecast this year and it was depressing. After a little while I switched to the radio feed from Green Bay. Sarah can't decide whether she wants to go to Magic Mountain tomorrow or stay home and watch the show (and under the circumstances, I'm dithering a bit too, but I know I'll watch). I have no idea what the kids want to do.

The game has a decent chance of being good, although I'd venture that more than half the people who see some part of the game could care less who wins.

The Super Bowl has become an American mid winter party. In between nearly six hours of talking heads and commercials, they'll actually show almost sixty minutes of American football (where feet are only infrequently used). If you count all the slow motion replays, there will be almost 70 minutes of football. The day after, the actual game will be forgotten by most, but discussion will rage about the best new commercials and stories will float around about all the crazy things that happened at the parties.

Some day, the football hype will fade and we'll have to come up with a new way to celebrate American Corporation Day.

Me? I just want to watch the damned football game.




Week in review

Sat, 25 Jan 2003 23:20:05 GMT

I ought to rename this the weekend blog, or maybe the once in every blue moon blog. Oh, it's been busy.

This week I had jury duty, which was interesting. I was called to sit through the jury selection process for one trial, but was never brought into the inquisition phase. There went one day.

I finished reading "The Summons" (which was appropriate) and have started back through the whole John Ryan series starting with "The Hunt For Red October".

We had a new engineer in from Atlanta, and spent a lot of time with him, just getting him up to speed on things.

We're having a department meeting in a couple of weeks to talk about what we're all doing and where we are on it. So I've been working on fleshing out a lot of ideas and putting together presentations on several different things.

I spent most of yesterday reading and working on documentation and then chasing down a rats nest of related bugs. I'll have to go back and work on that some more later today.

Oh yeah, I learned how to put a custom icon on a page in a browser. Browsers are looking for 'favicon.ico' (I'd been wondering about custom icons and noticed all the icon requests in the server logs).