Click here to Skip to main content
15,887,485 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: Trick for young players. Pin
_Maxxx_4-Nov-12 11:49
professional_Maxxx_4-Nov-12 11:49 
GeneralRe: Trick for young players. Pin
CafedeJamaica2-Nov-12 10:54
professionalCafedeJamaica2-Nov-12 10:54 
GeneralRe: Trick for young players. Pin
AspDotNetDev2-Nov-12 11:28
protectorAspDotNetDev2-Nov-12 11:28 
GeneralRe: Trick for young players. Pin
BotReject4-Nov-12 10:54
BotReject4-Nov-12 10:54 
GeneralRe: Trick for young players. Pin
TheCoolCoder5-Nov-12 1:13
TheCoolCoder5-Nov-12 1:13 
GeneralRe: Trick for young players. Pin
_Maxxx_5-Nov-12 1:40
professional_Maxxx_5-Nov-12 1:40 
GeneralRe: Trick for young players. Pin
Super Lloyd5-Nov-12 17:47
Super Lloyd5-Nov-12 17:47 
GeneralRe: Trick for young players. Pin
_Maxxx_5-Nov-12 22:25
professional_Maxxx_5-Nov-12 22:25 
2 answers

1. The problem is that it is easy to be misled about what is happening in this sort of circumstance; Bearing in mind that, in the real world, the 'contains' code would be in a method that simply has a collection of objects as its parameter (so it's not obvious what values may be in those objects). If you are just saying that you would never be fooled by something like 'contains' finding some objects and not others, then I bow to your superior intellect.

Oh, and the newbies being surprised thing is just off topic. I am certain that many a newbie (and quite a few oldies)_ would be fooled by the 'contains' issue with a mixture of objects, some of which are value and some reference, ESPECIALLY as the issue (in the case identified in some of my other responses) rears its head only when the values of two arguments happens to be equal - which leads to an irregular failure of a part of the framework.

2. Are you referring to 'a trick for young players'? If so, maybe this is an Aussie phrase. It means 'something to beware of for the inexperienced'
MVVM# - See how I did MVVM my way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011

.\\axxx
(That's an 'M')

GeneralSomebody getting paid by the character typed? PinPopular
esaulsberry29-Oct-12 10:17
esaulsberry29-Oct-12 10:17 
GeneralRe: Somebody getting paid by the character typed? Pin
Br.Bill3-Jan-13 12:36
Br.Bill3-Jan-13 12:36 
GeneralThe occasional flash of brilliance Pin
Eddy Vluggen29-Oct-12 9:50
professionalEddy Vluggen29-Oct-12 9:50 
GeneralRe: The occasional flash of brilliance PinPopular
enhzflep29-Oct-12 15:49
enhzflep29-Oct-12 15:49 
GeneralRe: The occasional flash of brilliance PinPopular
CDP180229-Oct-12 19:51
CDP180229-Oct-12 19:51 
GeneralRe: The occasional flash of brilliance Pin
enhzflep29-Oct-12 20:04
enhzflep29-Oct-12 20:04 
GeneralRe: The occasional flash of brilliance PinPopular
CDP180230-Oct-12 1:21
CDP180230-Oct-12 1:21 
GeneralRe: The occasional flash of brilliance Pin
enhzflep30-Oct-12 6:47
enhzflep30-Oct-12 6:47 
GeneralRe: The occasional flash of brilliance Pin
Florin Jurcovici1-Nov-12 0:50
Florin Jurcovici1-Nov-12 0:50 
GeneralRe: The occasional flash of brilliance Pin
Reelix1-Nov-12 1:27
Reelix1-Nov-12 1:27 
GeneralRe: The occasional flash of brilliance Pin
KP Lee1-Nov-12 8:28
KP Lee1-Nov-12 8:28 
GeneralRe: The occasional flash of brilliance Pin
BlackMilan29-Oct-12 22:34
BlackMilan29-Oct-12 22:34 
GeneralRe: The occasional flash of brilliance Pin
Dan Neely1-Nov-12 2:41
Dan Neely1-Nov-12 2:41 
GeneralRe: The occasional flash of brilliance Pin
Sasha Laurel1-Nov-12 4:34
Sasha Laurel1-Nov-12 4:34 
GeneralRe: The occasional flash of brilliance Pin
patbob1-Nov-12 5:54
patbob1-Nov-12 5:54 
GeneralRe: The occasional flash of brilliance Pin
Marco Bertschi2-Nov-12 7:03
protectorMarco Bertschi2-Nov-12 7:03 
GeneralRe: The occasional flash of brilliance Pin
MehGerbil1-Nov-12 2:12
MehGerbil1-Nov-12 2:12 

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.