730

Also, do y'all call main() in the if block or do you just put the code you want to run in the if block?

you are viewing a single comment's thread
view the rest of the comments
[-] arschflugkoerper@feddit.org 88 points 3 weeks ago

What kind of psychopath would put the code in the if block.

[-] eager_eagle@lemmy.world 33 points 3 weeks ago* (last edited 3 weeks ago)

I work in an academic / research environment. Depending who wrote it, even seeing a __name__ == "__main__" is a bit of a rare thing...

[-] SpaceNoodle@lemmy.world 23 points 3 weeks ago

Academic code is absolutely horrific.

Fortunately, it is possible to translate it for practical applications.

[-] arbitrary_sarcasm@lemmy.world 13 points 3 weeks ago

As someone in academia who writes code, I can confirm.

load more comments (4 replies)
load more comments (27 replies)
this post was submitted on 28 May 2025
730 points (96.3% liked)

Programmer Humor

24425 readers
155 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 2 years ago
MODERATORS