skysight-inc/HackerNews huggingface dataset:
Naive solution: There are 924x1080 px as possible candidates for the upper-left corner of the new rectangle. Test each of these candidates to see if a rectangle placed there is a valid position. The complexity would be O(W * H * n) where W,H = dimensions in pixels of the screen, n = number of already placed windows. For practical purposes i think this would be a good solution, assuming the need for a new window is not very frequent. I suspect the complexity can be improved though, maybe with some sweep line algorithm.
The way I rate another programmer is by how hard I have to think while reading his/her code.

If it is clear and easy to follow, with few surprises, then I'll rate that programmer highly. If I find things that are more complicated than they need to be, my calm will be disturbed.

Assembly of japanese bicycle require great peace of mind.
How Twitter Stores 250MM Tweets in MYSQL
And that was less then 5 years ago, and it was a Stop the World GC until less then 2 years ago updated to Incremental. While Mozilla's has had incremental for a year and are still working on Generational Collector.

The point is, apart from Java which gets many cooperate backing, even the most widely uses programming languages only recently had a decent enough GC implementation. As much as i hate this slow progression, most VM still dont have GGC as default at all.
What are some concrete examples of hard problems tech companies face that require novel solutions and why are algorithms problems the best way to find the people qualified to solve them?

This is best answered by awesome example. See http://research.google.com/people/jeff/ for a list of some the problems that one Google programmer met, and solved. Many of said problems were novel at the time, though many have now learned the answers that Jeff came up with.

These kinds of problems and answers are simply not understandable to people who don't understand algorithms. And you can tell people without a deep understanding of algorithms how to solve those problems, and they will consistently get it wrong.
Finding the time to keep up with the best practices and literature of both fields at once, despite their overlap, is still a monster.
Thanks for the comment -- I'm the author of the post in question (and co-founder of Mindscape, producers of Raygun). We still have the test running - just following the guidelines of leaving it for 7 days even after a winner is determined.

Did you swing the statistics? ;-)
Even if they are largely external, we can't say that michaelochurch hasn't been providing suggestions for improvement. His overall message doesn't strike me as complaining just to complain, even if some of his individual posts are a bit over the top.
One thing this shows is just how powerful Facebook could become/already is.
When they connect the dots online and offline of billion user's buying information and habits they essentially can electronically understand who you are better than you do, and can predict what you'll do even better.
Just food for thought.
Psychology being an inexact science, it is difficult for someone else to repeat the same experiment and check the validity of the results (such as in the physical sciences). Even if someone does get different numbers, the validity of the repeat experiment itself can be questioned, or it can be put down to any number of variables. eg - the human subjects themselves will not the same.
In my experience, I've seen 3 kinds of jobs that demand engineers who can solve "hard" problems:

1. Obviously hard, and needs no explanation e.g. self-driving cars.
2. Basic problems done at ridiculous scale. Quickly matching keywords to web pages is not a hard problem; quickly matching keywords to every web page on the internet is a hard problem.
3. The problem is that (forgivably or not, depending on circumstances) we have no idea what we're trying to do.
That depends on the filesystem events you tie into (Open, Close, Write, Delete, etc) and what your responding script does. But, at the point where you want to put the entire system under some kind of change management, why not use something designed for that, like NixOS[0]?

[0] http://nixos.org/nixos/
In that case, it's probably most space efficient to place each new window next to an already visible window or at an edge of the screen.

So keep a list of possible candidate positions. Each of these positions represents either an edge of the screen or a position directly above/below/to the left/to the right of an existing window. You will need to calculate different offsets for each of these circumstances to generate candidate positions. You easily eliminate ones that fall outside of the screen.

Each time you attempt to add a window you iterate the list of candidate positions.
If a candidate position can fit a window (just use brute force 2D AABB collision detection against all windows, or a quadtree/spatial hash to optimise) then place the window there. If it cannot fit remove the position from the candidate list.

Once you have added the window, calculate all the candidate positions (for each side) and add these to the list of possible positions for later windows.

Well it's late and that's the best I can manage..
I know somebody will point out a flaw here :)
(Author of the post) Consider this: In any job you're going to do "normal" stuff the majority of the time. The other times, you have to pull out A-level work. It's not 24x7, but when the time comes you have to be able to do it, eg writing a parser for an obscure query language that will get executed $X billion times per day, so it better be small, correct, and fast.

