this post was submitted on 13 Jun 2023
43 points (95.7% liked)

Programmer Humor

19207 readers
1152 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] mamarguerat@discuss.tchncs.de 3 points 1 year ago
private void GenerateCode(){
  println("private bool IsEven(int number){");
  println("if (number == 1) return false");
  for(int i == 2; true; i += 2){
    println("if (number == " + i.tostring() + " return true";
    println("if (number == " + (i + 1).tostring() + " return false";
  }
}