Shiny Donkey!
Shiny Donkey! Shiny Donkey! Shiny Donkey!
                  Fake Banner Ads!  Mini-Sites!  
    New Shiny Donkey Posts  more >>
* BREAKING NEWS *  9 out of 10 reality TV producers recommend marrying Bull instead of shinydonkey.com
.NET To err is human
[reply]   [1 comment]

03/31/06 12:32 PM EST
posted by JER email web

How do you handle Exceptions in your .NET code? I always catch exceptions I'm expecting (like a "directory not found" error) and try to resolve it without bothering the user. If it can't be resolved, I write the message & stack trace to an error log, then rethrow the Exception to allow it to bubble up.
Another "developer" and I had an argument recently about this practice, mainly because of critical comments I made about his code. Specifically, he uses the following code as a stub for all methods:

private void ExampleMethod(){
   try{
      //some code here
   } catch {
      throw;
   }
}

So basically he catches all errors and then rethrows them immediately.  I asked him what logic was behind that design choice and he told me that he doesn't trust the .NET Framework to handle all errors, so it's best to follow this practice.  Also, this will insure that errors bubble up to the caller.  Apparently he adapted it from someone he used to work with.

I have a few problems with this argument...

  1. If you "don't trust" the .NET Framework to handle Exceptions, why do you trust it to catch & rethrow them??
  2. A naked "catch" block will catch non-CLS compliant code, which can only be introduced via COM or some really sketchy manual compilation.  So if your method is calculating the volume of an egg and does not call any 3rd party dlls, why are non-CLS compliant exceptions a concern?

We had this e-mail exchange:

E-mail #1

Ken,
Specifically, this Microsoft recommendation seems to back up my main argument for not re-throwing an Exception

"Use Inner exceptions (chained exceptions). However, do not catch and re-throw exceptions unless you are adding additional information or changing the type of the exception."

Jerry

E-mail #2

Jerry, that's true I found out about it, but it look so unstructured, it is what's in the framework, less work for us.  However look at it in terms of distributed environment, this won't work.  Example Client.A() call web service B(), since B() is ws business layer with passive exception handling, when error occurred in datalayer ws is using error wont bubble up to the client.  It's error accessible in local framework.


Anyone else want to weigh in on this?


References
Best Practices for Handling Exceptions
.NET Framework Developer's Guide : Exception Handling
Unexpected Errors in Managed Applications

 

Geek Stuff Making the sale at Best Buy (or Circuit City or Radio Shack or...)
[reply]   

03/29/06 11:41 AM EST
posted by JER email web

About 4 years ago I was at a Best Buy in Springfield, VA shopping for CDs.  The guy browsing next to me must have noticed my hat, because he suddenly asked me, "Are you an Indians fan?"  I said that I was and we talked about the upcoming season for a minute or two.  As I tried to excuse myself, he asked what I did for a living.  I mentioned IT and then he asked if I ever did anything on the side.  I said yes and he asked for my contact info so that he could call me about an opportunity he wanted some help with.  He wouldn't give many details about what he needed and said he would explain more later.

The next day I met him at a Starbucks nearby and he & his boss gave a pitch about the difference between working for someone and working for yourself.  Clearly this was not about freelance IT work, it was some kind of sales pitch.  They asked if I wanted to make a lot of money.  They asked if I had what it took to run a business.  They kept repeating keywords like "opportunity" and "business." After minutes of this blather, I interrupted them and asked them to cut to the chase.  They continued to ramble on.  Finally, they said that they were holding a more formal meeting the next night at the Springfield Hilton for a group of smart young guys like me.  They assured me that all my questions would be answered if I attended this meeting.  I politely declined their invitation and excused myself (amidst much ado about how I should stay and hear more).

I felt like an idiot after wasting an hour with those schmucks and headed home.  Over the next few days, I received several followup voicemail messages, but they eventually left me alone.

A few months later, I was shopping at a Circuit City and a stranger came up to me and asked, "Indians fan, eh?"  At that moment, I decided to stop wearing hats so often.  After a few minutes of talking about the upcoming baseball season, this new guy asked what I did for a living and (in a far too cheery tone) if I ever did any work on the side.  I paused, looked him straight in the eye and said "No."  He must have seen something in my expression or read something in my tone, because his salesman demeanor suddenly slipped away.  His body language was so different, it was clear that he HAD been about to do the sales pitch had changed his mind.  He mumbled something under his breath and slipped away.

I was relieved that I'd scared him off but it made me sick that while I may have saved myself, he & his ilk would continue to prey on unsuspecting electronics store customers.  And after wasting over an hour with two different reps, I still had no idea what their strange business scheme was or what they were after.

Time passed.

Last night, I received a phone call from Steve Behr to confirm a meeting with him in Tyson's Corner at 6 pm.  I had never heard his name before and had never agreed to any meetings, so I was quite confused.  He had a very schmoozy demeanor and repeatedly used my first name, as if we were long lost pals.  He said that he'd scheduled a meeting with Michelle to discuss a "business opportunity" that he thought she & I could help with.  I told him that she hadn't mentioned him or any meeting to me.  And furthermore, what was the great business opportunity he wanted to talk about?  His vague answer and dodginess made it clear that "Steve" must be part of the same group from years earlier.  I told him that I'd speak with Michelle & she would call him to confirm.

I asked Michelle about this strange call and she said she wasn't sure what this guy had in mind, but that she'd met him at RADIO SHACK a few days earlier and she though we could at least hear him out.  "Nooo!!" I cried.  "This guy's in league with those douches I met with 4 years ago, I'm sure of it!"  She was surprised at how certain I was about his sketchiness.  She told me that he was hosting a meeting at the Tyson's Corner Hilton at 7 pm tonight (apparently, these guys love Hiltons) and had wanted to meet with us beforehand.  I called the hotel and found that a group named "iCommerce" has a meeting room booked from 7pm to 11pm.

