730
submitted 2 months ago by [email protected] to c/[email protected]

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
[-] [email protected] 6 points 2 months ago

Does everyone call the function of the script main? I never use main(), just call the function what the program is supposed to do, this program calculates the IBNR? The function is called calculate_IBNR(), then at the end of the script if name = 'main': calculate_IBNR(test_params) to test de script, then is imported into a tkinter script to be converter to an exe with pyinstaller

[-] [email protected] 3 points 2 months ago

All of mine are called do_thing() because after a few days of working on it, the scope creep always means the original name was wrong anyway.

this post was submitted on 28 May 2025
730 points (96.3% liked)

Programmer Humor

25843 readers
2623 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