Click here to Skip to main content
15,896,063 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.

 
JokeRe: Bool expression?? Pin
BadKarma8-Feb-08 4:16
BadKarma8-Feb-08 4:16 
GeneralRe: Bool expression?? Pin
AEternal8-Feb-08 4:34
AEternal8-Feb-08 4:34 
GeneralRe: Bool expression?? PinPopular
PIEBALDconsult8-Feb-08 6:53
mvePIEBALDconsult8-Feb-08 6:53 
GeneralRe: Bool expression?? Pin
Vasudevan Deepak Kumar14-Feb-08 3:39
Vasudevan Deepak Kumar14-Feb-08 3:39 
GeneralRe: Bool expression?? Pin
Michael P. Scherer13-Feb-08 11:05
Michael P. Scherer13-Feb-08 11:05 
GeneralRe: Bool expression?? Pin
BadKarma13-Feb-08 21:19
BadKarma13-Feb-08 21:19 
GeneralRe: Bool expression?? Pin
Vasudevan Deepak Kumar14-Feb-08 3:40
Vasudevan Deepak Kumar14-Feb-08 3:40 
GeneralRe: Bool expression?? Pin
codemunch8-Feb-08 6:49
codemunch8-Feb-08 6:49 
It IS that horrible when you join a project and the other "experienced" consultant is writing a pile of redundant crap like that:

if(x == true)
{
control.Enabled = true;
}
else
{
control.Enabled = false;
}

The above adds an extra comparison operation in addition to being ugly. Besides, as someone already mentioned, How will the juniors ever progress?
Forgiveable for the OP though Smile | :)

The project i joined has a metric buttload of that garbage. Even worse is these guys "architected" classes without methods (can you say pre-OOP structures boys & girls?) and then created a function library (which they called a "fascade" and is NOTHING like the fascade design pattern) where you pass in an instance of this methodless "class" to the method of a fascade class to do work on it (i.e. persist it). The reasoning? They thought adding methods to the class would make it too slow. It has been a rollercoaster of emoticons.
OMG | :OMG: WTF | :WTF: Mad | :mad: Sigh | :sigh: Cry | :(( Roll eyes | :rolleyes:

e.g.

class Person
{
public string FirstName;
public string LastName;
}

class PersonFascade
{
public void InsertPerson(Person p) { /* do stuff */ }
public void UpdatePerson(Person p) { /* do stuff */ }
public void DeletePerson(Person p) { /* do stuff */ }
}
GeneralRe: Bool expression?? Pin
Tristan Rhodes11-Feb-08 22:08
Tristan Rhodes11-Feb-08 22:08 
GeneralRe: Bool expression?? Pin
codemunch12-Feb-08 6:51
codemunch12-Feb-08 6:51 
GeneralRe: Bool expression?? Pin
Erich Ledesma8-Feb-08 8:52
Erich Ledesma8-Feb-08 8:52 
GeneralRe: Bool expression?? Pin
dojohansen12-Feb-08 3:18
dojohansen12-Feb-08 3:18 
GeneralRe: Bool expression?? Pin
Paddy Boyd8-Feb-08 4:51
Paddy Boyd8-Feb-08 4:51 
GeneralRe: Bool expression?? Pin
leppie8-Feb-08 5:51
leppie8-Feb-08 5:51 
GeneralRe: Bool expression?? Pin
Sean Williams11-Feb-08 20:51
Sean Williams11-Feb-08 20:51 
GeneralRe: Bool expression?? Pin
Sean Williams11-Feb-08 20:53
Sean Williams11-Feb-08 20:53 
GeneralRe: Bool expression?? Pin
Sean Williams11-Feb-08 20:57
Sean Williams11-Feb-08 20:57 
GeneralRe: Bool expression?? Pin
dojohansen12-Feb-08 3:22
dojohansen12-Feb-08 3:22 
GeneralRe: Bool expression?? Pin
Paul Conrad17-Feb-08 6:50
professionalPaul Conrad17-Feb-08 6:50 
GeneralRe: Bool expression?? Pin
PIEBALDconsult2-Apr-08 8:00
mvePIEBALDconsult2-Apr-08 8:00 
GeneralChildhood coding PinPopular
Daniel 'Tak' M.6-Feb-08 16:20
Daniel 'Tak' M.6-Feb-08 16:20 
GeneralRe: Childhood coding Pin
Pete O'Hanlon6-Feb-08 21:54
mvePete O'Hanlon6-Feb-08 21:54 
GeneralRe: Childhood coding Pin
NormDroid7-Feb-08 0:18
professionalNormDroid7-Feb-08 0:18 
GeneralRe: Childhood coding Pin
Dan Neely7-Feb-08 2:16
Dan Neely7-Feb-08 2:16 
GeneralRe: Childhood coding Pin
ClementsDan7-Feb-08 5:21
ClementsDan7-Feb-08 5:21 

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.