Even long ago, I discovered that once I reached a certain level of tiredness, it was pointless to keep coding, because after a night's sleep I'd realize it was all garbage and had to revert to a previous version.
Past that point there's no possible justification except "I need to show something functional to someone tomorrow".
I confess that, once upon a 5 A.M., I thought it would be clever to store X-Y position values not as a tuple but as two halves of a single int. There was a reason, but looking at it the next day there certainly wasn't a good enough reason. That set my low-water mark for coding while tired.
Yes, this. And that goes even if one is already awake due to insomnia: one owes it to oneself as well as to one's colleagues not to write code when one's mind is not in tip-top shape.
I confess that, once upon a 5 A.M., I thought it would be clever to store X-Y position values not as a tuple but as two halves of a single int. There was a reason, but looking at it the next day there certainly wasn't a good enough reason. That set my low-water mark for coding while tired.