• (cs)

    When I was reading the story, I was almost sure that the second table allowed for one notice per day, in a 30-day month. I was wrong.

  • Ratchetr (unregistered) in reply to undrline
    undrline:
    I think it's clear that the guy just hadn't finished, and was working with inadequate information to get his job done.
    Nigel's problem wasn't inadequate information. It was inadequate knowledge.
  • Not Nigel (unregistered) in reply to Ratchetr
    Ratchetr:
    undrline:
    I think it's clear that the guy just hadn't finished, and was working with inadequate information to get his job done.
    Nigel's problem wasn't inadequate information. It was inadequate knowledge.

    The real problem, as well as TRWTF, was inadequate Nigel.

    "We cut out the hard part and pass the savings on to ME!"

  • (cs)

    Let me get this straight. The database design immediately proves Nigel is a moron - and yet still Jon was "expecting some incredibly clever code to map user notices to the notices table and do all the filtering and sorting"? I'm not sure I'd have even dared to open the code, let alone expected it to be awesome.

  • Not as DULL as you (unregistered) in reply to Crabs
    Crabs:
    And actually, if he did it right, this could be used to display 2^30 messages, rather than just 30. That should be enough messages for anybody.

    Elaborate please. I fail to see how you could get 2^30 messages displayed simultaneously.

  • pmv (unregistered)

    Wait, this can still work.

    All you have to do is run a VM with a fresh database for each user. Then every time there is a new notice, look up which users on which VMs need their database updated. You'd have to keep a hash to store the usernames and vm ids, then you could call getUsersDatabaseMachineFromHash(string username). For power-users you could assign more than one VM to get around the 30 alert limit.

  • lolzJ (unregistered) in reply to monkeyPushButton

    TRWTF is using a

    inside a table.

    No wait, TRWTF is using a table. (hmm, maybe not in this case. It's debatable.. ;)

  • clbuttic (unregistered) in reply to Dazed
    Dazed:
    Did Nigel have a sister called Paula?
    Hmmm... if Nigel is Paula Bean's brother, that would make him Mr. Bean! (Which explains a lot, actually.)
  • El Dorko (unregistered)

    That Nigel dude is obviously just incompetent, probably he's a web developer so he's mostly done the visual stuff. Groovy colors, rounded borders, javascript flyover stuff and the likes, and never touched a database before.

    The real asshole (can I say that here?) is that Jon guy. At the very first sight of the database "design", he should've gone to the poor guy and explained to him that it's not right, and show him how to do it. Motivate him, get better results, and maybe even one a real, working thingamawhatsit. Sheesh. So now they have no web dev/designer, no working notification system, and the wanker (can I say that here?) Jon still employed - there's the real WTF.

  • csrster (unregistered) in reply to My Freaking Goodness!
    My Freaking Goodness!:
    This is just about the easiest DB project in the world. It's almost the canonical example of a many to many relation.

    Table Users (UserID, other-info) Table Notice (NoticeID, NoticeText, Expires) Table UserNotice (UserID, NoticeID, Acknowledged)

    I'll leave data types and references as an exercise for the reader.

    Yes indeedy. And with Ruby on Rails that would be almost the complete application :-)

    So why is it that database design WTFs always seem to be the worst WTFs? Is it a subject which is unusually badly taught? Or is it an area which is especially tricky for the self-taught?

  • Yazeran (unregistered) in reply to Not as DULL as you
    Not as DULL as you:
    Crabs:
    And actually, if he did it right, this could be used to display 2^30 messages, rather than just 30. That should be enough messages for anybody.

    Elaborate please. I fail to see how you could get 2^30 messages displayed simultaneously.

    Use the 30 int columns as individual bits in a large integer and in effect you have a 'new' foreign key which could map to the noticeid...

    However if anyone tried that on code I had to maintain I would be tempted to do harmful things to him/her with a large solid cluebat! (My head hurts just thinking about the horrible stored procedures which would be used to do the mapping, especially since the columns appears to be nullable...)

    Yazeran

  • Yazeran (unregistered) in reply to csrster
    csrster:
    My Freaking Goodness!:
    This is just about the easiest DB project in the world. It's almost the canonical example of a many to many relation.

    Table Users (UserID, other-info) Table Notice (NoticeID, NoticeText, Expires) Table UserNotice (UserID, NoticeID, Acknowledged)

    I'll leave data types and references as an exercise for the reader.

    Yes indeedy. And with Ruby on Rails that would be almost the complete application :-)

    So why is it that database design WTFs always seem to be the worst WTFs? Is it a subject which is unusually badly taught? Or is it an area which is especially tricky for the self-taught?

    In my opinion it is because in order to do a proper database design you need to have a somewhat solid grasp on math and mathematical logic to do it, not something the average self taught Joe developer has. He may have heard about normalization, but without some math skills he will not realize WHY normalization is good and do it horribly when he has to do it in practice.

    Yazeran

  • qilphil (unregistered) in reply to Yazeran

    Maybe it's because database design is sort of the foundation of a good (well .. working - nonWTF) application. The rest you can mostly fix later, but if you mess up with the fundamentals, you carry them and theis messy cosequences to the biter end

    It's like building a skyscraper.... you screw up with the roof, someone else can put on a new roof .. if you screw with the foundation, you have to tear down the whole thing.

    Reminds me of a cartoon: Some italian architect in the year ca. 1173: "Yeah, we cut some corners with the foundation, but I don't think anyone here in Pisa will notice"

  • Mr Smith (unregistered)

    The real WTF was using tinyints as booleans. What he should have done was use bigints as bitmaps. That way he would have been able to fit 8 bytes worth of boolean flags in one field.

  • puzzled (unregistered) in reply to El Dorko
    El Dorko:
    That Nigel dude is obviously just incompetent, probably he's a *web developer* so he's mostly done the visual stuff. Groovy colors, rounded borders, javascript flyover stuff and the likes, and never touched a database before.

    The real asshole (can I say that here?) is that Jon guy. At the very first sight of the database "design", he should've gone to the poor guy and explained to him that it's not right, and show him how to do it. Motivate him, get better results, and maybe even one a real, working thingamawhatsit. Sheesh. So now they have no web dev/designer, no working notification system, and the wanker (can I say that here?) Jon still employed - there's the real WTF.

    Exactly what I thought when I read it

  • Jesper (unregistered) in reply to AndyL
    AndyL:
    In before the 30th comment!
    Huh?! Certainly not. Your comment is number 241123.

    (Remember, it was 30 comments for the whole site, not for a single customer).

  • (cs)

    I think I know exactly what Jon was thinking:

    [image]
  • xmlforlife (unregistered) in reply to Piercy
    Piercy:

    There are no unread messages in your comments

    ... why does it have to be sn... five columns?!

    Jon should watch out for some very special css I suspect ...

  • Mike (unregistered) in reply to pink_fairy
    pink_fairy:
    I can't believe nobody has yet quoted:

    "We're only making plans for Nigel We only want what's best for him ...

    Update: Apparently, Nigel was recently appointed Mayor of Simpleton

  • cristian (unregistered) in reply to monkeyPushButton
    monkeyPushButton:
    The real WTF is the lack of closing tag for the

    , right?
    <td colspan="5">
      <h2>There are no unread messages/notices in your inbox
    </td>
    

    not quite. in html [not in xhtml] you are allowed to have non-closed tags. :P

  • (cs) in reply to valerion
    valerion:
    Sorry, but you guys are all wrong - Nigel was, actually, a genius.

    He knew all along that nobody actually reads these kinds of notices, and that having them show up all the time would just irritate the users. Therefore he put some crap in to allow people to think they were adding them - keeping management happy - and didn't show them to the customers at all - keeping the customers happy.

    A++++

  • methinks (unregistered) in reply to Dazed
    Dazed:
    Did Nigel have a sister called Paula?

    Damn, beat me to it... ;oP

  • Agree (unregistered) in reply to Yazeran
    In my opinion it is because in order to do a proper database design you need to have a somewhat solid grasp on math and mathematical logic to do it, not something the average self taught Joe developer has. He may have heard about normalization, but without some math skills he will not realize WHY normalization is good and do it horribly when he has to do it in practice.

    This.

    We're all used to see code which has had requirements added and added to it until it's total spaghetti code. Unfortunately, this is almost common and we expect it.

    But it's much much harder to fake an understanding of logic when you're creating a database. There difference between right and wrong is too obvious.

  • Mitur Binesderti (unregistered)

    Looks like a C++ programmer in the making.

  • Anon (unregistered) in reply to El Dorko
    El Dorko:
    The real asshole (can I say that here?) is that Jon guy. At the very first sight of the database "design", he should've gone to the poor guy and explained to him that it's not right, and show him how to do it. Motivate him, get better results, and maybe even one a real, working thingamawhatsit. Sheesh.

    Yeah, then Nigel goes to the management with Jon's solution that he created for poor Nigel while neglecting his own projects. Result? Nigel gets promoted because he's an overachiever and Jon gets yelled at for not getting his stuff done.

    Also, it would certainly be nice (in a humanity kind of way) to help Nigel and "motivate him" but the fact is that he was hired to do work he was clearly unable to do. He's incompetent and it's not up to Jon or anyone else to change that. It's up to Nigel himself.

  • Real-modo (unregistered) in reply to Agree
    Yazeran:
    In my opinion it is because in order to do a proper database design you need to have a somewhat solid grasp on math and mathematical logic to do it, not something the average self taught Joe developer has. He may have heard about normalization, but without some math skills he will not realize WHY normalization is good and do it horribly when he has to do it in practice.
    Since I have a degree in mathematical logic, I'd like to agree. Closed shop, and all that. I do agree beyond a certain point; certainly the theory helps in tricky cases. But 99% of the time, "good-enough design" just takes two rules of thumb:
    1. Tables should represent things in the application domain, i.e. that the users might talk about or want to see lists of.

    2. The test: how well would this design work if there was a million of everything?*

    Nigel got two-thirds of point 1. He got tables for Notices and for The-List-of-Notices-Each-User-Should-See. Give him credit, probably there was already a Users table. He was smart enough not to have the List-of-Notices-Each-User-Should-See hold copies of each notice's text. I've seen that before.

    He didn't apply the test, though. Applying it would (perhaps!) have prompted him to seek another design.

    • If the response to the question is "But there is a million of everything!", then you know it's time to call in the mathematical-logic and relational-database geeks.

    Oh, and if you're going to make a valid argument against point 1 for some corner case, you're well beyond the level of knowledge held by the "average ... Joe developer". Not that saying that will stop any invalid arguments...

  • Not as DULL as you (unregistered) in reply to Yazeran
    Yazeran:
    Not as DULL as you:
    Crabs:
    And actually, if he did it right, this could be used to display 2^30 messages, rather than just 30. That should be enough messages for anybody.

    Elaborate please. I fail to see how you could get 2^30 messages displayed simultaneously.

    Use the 30 int columns as individual bits in a large integer and in effect you have a 'new' foreign key which could map to the noticeid...

    However if anyone tried that on code I had to maintain I would be tempted to do harmful things to him/her with a large solid cluebat! (My head hurts just thinking about the horrible stored procedures which would be used to do the mapping, especially since the columns appears to be nullable...)

    Yazeran

    This would remove the ability to show/hide for specific users so it doesn't quite work.

  • Dan (unregistered)

    They once said that the entire auto market for North America was no more than a few hundred cars. With that kind of foresight, I can't see how a company would need more than 30 notices.

  • Anonym (unregistered)

    TRWTF is ASP.

    Everything would have been so much better if it was coded in PHP.

  • Your Name (unregistered) in reply to Anonym
    Anonym:
    TRWTF is ASP.

    Everything would have been so much better if it was coded in PHP.

    signed

    AND why did he use colspan=5 for an single cell? And the unclosed tag at least shows me, that he is a messy coder. For sure these are not the only problems with his code. For me a good coder is someone who makes code and database design, which any good coder is able to work further too. If you can't be teamable and blame others for not understanding code, which is not better but only complicated, you don't fit in any Company. Like the guy, some comments before, who was proud of the fact, that nobody could easily understand his comlicated made projects, which would probably work using "normal" Database Design as good as he did it. Maybe even faster because good database queries are faster then some loops with complicated string operations and you get out, and are able to directly work with exactly the data you need.

    only my opinion

  • Anon (unregistered) in reply to Anon
    Anon:
    El Dorko:
    The real asshole (can I say that here?) is that Jon guy. At the very first sight of the database "design", he should've gone to the poor guy and explained to him that it's not right, and show him how to do it. Motivate him, get better results, and maybe even one a real, working thingamawhatsit. Sheesh.

    Yeah, then Nigel goes to the management with Jon's solution that he created for poor Nigel while neglecting his own projects. Result? Nigel gets promoted because he's an overachiever and Jon gets yelled at for not getting his stuff done.

    Also, it would certainly be nice (in a humanity kind of way) to help Nigel and "motivate him" but the fact is that he was hired to do work he was clearly unable to do. He's incompetent and it's not up to Jon or anyone else to change that. It's up to Nigel himself.

    Depends, if Jon is working with Nigel on the project, then he should alert someone senior about what is going on - then it is up to them to take corrective action. By the sound of it Nigel doesn't bother thinking about a design, how it fits the requirement or any other thing. On the other hand, if Jon is not working on the project it comes down to seeing that Nigel isn't up to it, and offering to help. The problem with all of this is that people like Nigel will do all they can to pass the blame to whoever offered them advice. Jon will probably have picked up that Nigel is not a guy to be trusted, either with his word or his programming abilities, and will have made his own conclusions. Some people you just can't motivate - they won't listen, take or seek out advice, or even do a bit of reading. All they will be thinking about is who to blame for their own failures. This guy Nigel - he appears to be someone who has picked up a bit of programming from wherever, and has been let loose on a project where he is way out of his depth. He obviously doesn't have much of a clue about relational database basics, or messaging systems (or even programming in general). And rather than take advice on this, he has gone ahead and just written a total worse-than-failure.

  • Someone (unregistered)

    Anyone else reminded of this bash quote? http://www.bash.org/?240849

Leave a comment on “Noticing Something Strange”

Log In or post as a guest

Replying to comment #241242:

« Return to Article