Menu
The best code is no code at all.
Home
Hot
Random
Search
Browse
AI
AWS
Agile
Algorithms
Android
Apple
Backend
Bash
C++
Cloud
Csharp
All Categories
HTTP 418: I'm a teapot
The server identifies as a teapot now and is on a tea break, brb
HTTP 418: I'm a teapot
The server identifies as a teapot now and is on a tea break, brb
If true Memes
Posts tagged with If true
The Unreachable Code Jedi Mind Trick
Java
Debugging
Programming
Testing
1 year ago
226.7K views
0 shares
The oldest trick in the developer handbook: wrapping problematic code in an if (true) block with a return statement instead of properly commenting it out. Top panel: Java compiler screaming "unreachable statement" because those Star Wars lightsaber sound effects will never execute after the return . Bottom panel: The developer feeling smug after "fixing" the issue by wrapping the return in an if (true) block, tricking the compiler into thinking those ridiculous sound effects might actually run someday. Nine years of software engineering experience and we're still pulling stunts like this instead of using version control like adults.
Terrible Auth: The Digital Doorman Who Always Says Yes
Security
C++
Programming
Debugging
Testing
1 year ago
335.6K views
0 shares
The first part of this authentication function is actually doing its job—checking if the password matches. But then comes the security masterpiece: if (true == true) . Congratulations, you've created the digital equivalent of a bouncer who checks your ID and then lets you in anyway because "yep, gravity still works!" This function will authenticate literally anyone who gets past the first check... or fails it and just keeps trying. Security experts hate this one weird trick!
Today's picks
Stackoverflow T-Shirt Overflowing like a boss Stack Overflow T-Shirt
Affiliate
$14.99
Shower Thought
Debugging
53.7K views
1 year ago
GearScouts.com
Sponsored
Power stations