Click here to Skip to main content
15,887,371 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Simply not Normalisation Cricket. Pin
Florin Jurcovici17-Dec-11 4:05
Florin Jurcovici17-Dec-11 4:05 
GeneralRe: Simply not Normalisation Cricket. Pin
Brady Kelly17-Dec-11 4:10
Brady Kelly17-Dec-11 4:10 
GeneralRe: Simply not Normalisation Cricket. Pin
interarticle17-Dec-11 22:22
interarticle17-Dec-11 22:22 
GeneralRe: Simply not Normalisation Cricket. Pin
Tom Chantler16-Dec-11 1:54
professionalTom Chantler16-Dec-11 1:54 
GeneralRe: Simply not Normalisation Cricket. Pin
Klae16-Dec-11 4:45
Klae16-Dec-11 4:45 
GeneralRe: Simply not Normalisation Cricket. Pin
A_WoodApple16-Dec-11 5:56
A_WoodApple16-Dec-11 5:56 
GeneralRe: Simply not Normalisation Cricket. Pin
Florin Jurcovici17-Dec-11 4:12
Florin Jurcovici17-Dec-11 4:12 
GeneralRe: Simply not Normalisation Cricket. Pin
Allan Thomas17-Dec-11 1:47
Allan Thomas17-Dec-11 1:47 
While I agree that the database design is less than optimal point number 2 might actually be a good database design (despite who implemented it).

There are a lot of times that information is duplicated in other records because it's that important for the smooth running of the system. Lets take the number enrolled students and consider what happens if someone removes one student from the database.

First if you were just counting the number of records then anyone accessing the records would have the results change on them and if you are running KPI's or any sort of reporting function over this information it will lead to inconsistant information from the system (i.e. you print a report last week and it says x students attended exams and this week it says y you then go WTF).

Secondly from an auditing point of view there are probably legal or regulation requirements on keeping track of the number of students attending exams (assuming the processes keep that information up to date) and once that information is entered it's locked. A great example is tax. Would you like it if the tax that gets taken out of your pay to be a calculated value? 'Hey Keith I know you did a bit of overtime this week so your tax rate went up, oh and by the way you won't get paid next week because the tax department says you have an outstanding amout that you owe them.'.

The last reason is if there are two fields that are supposed to hold the same information but don't then people will start asking a lot of questions. Since this will occur immediately after a process has failed you have the ability to trace the issue while people can still remember what they have been doing recently. Trying to track down a problem way, way after the time it has occured it a real pain in the butt.

PS: I feel your pain but I've had to 'upgrade' a few critical systems built in access where code for directly changing the database was embedded in each form and if there was two processes for entering information then there was two different forms with the code copied and pasted. Trying to reduce it to one logical process was interesting since there were a lot of if statements with multiple places where it reads and writes to the database was ..... interesting.
GeneralConverting a string to an int PinPopular
Shameel13-Dec-11 8:19
professionalShameel13-Dec-11 8:19 
GeneralRe: Converting a string to an int PinPopular
GibbleCH13-Dec-11 10:09
GibbleCH13-Dec-11 10:09 
GeneralRe: Converting a string to an int Pin
Shameel13-Dec-11 17:47
professionalShameel13-Dec-11 17:47 
GeneralRe: Converting a string to an int Pin
PIEBALDconsult13-Dec-11 15:48
mvePIEBALDconsult13-Dec-11 15:48 
GeneralRe: Converting a string to an int Pin
Shameel13-Dec-11 17:53
professionalShameel13-Dec-11 17:53 
GeneralRe: Converting a string to an int Pin
PIEBALDconsult14-Dec-11 1:49
mvePIEBALDconsult14-Dec-11 1:49 
GeneralRe: Converting a string to an int Pin
Rob Grainger15-Dec-11 22:34
Rob Grainger15-Dec-11 22:34 
GeneralRe: Converting a string to an int Pin
_Damian S_13-Dec-11 15:50
professional_Damian S_13-Dec-11 15:50 
GeneralRe: Converting a string to an int Pin
Shameel13-Dec-11 17:54
professionalShameel13-Dec-11 17:54 
GeneralRe: Converting a string to an int Pin
_Damian S_13-Dec-11 19:42
professional_Damian S_13-Dec-11 19:42 
GeneralRe: Converting a string to an int PinPopular
BobJanova13-Dec-11 23:29
BobJanova13-Dec-11 23:29 
GeneralRe: Converting a string to an int Pin
PIEBALDconsult14-Dec-11 1:51
mvePIEBALDconsult14-Dec-11 1:51 
GeneralRe: Converting a string to an int Pin
Shameel14-Dec-11 3:41
professionalShameel14-Dec-11 3:41 
GeneralRe: Converting a string to an int Pin
BobJanova14-Dec-11 3:50
BobJanova14-Dec-11 3:50 
RantDocumentation failure PinPopular
DerekT-P13-Dec-11 3:17
professionalDerekT-P13-Dec-11 3:17 
GeneralRe: Documentation failure Pin
GibbleCH13-Dec-11 4:29
GibbleCH13-Dec-11 4:29 
GeneralRe: Documentation failure Pin
DerekT-P13-Dec-11 4:52
professionalDerekT-P13-Dec-11 4:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.