Am I wrong to think my senior using an expiry date value null as forever weird or is this common practice?

  • 5
    I'd say it's common practice for when you need expiry
  • 1
    Why do you think it's incorrect?
  • 2
    If it’s not going to expiry, why force someone to update it in 5+ years, whom may or may not be yourself.

    Otherwise if it’s not a null date, I’ve seen booleans used instead to be a non-expiry item with a date of 0000-00-00...
  • 2
    null, as in "doesn't expire" is pretty common, yes.
  • 1
    It's common. You could however argue to instead use "9999-12-31" as never expire, as db queries will just have to check if "currentDate < expireDate" instead of "(currentDate < expireDate OR expireDate IS NULL)" however querryoptinizers should take care of that. Probably.
Your Job Suck?
Get a Better Job
Add Comment