Tuesday, August 24, 2004

Exceptions - another implementation difference

Good article on IBM developerworks regarding exceptions.

Another difference in implementation between Java and C#. Java has the checked vs unchecked exceptions. C# just has unchecked. The article does a good job of explaining the thinking behind each implementation.

The problem with checked exceptions is that you need to specify which exceptions you will catch in the method signature. It's a problem because since it's part of the interface, it is essentially set in stone. If ever you refactor the code in the method and those resulting new methods throw new exceptions, you will need to modify the method signature with the added exceptions, thus breaking compatibility. As you go higher up in the code hierarchy you need to make sure that your methods keep adding exceptions that could be thrown in the lower code.

The problem with the C# way is that since there is no information about what exceptions are thrown, you dunno what to catch. You have to rely on the documentation. It's not baked into the system.

There are pro's and con's to each way as is mentioned in the article. I personally don't have a clear opinion on which is better. One thing I read that made sense was that exceptions are supposed to be exceptional. If one is thrown, something is out of the norm. It shouldn't be silently ignored which might be the temptation with Java since you have to keep track at every level.

Overall, I feel there needs to be better literature out there regarding how exactly to handle exceptions in an application. Atleast, I haven't come across too many good articles. As we had discussed before, it doesn't seem right when there are a whole bunch of try catch blocks in your code. It's not the right way.

Tuesday, August 03, 2004

Missed google name opportunities

Saw this on a blog...

Google got it right with Froogle (the site for searching for the least expensive products), but missed the opportunity with news, creating news.google.com instead of noogle. Here is my list of proposed names for sites Google could run:

Google: the general search site
Froogle: for searching for the lowest cost on items
Whoogle: for searching for people
Noogle: for searching news
Screwgle: for searching porn
Boogle: for searching for scary things
Toolgle: for searching for tools
Poogle: for finding the closest bathroom
Loogle: for searching legal (or finding the closest bathroom in England)
Roogle: for finding small kangaroos
Moogle: for searching money (or finding lost cows)
Vousgle: the French site for finding everything about you
Zoogle: search the local animal park

Re: Sun buys Novell

Sun really has lost it.

Sun buys Novell

Quite a few news items have been posted recently on Sun planning to buy Novell like at eweek.

Most say Jonathan Schwartz feels it will hurt IBM for some reason. Firstly I am not sure how much Sun can hurt IBM.

Another relationship struck me.

Novell has Ximian which has Mono... hmm very interesting.

But again Mono has been released under the GPL and LGPL liscences as mentioned here. At least the GPL part can be forked.

So don't be suprised if you hear "Microsoft buys Sun"

Probably one of my worst jokes and its online now!!