Hacker News new | past | comments | ask | show | jobs | submit login

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.


You’re splitting hairs and failing at it. They have clearly found a “bug” if Night Shift is consuming 100% CPU without end, even if their hypothesis for the reason might be wrong.


>They have clearly found a “bug”...

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.


I disagree. If you have to understand the cause of undersires behaivor before a bug can be said to exist, then debugging is a prerequisite to a bug existing.

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.


As the OP, I'm giving this one an upvote. I am far from an engineer, so the most I can come up with a hypothesis. I need a real engineer to do the real debugging.


A bit late, but I did want to point out that I enjoyed the article and found it engaging. I was not trying to diminish from you in any way. My comment was much more a semantical argument over the comment than a logical disagreement with your article.

Anyways, thanks!


What's the difference between unexpected and undesired behavior and a bug?


Unexpected or undesired behaviours are relative to who's expectations and desires are being considered while bugs are (or at least should be) universally recognisable as bugs.


Would anyone consider that the corebrightnessd process at 117% cpu is expected/desired behaviour?


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.


This Android phone tells me proactively if it notices an application using lots of battery life or network bandwidth. And if I'm inquisitive it will let me see how much they used anyway when it didn't alert.

For example apparently Chrome used 3% of the battery life so far today whereas a game I was just playing already consumed 5%


On Android you used to be able to open a terminal and run "top".

With the improved security model, that now only shows the bash and top processes.


You can get much more useful info out of Activity Monitor by running spindump.

For iOS the Battery settings are usually good at telling you about power drain.


I don't think the Battery settings shows you power usage by system daemons?


It’s not specific, but it’ll say “System Services” I believe.




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

Search: