For smaller memory allocations that don't go directly to the OS, I suppose it's theoretically possible (though I'm not sure any compilers do it). For the larger allocations that the author mentions that go directly to the OS to fulfill, however, the compiler wouldn't be able to optimize this away. In that case, the zero'ing occurs in the kernel, which is something that the compiler has no control over.
The zero'ing is done significantly for security reasons anyway. If a program could somehow disable that feature and get leftover memory from the kernel it could very easily contain password, secret keys, and other important bits of data that you wouldn't want random programs on your computer to have access to.
This story appears to go beyond a simple HR dispute, but is endemic of a culture all too common in our industry that we should have zero tolerance of and should work to undermine. It appears that not only were inappropriate statements made, but other high-ups at Google weren't willing to stand up for what's right. Considering this happened at an employer of many readers on this site who may have additional insights or stories to add, I think it's perfectly reasonable to have posted here.
Exactly. It would be interesting to hear from some Google employees here, both men and women, about their good or bad sexism related experiences at the company.
The issue is that the counter doesn't know the state of the first switch at the start. If it's on at the start, then sure your solution will work. But if it's off at the start and they all agree to only flip on the switch once, then the counter will sit around forever waiting for p flips, when only p - 1 will ever happen. They need a solution that will work no matter what state the switch is in at the start.
I think you misunderstood. powrtoch proposed having a set of questions in which each individual question is itself very complicated. For example, being a non-practicing Catholic with exactly three children is only one small facet to a single question. By or'ing a bunch of really specific questions together you can come very close to getting exactly 50% of the population to answer yes to a single question.
That's kinda cheating though isn't it? Like chaining a dozen statements on one line with semicolons and going, "look I can write that program in one line!"
That depends what constraints you choose to define on the problem - if they need to be knowable, memorable,... then yes probably. Anyway, sz4kerto has a good comment about using a Karnaugh map which might help see how this works - it's a lot cleverer than just chaining things randomly - but does break a lot of hypothetical arbritary restrictions.
It's something I thought about for a while and just decided it wasn't worth it. I just switched away from Posterous (c.f. https://news.ycombinator.com/item?id=5388857 ) and when I was building the new blog, I looked at my RSS subscribers and realized only 15 people actually use it. Just wasn't worth building.
This bothered me as well, particularly for the example that they provided. The convention may work for tracking conversations, but knowing the exact time that the helicopter was spotted relative to other events seems more important. Yet, by their convention you can only accurately compare it with the time of other cited tweets.
I think you're absolutely correct regarding "homework." It can be a good indicator of a candidate's competency, but many people don't have the patience to do it.
I spent much of this past fall interviewing for an internship for the upcoming summer. It's one thing for a company to ask a candidate to devote a day to interviews, after flying them out and putting them up in a nice hotel, but it feels completely different to have the candidate complete some sort of homework.
The candidates that you want to hire are likely busy interviewing with several other companies as well, and probably don't have time to work on some random assignment for your company. So, unless your company really stands out, they're just going to pass.
I've found that interviews benefit both the company and the candidate, while I can only really imagine homework benefiting the company. I learn a lot about a company from the way they interview and the way developers talk about their jobs; the interaction is really important. Yet, homework assignments don't really have much interaction, and end up being a test of how much the candidate wants the job, instead of how well they fit with the job.
The zero'ing is done significantly for security reasons anyway. If a program could somehow disable that feature and get leftover memory from the kernel it could very easily contain password, secret keys, and other important bits of data that you wouldn't want random programs on your computer to have access to.