Infinite loop in macOS Night Shift in the summer near the Arctic Circle
twitter.com
twitter.com
> Now, is this a corner case, an edge case or a boundary case? And does the answer depend on whether you are a flat-earther or not?
That was too funny.
https://en.wikipedia.org/wiki/Sunrise_equation
cos(\Omega) = - tan(\phi) x tan(\delta)
Where \Omega = hour angle (sunrise, sunset offset from noon), \phi = latitude, \delta = sun declination.
Clearly if the right hand side gets big enough (>1), this doesn't work.
Angles are always such a pain. In my experience it's worth applying trigonometric identities and working in terms of unit vectors, sines, and cosines instead of using angles directly. In this case angles seem unavoidable, though: acos(tan(x)*tan(y)) doesn't simplify to anything useful.
It threw a fit and rebooted when I asked it for sunset while at 78 degrees north in June.
But yeah, diversity would have helped.
I was about to wonder how racial and sex diversity plays into a program running into an infinite loop.
Edit: Which is to say that a male with fair hair and skin and a university education wouldn’t qualify as diverse in most contemporary conceptions of diverse, despite a likely underlying diversity of culture and experience.
So, yes, diversity of experience is important, and no, that's not what is accepted as diversity in modern corporate culture.
https://www.telegraph.co.uk/news/2017/10/17/apples-head-dive...
Software would be so much simpler on a ringworld ...
Does anybody know if there is a law on that?
[1] https://en.m.wikipedia.org/wiki/Magic_Roundabout_(Swindon)
> It is illegal to circle a roundabout more than 3 times
> FALSE
> There is no evidence to support this, other than the 'careless driving' argument. You should plan before you enter a roundabout and circling more than twice could be considered as careless driving.
https://www.endsleigh.co.uk/blog/post/false-driving-myths/
See also https://www.reddit.com/r/policeuk/comments/6ouamr/how_many_t...
Basically, it depends how bored your local police are
https://www.youtube.com/watch?v=-5wpm-gesOY
and why I will never implement datetime myself
Use the one that comes with each language, or use some UTC library?
f.lux gets it right if I set my zip to Barrow, AK. Why can't Apple, with how many orders of magnitude more resources at their disposal — including knowledge?
(Posted at (5+4i):(37+5.23812i) AM)
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!"
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 problem is simple.
https://en.wikipedia.org/wiki/Time_in_Arizona
The Navajo Nation is within Arizona's boundaries, and it does observe DST. And the Hopi Reservation is within the Navajo Nation, and it does not observe DST.
And since Arizona is surrounded by California, Nevada, Utah, New Mexico, and Mexico, all of which do observe DST, that means you have an island of no-DST (Hopi) inside an island of DST (Navajo) inside an island of no-DST (Arizona) inside an area of DST (adjoining US states plus Mexico).
There are days where I think I should go back to a mechanical watch and adjust the time each day at high noon. It won’t agree with anyone else’s time most of the time, but at least it will be correct.
If they copied that date from some automated system it might as well be any of these.
Humans usually say “New York time”.
I'm guilty of this too, since I can never remember which part of the year constitutes "on" and which is "off", only where the boundaries are. If I stop and think I can usually remember "spring ahead is turning it on", but never off the top of my head.
Are people really that fragile? Yes and no.
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 problem is simple.
Isn't humility the answer to both? Someone should develop a humility course for programmers involving an "ultra drone," writing the date/time library for it, and some simulated world test cases. Such "humility exercises" are found in various disciplines. There's one for CIA analysts, involving analyzing US Civil War sites via sat photos, then having them visit in person.
It's not fragility, so much as perspective.
When you are thinking something is simple, and you say "Am I'm thinking I'm impressed with my own cleverness?" it's easy to say "no". Because it's not arrogant to think you can accomplish something simple.
When you are thinking something is simple, and you say "Am I assuming simplicity?" it's easy to say "yes".
Realizing you're committing the fallacy is the first step to avoiding it.
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...
What do you call this type of worldview where you just view everything as completely meaningless or devoid of any value? Is it really straight up Narcism? I mean my god no wonder this is one of the most depressed generations on record.
Apologies for the off-topic comment, I just felt compelled to post this. We are the most meaningful, most important things in the universe until we know or learn otherwise. We are the most intelligent, most accomplished life forms in our known existence. Viewing it as arbitrary might be "technically true" but then again what do we know? What if we are it? It is just as plausible as the other view: that we are just on a billion year course for the eventual heat death of the universe and the end of existence all together.
Treat yourselves as special, you are. Treat others that way too. You'll also be a lot happier. Sorry for the platitudes.
If you're the only one in a talent contest, you're the best ... and the worst.
It's ok though, it doesn't matter.
Do you believe that animals have meaningful conversation? Or that humans do?
Does the universe speak? If it did, would you know?
Do you understand its language? Can you hear it?
There's also something else: nothing.
We’ve needed to coordinate actions forever and the sun was the only reliable way to do that for a long time. Nothing arbitrary about where our time came from.
Before then? Eh. Objectivity is overrated and an imperfect time system is a nice reminder that life doesn’t revolve around us and what we want.
* Absolute Time: A time value fixed to UTC.
* Fixed Time: A time value fixed to a specific time zone.
* Floating Time: A time value that is interpreted according to the time zone of the observer.
And now we're back to the original problem.
AM and PM are "ante meridian" and "post meridian": before" and after. But 12 is on* the meridian; neither one. You can meaningfully say 12:00:01 am, or 11:59:59 pm, but for 12 sharp nobody can say whether am or pm is dark or day.
Airlines schedule flights at 12:01 for this reason.
I’m no domain expert but I’m guessing flights are scheduled at 12:01am because people are bad at time. For instance some people would think 12am is the last minute of the previous day instead of the first minute of the next day. 12:01 removes the potential ambiguity.
There isn't a flight at midnight, but there are fewer flights then anyway, and it may be confusing to some which day the flight is on. Of course, the flights around midnight have departure times of 2350 and 0015.
0 was invented for a reason. This am/pm stuff is so confusing.
Or, this is true, if you allow that "day" is defined by sunrise to sunrise (or sunset to sunset, depending on your religion), which in the region discussed would give you one sunrise per revolution around the sun.
Either one of those truths could be the basis for fixing this bug.
EDIT: Rather than a bug (in the implementation), this may be better classified as an under-specification.
Presumably in this case you would have arrived at an answer along the lines of "yes, so long as there's always a sunset". Which should then prompt the question: hang on, is there always a sunset? A quick scan over whatever datafile it's using for input should answer that.
https://www.ar15.com/forums/general/Urban_legend_about_F16__...?
My USB logger was OK, but my backup logging apps both added crazy points around the world.
Programs to display / edit the tracks also had bugs.
Even Google Maps has defects on the maps at the antimeridian.
https://www.defenseindustrydaily.com/f22-squadron-shot-down-...
Also related- it seems crazy to me how some teams are working on a robotic product without building/interating a simulator first!
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.
Anyways, thanks!
This depends on your definition of "bug". I think, in the classical sense, a bug is something that you understand both the cause and the resultant undesired behaviour and, as of consequence, you can reproduce the chain of events.
Given that definition, I would be disinclined to agree with calling it a "bug".
However, I would also like to point out that we're getting so nuanced in terms that we're, quite literally, dropping the notion of lauding the attempts of the OP to go down the road of wanting to deduce the problem, themselves.
If I write a program that computes 2+2 and it tells me the answer is 5, that’s a bug. Why is irrelevant until I want to fix it.
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.
For example apparently Chrome used 3% of the battery life so far today whereas a game I was just playing already consumed 5%
For iOS the Battery settings are usually good at telling you about power drain.
With the improved security model, that now only shows the bash and top processes.
That would be the same place a few months from now. This is strange though, it's not like this guy is the first above the polar circle using a Mac. I suspect it must somehow be related to him being a tourist with a different region and timezone settings or maybe the location services got confused.