Click here to Skip to main content
15,886,137 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: YARTH-JS : Yet Another Reason To Hate JavaScript Pin
Super Lloyd9-Dec-19 15:34
Super Lloyd9-Dec-19 15:34 
GeneralRe: YARTH-JS : Yet Another Reason To Hate JavaScript Pin
raddevus10-Dec-19 3:33
mvaraddevus10-Dec-19 3:33 
GeneralRe: YARTH-JS : Yet Another Reason To Hate JavaScript Pin
markrlondon3-Oct-20 14:17
markrlondon3-Oct-20 14:17 
GeneralRe: YARTH-JS : Yet Another Reason To Hate JavaScript Pin
raddevus4-Oct-20 9:57
mvaraddevus4-Oct-20 9:57 
QuestionMessage Removed Pin
16-Sep-19 19:00
professionalSharath C V16-Sep-19 19:00 
AnswerMessage Removed Pin
17-Sep-19 0:07
protectorNelek17-Sep-19 0:07 
GeneralVisual Studio namespace gotcha Pin
Fueled By Decaff9-Sep-19 4:17
Fueled By Decaff9-Sep-19 4:17 
GeneralRe: Visual Studio namespace gotcha Pin
Nathan Minier17-Sep-19 1:20
professionalNathan Minier17-Sep-19 1:20 
Because that would be an ambiguity in one of the few places where ambiguity would break the system.

By and large, C# is really good about supporting abstractions. One of the main reasons for this is that the whole thing is underpinned with stringent structural rules in terms of where and how code is loaded. These rules, which include namespace definitions, make the entire idea of dynamic module loading work without a bunch of odd checks and locks.

An ambiguous namespace definition would break this system. Do I want System.Timers or System.Threading.Timers? The APIs are different, so if I load one ambiguously, I'd need to do some type checks before using anything from it an likely set aside some buffers and concurrency control while making the determination and loading the code.

Or I can just type: using System.Threading.Timers;

Side note: ReSharper automatically detects namespace issues and can automatically correct them for you.
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor

GeneralI think my WTF per minute counter just overflowed... Pin
Rob Grainger4-Sep-19 5:53
Rob Grainger4-Sep-19 5:53 
GeneralRe: I think my WTF per minute counter just overflowed... Pin
PeejayAdams4-Sep-19 6:07
PeejayAdams4-Sep-19 6:07 
GeneralRe: I think my WTF per minute counter just overflowed... Pin
Rob Grainger4-Sep-19 22:50
Rob Grainger4-Sep-19 22:50 
GeneralRe: I think my WTF per minute counter just overflowed... Pin
Greg Utas4-Sep-19 7:20
professionalGreg Utas4-Sep-19 7:20 
GeneralRe: I think my WTF per minute counter just overflowed... Pin
Rob Grainger4-Sep-19 22:51
Rob Grainger4-Sep-19 22:51 
GeneralRe: I think my WTF per minute counter just overflowed... Pin
MarkTJohnson4-Sep-19 8:00
professionalMarkTJohnson4-Sep-19 8:00 
GeneralRe: I think my WTF per minute counter just overflowed... Pin
Lutosław1-Oct-19 11:39
Lutosław1-Oct-19 11:39 
GeneralRe: I think my WTF per minute counter just overflowed... Pin
kmoorevs4-Sep-19 12:06
kmoorevs4-Sep-19 12:06 
GeneralRe: I think my WTF per minute counter just overflowed... Pin
Bernhard Hiller5-Sep-19 22:41
Bernhard Hiller5-Sep-19 22:41 
JokeRe: I think my WTF per minute counter just overflowed... PinPopular
Fueled By Decaff9-Sep-19 3:22
Fueled By Decaff9-Sep-19 3:22 
GeneralRe: I think my WTF per minute counter just overflowed... Pin
Private Dobbs30-Oct-19 22:32
Private Dobbs30-Oct-19 22:32 
GeneralRe: I think my WTF per minute counter just overflowed... Pin
#realJSOP9-Sep-19 5:21
mve#realJSOP9-Sep-19 5:21 
GeneralRe: I think my WTF per minute counter just overflowed... Pin
Keith Barrow15-Oct-19 11:47
professionalKeith Barrow15-Oct-19 11:47 
GeneralRe: I think my WTF per minute counter just overflowed... Pin
Bajaja30-Oct-19 22:13
professionalBajaja30-Oct-19 22:13 
GeneralKotlin: new(ish) syntax emerges Pin
raddevus15-Aug-19 10:36
mvaraddevus15-Aug-19 10:36 
GeneralRe: Kotlin: new(ish) syntax emerges Pin
Marc Clifton15-Aug-19 11:19
mvaMarc Clifton15-Aug-19 11:19 
GeneralRe: Kotlin: new(ish) syntax emerges Pin
raddevus15-Aug-19 12:29
mvaraddevus15-Aug-19 12:29 

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.