Monday 5 April 2010

Programming: Unexpected errors

"Unexpected error"... what's that? Lately I've been writing a lot of new code at work, and I've faced the question frequently: "Do I really need an exception handler HERE?? I just added a few around this part..." Yes, usually there is a need and it's a true need. Let me explain: if there is an exception in the program that didn't go through my exception handler (which logs the actual error message in this special case of a remote DB application that nobody is watching), a "refreshing" hit-and-miss operation will be carried out, possibly causing a domino effect creating a number of new bugs and logic faults just because I didn't spot the missing double quote or something similar that caused the original fault.

I'm guessing that the "unexpected errors" in the world largely go to the waste bin. I mean, they don't tell what went wrong to most of the developers, regardless of the fancy hex codes and address pointer values. (This hints that those messages don't tell anything to me, though I don't know if I'm amongst the "most of the developers" or not.)

Someone said back then that most of the computer code is used for checking/validating the (user) input. I think that is true. Especially when the "is used" is replaced by "should be used". But when you cannot really validate the input, write decent exception handlers! Simple as that. Either way, implementing the actual function may not be a big task, but making it fault tolerant, or even user-friendly that tells clearly what went wrong... that is a never-ending story ;)

Sunday 4 April 2010

Valtakunnalliset Tähtipäivät 2010

Mikkelin Ursa ry on saanut kunniakseen järjestää valtakunnalliset tähtipäivät 17.-18.4.2010. Ne pidetään Suomessa 37. kerran. Mikkelissä ja koko Etelä-Savon maakunnassa tähtipäivät pidetään nyt ensimmäistä kertaa.

Tapahtuma on suuri tähtitieteen harrastustapahtuma, jonne saapuu ansioituneita tähtitieteen ammattilaisia, alan harrastajia, tähtiyhdistyksiä ympäri Suomea sekä runsaasti yleisöä. Päivät koostuvat mm. vaikuttavista tähtitieteen luennoista, mielenkiintoisista esitelmistä ja planetaarionäytöksistä.

Luennoitsijoina tähtipäivillä ovat mm. Turun yliopiston avaruustähtitieteen professori Esko Valtaoja, joka hämmästyttää kuulijoita Universumin ihmeistä ja Helsingin yliopiston avaruustähtitieteen professori Karri Muinonen, joka valaisee yleisöä asteroideista ja komeetoista. Lisäksi päivillä kuullaan useiden asiantuntijoiden esitelmiä supernovista, eksoplaneetoista, meteoreista ja tähtiharrastuksesta. Yleisöllä on mahdollisuus ihastua tähtitaivaaseen planetaariossa ja tutustua havaintolaitteistoon, mm. kaukoputkiin sekä alan erikoisliikkeiden tuotteisiin. Tapahtumassa on ohjelmaa myös lapsille. Tähtipäivät avaa Mikkelin kaupungin kehitysjohtaja Soile Kuitunen.

Lue lisää tapahtumasta Mikkelin Ursan sivuilta: www.mikkelinursa.fi