Comment On Noticing Something Strange

Jon works for a small company that sells electronic biofeedback monitors and provides a website that allows customers (mainly health professionals) to upload and interpret the collected data. Not too long ago, they hired an "experienced web developer" named Nigel to help on the web-end of things. After a few weeks of minor site maintenance tasks, Nigel was given his first real feature to implement: a notification system. The Spec [expand full text]
« PrevPage 1 | Page 2Next »

Re: Noticing Something Strange

2009-01-27 11:08 • by monkeyPushButton (unregistered)
The real WTF is the lack of closing tag for the <h2>, right?

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

Re: Noticing Something Strange

2009-01-27 11:09 • by AndyL (unregistered)
In before the 30th comment!

Re: Noticing Something Strange

2009-01-27 11:10 • by Drew (unregistered)
There are no unread comments in your inbox

Re: Noticing Something Strange

2009-01-27 11:10 • by Yazeran (unregistered)
Wow!

Although I have personally made some bizarre database tables that one takes the record (*dum dum tsh*).

I could understand the first approximation about only 30 active notices, but designing a database with a hard limit on the total notices, that's just plain stupid.

The add the gem about no messages to display......

Some people should just simply not be let near a computer let alone a compiler/database...

Yours Yazeran

Re: Noticing Something Strange

2009-01-27 11:11 • by Piercy (unregistered)
<table>
<tr>
<td colspan="5">
<h2>There are no unread messages in your comments
</td>
</tr>
</table>

Re: Noticing Something Strange

2009-01-27 11:23 • by MainCoder (unregistered)
Not really a WTF. Table limited to 30 notices? Yeah, but who cares. I will work and it'll just become one of those quirks that every system has. Always saying no messages? The feature was simply not yet implemented. Just something to do with a few hours to spare.

Re: Noticing Something Strange

2009-01-27 11:36 • by Zecc
<obvious two weeks notice joke />

Re: Noticing Something Strange

2009-01-27 11:39 • by Anonymous (unregistered)
So half the implementation was crap and the other half was non-existent. Don't know about anywhere else but that sounds like a regular day at the office round here.

Re: Noticing Something Strange

2009-01-27 11:40 • by Paul Berry (unregistered)
You can normalise someone with a steamroller, right?

::)

Re: Noticing Something Strange

2009-01-27 11:43 • by alomondo (unregistered)
Is this a true story?

Re: Noticing Something Strange

2009-01-27 11:50 • by Dazed (unregistered)
Did Nigel have a sister called Paula?

Re: Noticing Something Strange

2009-01-27 11:50 • by My Freaking Goodness! (unregistered)
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.

Re: Noticing Something Strange

2009-01-27 11:56 • by ThomasP (unregistered)
241143 in reply to 241123
AndyL:
In before the 30th comment!


You should have waited, your post will be reused when everyone gets on here for their lunch break.

Re: Noticing Something Strange

2009-01-27 12:02 • by groogs (unregistered)
Why is building a system like this that is limited to 30 notices, and requires re-use considered OK?

This is the kind of decision that leads to a WTF being posted 6 to 12 months from now, after someone has modified this system (eg, to have a log what notices users saw and accepted) using the same type of dumb design, and then a real developer comes in to see why it isn't working.

This is just short sighted, and someone designing this should be ridiculed on here. So should the developer that approves the design.

Re: Noticing Something Strange

2009-01-27 12:02 • by Jim (unregistered)
If this guy had any skill he would have just implemented the whole thing in two Javascript arrays. What a retard.

Re: Noticing Something Strange

2009-01-27 12:03 • by Sutherlands
241148 in reply to 241140
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.

All tinyints, obviously. At least I got that much out of the article.

Re: Noticing Something Strange

2009-01-27 12:07 • by 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.

Re: Noticing Something Strange

2009-01-27 12:12 • by citricsquid (unregistered)
241152 in reply to 241150
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.


This.
I'd employ Nigel.

Re: Noticing Something Strange

2009-01-27 12:23 • by Jauco (unregistered)
So... Basically Nigel was asked to implement e-mail right?

