Archive for the ‘Code Follies’ Category

Bad Data Design

Code Follies, From The Lines | Posted by attriel October 17th, 2008

Today I was working on some changes that had been requested to a system we manage.  Technically, they’d been requested through another group, passed to a third group, and they’d talked to me about it a month or so ago, I explained how it needed to process to update into our system so that the person asking could actually see the result, but we decided that, because it’s a legacy process that translates into our database, they’d get the system figured out and then we’d figure out how to pass the updates piecemeal.  Since until the flags are set for each record, they can update the source all they want and nothing happens.

Today I got a forward of a forward of the tail end of a conversation between two people that had been passed to a third.  Yeah, does that sound confusing?  me too!  End result being that the guy that requested the original change was wondering why he’d been told it was done but it wasn’t showing up.

Somewhere along the way, the flags were never updated.  Oops.  Turns out, upon further inspection, that they updated table A, we process from view B, which gets that data from C.  C has no relation to A.  So even if they’d updated the flags, we never would have gotten anything :o  So after some discussion I processed their updates directly into our dev environment so we can make sure that they do what everyone wants they should do.  I don’t actually know if the source data will ever get updated :o

On an entirely unrelated note …. What do you call a design that has two unique keys for every entry?

Now … what do you call it when it turns out one of them is not garaunteed to be unique?

OK … And what about when the other one is garaunteed to be unique EXCEPT WHEN IT ISN’T???

*sigh* Literally, I found a set of records where A and B shared key 1, then B and C shared key 2.  There is no unique way of identifying these without using (a) both keys, or (b) information that exists only inside the database

Of course, I will never get an explanation as to who’s dumb idea this design was, because that person is probably one of the guys that’s gone by now.  Just like all the other design idiocy decisions that vex me (us) daily.

Design by Defect

Code Follies | Posted by attriel September 2nd, 2008

Imagine if you will.  A room with 4 people for a meeting.  Two of them are coders.  Developers.  It’s a design meeting.  Lets call them A and N.  The other two people we’ll call D and C.  Because that way the letters are nice and random ;)

The meeting is talking about the design and design decisions behind a new content framework for a series of sites.  Rather than investing in a CMS that might do most of what they want badly, the customer has asked for a custom built deal to perform the functions they need well.  (OK, that’s a bit of a stretch.  Group S convinced the customer that this was the best way to do it, but the customer isn’t necessarily convinced they need anything more than their current “bob edits the HTML files for us” system).  A has just been invited to the meeting, apparently related meetings have been going on for months.

N, the other developer, has a system he worked on previously that he feels can be easily retooled to provide CMS functionality without having to start from scratch.  Reusability of code, cool.  Reusability of code from another client while working for a different company, questionable.  Reusability of an inventory tracker as a CMS framework … uh … When you have to start wedging site design ideas around the existing code so you don’t have to rewrite it … 

D is a manager.  His major contribution to the meeting was fairly benign.  Basically, anytime N asked a question about how this or that should work, D deferred to C or sent the question back to N.  He also nailed the manager ability to agree with everyone in the room, even when they disagree with each other.

C is an idea man.  He generates ideas, mockups, etc.  He doesn’t work on the code, directly.  During the meeting he shoots down multiple design choices due to the customers being, effectively, retarded imbeciles.  

So, during this multi-hour meeting, you have A making repeated comments and suggestions based on a total lack of background.  N making choices and declarations based on how the sites can best be modeled as inventory.  And C firing down ideas due to customer incompetence.  N and C both keep making suggestions based on, effectively, retaining the current system and model.  Which is Bob edits html files by hand on the server.  D’s major contribution is repeated use of statements like “outside the system”, and then wanting these tasks that exist outside the system to be triggered or to effect a change in the system.  Without them being connected.  Every user role that comes up is “Well, that would be Bob”, the only example in every mockup is a section that, within the first 20 minutes, is written off as not-exemplary of the rest of the system. 

In the end, it’s a poorly implemented system based on a defective design, intended to minimally meet abysmal requirements for a product that the customer isn’t even sure they want.  What could POSSIBLY go wrong?