It happens to most of us, I'm sure. We've sat down to work on a problem, only to forget about dinner, then breakfast, and sometimes lunch. "Two minutes" often becomes "until 2 A.M." and then when we finally take a break and we find ourselves continuing to work on the same code, or worse. At what point do you know to stop and do something else (and what do you do)?
I mostly ask this because I recently found myself thinking something to the effect of:
Faucet.turn();
try
{
Drain.releaseWater();
}
catch( Exception e )
{
try
{
Plunger.pump( Drain );
Drain.releaseWater();
}
catch( Exception e )
{
Errands.push( GroceryStore.purchase( LiquidPlumber ) );
}
}
I am spending my spare time reading a book now.