Re: Noticing Something Strange

2009-01-27 12:31 • by AdT (unregistered)
No one will ever need more than 30 notices.

Or zero for that matter.

PS: I'm waiting for the comments explaining how this was a perfectly acceptable use of database denormalization / disintegration.

Re: Noticing Something Strange

2009-01-27 12:33 • by Anon (unregistered)
241161 in reply to 241146
groogs:
Why is building a system like this that is limited to 30 notices, and requires re-use considered OK?


Because management doesn't understand what is possible and the developer tells them that this is the only way it can be done.

Re: Noticing Something Strange

2009-01-27 12:43 • by Ratchetr (unregistered)
241165 in reply to 241140
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.

Nigel prefers the many to many but not too many design pattern. Takes fewer resources.

Re: Noticing Something Strange

2009-01-27 12:49 • by Quango
241169 in reply to 241147
Jim:
If this guy had any skill he would have just implemented the whole thing in two Javascript arrays. What a retard.


Missing smiley I assume?

Re: Noticing Something Strange

2009-01-27 12:51 • by Crabs (unregistered)
241171 in reply to 241156
Jauco:
So... Basically Nigel was asked to implement e-mail right?


Sort of. There is use in it. The company can't guarantee the user checks their e-mail before using their site. They can guarantee, however, that the notices show up before the user can do anything else on their site. This could be a useful feature.

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.

Re: Noticing Something Strange

2009-01-27 12:56 • by clickey McClicker (unregistered)
241172 in reply to 241150
valerion:
Sorry, but you guys are all wrong - Nigel was, actually, a genius.

Could be he left the company because he found top management using offshore banks for something odd and decided to bail first (very possible these days). Any word on his stock options?

He got out so fast leaving all the code in an unpolished state. Had he used comments it would have been plain to see how this part fit into the grand final project which would have been a work to behold.

Genius, obviously!

Re: Noticing Something Strange

2009-01-27 12:58 • by clickey McClicker (unregistered)
241173 in reply to 241171
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.


But will it fit in the 640k of ram?

Re: Noticing Something Strange

2009-01-27 13:00 • by Quantum Mechanic (unregistered)
It's hard to say if Nigel was in over his head or a @#$% con-artist who knew exactly what he was doing. Cripes!

Re: Noticing Something Strange

2009-01-27 13:20 • by Fixmyship (unregistered)
Obviously he was going to use the IDXX to store 1 message per user and find it by constructing an id in base 30 - up to (30^30) 2.05 * 10^44 notices in the system total.

A reasonable solution would be 6 notices per customer - a total of (30^5) 24 300 000 notices possible in the system.

Re: Noticing Something Strange

2009-01-27 13:22 • by derobert
I'm not sure why everyone is so upset about the database design.

Hypothetically, if the page could display at most fifteen notices, the database design could scale to twice the current usage. While not great scalability, it's still something.

If the page displayed at most two notices, the database would have 15 times scalability. That's pretty impressive.

But this design is better. The limit (from the positive side) as the number of alerts displayed by the page approaches 0 is unbounded; that is to say that this design has infinite scalability, without additional hardware. That's damned impressive.

We should all aspire the to standards set by Nigel.

Re: Noticing Something Strange

2009-01-27 13:35 • by 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
We're only making plans for Nigel
Nigel just needs this helping hand
And if young Nigel says he's happy
He must be happy
He must be happy in his work
We're only making plans for Nigel
He has his future in British Steel
We're only making plans for Nigel
Nigel's whole future is as good as sealed
And if young Nigel says he's happy
He must be happy
He must be happy in his work
Nigel is not outspoken
But he likes to speak
And loves to be spoken to
Nigel is happy in his work
We're only making plans for Nigel"

On the other hand, British Steel isn't looking too clever these days, either.

I look forward to receiving Nigel's CV someday:

"Implemented clone of entire email system using only Tinyints..."

Re: Noticing Something Strange

