Friday, December 17, 2004

Designing with Exceptions

Rob Diana recently wrote about Exceptions and APIs, some thoughts stemming from a thread on Test Driven Development he read. On the StraightTalking-Java mailing list this spawned a lengthy discussion about the usage of exceptions, when they should be internally handled vs. thrown (possibly wrapped). My thoughts on the subject are a bit more general, but still worth mentioning (especialy since I'm trying to utilize this blog on a more consistent basis, and this seemed like a good way to start - again...)

Any object or set of cohesive objects (in some cases, an API) should only throw exceptions that are at the same level of abstraction as the interface to the object(s)/API.
IOW, the abstraction level of the object's interface must be consistent - that is not negotiable - and the thrown exceptions are part of the interface. Thus, the exceptions must match the abstraction of the rest of the interface (parameter types, return types, etc.)

If we follow this rule (it is more than a guideline, IMO) the decision about what kinds of exceptions to throw becomes easy in 99% cases. An app's persistence layer does not throw JDBC errors or hibernate errors, because those are implementation details of that layer - it is written at a "higher" level of abstraction. However, it can reasonably trap those kinds of errors and perform whatever reasonable action the developer chooses (which might include, for example, retrying the operation an extra time), most of the time wrapping the underlying error and throwing some exception that matches it's interface.
Same for a "business logic" layer - it talks in terms like CustomerAccount, Product, BillingCycle - so it can also use notions like CustomerNotFoundException, ProductDiscontinuedException, and BillingCyclePassedException (if the designer so chooses). It would not, however, use notions like SQLException, IOException, EJBException, etc. Those are implementation details - you would not want to change your whole interface just because the implementation changed from using straight JDBC to something else, for example.

I'm surprised there would be any debate about this. APIs (or any objects/set of cohesive objects) are certainly capable of handling some kinds of errors internally, but many times the context of the call is best able to know what to do.

Wednesday, October 27, 2004

Greece Trip Photos

OK, most everyone knows, but for those of you who don't:
We've finally got all the pictures from our trip (all 230+ of them!) organized and posted on our web site. The page is
Enjoy, and let us know if you'd like copies of any of them.

Eric & Jazmine

Tuesday, September 14, 2004

Ia - Another slice of heaven

When we were on our way to Santorini island we were unsure of which town we wanted to stay in, and for how long (we have been considering visiting another island for a couple of days). Well, Ia and the Filotera hotel have made the decision easy! Ia is a charming old-world style town built right into the cliffs, where all those famous pictures of little cubical white and blue houses and blue-domed churches come from.
Today we spent in an easy stroll through the town, Jazmine visiting every little craft shop and souvenir stand (Jazmine: "Not every one; every other one maybe...") and Eric taking about 1000 pictures.
We met so many friendly people - shop keepers, artists, other tourists - that we can't even remember them all. But most enjoyable of all were the quite, traditional atmosphere and the picturesque scenes that we discovered all day long.
Here and here are some of the dozens of such scenes that we captured.

Our afternoon ended at the cliff-side northernmost point where hoards of people gather for the sunset.

Monday, September 13, 2004

Teavel Day

Off to Santorini!

Caught another early morning bus to Iraklion where we got on a ferry boat to Santorini island (Eric: "Man, these ferrets are huge!") Once again, crystal blue waters. I wish we could upload some of our pictures, because words simply don't tell you what the sea looks like.

We arrived in Santorini port; two buses and 2 hours later we got to Ia, the town on Santorini's northern tip. We stepped off the bus just in time to catch a glimpse of the famous Santorini sunset (more of that later), and for the first time in this trip we had a little bit of trouble finding a room. Not too much - our first couple of choices (thanks to Fodor's) were full, but we ended up with a charming, relatively large studio room off the main strip. Most importantly, Jazmine is very pleased, since this might be the cleanest room in all of Greece. It literally sparkles from the steps to the ceiling! The place (Filotera Rooms) is run by a very friendly couple named Maria and Nikos who speak pretty good English (we've found many Greeks to be pretty good with our language - sure makes things like finding sugar-free drinks and a bathroom with a toilet seat easier!)
Here's a few pictures of the hotel and views from our private balcony.

Eric has mandated that tomorrow we avoid all buses and sleep in...

Sunday, September 12, 2004

Samaria Gorge

Up early this morning to catch an 8:30 bus to the top of the Samaria Gorge (supposedly the largest such gorge in all of Europe). With each bus trip we take to a remote place, we have increased respect for these bus drivers who can manipulate a full size greyhound-type tour bus around hairpin turns, up and down mountain roads, and through the tiny streets that populate most Greece cities. There is often little more than one lane for both directions of travel, but these drivers navigate them with ease, usually while eating a gyro, fidgeting with the radio, and yelling at someone in Greek on their cell phones!

Brrr! The beginning of the gorge trail was about 17 degrees Celsius (you do the math to Fahrenheit - we're too lazy to do it now) and was the beginning of a problem theme for the day: bathrooms without seats.
If you read about the gorge, don't be fooled by the "it's all downhill" propaganda - it was a very tough hike! all 13 kilometers of it (for the math challenged, that's about 6-7 miles, approximately, give or take a mile or two, sort of...). The trail meandered following the sheer rock face. There was a charming half-restored "settlement" at the halfway point (which included more bathrooms with no seats). By the end of the 5 hour hike, our feet were bleeding, our muscles jelly, and our knees crumbling like feta cheese! (OK, not quite, but we are definitely going to spend several days paying the price for this adventure).

The trail ends at a seaside village where we caught a "ferret" ferry boat to the next town where we waited with 100 of our closest friends to get on a 2-hour bus ride back to Hania. This was only the second time we've been really close to the Aegean sea - water so deep blue that you wouldn't believe us even if we could describe it in words. Jazmine is convinced that God has a special angel whose job it is to add blue dye to the water in this part of the world every day to keep it looking so pure ;-)

Back in our room in Hania we enjoyed the best showers we've had in years! Later we had one of those wonderful experiences that make a vacation extra special: we were shopping for touristy stuff and bought a ceramic bowl from a nice little old man. We asked him to recommend his favorite restaurant in town. Rather than tell us, he decided to walk us right to the place and personally introduced us to the manager/owner. It was a very Greek-typical action; the people are (for the most part) so very friendly and helpful that we sometimes feel guilty asking more questions. But this little fellow seemed to enjoy sharing his hometown with us, and we were grateful. We enjoyed live bouzouki music while Eric had a pork dish in spicy tomato sauce and Jazmine consumed an entire grilled fish, head and all ("Stop staring at me!" -Eric).

The next morning, the long hiking was taking its toll as Eric got out of bed but his legs from the knees down decided not to follow him...

Saturday, September 11, 2004

Eric likes Greece...

Eric likes Greece...they put cheese on or in everything! There is even cheese (yes, just cheese) as an appetizer on almost every menu. Needless to say, the cheese pies (a croissant-like pastry with various kinds of cheeses baked inside) and other such goodies are calling to Eric, as if by name.

Anyway, today we visited the site of the ancient (we mean really ancient - they date to 1500-2000 BC) ruins of the Minoan civilization. If you could look past the abundance of tourist and the fact that the ruins have been controversially reconstructed in the last century, it was pretty amazing to be walking around in a place where some of the first organized politics, religion, and society existed.

For example, there are existing, original terracotta pipes that demonstrate the advancement the Minoans had - they built a sophisticated plumbing system to bring fresh water and remove dirty water to/from the palace. Our guide explained a number of such examples of techniques and ingenuity that are still utilized today. They used building materials such as alabaster, quartz, and marble to build the palace, and painted with brilliant colors. To put it shortly, it was impressive.

After a quick "Greek fast food lunch" - ham & egg crepe for Jazmine, gyro pita for Eric (Jazmine prohibited Eric from any more cheese pies for a couple of days), we hopped a bus to the second largest city on Crete, Hania (pronounced an-ya'). Anyone who knows Eric can guess how he spent a good portion of the 3-hour bus ride - napping!

Arrival in Hania was much more pleasant than Iraklion, once we found our way to the "old" part of town. The harbor area and it surrounding labyrinth of tiny little streets and brightly painted buildings that crowd them reminds us of Venice (no, not Venice, Florida). About an hour of hunting and bargaining for a room to stay, and we were off to dinner. And oh my, what a fantastic meal we enjoyed. Live bouziki and violin music, pleasant breeze at our street-side table, and probably the best food we've had so far on this trip (if not some of the best we've had anywhere). Let's see, did we like best the cheese-stuffed green peppers, the bowtie and chicken pasta with pine nuts, oregano, and feta, the tender swordfish fillet with olive oil and fresh lemon, or perhaps the dessert of homemade yogurt with local honey? I don't know, it was all soooo good... (and yes, we are trying to make you all jealous).

Tonight we prepared for a long day hiking the Samaria Gorge tomorrow. A bit of re-packing was in order since the backpack had become cluttered with the usual collection of tonteria (miscellaneous junk) that seems to multiply like rabbits when we're on vacation.

Friday, September 10, 2004

Goodbye Meteora, Hello Crete

Short entry today, since it was just a traveling day. It was very difficult to leave the little slice of heaven that we'd found in Kastraki, but we had to get on the road back to Athens to catch our plane to Iraklion on the island of Crete. As we said goodbye to our gracious hosts Thanassis and Tula Nakis at the Doupiani House (and Jazmine said goodbye to the kittens) we were eager to get to Crete.

The sunset was nice from the plane, but Iraklion is not the most scenic place to land. A large city that is thoroughly "modern" in that it has as much traffic, noise, and pollution as if it were a suburb of Athens. We had dinner at a little Italian restaurant in an old restored building (all restaurants in Greece seem to be occupying buildings that are at least 300 years old!), and we were struck by the sizable youth population and accompanying trendy cafe and bar scene that permeated the "old town" part of the city. It was very hip and trendy and very European...

Tomorrow we visit the oldest ruins in Greece (maybe the oldest surviving in the world), Minoa.

Thursday, September 9, 2004

Meteora Monasteries

Meteora is a region of inexplicable sheer rock formations that rise straight up more than 1000 feet. As if it weren't enough to see such magnificent natural phenomenon, some 12th century monks decided to build a series of monasteries on the tops of these rocks, which visitors can tour - and we did. The buildings look as if they are growing straight out of the rock - as if God himself placed them there, like he thought the cliffs needed a little icing on top or something.

The monasteries range from little more than small, simple temples with even smaller living quarters, to a giant compound that we spent 2 hours walking through (accompanied by about 2000 of our closest tourist friends). All of the little Byzantine-style one-room churches are spectacularly painted with frescoes depicting various scenes from the bible (some of which would be rated R for graphic violence if they were movies - those monks apparently didn't want to forget what some Christian martyrs were put through).

Luckily for our exhausted legs, there is a road that leads right to the front steps of most of the monasteries, but at times we thought one of us might have to get out and push our tiny rental car to coax it up the hill - we had to feed the hamster inside the a little extra to get it up those steep roads.

Eric enjoyed a nice siesta back at the hotel in the afternoon, while Jazmine gallivanted with the resident kittens ("Awwww...they're so cute!"). Our host recommended his favorite restaurant for dinner in the larger town (Kalambaka) down the road, where we enjoyed dinner and met up with a British couple we had seen several times on the cliff-side monasteries. We stayed at the taverna chatting with them until midnight, laughing at each others' accents and sharing travel stories.

Wednesday, September 8, 2004

Delphi to Meteora

Short and sweet entry today..

We saw the Delphi ruins this morning - I think there are more stone/marble column pieces laying around seemingly neglected than there are actual columns standing. Jazmine called it the column cemetery. We stood in a theater that is about 3000 years old; we sat on stones that ancient kings and dignitaries sat on; it was quite an experience. [Pictures will be sent in a couple of days - the carrier pigeon internet is can't handle them today :-)]

Spent 4-5 hours in the car driving to the Meteora area, site of famous cliff-dwelling monks. Found a gorgeous little bed-and-breakfast style hotel with amazing views of the cliffs and monasteries. Off to find some dinner now - and rest our poor legs for more stair climbing tomorrow...

Tuesday, September 7, 2004

Tired Legs

This morning we decided to climb the nearly 1000 stairs to the top of a fortress overlooking Nafplio (it stands about 700 feet above the harbor). The worst part was that we also had to climb down again. The view was breathtaking and well worth it, but I'm not sure our calf and thigh muscles think so.

After lunch we headed to ancient Mycenae, only about 1/2 hour away, to do some more exploring. Ends up that we had to do even more climbing of the ancient site (our legs were screaming in protest: NOOO, not again!). It's amazing to imagine the kingdom of such grandeur existed at this location. There is still ongoing excavations at the site, which is pretty cool when you realize you are walking around in a living, breathing archaeological location. Additionally, we explored an underground cistern (for well water) with a French couple we met right there. We were unaware that a flashlight was needed to go through the tunnel (and MORE stairs, I might add) but they had read the guide book and had one for the four of us to use. We communicated with the limited French Jazmine spoke and were able to exchange their email address in order to send a picture we took (in the dark). Mycenea is one of the must-see ancient sites in Greece, and we were glad to have experienced it.

Hopping back into the rental car, on our way to Delphi. We started on the main highway (with its one-and-a-half lanes in each direction - we kid you not, there are actually only one and a half lanes! It's like the Greeks got tired of making lanes and decided that was enough). It followed the coast and we crossed what some Greeks claim is the largest bridge in the world. I don't know about that, but it was impressive - especially as we drove by it on the highway again and again as we searched in vain for the exit ramp to get to the bridge ("Hey look kids, it's Big Ben!")

After the main highway, it was a nice change to take a twisting little road along the other coast on our way into the mountains that house the ancient Delphi site. We stopped to stretch legs and felt the first spray of the Mediterranean sea on our faces -nice! On up the spaghetti road, hairpin turns and crazy motorcyclists and truck drivers, and into the little tourist town where we stayed. Tomorrow morning we visit the ancient ruins of Delphi.

Monday, September 6, 2004

Eric Turns into a Greek...

...driver, that is. Today we picked up the rental car in Athens that will take us on our land tour of the Greek mainland which includes the city of Nafplion, Ancient Mycenae, Delphi, monasteries at Meteora, and then back to Athens.
Getting back to the original statement, Eric's driving matches that of the Greeks, going in and out of lanes, passing cars with about enough room in between to squeeze a playing card or two...a few times Jazmine had to close her eyes during those passing times.
We have survived so far though; I (Jazmine) don't think I could have driven any better. I am glad he is driving and not I.

We drove from Athens to Nafplio today.
Nafplio, an old town on the southern end of the peninsula, is a wonderful little town, quaint and historical. It reminded us of Cartagena, Colombia, Saint Augustine, or Venice Italy - with narrow streets and many buildings being restored to the original style.
We climbed a couple of Venetian forts and spent some time strolling the cobblestone streets. Our hotel, The Byron Hotel (pictures later), was absolutely beautiful and a bargain to boot.

We decided to plan some of our island visit for next week - Jazmine found a small travel agent in Nafplio and we kept him up and chain-smoking well into the night as we explored about 100 different options for getting to and around the islands. The agent was amazingly friendly, knowledgeable, and English-fluent. His name was Konstantinos at Kasteli Tours (we just want to give him props because he is one of the friendliest people we've met so far and his travel service was a HUGE help since we really didn't know what we were going to do about the islands).

[sorry no pictures today - this computer is on a very slow internet connection (I think it is using carrier pigeon). We'll try to upload some new pictures in a couple of days (we've already taken over 200 so there are plenty to see!)

Sunday, September 5, 2004

The Acropolis and Cape Sounion

Believe it or not, we actually woke up early on a weekend morning. The consummate Athens site, the Acropolis, is best viewed in the early hours when the sun is not yet high enough to bake bread on the rocks. So we were up and out by 8:00am, and the Acropolis was ready for us.
Pictures and words can simply not do justice to the magnificence and grandeur of the Parthenon. But here's a try anyway: Photos
The first word to describe the Parthenon perched atop the Acropolis (a giant rock in the middle of this sprawling city) is: windy. The second word is blustery. The third word is...OK you get the idea. We were literally nearly blown over at times. But it was worth it - the site is beautiful, and the views of Athens from this high point are equally striking. We will be posting all our pictures when we get home, what is above is just a sample.

After a small lunch we hopped a bus and headed for another ruined temple site - Cape Sounion, the southernmost point of mainland Greece and home to the ancient Temple of Poseidon. More wind, more tourists, but equally as beautiful as the Parthenon. Perhaps more so, because we stuck around for what many people regard as one of the most beautiful sunset views in all of Europe. Here are some pictures that give just a vague hint of what it was like.

All in all, a busy day and we are both pooped as we sit in an all-night Internet "cafe" typing this log. Our prayers are with our friends and family back home in Florida after seeing some news and pictures online about what hurricane Frances is doing to our home state. We will try to make a couple of short phone calls tomorrow to find out if everything and everyone is OK.

Prayers and love, enjoying the spotless weather half way around the world,

Eric & Jazmine

Saturday, September 4, 2004

Rough Beginnings

Our trip was almost in jeopardy before it even began.
First, Eric left behind his all-important insulin in the car after we were dropped off at the airport. For 20 minutes, we were in a state of complete panic (think the Bill Paxon character in the movie Aliens - "We're dogfood, Man! Game over! We're dead meat man!") while we tried to track down Albert and family in whose car the life-giving medication was left. Luckily, our nephew Nicholas saved the day - he found the insulin, alerted his parents, and they quickly returned to the airport with it (side note: Albert and Jannette REALLY need to get a cell phone).

So we finally get to check-in and the airline agent tells us there is a problem - the name on Jazmine's passport is her maiden name (Latorre_, but the ticket is in her married name (Jazmine L. Rizzo). "This will not do." - yeah lady, thanks a lot. Now what do we have to do to get on that plane which leaves in less than an hour?
After about 20 minutes, most of which I believe was a thinly veiled attempt to get us to break down and admit some kind of international conspiracy to confuse beaurocratic workers, she comes back and tells us it is taken care of. OK, then she asks Jazmine again what her full name is, with a strange look. Jazmine tries to explain, again, how the passport was issued before she was married, but the agent just interrupts and says, "Listen, this is what I'm telling you - this [pointing to the passport with Latorre on it] is your name. Yes?" We finally get the hint - we nod and she changes the ticket to be in the name of Jazmine Latorre. So for the next 2 weeks, Eric is traveling with some woman who is not named Jazmine Rizzo.

So, our trip was in danger of cancellation or at least serious postponement - but we were rescued by a 9-year-old who is strangely fascinated with Eric's insulin injections, and a complete stranger who has decided that womens' lib lives on and married women should keep their maiden names. Thanks to both of them!

So now we're here in Athens, and things have been great since those early problems. We explored the Ancient Greek Agora, explored some ruins, and had a lovely souvlaki dinner at an outdoor cafe. Hotel Attalos is very pleasant and I (Eric) have so far managed to keep Jazmine from spending hoards of money at the copius knick-knack shops that proliferate most of central Athens! Woohoo for me - one day down, 14 to go...

Monday, August 30, 2004

Look out Greeks, the Rizzos are coming!

Jaz and I are busy getting ready for our trip to Greece on Sept 3 - planning, packing, preparing, practicing photographing, postulating the possibilities,... [OK, I'll stop with the alliteration]
We've decided to head out with only minimal reservations and a rough sketch of an itinerary - only booked a hotel for our first few and last nights in Athens. For the rest of the 12 or so days & nights we'll be there, well we're just going to wing it as we go. What an adventure - could turn out to be disastrous (I doubt it), but it also could turn out to be great.
So stay tuned to this space [we hope to update it about every other day as we make our way through the ancient land]. If we get lost, side-tracked, or arrested, it'll be fine as long as they have diet soda and Internet access wherever it is that we end up :-)
El Penguino will keep you company while you're here, but please, don't feed him table scraps.

Eric and Jazmine