POV-Ray : Newsgroups : povray.off-topic : The code I'm working on makes me want to cry ... : The code I'm working on makes me want to cry ... Server Time
5 Sep 2024 11:22:58 EDT (-0400)
  The code I'm working on makes me want to cry ...  
From: Mike Raiford
Date: 6 Aug 2009 14:02:37
Message: <4a7b1abd$1@news.povray.org>
Just a sample of what I'm dealing with.

Control ctrl = (Control)sender;

switch (ctrl.Name)
{
case "cboCustomer":
.
.
.


Seriously, WTF? There's 2 events like this... I could have been 
mistaken, but I thought the great advantage of events and such was to 
avoid switch statements, or long if...else... blocks.

I've actually counted as many as 3 different places where data is loaded 
into controls from the currently selected item.

I have 1 "form" (actually it's a user control) that contains some basic 
data, and is in 4 files, approximately 4,000 lines of code each.

It's painful.

Oh, and get this... the database is just as delightful. The customer's 
address information is in..... 3 tables.

1 the main table contains the address itself, and pointers to the city, 
and the state tables.

That's right, a row for every city, and a row for every state.

It's more than just that. The address was just the easiest to explain 
example of the wtfery that permeates this project.



-- 
~Mike


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.