Password Validation Gets Ridiculous
function isValidPassword(password) { if (password == "a") return false; if (password == "ab") return false; if (password == "abc") return false; if (password == "abcd") return false; if (password == "abcde") return false; if (password == "abcdef") return false; if (password == "abcdefg") return false; if (password == "abcdefgh") return false; if (password == "abcdefghi") return false; if (password == "abcdefghij") return false; if (password == "abcdefghijk") return false; if (password == "abcdefghijkl") return false; if (password == "abcdefghijklm") return false; if (password == "abcdefghijklmn") return false; if (password == "abcdefghijklmno") return false; if (password == "abcdefghijklmnop") return false; if (password == "abcdefghijklmnopq") return false; if (password == "abcdefghijklmnopqr") return false; if (password == "abcdefghijklmnopqrs") return false; if (password == "abcdefghijklmnopqrs") return false; if (password == "abcdefghijklmnopqrstu") return false; if (password == "abcdefghijklmnopqrstuv") return false;
A code editor shows a password validation function rejecting increasingly long passwords made from consecutive letters of the alphabet. The joke is that the programmer handles every possible alphabetic prefix with a separate condition instead of writing a sensible validation rule, creating absurdly repetitive code as a reaction to overcomplicated or incompetent programming. EN: A code editor shows a password validation function rejecting increasingly long passwords made from consecutive letters of the alphabet. The joke is that the programmer handles every possible alphabetic prefix with a separate condition instead of writing a sensible validation rule, creating absurdly repetitive code as a reaction to overcomplicated or incompetent programming.
- @gentoomemes / 15106 2024-12-06
- Type
- image
- Size
- 548×510 · 49.4 KiB
- Mood
- absurd, sarcastic
- Language
- en
- Added