2009-01-27 13:45 • by Anonymous (unregistered)
241185 in reply to 241130
MainCoder:
Not really a WTF. Table limited to 30 notices? Yeah, but who cares. I will work and it'll just become one of those quirks that every system has. Always saying no messages? The feature was simply not yet implemented. Just something to do with a few hours to spare.


You... you're being sarcastic, right? This whole project is like a 2 hour job at most, and that's without any stupid limitations like a 30 notice maximum.

Re: Noticing Something Strange

2009-01-27 13:48 • by CynicalTyler (unregistered)
he opened up the code file expecting some incredibly clever code
Idiot.

Re: Noticing Something Strange

2009-01-27 13:56 • by mh (unregistered)
From such small seeds do Enterprise systems grow. Scoff ye not! SAP may have started out like this (...actually...)

Re: Noticing Something Strange

2009-01-27 14:01 • by CaRL (unregistered)
system was to allow management to communicate with customers about new products

So, basically, the manager said "Make me a SPAMbot, but force the customers to read my drivel."

When developers / managers get that arrogant, it makes me wonder if it is time to legalize more forms of torture. But, lacking that, if we can put the most clueless developers to work writing this stuff it should at least slow these jerks down somewhat.

Re: Noticing Something Strange

2009-01-27 14:20 • by bob (unregistered)
The real take away here is that not all coders can design a database. I've even seen competent coders produce similar schemas -- it's a separate skill.

God have mercy on the incompetent.

Re: Noticing Something Strange

2009-01-27 14:34 • by WC (unregistered)
241193 in reply to 241171
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.


But only 1 at a time.

Re: Noticing Something Strange

2009-01-27 15:08 • by Aaron
241195 in reply to 241189
CaRL:
So, basically, the manager said "Make me a SPAMbot, but force the customers to read my drivel."

When developers / managers get that arrogant, it makes me wonder if it is time to legalize more forms of torture. But, lacking that, if we can put the most clueless developers to work writing this stuff it should at least slow these jerks down somewhat.

Interesting theory. Wrong, but interesting. It's entirely legal for businesses to send direct mail to customers with pre-existing business relationships (which is obviously the case here), and this isn't even direct mail. Nobody is being forced to log in and read the notices. If a customer decides to sever the relationship, he will never see a notice, ever.

I'll bet that you're one of those people who are against all forms of advertising, aren't you?

Re: Noticing Something Strange

2009-01-27 15:19 • by Lego (unregistered)
241196 in reply to 241169
Quango:
Jim:
If this guy had any skill he would have just implemented the whole thing in two Javascript arrays. What a retard.


Missing smiley I assume?

Nah, this looks like TopCod3r in disguise!

Re: Noticing Something Strange

2009-01-27 16:06 • by (Visitor) (unregistered)
Unbelivable.

Re: Noticing Something Strange

2009-01-27 16:08 • by undrline
The whole acknowledgment thing seems like an awkward set of specs.
You're showing the user a notice,
but, you allow them to get rid of the notice by acknowledging it,
but, you don't make it such that the user *must* acknowledge it once they've seen it
and, you don't keep a record of what has been acknowledged.

Also, there's no description of how a notice gets entered. It could very well be that there is a stock set of thirty generic notices that were set up to choose from.

It seems that the no new messages page is most likely a default page, and a placeholder.

I think it's clear that the guy just hadn't finished, and was working with inadequate information to get his job done.

Re: Noticing Something Strange

2009-01-27 16:19 • by sxeraverx (unregistered)
241205 in reply to 241191
Last summer I worked at a place like this. The DBA was actually coder who was in reality a biologist. "Sure, normalization's nice and all, but this works. Besides, there's no time for a complete rewrite." Loads of tables named "temp_x_1", "temp_X_1", "temp_X1", etc., most of which held exactly two rows and about 50 columns.

Re: Noticing Something Strange

2009-01-27 16:28 • by PuffyJacket69 (unregistered)
241207 in reply to 241203
undrline:
The whole acknowledgment thing seems like an awkward set of specs.
You're showing the user a notice,
but, you allow them to get rid of the notice by acknowledging it,
but, you don't make it such that the user *must* acknowledge it once they've seen it
and, you don't keep a record of what has been acknowledged.

