The Unreachable Code Jedi Mind Trick

The Unreachable Code Jedi Mind Trick
java-memes, debugging-memes, compiler-memes, unreachable-code-memes, code-comments-memes | ProgrammerHumor.io

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.

More Like This