Skip to content

Instantly share code, notes, and snippets.

@accidentaldeveloper
Created January 23, 2015 15:38
Show Gist options
  • Save accidentaldeveloper/ef44f5be0b585c5810a0 to your computer and use it in GitHub Desktop.
Save accidentaldeveloper/ef44f5be0b585c5810a0 to your computer and use it in GitHub Desktop.
Force yourself to fix an ugly hack by a certain date, before you forget about it entirely
[Conditional("DEBUG")]
public void HackTimeBomb(DateTime expiration)
{
if (DateTime.Today > expiration)
throw new InvalidOperationException("Bzzz! Your hack has expired!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment