Exception and Throwable Java classes

Software

Classic Java logo

A few weeks ago I talked about how you can throw custom exceptions in Java which can be extremely useful for dealing with certain events. The problem a few people raised with my example though was my use of Throwable instead of Exception, so this afternoon I wanted to briefly explore the error in my ways!

While using Throwable in the context of throwing custom error messages technically works, the Exception class inherits directly from Throwable and is on the same level as the exceptions Java throws itself (surprising given the name!) which makes it a more correct choice.

The reason why my lecturer and I were using Throwable instead of Exception was because we wanted access to the printStackTrace() method which provides valuable feedback. It turns out given Exception is a subclass of Throwable it also implements it! Sometimes the most obvious things are the most elusive.

To test that Exception did indeed implement the printStackTrace() method I wrote a basic Java application called Nonsense in which I created custom Throwable and Exception errors, triggered them with some dummy methods and finally handled them in try and catch blocks which printed the results.

public class Nonsense {
  public static void main(String[] args) {
    try { testThrowable(); }
    catch(throwableError e) { e.printStackTrace(); }
    try { testException(); }
    catch(exceptionError e) { e.printStackTrace(); }
  }
  static void testThrowable() throws throwableError {
    throw new throwableError();
  }
  static void testException() throws exceptionError {
    throw new exceptionError();
  }
}
class throwableError extends Throwable {
  public throwableError() {
    super("Whoops! THROWABLE error!");
  }
}
class exceptionErr extends Exception {
  public exceptionError() {
    super("Whoops! EXCEPTION error!");
  }
}

Aside from the line numbers the printStackTrace() method reports in both, the output is identical. Lesson learned, if I want to specifically throw my own Exception, I'll use the Exception class!

I restrained myself, I didn't end up making the lame comment that "I take exception to all these Exceptions!" until the last line. I'm proud of myself.


This Mac doesn’t like him? Ack, Johnson!

Media

I'll have posts of real substance again tomorrow folks :).


Jean Luc Picard on Data’s name

Media

Picard and Data from Star Trek: The Next Generation

PICARD: Do you not find it even just a bit amusing that you asked me to help you interpret data… given your name is Data?
DATA: I do not sir. The events of Star Trek Generations have not yet occurred and as such I do not currently have an emotion chip installed with which to find such an observation amusing.

This never happened, but it should have.


Rubenerd Fun Fact #82 Spanish homes

Internet

Fun Facts!

A special edition of Fun Facts here today folks! If you never took notes on any of the previous ones, you'll want to for this one.

So I was trying to find out the best way to rent out my Spanish holiday home for the 365 days of the year where I'm not living in it, and I came across the QSD Group in the United Kingdom. According to their site description:

Some of our clients rent out their property on the coast during their absence. This could be a way to increase the return on your investment or to pay off part of your mortgage. There are plenty of companies and internet portals that offer you their rental services. QSD Group recommends the services of OPI Rentals, specialists in management and rentals.

Some of our clients rent out their property on the coast during their absence. This could be a way to increase the return on your investment or to pay off part of your mortgage. There are plenty of companies and internet portals that offer you their rental services. QSD Group recommends the services of OPI Rentals, specialists in management and rentals.

That's right, they think their primary description is so important they insist on relaying it twice. I'd never be caught making such an obvious mistake on my blog here, the one where they think their primary description is so important they insist on relaying it twice.

Where is the Fun Fact in all this Ruben?!

Okay, I'm getting to that. It has to do with their pictured customer service representative on their website's header:

Fun Fact #82: You get more clients when the customer service representative pictured on your website doesn’t look so bored he’s about to kill you.

QSD


#Anime Bakemonogatari 10

Anime

Bakemonogatari continues to be a series that defies all accepted conventions and refuses to be pigeon holed. I don't know how you would literally pigeon hole a series, I assume you'd simply slip the optical disk into a letterbox and be done with it without much trouble at all, in which case the analogy in this example is flawed. I talk myself into corners without anyone else assisting.

This was a continuation of the Nadeko Snake story arc that started with episode 09 where Koyomi has (once again) taken it upon himself to help save a person with a spiritual oddity that's hurting themselves and their very existence. How nice and selfless of him ;).

After consulting with Epic Hawaiian Shirt Guy he realises Nadeko actually made her situation worse by killing snakes near the abandoned shrine, and the only way to free her from their grip that's causing the marks all over her body is to return to said shrine and prey a special incantation. I think that's what it was, feel free to correct me!

We see more of Suruga because he enlisted her help, but for the second episode we don't get to see any of Her Senjougaharaness which as a fanboy I found hard to deal with, but don't worry I'm getting over it :). Suruga stands by with Koyomi during the exorcism but jumps in to help once Koyomi can't take on the spirit by himself any more. Turns out it's hard for him to tackle a real oddity because by being a bit of a vampire himself he's an oddity too.

Oh yeah, and apparently it seems if Koyomi had watched Code Geass he would have liked the superfluous maid cafe episode, ha! :D. Cue a "what I was expecting, what I actually got" comic.

