Click here to Skip to main content
15,886,110 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: Don't Understand why I should move from Office 2007 Pin
PeejayAdams1-Jun-18 5:13
PeejayAdams1-Jun-18 5:13 
GeneralRe: Don't Understand why I should move from Office 2007 Pin
Clifford Nelson1-Jun-18 5:22
Clifford Nelson1-Jun-18 5:22 
GeneralRe: Don't Understand why I should move from Office 2007 Pin
PeejayAdams1-Jun-18 6:01
PeejayAdams1-Jun-18 6:01 
GeneralRe: Don't Understand why I should move from Office 2007 Pin
Clifford Nelson1-Jun-18 16:41
Clifford Nelson1-Jun-18 16:41 
GeneralRe: Don't Understand why I should move from Office 2007 Pin
David A. Gray25-Jun-18 10:58
David A. Gray25-Jun-18 10:58 
GeneralRe: Don't Understand why I should move from Office 2007 Pin
Dr.Walt Fair, PE6-Oct-18 11:45
professionalDr.Walt Fair, PE6-Oct-18 11:45 
AnswerRe: Don't Understand why I should move from Office 2007 Pin
Clifford Nelson16-Oct-18 6:55
Clifford Nelson16-Oct-18 6:55 
GeneralRepurposing VarChar columns Pin
dbrenth23-May-18 2:42
dbrenth23-May-18 2:42 
So I brought our entire system to it's knees yesterday. What did I do? I entered some text into a varchar column in one of our database tables.

Why was that bad? When this column was created it originally held text, but then somebody decided that this text would be better served in a lookup table. Instead of creating a new column for the lookup key (an integer), they simply changed each value in column to its corresponding number in the lookup table.

And then they created views that join the table and lookup table which our company's programs tightly couple to. Microsoft, in their ever unceasing efforts to be helpful says you can join a varchar column to an integer column - so long as EVERY item in the varchar column casts to an integer. But if there is even one row that doesn't cast ... <rant>Why they couldn't cast the integer column to a varchar for us, only Microsoft can answer that.<end rant="">

So, to make a long story short, I added my text as a new lookup item and now there is a number where my text used to be and everything and everybody is happy again.
Brent

GeneralRe: Repurposing VarChar columns Pin
Jörgen Andersson23-May-18 3:43
professionalJörgen Andersson23-May-18 3:43 
GeneralRe: Repurposing VarChar columns Pin
Richard Deeming23-May-18 4:19
mveRichard Deeming23-May-18 4:19 
GeneralRe: Repurposing VarChar columns Pin
Jörgen Andersson23-May-18 5:55
professionalJörgen Andersson23-May-18 5:55 
GeneralRe: Repurposing VarChar columns Pin
Eddy Vluggen25-May-18 1:32
professionalEddy Vluggen25-May-18 1:32 
GeneralRe: Repurposing VarChar columns Pin
Jörgen Andersson28-May-18 0:41
professionalJörgen Andersson28-May-18 0:41 
GeneralRe: Repurposing VarChar columns Pin
Eddy Vluggen28-May-18 0:48
professionalEddy Vluggen28-May-18 0:48 
GeneralRe: Repurposing VarChar columns Pin
Jörgen Andersson28-May-18 0:49
professionalJörgen Andersson28-May-18 0:49 
GeneralRe: Repurposing VarChar columns Pin
PeejayAdams23-May-18 5:35
PeejayAdams23-May-18 5:35 
GeneralRe: Repurposing VarChar columns Pin
GuyThiebaut24-May-18 21:10
professionalGuyThiebaut24-May-18 21:10 
GeneralRe: Repurposing VarChar columns Pin
David A. Gray25-Jun-18 11:05
David A. Gray25-Jun-18 11:05 
GeneralRe: Repurposing VarChar columns Pin
GuyThiebaut25-Jun-18 20:31
professionalGuyThiebaut25-Jun-18 20:31 
GeneralRe: Repurposing VarChar columns Pin
David A. Gray26-Jun-18 6:23
David A. Gray26-Jun-18 6:23 
Questionreassigning static variable Pin
Eytukan22-May-18 1:02
Eytukan22-May-18 1:02 
AnswerRe: reassigning static variable Pin
KarstenK22-May-18 1:11
mveKarstenK22-May-18 1:11 
GeneralRe: reassigning static variable Pin
Eytukan22-May-18 1:12
Eytukan22-May-18 1:12 
GeneralRe: reassigning static variable Pin
Eddy Vluggen22-May-18 1:37
professionalEddy Vluggen22-May-18 1:37 
GeneralRe: reassigning static variable Pin
Eytukan22-May-18 1:39
Eytukan22-May-18 1:39 

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.