We ask people to prep because we want to know if you can do that level of work.
Liquid Lifebar - An Arduino project
The last time I read into this subject, there were neural network models that achieved around 80% accuracy. There's a research group at my uni dedicated to this research area.
His overall message is how companies and management can improve -- advice for a position he's never been in and has no experience with. If he's said things that represent a serious acknowledgement of his own shortcomings as an employee -- i.e. a frank discussion of why such a high proportion of his employment experiences have been bad compared to typical HNers or engineers -- I'm not aware of them. He seems to be fairly self-congratulatory on that front, which is at odds with the results so far.
One problem, one weekend, eight languages
Without wanting to seem unnecessarily rude, it's not that hard to survive #1 at HN. I had a blog post submitted by someone else hit #1 for two days. It was worth about 25k visits. I've had other stuff do 100k visits in a day on the same system during a natural disaster; that little network is basically idling at what used to be vanity numbers (millions of views per month, guys, time to list on NASDAQ!)

If you're on Wordpress, install WP Supercache. That's 80% of the solution, right there. Install equivalent whole-page caching for any other framework or system and tell your HTTP server how to pick it up; that should leave you prepared for hundreds of RPS.

We're at the stage where people are posting the equivalent of "how I survived skipping lunch". It's not 1997 any more, tens of thousands of visits is a link from a moderately popular twitter account or a medium-size metropolitan newspaper.

I'm sorry to seem so uncharitable. I'm just not sure what value these posts add.
I highly recommend Logstash and Kibana. The setup might be a little more complex then some would desire (but by no means is it difficult and both have solid docs), but the two are pretty powerful tools.

1 - http://www.logstash.net/
2 - http://kibana.org/
Cast-iron cookware is very expensive here, and therefore scarce. If you're cooking in a shopping cart it's unusual for cast iron to be a viable alternative.
> Maybe you don't realize that "they" includes Ken Thompson himself... You may disagree with the Go design team's decisions, but it's amusingly absurd to accuse them of inexperience.

Not really, if anything, Go shows that its designers have a lot of inexperience when it comes to modern language design.

Go would have been a kille language in the late 90's but it seems to ignore everything that we've learned about language design in the past decade.
That was my initial reaction; free hosting to get switchers as a last ditch effort? No thanks, I'd rather pay a small sum to support a good product.

I had tried these guys last year when they were doing a different 'free' promo. For whatever reason I was unimpressed and had never gone back after the one instance. Not that they're bad, but I don't remember them being memorable over the well-knowns of the VPS market.
all he had to do was host on nginx.
Ah the memories. I was heavily involved with the Bay Area Developer GRoupE :-) We had BADGE meetings initially at Stanford Linear Accelerator and then later at Stanford. We used to head to the Oasis for the after the meeting meeting. As a lot of the original Amiga developers (pre-Commodore) were based out of Los Gatos (the original home of Amiga when Commodore bought them) many would come to those meetings and share various insights with us.

At one point we decided to host a demo contest (which Tom Rokicki pronounced with a long 'e' sound) it was the hottest ticket in the Bay Area for a while, we even had Commodore and Newtek offering up gear for prizes. Some amazing stuff watching people pull every ounce of performance they could out of the chips.
Your site apparently got ~2250 visits per day (so, less than two per minute) at the height of your "surge", and seems to consist of three pages (/, /about, and /open-source). Most people are only going to look at just /, so let's say 3000 pageviews. The day after was still seeing good amounts of traffic, so it wasn't some kind of momentary "all 3000 hit the site in the same minute" situation: it seems like a fairly benign decay. How could you possibly have been dealing with 287 concurrent users?

My website (saurik.com) is seriously written in JavaScript. I was doing this long before node was popular, and so it is designed "horribly sub-optimally": it is using Rhino, which is not known for speed. I use XSL/T as a templating engine to build the page layouts, which is also not known for speed. Every request is synchronously logged to a database. I get over 50k HTML pageviews a day, most for one recent article which I posted a few weeks ago: when I posted it, I was getting well over 3k pageviews per hour.

I do not do any caching: I generate each page dynamically every time it is accessed. I seriously dynamically generate the CSS every request (there are some variables). Even with 3k HTML pageviews per hour, that's less than one complex request per second. How does one even build a website that can't handle that load? That is what I'd seriously be interested in seeing: not "how do I handle being #1 on Hacker News", but "why is it that so many websites are unable to handle two requests per minute".
As stated this seems really easy. I think it is supposed to be more like Meebo where the users can resize/move every window (i.e. they dont have to be aligned to any boundary) and they recieve a new message. The Meebo software wants to place a new 100x200 window not on top of any existing window. Write the algorithm to determine where to place it. Then generalize the algorithm to WxH. Hard enough? (If not, find an algorithm that does this in linear time)
A lot of people on HN are still learning things like this. I understand that a post like this doesn't add any value to someone like you who probably knows this stuff inside and out, but I'm grateful for posts that give me insight into new tools that can help me. This isn't just a community for people with 10 years of programming experience.