These quote from their website confirmed that all 3 of these entrepeneurs work for iCommerce:

Are you making the kind of money you want? Ever thought about a business of your own?

No matter what your goal, this business works the same way:  the more people you register who buy and sell products with you, the more you grow and the more you make.

I called Steve back and asked if he was affiliated with iCommerce.  He said that his group uses a lot of different brandings, so yes, maybe he was, but he wasn't sure.  He then used that as a segue to discuss e-commerce and asked if I'd ever looked into starting my own business.  I said that I'd met a few of his kind years earlier and asked if these hotel meetings would train me to hang out at electronics stores all day.  He said that it wasn't all about hanging out at electronics stores, it was about building a business, yada yada.  I told him that I didn't want to waste any more of my time with him or his schtick.  Incredibly, just like the coffee shop meeting 4 years earlier, no matter how rude I was, he was completely unfazed and kept giving his pitch.  I swore at him, he laughed it off.  I told him I wasn't interested, he said to call if I changed my mind.

By the way...

If you're interested in a terrific "business opportunity," please call Steve at (301) 466-9061 !!!  I'd love to hear what kind of businesses each of you open!

 

Politics Yep, totally the same
[reply]   [2 comments]

03/23/06 07:30 AM EST
posted by JER email web

I'd like to write a scathing commentary on an article I just read, but I'm at a loss for words.  How can anyone compare verbal outrage regarding a potential death sentence to rioting over a cartoon?  Are we saying that religious cartoons and death sentences are similar?  Or maybe that vocal protest is comparable to rioting?  Maybe both??  Here is a snippet from the article in question...

Afghan convert controversy mirrors cartoons row

Tom Heneghan, Reuters

The strong Western response to a threatened death sentence for an Afghan convert to Christianity looks something like a mirror image of the Muslim reaction to the Prophet Mohammad caricatures printed in the European press.

There have been no riots or sackings of Afghan embassies ... but the shock and mutual incomprehension expressed in both cases are similar.

http://news.yahoo.com/s/nm/20060323/wl_nm/religion_afghan_reaction_dc

 

Bad Jokes Billy Joel & Google
[reply]   

03/17/06 09:48 AM EST
posted by JER email web

Last night I saw Billy Joel at the Verizon Center and had a great time.  The entire show was excellent, but the highlight by far was Zanzibar.  It was a treat not only because he rarely plays it live, but because his band was on fire during the whole song, especially the trumpet player.

And in a strange Billy Joel-related coincidence, it was my fondness of his music that led me to find alt.music.billy-joel 10 years ago.  I posted a rather stupid message asking whether or not subscribing to the newsgroup meant I'd be getting Billy Joel news.  8 years later, I Googled myself and found out that I'd gotten a very sarcastic, mean-spirited response from another subscriber.  I originally posted about this topic here.

Yesterday, over 2 years later, the flamer found my reply, presumably by Googling himself:

From an e-mail received Thursday, March 16, 2006 12:45 PM ...

Hey, I vaguely remember posting that witty rejoinder back in 1996! I hope you eventually got over it! Btw, if you consider a sarcastic good natured ribbing to be a flaming, you should spend a little more time reading newsgroups (also learn to laugh at yourself a bit). But it's really great to reconnect with you after all these years.

Warmest regards,
Jason Barrie Wood.

Oh, I'm over it.  I think I was mad for the 2 minutes it took me to write that original post.

Still, Woody's repetitive use of my full name was what **** me off the most.  His response could have simply read, "Who the **** are you?  Eat ****." and it would have been more in the spirit of a "good natured ribbing."  And how does "we all got drunk and laughed about [him]" constitute a "witty rejoinder?"  Canadian humor is losing its edge.

Ah well, at least this whole thing brought together two old friends.  :)

Original Post

The Newsgroup Posting

 

.NET QA?
[reply]   [8 comments]

03/14/06 10:12 AM EST
posted by Blearns email web

Anybody work in a place that has/had a specialized QA staff?

 

SQL Alex, Vindicated
[reply]   [3 comments]

03/02/06 09:01 AM EST
posted by JER email web

Long ago, Alex made a comment that Foreign Keys are great in development but should not be copied to the production server because they reduce performance.  SQL Server Central explores the issue and comes to the same conclusion.  Though it seems almost academic on most sites, it could definitely improve performance of your nascarnet.coms...

 

Movies Katie Holmes has really let herself go...
[reply]   

03/01/06 02:47 PM EST
posted by JER email web

KatieHolmes_150.jpgAccording to MSN & the AP Wire, this is a recent photo of Katie Holmes.  Priceless....

 

Miscellaneous
[reply]   [1 comment]

03/28/06 07:40 PM EST
posted by lohan ****er

I WANT TO BANG LOHAN SO BAD AND HER BOOBS ARE NICE VERY NICE BUT FAKE SADLY :(!!!!

 

Politics
[reply]   [1 comment]

03/24/06 06:19 AM EST
posted by WeaselSpleen

"Whatever George W. Bush believes, I beleive the opposite, because I'm a liberal douchebag."
"Whooee, yeah, you tell 'em! That's the way! Good on ya!

"Whatever George W. Bush believes, I believe the same, because I'm a conservative douchebag."
"Hey, wait, that's not funny!"

****in' retards...

 



"And remember, a shiny new donkey for whoever brings me the head of Colonel Montoya..."
e-mail webmaster