Click here to Skip to main content
13,803,390 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 6:13
memberPeejayAdams1-Jun-18 6:13 
GeneralRe: Don't Understand why I should move from Office 2007 Pin
Clifford Nelson1-Jun-18 6:22
mvpClifford Nelson1-Jun-18 6:22 
GeneralRe: Don't Understand why I should move from Office 2007 Pin
PeejayAdams1-Jun-18 7:01
memberPeejayAdams1-Jun-18 7:01 
GeneralRe: Don't Understand why I should move from Office 2007 Pin
Clifford Nelson1-Jun-18 17:41
mvpClifford Nelson1-Jun-18 17:41 
GeneralRe: Don't Understand why I should move from Office 2007 Pin
David A. Gray25-Jun-18 11:58
memberDavid A. Gray25-Jun-18 11:58 
GeneralRe: Don't Understand why I should move from Office 2007 Pin
Walt Fair, Jr.6-Oct-18 12:45
professionalWalt Fair, Jr.6-Oct-18 12:45 
AnswerRe: Don't Understand why I should move from Office 2007 Pin
Clifford Nelson16-Oct-18 7:55
mvpClifford Nelson16-Oct-18 7:55 
GeneralRepurposing VarChar columns Pin
dbrenth23-May-18 3:42
memberdbrenth23-May-18 3: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 4:43
protectorJörgen Andersson23-May-18 4:43 
GeneralRe: Repurposing VarChar columns Pin
Richard Deeming23-May-18 5:19
mvpRichard Deeming23-May-18 5:19 
GeneralRe: Repurposing VarChar columns Pin
Jörgen Andersson23-May-18 6:55
protectorJörgen Andersson23-May-18 6:55 
GeneralRe: Repurposing VarChar columns Pin
Eddy Vluggen25-May-18 2:32
professionalEddy Vluggen25-May-18 2:32 
GeneralRe: Repurposing VarChar columns Pin
Jörgen Andersson28-May-18 1:41
protectorJörgen Andersson28-May-18 1:41 
GeneralRe: Repurposing VarChar columns Pin
Eddy Vluggen28-May-18 1:48
professionalEddy Vluggen28-May-18 1:48 
GeneralRe: Repurposing VarChar columns Pin
Jörgen Andersson28-May-18 1:49
protectorJörgen Andersson28-May-18 1:49 
GeneralRe: Repurposing VarChar columns Pin
PeejayAdams23-May-18 6:35
memberPeejayAdams23-May-18 6:35 
GeneralRe: Repurposing VarChar columns Pin
GuyThiebaut24-May-18 22:10
professionalGuyThiebaut24-May-18 22:10 
GeneralRe: Repurposing VarChar columns Pin
David A. Gray25-Jun-18 12:05
memberDavid A. Gray25-Jun-18 12:05 
GeneralRe: Repurposing VarChar columns Pin
GuyThiebaut25-Jun-18 21:31
professionalGuyThiebaut25-Jun-18 21:31 
GeneralRe: Repurposing VarChar columns Pin
David A. Gray26-Jun-18 7:23
memberDavid A. Gray26-Jun-18 7:23 
Questionreassigning static variable Pin
Eytukan22-May-18 2:02
memberEytukan22-May-18 2:02 
AnswerRe: reassigning static variable Pin
KarstenK22-May-18 2:11
mvpKarstenK22-May-18 2:11 
GeneralRe: reassigning static variable Pin
Eytukan22-May-18 2:12
memberEytukan22-May-18 2:12 
GeneralRe: reassigning static variable Pin
Eddy Vluggen22-May-18 2:37
professionalEddy Vluggen22-May-18 2:37 
GeneralRe: reassigning static variable Pin
Eytukan22-May-18 2:39
memberEytukan22-May-18 2: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.


Advertise | Privacy | Cookies | Terms of Service
Web06 | 2.8.181215.1 | Last Updated 18 Dec 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid