Click here to Skip to main content
15,906,463 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: I frequently type un-compilable code or comments to myself... Pin
BillW3322-Apr-11 10:09
professionalBillW3322-Apr-11 10:09 
GeneralRe: I frequently type un-compilable code or comments to myself... Pin
StM0n8-Apr-11 22:33
StM0n8-Apr-11 22:33 
GeneralRe: I frequently type un-compilable code or comments to myself... Pin
BobJanova15-Apr-11 3:23
BobJanova15-Apr-11 3:23 
GeneralNew trend at work... Pin
Sander Rossel6-Apr-11 3:05
professionalSander Rossel6-Apr-11 3:05 
GeneralRe: New trend at work... Pin
Luc Pattyn6-Apr-11 6:37
sitebuilderLuc Pattyn6-Apr-11 6:37 
GeneralRe: New trend at work... Pin
Sander Rossel6-Apr-11 7:26
professionalSander Rossel6-Apr-11 7:26 
AnswerRe: New trend at work... Pin
Luc Pattyn6-Apr-11 15:12
sitebuilderLuc Pattyn6-Apr-11 15:12 
GeneralRe: New trend at work... Pin
Sander Rossel6-Apr-11 19:50
professionalSander Rossel6-Apr-11 19:50 
That is not a bad idea at all!
Of course it would be:
VB
manager.AddToManager("String1", New ListInterfaceClass({New Example1, New Example2, New Example3}))


Your second option would once again require a dependency between ManagerClass and ListInterfaceClass. It is probably going to be like that anyway, because my boss wants it, but that would result in having to rewrite or at least recheck the ManagerClass once the ListInterfaceClass changes or is made obsolete. And that happens a lot in our company...

Besides, I recently showed something like that to my boss:
VB
Dim something as New Class4(New Class3(New Class2(New Class1)))

His reply was "This looks really weird, did you just make that up? In all my seven years of experience I have never ever seen anything like that and Microsoft does not do that for sure!" then he started yelling and saying "You read some articles on the internet and think you know it all, but I have seven years of experience! You have obviously not understood anything if you make code like that!" I was speechless....

Maybe I posted this thread in the wrong forum. Although the 'less code is better' mentality is still something to be ashamed off. At least the way it is currently implemented (I know of a much worse example, but that would be to much to type here) Wink | ;)
It's an OO world.

GeneralRe: New trend at work... Pin
TorstenFrings13-Apr-11 23:27
TorstenFrings13-Apr-11 23:27 
GeneralRe: New trend at work... Pin
Sander Rossel14-Apr-11 23:49
professionalSander Rossel14-Apr-11 23:49 
GeneralLogics is really hard to learn PinPopular
Vladimir Svyatski5-Apr-11 22:16
professionalVladimir Svyatski5-Apr-11 22:16 
GeneralRe: Logics is really hard to learn [modified] Pin
musefan6-Apr-11 0:31
musefan6-Apr-11 0:31 
AnswerRe: Logics is really hard to learn Pin
Eddy Vluggen6-Apr-11 2:33
professionalEddy Vluggen6-Apr-11 2:33 
GeneralRe: Logics is really hard to learn Pin
musefan6-Apr-11 3:22
musefan6-Apr-11 3:22 
GeneralRe: Logics is really hard to learn Pin
Eddy Vluggen6-Apr-11 20:55
professionalEddy Vluggen6-Apr-11 20:55 
GeneralRe: Logics is really hard to learn Pin
Jyothikarthik_N7-Apr-11 3:52
Jyothikarthik_N7-Apr-11 3:52 
GeneralRe: Logics is really hard to learn Pin
Liju Sankar7-Apr-11 22:11
Liju Sankar7-Apr-11 22:11 
GeneralRe: Logics is really hard to learn Pin
Sander Rossel6-Apr-11 2:20
professionalSander Rossel6-Apr-11 2:20 
GeneralRe: Logics is really hard to learn Pin
BillW336-Apr-11 5:19
professionalBillW336-Apr-11 5:19 
GeneralRe: Logics is really hard to learn Pin
Chris Meech6-Apr-11 5:43
Chris Meech6-Apr-11 5:43 
JokeRe: Englishs is really hard to learn Pin
Nathan D Cook7-Apr-11 5:28
Nathan D Cook7-Apr-11 5:28 
GeneralRe: Englishs is really hard to learn Pin
Liju Sankar7-Apr-11 22:13
Liju Sankar7-Apr-11 22:13 
GeneralRe: Logics is really hard to learn Pin
Luc Pattyn7-Apr-11 22:35
sitebuilderLuc Pattyn7-Apr-11 22:35 
GeneralRe: Logics is really hard to learn Pin
Richard A. Dalton20-Apr-11 1:24
Richard A. Dalton20-Apr-11 1:24 
GeneralRe: Logics is really hard to learn Pin
Luc Pattyn20-Apr-11 1:47
sitebuilderLuc Pattyn20-Apr-11 1:47 

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.