Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Who believes these things? February is always 28 days long? Any 24-hour period will always begin and end in the same day (or week, or month)? A week always begins and ends in the same month?


I thought about the same thing. I choose to read the title as "Falsehoods programmers seem to believe about time". Or "act as if they believe" in place of "seem to believe".

I can easily imagine somebody introducing a bug that relies on a 24 hour period ending in the same month as it began.


He's talking about test code. So if those test cases are missing, but the programmer thinks the tests are thorough, then it looks like the programmer believes those things (or forgot that they weren't true).


A bad test might boil down to,

    assert(month(now()) == month(now() + 24.hours))
then fail from time to time.


Perhaps the accurate title is "Assumptions programmers make about time"


Bugs happen. Especially thoughtless ones.

The title might better have been "Things programmers have tried to do with time."




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: