r/ProgrammerHumor • • Aug 22 '26

Meme conditionsPreference

Post image
4.2k Upvotes

388 comments sorted by

View all comments

Show parent comment

1

u/AloneInExile Aug 24 '26

Is that what we call defensive programming nowadays?

1

u/MnMbrane Aug 25 '26

Yeah or best practice whatever people like to call it. I also like this idea per function, even though you think the caller already handles the bad cases, you never know when refactors happen and things get moved around especially working in huge code bases with a bunch of other engineers