Click here to Skip to main content
15,867,771 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: Android gravity constants Pin
Richard Deeming19-Aug-14 1:47
mveRichard Deeming19-Aug-14 1:47 
GeneralRe: Android gravity constants Pin
KP Lee21-Aug-14 17:57
KP Lee21-Aug-14 17:57 
GeneralRe: Android gravity constants Pin
Sander Rossel19-Aug-14 1:49
professionalSander Rossel19-Aug-14 1:49 
GeneralRe: Android gravity constants Pin
Brisingr Aerowing19-Aug-14 5:00
professionalBrisingr Aerowing19-Aug-14 5:00 
GeneralRe: Android gravity constants Pin
KP Lee21-Aug-14 18:24
KP Lee21-Aug-14 18:24 
GeneralThe lasting effects of the Unix epoch Pin
PIEBALDconsult10-Aug-14 12:32
mvePIEBALDconsult10-Aug-14 12:32 
GeneralRe: The lasting effects of the Unix epoch Pin
Rob Grainger13-Aug-14 23:26
Rob Grainger13-Aug-14 23:26 
GeneralThe Magician's String, what you see is not what you get. PinPopular
Nicolas Dorier10-Aug-14 10:34
professionalNicolas Dorier10-Aug-14 10:34 
C#
static void Main(string[] args)
{
	String str1 = "http://toto.com/";
	String str2 = "http://toto.com‏/";
	bool eq = str1 == str2;
	Console.WriteLine(eq); //print false


	str1 = "http://toto.com/";
	str2 = "http://toto.com/";
	eq = str1 == str2;
	Console.WriteLine(eq); //print true
}


See for yourself, but copy the code, do not retype it. Smile | :)
I lost hair on this one, bug on an actual project for one customer.
But it is a nice trick to do to one of your most hated co worker if his computer is unlocked... Also works in configuration files. Wink | ;)
This is pure evil though.

[UPDATE] With some advice I found even more evil than that.

C#
"а" == "a" //false


modified 11-Aug-14 11:13am.

GeneralRe: The Magician's String, what you see is not what you get. Pin
Brisingr Aerowing10-Aug-14 11:28
professionalBrisingr Aerowing10-Aug-14 11:28 
GeneralRe: The Magician's String, what you see is not what you get. Pin
PIEBALDconsult10-Aug-14 11:55
mvePIEBALDconsult10-Aug-14 11:55 
GeneralRe: The Magician's String, what you see is not what you get. Pin
Nicolas Dorier10-Aug-14 12:17
professionalNicolas Dorier10-Aug-14 12:17 
GeneralRe: The Magician's String, what you see is not what you get. Pin
PIEBALDconsult10-Aug-14 12:33
mvePIEBALDconsult10-Aug-14 12:33 
GeneralRe: The Magician's String, what you see is not what you get. Pin
Nicolas Dorier10-Aug-14 12:37
professionalNicolas Dorier10-Aug-14 12:37 
GeneralRe: The Magician's String, what you see is not what you get. Pin
PIEBALDconsult10-Aug-14 12:39
mvePIEBALDconsult10-Aug-14 12:39 
GeneralRe: The Magician's String, what you see is not what you get. Pin
Nicolas Dorier10-Aug-14 12:47
professionalNicolas Dorier10-Aug-14 12:47 
GeneralRe: The Magician's String, what you see is not what you get. Pin
PIEBALDconsult10-Aug-14 12:56
mvePIEBALDconsult10-Aug-14 12:56 
GeneralRe: The Magician's String, what you see is not what you get. Pin
Nicolas Dorier10-Aug-14 13:16
professionalNicolas Dorier10-Aug-14 13:16 
AnswerRe: The Magician's String, what you see is not what you get. Pin
Guirec10-Aug-14 11:57
professionalGuirec10-Aug-14 11:57 
GeneralRe: The Magician's String, what you see is not what you get. Pin
Dave Kreskowiak10-Aug-14 12:22
mveDave Kreskowiak10-Aug-14 12:22 
GeneralRe: The Magician's String, what you see is not what you get. Pin
Xmen Real 10-Aug-14 15:01
professional Xmen Real 10-Aug-14 15:01 
GeneralRe: The Magician's String, what you see is not what you get. Pin
Rage10-Aug-14 15:17
professionalRage10-Aug-14 15:17 
GeneralRe: The Magician's String, what you see is not what you get. Pin
Nicolas Dorier10-Aug-14 15:26
professionalNicolas Dorier10-Aug-14 15:26 
GeneralRe: The Magician's String, what you see is not what you get. Pin
Nicholas Marty11-Aug-14 0:42
professionalNicholas Marty11-Aug-14 0:42 
GeneralRe: The Magician's String, what you see is not what you get. Pin
Nicolas Dorier11-Aug-14 1:40
professionalNicolas Dorier11-Aug-14 1:40 
AnswerRe: The Magician's String, what you see is not what you get. PinPopular
Wonde Tadesse10-Aug-14 15:41
professionalWonde Tadesse10-Aug-14 15:41 

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.