Comment On When developers "Throw" Parties

Dave Milner contributes this story to TheDailyWTF: [expand full text]
« PrevPage 1Next »

re: When developers "Throw" Parties

2004-07-28 13:05 • by h0
I don't see anything wrong with this. Generic event handlers such as this aren't specific, hence it being generic.

re: When developers "Throw" Parties

2004-07-28 13:22 • by tim
It's not really generic though. It's just specific in its case statements. So instead of abstracting your functionality, you've supressed it a level and missed it together. So if you want to try and find the functionality of "event a" you have to remember there's no function "EventAOnFire" there's a "EverythingIsFired" and it's in there somewhere. This buys you nothing (unless headaches and confusion are something you want). Of course that's just my opinion.

re: When developers "Throw" Parties

2004-07-28 13:22 • by tim
missed=mixed

re: When developers "Throw" Parties

2004-07-28 13:54 • by AIM48
Reminds me of the service method of a good old Java servlet (or ASP page for that matter) -

re: When developers "Throw" Parties

2004-07-28 14:55 • by Ilya Haykinson
This great sample of coding wisdom also showcases another gem: the use of the Saving Disk Space pattern. Observe how the author masterfully named the method "Srch..", no "Search..". The immense savings of disk space and final size of the executable more than make up for any potential inconvenience this could possibly bring to someone else reading the code.

re: When developers "Throw" Parties

2004-07-29 03:30 • by Centaur
I HadThisPattern once. Instead of having lots of small batch files to do different unrelated tasks, I would stick them all as sections in one large file which had at its heading a checked “goto %1”. I also used a 4DOS feature to map all unknown commands to this all-in-one batch.

Seriously, of course it is a maintenance nightmare, and I got rid of it once I moved to a better file system.

re: When developers "Throw" Parties

2004-07-29 10:59 • by Andy Brummer
Given the title, I thought I'd see code litered with

throw new Party("ErrorMessage");

re: When developers "Throw" Parties

2004-07-29 11:35 • by Phil Scott
That "Saving Disk Space pattern" is hilarious. Thank Ilya, I'll have to remember that one.

re: When developers "Throw" Parties

2004-07-30 05:10 • by Ray S
One event handler to run them all, and in the darkness bind them.

re: When developers "Throw" Parties

2004-07-30 13:32 • by El Fuge
When I was in college, that's how I saw everybody do it, and it's how they kept on catching exceptions even after being pointed out how and why it was wrong.

Some people never learn.

re: When developers "Throw" Parties

2004-08-06 11:09 • by DrFooMod2
First, I'm a C# coder, but there is one "usefull" fearure in VB.NET (caugh) that's not in C#, and that's exception filters. So, this is a workaround in C#.
« PrevPage 1Next »

Add Comment