Should I not try to help out the community with blog posts about my experience? Should we just cater to the experts?
Original Press Source

http://www.exeter.ac.uk/news/research/title_281715_en.html

Actual Paper

http://www.pnas.org/content/early/2013/04/17/1215966110.full...
Its very easy to game the interview at big web companies. I mean even if they ask all these text book academia related questions- Algo/DS ones etc.

I remember once there was a question on Quora about an IIT BTech guy who had offers from all major web companies. Some one asked him how he did it. And his advice was that you had to simply 'practice'. Simply go out on the internet check for good interview forums work on it an hour every day. Even if you are actually a worthless programmer on the ground. You can pretty much ace any interview with simply practice.

This also reminds of my Math classes in pre-university college here in India. I would generally try to solve a problem in more than one way and show it to my lecturer. One day she scolded me badly, that my experiments might end up in me scoring less marks. Her point was the evaluators were used to seeing a certain pattern of answers over years. And if the student had a new innovative answer, they would simply mark it wrong because it didn't their 'one true' answer, even if the solution was more elegant and better than the common pattern. Therefore the only way of scoring high marks was to practice all the common patterns.

Rote learning works at all levels.

I remember some days back I watched a interview of RMS on youtube, and he was asked a question on how you could be a good programmer and what books you had to read. And he gave a straight reply- You had to simply work on some hard real world problems/projects and bring them to closure. That was his advice.

Too bad these days we check people on everything apart from their actual work.
Oh I'm sure governments around the world have been thinking quite hard about that.
Hi. I work at facebook and do many interviews.

Facebook still seems to be totally focused on code problems

I would say that statement is categorically false. In fact, the article lists 4 criteria, only one of which would be "code problems". The interview certainly has a focus on coding, but it most assuredly is not a total focus. And people can, have, and will pass the coding bar, and still fail to get an offer.

stuff that someone has made // communication skills, especially how well they can explain things they have worked on.

Both of these are critical parts of every facebook interview.

From this post, Facebook seems more interested in making sure developer can re-re-re-implement merge-bubble sort-reduce

I don't think that is a well supported inference from the post in question.
I need to use Facebook to login to take their 'programming' test. I'm PISSED.
I highly recommend Ghostery. I've been using it for quite a while now and have no complaints.
> "Practice writing code in a simple text editor without syntax highlighting or completion macros."

Maybe applicants shouldn't be able to "undo" during the interview? Or maybe applicants should be able to manually convert the code to assembler? Or, heck, have them use one of those behemoth computers with the blinking lights that we have to plug wires into sockets to program?

I mean...why should we rely on any technology that has been developed to make software engineers more effective and that the majority use daily? That would be like if we let sales people use tools they rely on, like charisma, during interviews!

The only sensible argument I've heard for why companies interview with programming puzzle questions is that it "takes too long" to do an interview better (like the way simonsarris pointed out Sencha does). At the point a company is unwilling to look at applicants as humans, and instead treats them as numbers/percentages, I wonder if they're a company worth working for any way.
This echoes the best interview I ever had, which finished with the interviewer starting me with a problem ("This functionality is running slow and hanging a lot") and had me walk through how I'd diagnose the problem, from the front end to the database: he was interested in what metrics I'd gather, what question I'd ask about how things work, who I'd want to rope in for help with particular parts of the problem, and so on. It was all drawn from a real-world problem they'd solved a few weeks ago.

I've used that ever since when I've been a technical interviewer. It's fascinating hearing how people go about solving problems, and it tells me a lot about their actual skills.

(One of the best responses for a sysadmin role qas a quiz around sudenly degraded performance and the first question was, "What's changed? I'll check the change management to see what's gone live recently.")
I agree that most of the work that needs to be done in this industry could be done by a well-trained monkey. And there are plenty of well-trained monkeys doing said work. But you really want more competent people doing it because you never know when you'll randomly encounter something that needs more ability than just cutting and pasting within a known template.

As an example of why, consider this famous Brian Kernighan quote, Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it? I've certainly been in the situation where the website is crashing, nobody knows why, but we need it fixed immediately. And solving the problem under pressure like that is twice as hard as debugging it normally.

When things go pear shaped, you really want someone available to debug it who is both competent, and familiar with the code in question. This is easy if the person who wrote the code is competent. But if the person who wrote the code is not amazingly competent, you may be stuck with your choice of competent people who don't know the code, and incompetent people who do know the code. Neither of whom is in a good position to fix the problem.

