News for hackers. Stuff that matters.
Re:Automated Unit Test Improvement Using Large Language Mode... by RHSeeger on Saturday February 17, 2024 @10:06AM (#39410062)
Along the same lines, I see this a lot

    long delay = (5 * 60 * 1000); // 5 minutes, in millseconds
And it's perfectly clear to me. Now, I think the comment is really helpful there (indicating intent), but I don't think having separate constants for each of the numbers there is going to make the code better. As it is, it's very easy to read at a glance, know what it's intended to do, and determine if it's correct (should you be worried about that at the moment). Which is what's important there.
Re:Automated Unit Test Improvement Using Large Language Mode... by gregmac on Saturday February 17, 2024 @12:00PM (#39411187)
I do that as well, but typically name that variable delayMilliseconds so there's no confusion.

sleep(delay) always looks ok, but sleep(delayHours) is probably going to catch your eye as suspicious.