In yet another unexpected twist we got another random new opening credits song and lighter graphics which I thought were lots of fun! I'll come right out and admit the closest I've got to listening to J-pop and Japanese music is Japanese bossa nova like my idol Lisa Ono (start your jeering, I don't care!) but I'll definitely have to get the sound track for this series. Staple Stable!

I know it's getting extremely boring and old to read, but I also have to say the graphics in Bakemonogatari continue to amaze. Honestly, the art is absolutely stunning and sometimes just downright surreal, I really hope they release an artbook or Megami for example releases an issue with art from this series. The character designs are awesome in their own right, but the scenery is on an entirely different level. I said this before, but if this series comes out on BluRay I'll be buying a PS3 slim JUST to watch it and take desktop background screenshots!

I'm really, really happy I was able to start the reincarnation of my lost anime blog here with a series like this. It's not my favourite of all time, but it's in my top 5, and certainly helped with the crushing anguish of season two of Haruhi that had the potential to be earth shattering and awesome but failed on almost every level. Granted I gave up midway through the Endless Eight and didn't watch anything more after that, perhaps I should give it another try.

In the meantime, I'm glad Nadeko is all okay, isn't that a nice ending? :).


Alternatives to Firefox?

Software

Firefox 3.5 crashing in Snow Leopard

Whenever Mozilla has released an update for the Firefox 3.0 series recently they've advised us on the Welcome screen and in popups that we should consider moving up to the Firefox 3.5 series, but as far as I know the welcome screen for their latest Firefox 3.0.14 update is the first where they imply sticking with the 3.0 series may be a security risk.

The problem is, for many of us Firefox 3.5 just isn't stable enough for daily use. I've upgraded to each of the 3.5 revisions and downgraded back to the 3.0 series in frustration every time I get one of those insipid "Well this is embarrassing!" crash dialog boxes. I've been dismissed by many people as being a fringe case, but a quick Google search will return plenty of people having similar problems, as well as all the feedback I've got from previous posts here. I've also been blamed for using extensions (a feature of Firefox I was unaware I was not supposed to use) but even uninstalling all extensions and only having one tab open results in the same errors.

If the 3.5 series isn't brought up to a minimum reliability standard before the 3.0 series is retired, I don't have a choice but to leave it for something else. I've started looking into alternatives, but alas I've been spoilt by Firefox for so long it's tough.

I'm in the process of working on a grid to compare these features with Camino, Opera, Safari, Chromium and Links (for fun!) which I hope to have up soon (for Mac, Linux and BSD). If you have any suggestions in the meantime, I'd really appreciate them :).

Things I need

  • blanket Flash cookie disabling (a SERIOUS new privacy problem)
  • simple to access JavaScript whitelisting ala NoScript
  • simple to access cookie whitelisting
  • Flash and HTML5 <audio> and <video> blocking
  • MD5 root certificate warnings

Things I’d like

  • advertisement blocking
  • ability to list tabs on the side of windows
  • grilled cheese sandwich and/or jaffle iron

New MyUniSA home page launch

Internet

New MyUniSA in Firefox 3.0.14

The University of South Australia which I am attending for university (surprising though it may seem) recently updated their MyUniSA student home page with more information and swishier graphics. So far I'm liking it to the extent that it's good to have something new to look at after seeing the same thing for ages, and I like being able to define my own links and see the weather on the sidebar.

Unfortunately they're still using the dreadful Outlook Web Access interface for email which only works in it's enhanced mode in Internet Explorer 6 (ugh, don't get me started!) and granted I'm sure very few of their users use Opera but the menubar looks a bit messed up even in version 10. The latter I can live with, but they really, really, REALLY need to ditch Outlook Web Access.


Programmers confuse Halloween and Christmas

Software

Chrismas tree in Vivocity

In a similar vein to the old adage that there are 10 kinds of people in the world, those who understand binary and those who don't, we have this gem:

Programmers confuse Halloween and Christmas because
Oct31 == Dec25.

HA!

Brought to you by Ruben Schade,
Department of Redundant Information Department,
a subsidiary of the Bureau of Oversight.


My Adelaide Fringe poster design

Media

Adelaide Fringe poster design

The Adelaide Fringe poster design contest has been over for a while now, but I came up with inspiration for this billboard design as I was walking home this evening. The best part of this design is I don't need to provide an SVG source because its so easy to recreate! Whaddya think? Huh? Huh? Isn't it so… phisticated?

To give you an idea what it would like displayed in the real world, I did this incredibly realistic photoshop job of this Adelaide billboard photo by nikski on Flickr.

Adelaide Fringe poster design

In other news, I'm assuming this Adelaide Fringe whatnot is some sort of hairdressing and barber event?


Not so pleasent World Vision encounter

Thoughts

Spooky afternoon in Mawson Lakes

This is a very sensitive subject with lots of emotions tied to it so I'm hesitant to even speak my position on it, but I feel things need to be said.

We just had a visit from a person from World Vision, the organisation which claims to be dedicated to helping children in developing countries that are in crushing poverty. Money is put towards funding food, shelter and clothing.

Perhaps resent is too harsh of a word, but I must be blunt and admit I resent being forced into something from a person who has arrived at my door, whether the person is from a company, a religion or in this case a religious charity. I understand these people need help, but they don't seem to be able to just tell me about the work they're trying to do, they try and use the same high pressure sales tactics insurance agents do. If I'm not sure or if I want more information, I shouldn't have to sign a contract on the spot I'm not comfortable with, even if their intentions are good.

I donate to secular charities that don't try to strong arm me (such as Oxfam) and make it a habit not to for those that try to force me into giving up credit card details and other personal information on the spot at my house. Am I a bad person?