Boolean Function Does the Opposite
Found this in production today. I need a drink. public static bool CompareBooleans(bool orig, bool val) { return AreBooleansEqual(orig, val); } internal static bool AreBooleansEqual(bool orig, bool val) { if(orig == val) return false; return true; } 12:54 AM · 31 May 19 · Twitter Web Client 2,519 Retweets 7,054 Likes
A screenshot of a tweet shows a programmer sharing contradictory C# code that claims to compare two booleans but returns false when they are equal and true when they differ. The joke is that this obvious production bug is so frustrating that the programmer needs a drink, making it a reaction to bad code and software bugs. EN: A screenshot of a tweet shows a programmer sharing contradictory C# code that claims to compare two booleans but returns false when they are equal and true when they differ. The joke is that this obvious production bug is so frustrating that the programmer needs a drink, making it a reaction to bad code and software bugs.
- @gentoomemes / 1729 2022-12-28
- Template
- Twitter screenshot
- Type
- image
- Size
- 702×800 · 54.8 KiB
- Mood
- саркастичный, раздражённый
- Language
- en
- Added