• 0 Posts
  • 39 Comments
Joined 1 year ago
cake
Cake day: July 2nd, 2023

help-circle
  • And your colleagues are probably correct with respect to this sort of «what it does» commenting. That can be counterproductive because if the code changes and the comment isn’t updated accordingly, it can be ambiguous. Better have the code be the singular source of truth. However, «why it does it» comments are another story and usually accepted by most as helpful.










  • I meant doesn’t change with respect to time zones. Leap times are still relevant in that scenario as each solar rotation doesn’t divide into a whole number of days and leap seconds due to variance in rotation.

    With respect to the meridian I envision it rotating around the earth once per year, hence sidereal. So 0000 would rotate around the earth through the course of the year. Each day it would be one degree farther.

    Most likely is I’m just completely full of shit.



  • Like with everything, context matters. Sometimes it can indicate poorly structured control flow, other times inefficient loop nesting. But many times it is just somebody’s preference for guard clauses. As long as the intent is clear, there are no efficiency problems, and it is possible to reach the fewest branches necessary, I see no issues.