Click here to Skip to main content
15,888,212 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: Must....not....kill.... Pin
Eddy Vluggen30-Oct-18 5:32
professionalEddy Vluggen30-Oct-18 5:32 
GeneralRe: Must....not....kill.... Pin
den2k8830-Oct-18 5:33
professionalden2k8830-Oct-18 5:33 
GeneralRe: Must....not....kill.... Pin
Slacker00730-Oct-18 5:35
professionalSlacker00730-Oct-18 5:35 
GeneralRe: Must....not....kill.... Pin
Marc Clifton30-Oct-18 5:57
mvaMarc Clifton30-Oct-18 5:57 
GeneralRe: Must....not....kill.... Pin
Gary Wheeler31-Oct-18 6:36
Gary Wheeler31-Oct-18 6:36 
GeneralRe: Must....not....kill.... Pin
charlieg30-Oct-18 11:13
charlieg30-Oct-18 11:13 
GeneralRe: Must....not....kill.... Pin
Marc Clifton1-Nov-18 3:25
mvaMarc Clifton1-Nov-18 3:25 
GeneralRe: Must....not....kill.... Pin
Bernhard Hiller30-Oct-18 22:02
Bernhard Hiller30-Oct-18 22:02 
No no no! Do not change that, you'll break it!
Don't you see that the other fields in that row of the table might change between queries? There's no transaction around these queries after all!
And also the id parameter might change between queries, if a different process has write access to it.
Oh, another thing: are you sure that the id column of the table is unique?
So many things could go wrong with your refactoring. Better don't do that! You cannot find out what the original developer thought when he wrote that code thanks to a lack of proper documentation.
Big Grin | :-D
Oh sanctissimi Wilhelmus, Theodorus, et Fredericus!

GeneralRe: Must....not....kill.... Pin
Marc Clifton1-Nov-18 3:25
mvaMarc Clifton1-Nov-18 3:25 
GeneralRe: Must....not....kill.... Pin
paulcookie31-Oct-18 23:01
professionalpaulcookie31-Oct-18 23:01 
GeneralRe: Must....not....kill.... Pin
Tomaž Štih1-Nov-18 0:41
Tomaž Štih1-Nov-18 0:41 
GeneralRe: Must....not....kill.... Pin
Marc Clifton1-Nov-18 3:28
mvaMarc Clifton1-Nov-18 3:28 
GeneralRe: Must....not....kill.... Pin
Tomaž Štih1-Nov-18 23:37
Tomaž Štih1-Nov-18 23:37 
GeneralRe: Must....not....kill.... Pin
englebart1-Nov-18 3:42
professionalenglebart1-Nov-18 3:42 
GeneralRe: Must....not....kill.... Pin
agolddog1-Nov-18 3:42
agolddog1-Nov-18 3:42 
GeneralRe: Must....not....kill.... Pin
KBZX50004-Nov-18 23:36
KBZX50004-Nov-18 23:36 
GeneralRe: Must....not....kill.... Pin
irneb8-Nov-18 22:52
irneb8-Nov-18 22:52 
GeneralRe: Must....not....kill.... Pin
C Pottinger5-Dec-18 13:51
C Pottinger5-Dec-18 13:51 
GeneralC# interpolated string, JavaScript template literal Pin
raddevus29-Oct-18 2:58
mvaraddevus29-Oct-18 2:58 
GeneralRe: C# interpolated string, JavaScript template literal Pin
  Forogar  29-Oct-18 3:08
professional  Forogar  29-Oct-18 3:08 
GeneralRe: C# interpolated string, JavaScript template literal Pin
raddevus29-Oct-18 3:21
mvaraddevus29-Oct-18 3:21 
GeneralRe: C# interpolated string, JavaScript template literal Pin
Marc Clifton29-Oct-18 4:22
mvaMarc Clifton29-Oct-18 4:22 
GeneralRe: C# interpolated string, JavaScript template literal Pin
raddevus29-Oct-18 4:52
mvaraddevus29-Oct-18 4:52 
GeneralRe: C# interpolated string, JavaScript template literal Pin
Richard Deeming29-Oct-18 8:52
mveRichard Deeming29-Oct-18 8:52 
GeneralRe: C# interpolated string, JavaScript template literal Pin
raddevus29-Oct-18 10:00
mvaraddevus29-Oct-18 10:00 

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.