A Jollier Way to Do This
God I wish there was a jollier way to do this private bool IsEven(int presents) { if (presents == 1) return naughty else if (presents == 2) return nice else if (presents == 3) return naughty else if (presents == 4) return nice else if (presents == 5) return naughty else if (presents == 6) return nice else if (presents == 7) return naughty else if (presents == 8) return nice else if (presents == 9) return naughty else if (presents == 10) return nice else if (presents == 11) return naughty else if (presents == 12) return nice else if (presents == 13) return naughty else if (presents == 14) return nice else if (presents == 15) return naughty else if (presents == 16) return nice else if (presents == 17)
A Christmas-themed programming meme shows a repetitive conditional function deciding whether numbered presents are “naughty” or “nice.” The joke is that the programmer wishes there were a more cheerful or elegant way to implement the tedious alternating logic. EN: A Christmas-themed programming meme shows a repetitive conditional function deciding whether numbered presents are “naughty” or “nice.” The joke is that the programmer wishes there were a more cheerful or elegant way to implement the tedious alternating logic.
- @gentoomemes / 8109 2023-12-23
- @pokupkabitka / 46684 2024-12-16
- Type
- image
- Size
- 641×787 · 88.8 KiB
- Mood
- sarcastic, absurd
- Language
- en
- Added