Live data from Hacker News

Infinite loop in macOS Night Shift in the summer near the Arctic Circle

twitter.com

21–30 of 175 posts

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#22
post #8
post #4

'Falsehoods programmers believe about time: - Every day has a sunrise and a sunset'

It exists, it's just complex-valued.

There are both coordinates and rotations, it would probably be better modeled as a quarternion or something of an even higher order.

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#23
post #4

'Falsehoods programmers believe about time: - Every day has a sunrise and a sunset'

Time is hard: https://zachholman.com/talk/utc-is-enough-for-everyone-right

This is all because of the fact that we're trying to represent the time taken by the earth (an arbitrary planet that has no impact on the universe whatsoever) to revolve around the sun (an arbitrary star) in terms of the amount of time the earth takes to rotate around itself. These two obviously unrelated things are somehow merged into to create an unsolvable clusterfuck. To make matters worse, let's sprinkle some politics...

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#25

Am I the only person who is impressed with this person's debugging skill?

Not really.

All he's shown is a behavior (high CPU) and is equating it with the latitude he's at. When he turns off Night Shift, the daemon process for the feature stops consuming as much CPU, from what I gathered. Nowhere does he provide evidence that there is an infinite loop calculating the sunrise/sunset.

And I really don't want to be a stereotypical poster by simply degrading what he did, so I will give credit to him for knowing where to look and making a hypothesis that is not wrong. He's perfectly on point to _begin_ a debugging process, but I can't see he's found a bug. He's found an unexpected or undesired behavior. I certainly would consider this story/tweet as a huge plus if he were being interviewed by me for an engineering position, but it appears he's already well above my pay grade anyways.

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#26

Earlier quoted context omitted.

Falsehoods programmers believe about time: The fundamental one is: "I'm so very clever, and I've dealt with dates my whole conscious life, I can probably think of all of the edge cases off the top of my head!"

I think you're right, but that the tone I read in your words would prevent people from improving. Rather than "I'm so clever" it is more "this isn't complicated". One can argue they mean the same thing, but I'd say they mean different things if comparing to an outside scale. The solution to thinking you're so clever is to reduce your arrogance, but the solution to thinking problems are simple is to stop assuming any…

My favorite incorrect fact is that there are 24 timezones. In fact, the number of offsets from UTC fluctuates throughout the year (at least last I worked on scheduling in 2012. Back then it was either 39 or 40 depending on DST)

Re: Infinite loop in macOS Night Shift in the summer near the Arctic Circle

#27

Am I the only person who is impressed with this person's debugging skill?

The machine gave two big hints. The fan spinning up indicated the computer was needlessly busy. Then the Activity Monitor revealed the problem was the "core brightness" system. From there it is a small leap to make the connection to Night Shift.

On mobile devices the only indications we have that something is wrong is warm devices and lower battery lives, which are far less immediate. And we don't have the detailed CPU usage that desktop devices provide. Maybe we need a simulated fan sound when our devices are being pushed too hard.

Post reply on HN