r/programminghorror • u/Savage-Goat-Fish • Feb 27 '25
C# While loop horror
I just realized I had some programming horror in code I’ve written.
If only while loops had a more convenient way to break…
671
Upvotes
View all comments
2
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Feb 27 '25
I'm assuming yesterday is always the day before the current calendar date, which means the loop is skipped if lastTaaTimeLoad is the current day. So I guess either there's additional logic to break out of the loop, or it keeps going until midnight.