News for hackers. Stuff that matters.

Serplat

Re:Why does calloc exist? on Monday December 05, 2016 @05:09PM (#13110185)
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.

Re:Why didn't you back me up? on Saturday March 07, 2015 @06:08PM (#9163465)
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.
Re:Prison Switcharoo on Sunday February 23, 2014 @02:15PM (#7287122)
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.
Re:33 Questions on Sunday November 24, 2013 @02:53PM (#6790823)
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.
Re:So You Want To Be A Breaker, Part 1: Web Security on Sunday March 17, 2013 @06:28PM (#5391357)
I second the need for an RSS feed. I was actually a bit surprised when I couldn't find one.
Re:HipChat releases native app for Mac on Thursday February 14, 2013 @10:39PM (#5224294)
I haven't used this app, but in every other app I use Cmd+W closes a tab, while Cmd+Shift+W closes a window.
Re:How do I cite a tweet? on Saturday January 19, 2013 @09:02PM (#5085652)
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.
Re:JavaScript Quiz Set on Saturday January 19, 2013 @11:44AM (#5083837)
Original author of that quiz here.

As dhconnelly pointed out, Java and C definitely do have their own isolated scope for 'if' blocks. More information: http://en.wikipedia.org/wiki/Scope_(computer_science)#Scope_...

Re:Here’s what I learned hanging out with Jason Fried on Monday January 07, 2013 @04:42PM (#5023442)
I would agree, but the pricing page only claims compatibility with more modern browsers: "Cross-browser tested (IE 9+, Chrome, Safari, & Firefox)"

When's the last time you saw a laptop that old running one of those browsers? I typically see them running IE6 or 7.

Re:The "well-calibrated interviewer" curse on Saturday January 05, 2013 @11:43PM (#5015319)
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.

Re:Code Interview Reading List on Wednesday January 02, 2013 @03:43PM (#4999147)
The theory behind it is that material about specific frameworks is easily learned. If a company is looking to hire you, what you currently know matters far less than what you can learn. The best developers are able to master new frameworks in days or weeks, making their current experience near meaningless.

So, instead of testing what you current know, many companies look to evaluate the way you think and your potential to learn. I'm sure that the current methods of doing this aren't perfect, but I think they're a hell of a lot better than asking me minute Hibernate details when I haven't used Hibernate in years.

I currently prefer overall design questions. The type where the interviewer proposes an overarching problem, and you have to design a full system to handle it (not a difficult algorithm necessarily, but the data structures and classes involved). Mix this with a bit of actual coding, and I think the interviewer can get a decent idea of your skills.

Re:SAT: Getting the lowest score possible on Saturday October 27, 2012 @12:35AM (#4705366)
That depends on the section of the test. Critical reading you can get several wrong, writing depends on your essay score, and math you typically can't get any wrong.
Re:GitHub hit by DDoS attack second day in a row on Friday October 19, 2012 @06:37PM (#4675673)
Github isn't solely a git server. They also have issues, wikis, etc, that are harder to keep in multiple locations.
Re:Dropbox Introduces 2-Factor Authentication on Sunday August 26, 2012 @09:02PM (#4436910)
This completely misses the point of Two-factor authentication, though.

Two-factor authentication is all about increasing security by combining two separate factors: something you know (password), and something you have (phone). From what I can tell, you're just switching from relying on one factor (password) to relying on the other factor (phone). It's just a different one-factor authentication paradigm.

Unfortunately, this leaves several gaps. For example, what happens when I lose my phone, or someone takes it from me? Can that other person log in immediately?

I can potentially understand an argument that this is more secure than solely password-based solutions (although I don't think it would be for me, where I use complex random passwords), but I certainly wouldn't consider it an alternative to two-factor authentication.

Re:New York Underground on Friday August 10, 2012 @11:03AM (#4366452)
I feel safer about it when looking at the scaled version: http://www.nationalgeographic.com/nyunderground/docs/scale.h...
Re:Valve brings non-game software to Steam on Wednesday August 08, 2012 @04:03PM (#4357754)
It's also extremely buggy on the Mac, at least. I can't count the number of times dropdown menus have shown up behind everything else.
I suppose that makes some sense.

However, it doesn't change the fact that by enabling it by default, most other sites will likely end up just ignoring it, even if that isn't Microsoft's intent.

The DNT header was likely to be ignored to begin with, but this just seals it.

The only way that the DNT header even stood a chance was if it was only enabled by a select few individuals who are greatly concerned with their privacy. By defaulting it to 'on' for users who don't particularly care about their privacy, or understand any of the implications, they essentially guarantee that only a handful of sites will even consider honoring DNT.

Assuming they actually stick with this, DNT has lost all of the little meaning it had to begin with.

Re:RethinkDigg.com on Friday July 20, 2012 @02:40PM (#4272268)
Actually, when it was first released, it simply didn't work. Very few pages actually loaded, and there were errors all over the place.