Also, there's no description of how a notice gets entered. It could very well be that there is a stock set of thirty generic notices that were set up to choose from.

It seems that the no new messages page is most likely a default page, and a placeholder.

I think it's clear that the guy just hadn't finished, and was working with inadequate information to get his job done.



This was what I was thinking after I read the article...

kind of a lame wtf...

Re: Noticing Something Strange

2009-01-27 16:37 • by Jimbo (unregistered)
The lack of comments here (even of the normal Grammar-Nazi style) speaks volumes for what people thought of this one.

Sounds to me like there were 30 TYPES of messages...

Re: Noticing Something Strange

2009-01-27 16:39 • by BadBaby13 (unregistered)
241211 in reply to 241171
Crabs:
Jauco:
So... Basically Nigel was asked to implement e-mail right?


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.


Actually, if you wanna get technical about it... you could build a whole database system, serialize it and store it in the notice text of one of the notices. If the text had a memory constraint.. you could serialize the database system you wrote across several message texts ordered by ID.

Not only would this solution allow you to create as vibrant and perfect of a normalized design entirely seperate from the restrictions that you might have gotten stuck with from the initial database design, but it would also allow you to make as many users and messages as memory would allow!

I have used this technique many times, and actually have a standard library that allows me to do it in no time. Pray that none of you EVER run across a system I have maintained!

also - we have to give nigel the benefit of the doubt. depending on the orm software nigels managers might have liked - the database might be perfect just the way it is!

Mwahahahahaha!

Re: Noticing Something Strange

2009-01-27 17:13 • by misc (unregistered)
241215 in reply to 241130
Not really a WTF!? Are you effin kidding me.

Re: Noticing Something Strange

2009-01-27 17:16 • by pink_fairy
241216 in reply to 241205
sxeraverx:
Last summer I worked at a place like this. The DBA was actually coder who was in reality a biologist. "Sure, normalization's nice and all, but this works. Besides, there's no time for a complete rewrite." Loads of tables named "temp_x_1", "temp_X_1", "temp_X1", etc., most of which held exactly two rows and about 50 columns.
Ah yes, "Third Cretinised Form." It's quite normal around here.

0th Cretinised Form: A flat file, named "temp". Optionally, this may be stored on "/tmp" or "C:\Temp".

1st Cretinised Form: One file is not enough for squillions of Bits-O-Data. Make more files: "temp_x", "temp_xx", or (for the truly naughty) "temp_xxx".

2nd Cretinised Form: Separation of implied function. Who can tell what relationship "temp_xxxxxxxx_swalk" has to "temp_x_f*off"? Add a primary key for ordinality (yes yes, I know this should have been done first. We're talking cretins, here): "temp_x_1", "temp_x_2", etc.

3rd Cretinised Form: Oh look, there's a caps key on my keyboard. Great! There's a semantic difference here, but I'm not going to tell you what it is.

Just a small Codd joke.

Anyway, who the heck needs tables? Unless they're wooden.

Re: Noticing Something Strange

2009-01-27 17:30 • by Curious (unregistered)
Is the original poster on here? I'd love to know how long it took Nigel to come up with this. The "There are no notices" messages is sort of understandable if this was all the work he had completed after one day. It's a little less forgivable if this was the totality of his work after six months.

Re: Noticing Something Strange

2009-01-27 17:44 • by Andyman (unregistered)
241220 in reply to 241171
Nice, had not thought about that...

Re: Noticing Something Strange

2009-01-27 17:46 • by Government Steering Committee (unregistered)
241221 in reply to 241169
Quango:
Jim:
If this guy had any skill he would have just implemented the whole thing in two Javascript arrays. What a retard.


Missing smiley I assume?


I assumed that the Internet was not limited to Americans and that not spelling out the sarcasm for every Tom, Dick and Retard was his way of fighting the ever-increasing stupidity prevalent on the Internet today.

;) <-happy?

Re: Noticing Something Strange

2009-01-27 17:51 • by Downfall (unregistered)
Nigel, please.
« PrevPage 1 | Page 2Next »

Add Comment