Monday 13 June 2016

The Real World

In the Real World, While and Until don't necessarily mean what programmers take them to mean.

I had a discussion with someone with a card that said, Valid until June 2016.  Does than mean it is valid until the start of June 2016 and then stops being valid?  No, because this is the inclusive "until".   It stops being valid after the point it is valid until.  This works with dates because it is unambiguous what is "after" June 2016.

Same with my weekly bus ticket.  Where it says it is valid until Tuesday that means including Tuesday and then stops being valid on Wednesday.  In code you would write this as "valid until date > Tuesday" not "valid until date = Tuesday".

People in Hull often use the word While where you might expect Until.  For example, you might hear "it was posted on Monday so it won't arrive while Thursday".

No comments:

Post a Comment