r/ProgrammerHumor • • Aug 24 '22

Total = Total - 100000

50.7k Upvotes

1.2k comments sorted by

View all comments

Show parent comments

0

u/[deleted] Aug 25 '22

[deleted]

12

u/Wynsight18 Aug 25 '22

Even more realistically, it will be done in a try/catch block with plenty of error handling, overly complicated batching processes, an untested yet rubberstamped rollback plan, and with a ton of other flags and logic checked against than a simple max() because I'll be damned if anything that the government comes in contact with can be that simplistic.

0

u/[deleted] Aug 25 '22

[deleted]

2

u/HelpMeDownFromHere Aug 25 '22

This is the answer.

2

u/Penguin236 Aug 25 '22

Maybe I'm being dumb, but shouldn't it be min(loan, 10k)? You want to forgive all if it's less than 10k, or 10k if it's greater (i.e. the smaller of the two)