This is hopefully not a situation that comes up very often. It is not something most of us get a lot of practice for. And we put a lot of effort into avoiding a pants on fire situation. But ideally you want all of your programmers to be able to think at this level. (Even if they mostly demonstrate it by avoiding problems in the first place.)
The CSS-Tricks License
> You're clearly confusing Somali Pirates and the Caribbean Pirates of the Golden Age. Pirates were predominantly privateers working under the authorization of a letter of Marque, and at any time could be a pirate to any of the three other major empires in the area.

And you're clearly confusing pirates with privateers.

Courtesy of wikipedia:

Piracy is typically an act of robbery or criminal violence at sea. The term can include acts committed on land, in the air, or in other major bodies of water or on a shore. [...] It is distinguished from privateering, which is authorized by national authorities and therefore a legitimate form of war-like activity by non-state actors. Privateering is considered commerce raiding, and was outlawed by the Peace of Westphalia (1648) for signatories to those treaties.
Thanks. That kind of answer is what I'm most curious about. What exactly is the A-level work that is not "normal stuff" that you want your candidates to be prepared for.
#meteor is a very helpful community.
The history of civilization is full of inventive people finding ways to make life better, and then doing so. Why does this not happen in these poverty stricken areas? Is it because anyone intelligent enough to do something about it leaves?

They don't have to jump straight to modern plumbing to have their lives improved.
You know, for people who have taken graphics classes, this seems like a much easier question because they know about AABB trees. That is the problem at the heart of the question. Also, your idea about candidate positions is wasteful. Just invert the tree so that it contains empty space instead of full space. Then, on insert, remove from the tree.
I feel like we're going to sail off into old/new user debate territory. "It's been done before" / "I'm new and so it's novel to me" etc etc.

I'm not sure what to tell you, except I fall squarely on the "old" side of that divide, having had to nurse Wordpress installations for nigh on 10 years now.

But every time -- every time -- an uncached Wordpress blog is linked to and dies with the famously unhelpful "Error establishing a database connection", somebody pops up to mention WP Supercache and/or W3 Total Cache.

Actually, if I have a pet peeve, it's that non-terrible caching isn't part of the Wordpress core. Probably breaks on gawdawfulhost.com or something, god forbid that 99.999% of the internet be better off from core architectural improvements when we could be working on the fifteenth new admin redesign!!1!

Edit: I realise now that you weren't talking about Wordpress and thus, my own pet obsession is clearly revealed.
Thanks ciscott, subscribed to both of those feeds. I'll also keep an eye on meetup.com -- should have looked there first actually.
> Unless Google is selling it at a loss.

Not sure about the loss, but I am sure they are not making much money from it.
Here is one answer for you.

Many programmers will take longer to configure their environment than you have available for the interview. Therefore if you tried to let them interview in the programming environment of their choice, there would be no actual interview. (And you'd have to undo whatever they did before the next interview.)
It reads like a category error to me. My experience is that the coming times that require A-level work from memory are emergencies and the "$X billion times a day query parser" ones are not, allowing more iteration and collaboration.
'Democracy May Have Had Its Day'
The World is Socialist
Am I missing something? Wikidata talks big, but apparently it only contains lists of different language versions of Wikipedia articles. (https://www.wikidata.org/wiki/Wikidata:Introduction#What_do_...) There doesn't seem to be any sort of codified plan forward, so I'm not sure what to think of it.
> HN isn't all that huge a traffic deliverer. It's just about the quality of that traffic.

what?
Google to discontinue Meebo social toolbar in favor of Google+
Having been to India quite recently (and being Indian), I talked to a lot of family members there about this issue, among others, as I saw it happen time and again. One of the things that really frustrated me was the pure lack of accountability in general. I said 'among others' earlier because I am also referring to environment issues such as littering and pollution. The people there aren't dumb--they know all of these actions have harmful and negative effects on others' help and the general environment, but they would rather not care than care for the most part. Herein lies the fundamental problem...if you would rather not care, well there's no solution to that. I am originally from Northern India but on my most recent visit, we went to Mumbai. If the ocean wasn't brown and there was less pollution, it would hands-down be one of the most beautiful cities in the world. But no one there seems to look at what could be but rather what it is and accept it.

So rather than spreading knowledge about these issues (which, don't get me wrong, is also good), there has to be an attitude change. You can't blame the government and I never like doing that, but it would be wonderful if the government would get involved in preventing these environmental/health jeopardizing actions. The problem with this, of course, that the country is so populated that it is extremely hard to make this drastic of an imposition and follow through with it.