My Favorite Engineering Interview Question - <AUTHOR> http://skife.org/interviews/design/2010/10/27/favorite-interview-question.html <comment><USER2> Advice for new questions: instead of contrived ones, pick a problem you've actually encountered in your job and ask the candidate to solve it. I've never had to implement a datastore like this -- so unless that's what you're actually doing, it doesn't seem particularly relevant. Another plus is that if you're doing interesting work, you have an almost endless supply of questions to choose from. Candidates also seem to respond better when you wrap up the question with "this is something I actually worked on a few weeks ago."

FWIW, Ning turned me down back in April 2008 so feel free to ignore my advice :)

<comment><USER3> Asking relevant questions at an interview is a good idea, but I've noticed that a lot of technical interviewers ask questions it took them weeks to understand and fix when they use this approach. Understanding a problem is often more difficult than solving it ... knowing that the interviewer understands the problem and constraints is even more of a challenge.

I once had an interviewer give me the kobayashi maru without telling me. I thought the guy was a jerk. He could just have pulled a gun on me and demanded my wallet if he wanted to judge my personality. I declined the second round.

<comment><USER4> Can you describe your kobayashi maru question? I'm curious.

<comment><USER3> Yeah, but it wasn't technical. The point of the question was to assess my entrepreneurial IQ, or so I was told after. Generally if an unemployed person's applying for a job, their entrepreneurial IQ is low at the moment and they need money. Nevertheless: I was to acquire a desk to work at, which needed to have certain dimensions for under a certain dollar figure. The internet is down, the local office supply company doesn't have it, etc, etc, until I'm starting to think the interviewer is nuts. OK, I'll sit on the floor. His point was that you need to generate options, which isn't bad advice. But it was a dumb interview question.

<comment><USER5> Very dumb question, indeed.

<comment><USER6> The point of the Kobayashi-Maru test isn't to test whether they're capable of passing impossible tests, it's to test their character facing death. If you're choosing fellows to go to war with, you want to choose ones that won't shit their pants or otherwise make your last moments alive together awkward.

<comment><USER5> That's great for Star Trek. I'll keep interviewing technical candidates on a technical basis.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> An idea I've tried a bit in the past (and would like to try more, given the chance): ask a question that you don't know the answer to. This shifts the power balance of the interview - you don't automatically have the answer over the candidate. You also don't have your mind closed by your expected answer(s). Both of these make the resulting discussion more comparable to how you will work with a colleague, which is what you are trying to test the candidate for, after all.

Doing this requires more effort and guts from the interviewer, but it's still easier than being on the other side of the desk. Finding a supply of suitable questions is probably the trickiest part - you could try looking up some problems from competitions just prior to the interview, or you could perhaps take a real problem you are trying to solve at that point in time (abstracted as required).

<comment><AUTHOR> I have done this before, usually if I am working on something interesting, and for which I don't like any solution I have yet hit on. In this case, I do the best I can to describe the problem, thinking thus far, etc, and turn the interview into a design session at the whiteboard.

I can only recommend doing it with a candidate you are more selling to then evaluating, and whom you think will be a good fit.

A strong candidate will jump in and you'll have a great session (I had one in particular with a great young erlanger whom we wound up losing to someone else, but the interview left a lasting impression and we kept in touch long afterwards).

</comment></comment><comment><USER8> These types of questions are terrible interviewing techniques. An interviewer who, even jokingly, goes into the room with an interrogative mindset is fundamentally failing at the core purpose of interviewing: finding good talent, preferably relatively undervalued talent. An interviewer should not be looking for someone who mirrors their way of thinking or or their approach to solving a problem. They should be looking for people with skills that complement the team, not duplicate it. Questions like these are typically signs of bad interviewing technique, but not always depending on how they are presented.

More often than not, however, people "design" interview questions to cause problems for prospective employees. You might think this is clever. You might think this helps weed out people who don't possess the ability to think quickly or react to feedback on their feet. All you really are doing is artificially limiting the prospective candidate pool.

Every dork with a chip on their shoulder can manufacture an a question to be unanswerable. Deep down inside what most of these bad interviewers really want is to design a question that creates one of two atmospheres in the interview room: (a) a submissive one, where the candidate is forced to placate the interviewer and reinforce their apparent intellectual superiority; or, (b) a confrontational one where the candidate and interviewer battle it out for dominance as alpha-geek. Either (a) or (b) can be seen as a positive depending on the type of interviewer that goes in. Ultimately, any interviewer that uses this technique is a bad one and any input they make into the hiring process should be seriously discounted.

The interviewer should adapt their interview style to the candidate based on reading their body language, communication skills, and overall demeanor in the interview room. Its the interviewer's responsibility to create the best interview experience possible. Some people are nervous; some don't think on their feet well; most rely on Google heavily to point them in the right direction; lots of them know more than they can demonstrate in the 5 minutes you give them to react to your stupid question.

Your job is find diamonds in the rough. People who are the best, not people who act, think, behave, or answer the way you think they should. Questions like the one in this blog post are tell-tale signs of alpha-geek interview dominance gone wild, and out of that you'll typically only get one style of candidate that makes it through the gauntlet, certainly guaranteeing you're not getting the best talent available.

<comment><USER4> I don't understand your objection here.

The question presented is a simple, open-ended question with a number of acceptable solutions. It's not even remotely "unanswerable". It's at least mildly interesting as indicated by the number of responses at a similar question on StackOverflow: [http://stackoverflow.com/questions/2573653/given-a-1tb- data-...](http://stackoverflow.com/questions/2573653/given-a-1tb-data-set-on- disk-with-around-1kb-per-data-record-how-can-i-find-dupl/2578319) . It's not far from the problems Ning solves. It's not an "aha" problem that you either get or you don't get. It's complex enough to reveal the candidate's thought process and problem solving methodology, but it's small enough for good candidates to get to a reasonable solution in the 45-60 minutes of an ordinary interview.

Nothing about the article indicates that the author has a chip on his shoulder, nor that he's a dork who wants to "battle it out for dominance as alpha-geek."

Nothing about the article indicates that author is looking for a specific solution reflective only of his particular prejudices in programming.

What in the world is the basis for your entire diatribe here?

<comment><USER8> Seeing as you worked at Ning and likely participated in these types of interviews it's not surprising you don't get it. Surely Ning was a great place to work and I'm sure you found really top-notch employees through your well known tough hiring process, but I'd be willing to wager they all look very much the same when you blur your eyes a little bit.

My diatribe, as you so eloquently put it, is based on the article. The list of things that the author expects to see in the answer. The way the question is presented. The lead off with "interrogation". The "gotcha" follow-up regarding how things might fail. These questions are great at finding a very specific type of candidate, but the _entire_ point of my comment is that this one candidate type is typically not indicative of the best engineer. Of course you'll disagree, I'm sure, seeing as you were part of this process.

<comment><AUTHOR> Asking how it will fail is a gotcha? To my knowledge and experience thus far, all systems fail. The question is "given this one, that we now have a good shared understanding of, which you designed with the tools you are most familiar with, how is _it_ going to fail?

Not one candidate I can think of has been either surprised by this question, or felt stuck, fwiw. Again, I may be completely self delusional, but I hope not!

</comment></comment></comment></comment><comment><USER9> I'm interested in why he's so against the "custom solution". Almost everything a DB will try and add in for key-value lookup is predicated on the idea that the requests aren't randomly distributed. The DB index will probably be based around b-trees, which will do a logarithmic-time search for the top few levels cached in RAM, but will fall over fairly miserably with multiple seeks as it has to page in leaf nodes and likely the nodes a level above those: I don't see it as realistic to expect a DB to do it all in a single seek.

On the other hand, if you have a perfect hash function for the keyspace into a hash addressing space (you'll want something a bit larger than 2^32), you could simply choose the device with the first few bits, then do a single seek into a (large) file on disk with the position indicated by the remaining bits of the hash addressing space, shifted over appropriately for the 128-byte stride of values. You don't even need a perfect hash: with a merely good hash function, you can cheaply read in more than 128 bytes from disk (OS will probably be reading in 4K anyhow), and use open addressing with linear probing.

You'll need enough devices to spread the load to get good latency for random seeks; probably a combination of mirroring and what amounts to sharding, using a portion of the key hash to select the device. But that's a relatively cheap numbers game.

But I'm not really seeing what a DB buys you here, in this specific scenario.

EDIT: Further investigation of tc and cdb (as linked in the article) suggests that tc (Tokyo Cabinet) may work in its hash form, but I'd rule out cdb for using two seeks, which I would expect to double the number of devices required.

<comment> brown9-2 I would imagine that for a certain number of candidates, they answer with a custom solution because they believe this is what the interviewer is expecting to hear (and asking for) when the question contains "you need to design, build, and deploy...". I think to some people, the immediate thought is that the interviewer would deduct points for originality if you said "well let's just use this tool off of the shelf".

This is why interviews are so tricky - it's hard as a candidate to juggle answering the question and trying to decipher what traits the interviewer is really trying to expose with this question.

For example with this one: is the interviewer trying to see if I understand my data structures and the size of this data to the point where I could design such a system from the ground up? Or are they trying to see how practical I can be given real-world time constraints?

<comment><AUTHOR> I agree, and I try to make clear that I really want to understand how the candidate would approach it -- if they genuinely would try to find a perfect hash and keep a hash -> offset map in memory, then mmap a big data file, that is fine. I _will_ ask how they will find the perfect hash, etc. If you can describe well the approach you take, then this is fine.

Ofttimes, though, candidates _have_ started designing a general purpose on- disk hash database. That is fine and dandy, and we always need a better database, but it is pretty orthogonal to the immediate problem.

Actually, ofttimes engineers have implemented general purpose on-disk hash databases as part of j. random project, so that path certainly _does_ occur on real projects :-)

</comment></comment></comment><comment><USER10> Sigh, I'd rather start my own business than run the gauntlet of interview questions again.

<comment><USER11> Really? I found my interview experience at Google a lot of fun. I would happily do it again.

</comment></comment><comment><USER12> When I see "the data never changes" <http://cmph.sourceforge.net/> springs to mind

<comment><AUTHOR> Oo, very nice. This is going to get explored Thank you for the link!

</comment></comment><comment><USER13> I'm confused... why specify a 1 TB _disk_? It doesn't seem that the problem's solution has any dependence on the aforementioned disk aside from the data it contains unless I'm misreading how he's explaining the answer?

<comment><USER14> Yeah, I also thought he expected to serve it all from a single disk. Hopefully in real life it gets clear in the discussion.

It's a problem when asking interview questions: there are many ways in which the question may be unclear and the interviewer is mislead that the applicant can't answer. Another problem may be that the interview interferes with the thinking style of the applicant: you try to discuss it with him while he needs time to think by himself, or just the opposite: he thinks better in a discussion and you stay quiet while he sweats in stress.

<comment><USER15> > there are many ways in which the question may be unclear and the interviewer > is mislead that the applicant can't answer.

yeah, when I was interviewed for my university, they asked me to design an algorithm to work out the n'th term of the fibonnacci sequence. They repeatedly said I didn't need to use recursion or loops.

When I finally gave up, they said: well here's one way:

f(n) = f(n-1)+f(n-2)

I just looked at them and quietly said "well... yeah... I mean... obviously". By that point I was too depressed to say "but that's frickin' recursive, wtf?!?" but that's what I was screaming in my head.

Amazingly I still got offered a place.

edit: still bugs the crap out of me. Did I mis-hear them? Were they being deliberately misleading? Was it some kind of test to see how I reacted to an impossible problem[1]? Were they really expecting me to come up with some mathematical algorithm to calculate the nth term without recursion or looping? Argh!!!

[1]: actually it's not impossible: [http://mathworld.wolfram.com/BinetsFibonacciNumberFormula.ht...](http://mathworld.wolfram.com/BinetsFibonacciNumberFormula.html)

but I don't have a background in mathematics and they knew that.

<comment><USER14> They were likely trying to help you and wanted to say they don't care whether you write an iterative or recursive solution.

<comment><USER15> I'm pretty sure I asked for clarification several times... It's possible I suppose.

Here's the problem it started from:

Eleven lily pads are numbered from 0 to 10. A frog starts on pad 0 and wants to get to pad 10. At each jump, the frog can move forward by one or two pads, so there are many ways it can get to pad 10. For example, it can make 10 jumps of one pad, 1111111111, or five jumps of two pads, 22222, or go 221212 or 221122, and so on. We'll call each of these ways different, even if the frog takes the same jumps in a different order. How many different ways are there of getting from 0 to 10?

(source: [http://www.comlab.ox.ac.uk/admissions/ugrad/Sample_interview...](http://www.comlab.ox.ac.uk/admissions/ugrad/Sample_interview_problems))

</comment></comment></comment></comment></comment><comment><USER16> Why have SSDs killed this question? Seems like you could tweak the amount of data on disk and/or the size of the values and/or the requests/second requirement and keep using it. Also, there are no 1TB SSDs available at this point, so you'd still have to assume spinning platters for this, no?

<comment><USER17> I haven't thought about it deeply, but my first guess would be that the seek time of hard disks is what makes serving 5000 requests per second difficult; consumer-grade hard disks can perform something in the range of a few hundred (randomly distributed) IOPS at best due to seek time. SSDs make seeks (almost) free, so even one decent SSD should be able to service 5000 requests per second, assuming you can get a big enough one.

If multiple storage devices (hard disks or otherwise) are allowed, RAID (or just splitting the data across multiple disks) would ameliorate the seek problem somewhat, since seeks can then happen in parallel. I wouldn't see this problem as requiring a distributed solution, unless the bottleneck is the bus or storage controller rather than the single-disk seek performance.

<comment><USER18> Multiple disks, across different physical servers (instead of RAID) would be good too.

You could also try increasing the throughput by having an in memory cache. The index/hash table can also be in main memory. Depending on the keys, locality can play a crucial role in prefetching data.

</comment></comment></comment><comment><USER19> Goshdarnit. I just sat down and started talking to myself about hash functions, filesystems, the wire protocol, and partitioning scheme for _half an hour_ instead of making dinner. Nerd sniping?

<comment><USER20> Why fret about the wire protocol? ZeroMQ will send messages plenty fast enough, and it's really very simple to use; just a few lines of code.

Damn you, now you've got me doing it. Nerd sniper. ;-)

</comment></comment><comment><USER21> I love to ask something that is simple to start with, and then build on it interactively with the candidate.

One of my favorite questions is - Give me a normalized database structure that you'll implement if you were to build gmail - incorporate conversations, messages, multiple message participants and labels.

Then, depending on the candidate, I build upon the question,and go into various optimizations possible, the ways caching would be implemented, sharding/splitting/de-normalization would be done with load, etc. etc. With good candidates, its always a very interesting discussion. And even the bad ones can leave the interview thinking they know something and don't need to feel bad :)

<comment><USER22> This. A million times this. I do the same thing starting with a simple kernel, but keep growing it, throwing in monkey-wrenches, see how the candidate reasons and adapts.

Good candidates will start recognizing and acknowledging trade-offs, whereas bad candidates will settle on one clear path.

Good candidates will speak about the ideas they're trying to get across, whereas bad candidates will drop into talking about specific brands of technologies.

<comment><USER21> Definitely.

One candidate when faced with some questions on how he'll handle load said he'll switch to Oracle :) Promptly asked to leave.

Good ones clearly show that they have the ability to deal with multiple tracks of ideas, know that trade-offs need to be taken care of, in general, have an approach that with some ingenuity, almost all problems are solvable. Thats the attitude I (and I guess you too) look for.

</comment></comment></comment><comment><USER23> I was unsure on how to answer this question since most of my experience is in application development.

I'd like to not be embarrassed when asked this question. What advice would you give someone wanting to learn enough to answer this question?

Are there any projects, books or other resources one could undertake?

<comment><USER24> Jon Bentley's "Programming pearls", definitely. This problem is somewhat comparable to the first "pearl" from this book. Anyway one of the best ever programming books :)

</comment></comment><comment><USER25> I like this question, but I'm wondering what a good interview looks like if someone is completely blind-sided by the question because they don't have a lot (or any) systems experience? I'm imagining an engineer who's experience ends with MySQL so knowledge of stuff like tcb is a definite no. Maybe that's not an issue, because they wouldn't be interviewing for this job if that was the case.

<comment><USER2> ... not an issue if the questions are relevant to the job. On the other hand, recruiting is hard and it's easy to let a great candidate slip by for any number of reasons.

</comment></comment><comment><USER26> Ning cut 40% of it's staff in April. Why are they hiring new outside developers?

<comment><USER4> Because some of us went on to better places :) Ning was recognized for its selectivity in hiring; though it did come as a shock, everyone that I knew in my short time there landed on their feet at similar or better operations (Google, Amazon, Etsy, etc).

In the intervening months since the layoffs, there's also been some attrition (as there always is) in those who weren't laid off. I know of at least two people who weren't laid off, but left for Facebook shortly after the layoffs.

I also know that they've already hired back at least one of my former coworkers since the layoffs.

</comment></comment><comment><USER27> This guy is taking a lot of heat for bad interviewing technique, and this may or may not be the case - but it's hard to say, given that we don't know what kind of a position he's interviewing for. Given the job requirements of the position, this may be a perfectly reasonable question - i.e. if the job requires someone to build and maintain large custom data stores, it's pretty acceptable practice to ask questions that reveal how much they know about large custom data stores. Personally I wouldn't be over the moon crazy about this question, but it's still a hell of a lot better than being peppered with random "what is X?" type questions that test nothing about your ability as a developer, and only what you currently directly know. That is to say, those questions where you end up looking like an idiot if you didn't happen to read the same man pages as the interviewer. In the types of questions this guy is asking, you have to basically guess what they're looking for - so it can end up being a bit of a mind reading exercise, which is why I wouldn't be terribly crazy about it - but it's still by far the lesser of several evils, simply because it's a direct demonstration of how a developer thinks about development, instead of how much rote minutae they've mastered or whether they can find a way to stick eight kittens into six holes without any broken legs of flying fur, etc....

<comment><USER28> > _In the types of questions this guy is asking, you have to basically guess > what they're looking for_

Don't guess, ask. Having asked questions like this before, I can assure you that a reasonable interviewer will actually be pleased that you understand the alternatives.

(And, of course, if you get an _un_ reasonable interviewer, you probably don't want to work there anyway.)

</comment></comment><comment><USER29> I've never been asked this question in an interview so when I saw it I started thinking about how I would answer it.

The first thing I did was work out the actual bytes/sec (throughput) needed for this many requests. Also given the 2 week timeframe I would question really hard what the data set looks like. Since the requests aren't randomly distributed does that mean you can narrow it down to a small enough portion to fit inside RAM.

I think the question is a good one because it does touch on a lot of aspects of infrastructure and systems design.

<comment><USER30> > Since the requests aren't randomly distributed

Does this follow when the original article says:

      "The keys are not distributed evenly within the keyspace."

and:

      "Requests are distributed evenly (and randomly) across the keys"

</comment></comment><comment><USER31> Easily solved with SSDs. Sort the keys, value is stored right after the key.

On each request do a binary search. It takes 32 seeks in the worst case.

Even current consumer level SSDs can handle 45K IOPS, so you'd get 1400 complete searches/sec from one SSD.

You might need to spread your data over 4 SSDs, but you can search in parallel, so it will even be faster.

If you want more speed, replicate your drives and load balance.

There are better ways (with perfect hash functions), but this is the easiest, and requires no additional storage.

<comment><USER32> In your case it would be better to use interpolation search[1][2] instead of binary search.

[1] <http://en.wikipedia.org/wiki/Interpolation_search> [2] <http://sna- projects.com/blog/2010/06/beating-binary-search/>

</comment></comment><comment><USER33> Expecting a good answer to this question in 30 minutes without any warning is totally unreasonable. Expecting anyone to implement a deployable, generalizable, tested solution to this in two weeks is totally ridiculous. I wouldn't work at a place that asked questions like this or made development calendars with schedules like that.

<comment><USER34> I did this in three weeks:

<http://bitbucket.org/rogueops/vinzclortho/wiki/Home>

I worked on it on average two hours per day. It's not that ridiculous to believe that it would be (near) production quality in two weeks of fulltime work.

<comment><USER33> It's not hard to get "near production quality". It is hard to get to production quality.

</comment></comment></comment><comment><USER35> Hmm my first thought was ... well ... WTF Then I thought - man I'd like to work for this corp. but alas I think I'm to stupid for that. Some moments of reflection later I'm now convinced that I don't want to work there at all.

The question is somewhat similiar to "give me the _fastest_ sorting algorithm and prove that it is" Everyone with a CS-degree or something similar will know this prove and Qsort from his very first years and I claim almost everyone will have forgotten the prove. (I can remember that you can prove this by looking at the "descision" tree passed on the 1on1 comparision which will have depth of about the needet size ;) - but this is it) I think most people will get the prove (even without google or wiki) in a resonable time (some hours?) but within interview-time and in this situation? In my case no way.

</comment><comment><USER36> It's everybody's favorite interviewing technique: Ask a fairly esoteric question that you are thoroughly familiar with and sit there and feel superior while the candidate struggles to get to an answer you will accept. Three kinds of candidates do well: those who are smarter than you are and spit out answers that surprise you; those who have heard the question and act like they're thinking it through for the first time; those who are unfamiliar with the area but have a personality you find congenial, so you coach them to a solution. In the end, it's all about ego.

</comment><comment><USER37> Using general purpose database in such case is just an approximation of a solution, ie. if the database supports index-optimized type of table and smart enough to cache index header blocks quickly enough.

Because of extreme primitiveness of this case, custom solution would work better here than general purpose db. Sort the pairs by key and place in the tree, with the root node containing 2^11 keys (512K), second level - 2^11 nodes of 2^11 keys each (512K each node size), 3rd level - 2^22 nodes of 2^10 keys (256K each node size). Keep root and all the second level nodes always in memory (1G RAM required). Given a key to find, look it up through the root and the second level nodes in memory - this would result in the index of the 3rd level 256K node to be read from disk. Time-wise reading a 256K block from disk is just one IO - pretty much the same time as reading 1 byte.

5000 lookups/sec at 1 IO/lookup - 20 disk array of 250 IO/sec disks - 15K ones would do it. 2 arrays of 400GB disks is still ~2 times cheaper than 1 TB SSD array. RAID5(6)-ing the disks will leave us with 6TB. Short-stroke the first 1TB (70Gb x 20) to get much better speed than 250 IO/sec (or just use less than 20 disks to start with) and enjoy the rest 5TB for non-IO intensive purposes.

</comment><comment><USER30> I'm trying to work out if this is a thinko on my part or a typo on your part:

First you write:

> a system that lets you look up the value for a given key

and then later on you write:

> if they think the problem of looking up a key by value has been solved > before

Did you mean to say "looking up a value by key" or am I misunderstanding it?

(Given that no one else has commented on it makes me question my question but I'm trying to get over my concern of being wrong on the internet and asking to be sure. :) )

<comment><AUTHOR> The second one is a typo on my part :-/

<comment><USER30> Thanks for clarifying that.

</comment></comment></comment><comment><USER38> These days i read "The Guerrilla Guide to interviewing" by joel before attending/conducting an interview. <http://www.joelonsoftware.com/articles/fog0000000073.html> . The OP's question doesn't have place there :-)

<comment><USER39> Who is Joel?

<comment><USER40> Joel Spolsky. Former Microsoft software engineer, now has a company that makes FogBugz. One of the great software opinionators, like Paul Graham.

</comment></comment></comment><comment><USER41> Hello, I would probably make a very poor candidate, but I wanted to ask this - the question gives a 1TB hard drive, and fills it literally to the brim with 4 billion sets of 256 bytes. And then you say that 4 or 5 years ago this relied on some sort of distributed system, but now it can be done on one box. What changed? If the drive is one terabyte, and is used to store exactly one terabyte of data, aren't you going to need to put your database overhead somewhere? Am I completely misunderstanding the question? I find it interesting though. It's an easy problem without the storage space limitation. With it, it's fascinating. Are we thinking to compress the values and/or the keys? Or am I off the mark?

</comment><comment><USER42> It seems to me that the problem could actually be solved by using a 64GB SSD. Given that the storage is 1TB and each of the keys and values are 128Bytes (and hence the disk is full to capacity), and assuming the keys are unique, which it would need to be to have all the keys unique, then we can safely say that every possible value in the 2^32 space is used. Therefore, we could read the data from the 1TB disk, and for each key we find, use the value of the key as the address of a memory location on the 64GB SSD. Net effect is we essentially remove all the key info from the hard disk and compress the storage into 16GB. ie, no need for the hard disk, just a 64GB SSD.

</comment><comment><USER43> If you have more data than, say, GDBM, can swallow in one bite, how could you break this data apart and then find the right chunk amongst multiple servers when given a key?

Also, what does the interviewer mean by this:

> I generally ask these folks if they think the problem of looking up a key by > value has been solved before, especially given the two weeks to be live in > production requirement.

Is that a typo? s/key by value/value by key/ ?

</comment><comment><USER44> I'm in recruiting myself. If I would ask questions like this we would have been out of new employees very soon. Questions like this only intimidate the applicant and are much to complex for interviews. Also you seem to have the idea that you know the only "truth". This is ridiculous.

</comment><comment><USER45> Great thought question. Being a junior developer, I haven't the slightest clue on how to answer it. Having been exposed to merely algorithms in school, would it be safe to assume that this wasn't really targeted at software engineers but more towards system designers?

</comment><comment><USER46> Sorry, I'm not a hacker, I wouldn't know the first thing about setting up an interface to a hard drive. However, the first thing that pops out at me is that you just described a 512 GB addressing scheme. You want half your disk to be unaddressable?

</comment><comment><USER47> Hah, I remember Andrey asking me this question in my Ning interviews :)

</comment><comment><USER48> My favorite: "Write a script that will save you one minute of time every day"

closely followed by

"Draw a picture of your job/Facebook/the future /whatever"

<comment><USER5> A picture? Are you hiring artists? Seriously. What do you get out of that?

<comment><USER48> A picture is a useful abstraction of reality. It forces people to think about what they'll 'answer' before they do. Some people might draw a diagram, some might draw a story, who knows. It tells a lot about people and how they think.

For some people this may seem like a fun task and they'll get excited about it, some may not find it useful and argue about it and others (the ones you want to avoid) will frown upon it and say 'Fine. I'll do it anyway'.

Most of the people I've interviewed are well accomplished engineers, but that doesn't always mean I want to work with them.

Why do you think it is NOT useful to draw a picture?

<comment><USER4> I think it's not useful because you're not hiring me to draw pictures. I'd pass on any interview where crayon drawings of my future had any impact whatsoever on the likelihood of my hire.

</comment></comment></comment></comment><comment><USER49> I would walk out of this interview!</comment>


Could you get a great job even if you have a family? - <AUTHOR> https://janigorse.com/2017/05/02/could-you-get-a-great-job-even-if-you-have-a-family/ <comment><AUTHOR> Could this be moved to ASK section please?</comment>


Hands-on with Amazon Locker, now working - <AUTHOR> http://www.geekwire.com/2011/exclusive-handson-amazon-locker-running <comment><USER2> Yes, it appears that Amazon is bootstrapping this by using UPS to deliver packages to the store but there's a bigger vision at work here.

This is another attempt by Amazon to solve the "last mile" problem. Amazon already saves a ton of money on shipping costs by packing their own trucks and driving them from distribution centers (e.g. Fernley, NV) to major metropolitan areas (e.g. Seattle, WA) and depositing them at USPS for final delivery. Amazon could even remove this cost for those people who choose to pick up their packages at (essentially) Amazon PO boxes.

</comment><comment><USER3> This seems wildly impractical, as the guy pulled the label out that still had a UPS label on it, which indicates that they sent it UPS to this facility which then put it in a locker.

If they're going to send it UPS anyway, why not just send it to your house? I can't imagine there are that many people who would rather have to make another trip to go pick packages up vs. having them left at your door (in most circumstances; there are some instances where it's more convenient to have something put somewhere you can access it 24/7 rather than dropped off, but I imagine those are limited.)

<comment><USER4> I think it can make sense in specific cases.

For example:

I live in Boston and a bunch of people don't have cars. If you don't have a delivery service in your building to take and store your packages, they can be left right outside the door which is kind of dicey, especially if you have valuable stuff.

Some people at my office just have all their packages delivered at work, which makes sense. But if you are going to have a ton of stuff delivered, or heavy stuff, it can be a hassle to then lug that back to the subway whereas it might be easier to have it delivered to the 7/11 that is just a block away from your place.

So like I said, it has specific uses. My guess is that the incremental capital spent isn't much to have the locker system, so why not test it out. Low risk - high uncertainty bet on Amazon's part.

<comment><USER5> Optimal use case is po box replacement. Not everyone needs a po box all the time. Think of this as an ec2 po box.

I bet focus groups said they hate not being around when ups guy shows up.</comment></comment></comment>


HTML5 Can't Exist Without the Flash Platform - <AUTHOR> http://blog.digitalbackcountry.com/2009/11/html5-cant-exist-without-the-flash-platform/

<comment><USER2> _"But I also don't think that means there is no room for companies like Adobe and Microsoft that want to see the web be better."_

A piece of rhetoric there. It's implied that companies who are pushing for the standardization of web technologies don't want to "see the web be better".

" _But it goes beyond features and into another problem with the web: a consistent experience. From browser to browser you're going to get wildly different implementations of a "standard"_ "

Flash has a uniform experience, sure: you're either running it on 32-bit x86 Windows, or you're seeing nothing.

 _"Platform Evangelist for Adobe"_

So the guy gets paid to be a flash apologist.</comment>


EmployTown Launches - <AUTHOR>

EmployTown capitalizes on the flip-flop in supply and demand for talent — particularly in the tech industry. Check us out here www.employtown.com. We created a revers job application that focuses on people and not the open slots at companies. Please let us know any feedback that you may have. <comment><USER2> First thing I notice: the text. It looks terrible in Chrome, at least for me. <http://i.snag.gy/bQQwc.jpg>

<comment><AUTHOR> Thanks for pointing that out. We will need to make it so it appears better in Chrome.

</comment></comment><comment><USER3> The stuff that could be better:

If I'm an employer, why would I want to eliminate job descriptions?

If I'm a job seeker, why would I want a "reverse job application"

What is a "reverse job application"?

The "People are talking" phrase seems trite and insincere.

The exaggerated size of the quotation marks looks wrong. Since the text between the quote marks is smaller, the trailing quote mark is vertically aligned such that it looks like a pair of commas.

Other than the "Login, Signup, and email" links, there's no further information about your company or what you actually do?

Under a normal/modern browser, everything is black, white, and shades of grey save for the "SignUp" link. The result is drab, like a cloudy day.

The good stuff:

Without logging in, your site seems to hold up well under both plain text (terminal) browsers like lynx, and graphical browsers with modified/forced CSS (used by people vision disabilities). It would hold up well for the blind using audio screen readers.

Your HTML source is unusually clean. Nicely Done.

EDIT: Fonts in Firefox 9 on UNIX (OpenBSD) look fine. Fonts in Chrome on UNIX (OpenBSD) also look find, but I use custom fonts in chrome to make things legible.

<comment><AUTHOR> Thank you for the feedback. Building something is challenging and we are always working to improve. I think you brought up some good questions that we will need to address. Do you think a product video would be more beneficial than using text etc?

<comment><USER4> I like the concept, but think you need to distill the benefits down more clearly, rather than just the shortcomings of the _status quo_. I don't think you need a video - they're time-consuming, rarely informative, and often annoying; things like music either clash with people's aesthetic sensibilities or are so bland as to dilute your message.

I would like a little more color. And show me some examples., so I know it's more than another 'upload your resume!' site.</comment></comment></comment>


In 18 Years, a College Degree Could Cost About $500,000 - <AUTHOR> https://www.buzzfeed.com/venessawong/in-18-years-a-college-degree-could-cost-about-500000?utm_term=.ig6P97xJ0#.yjpObnxDW <comment><USER2> There's a concurrent trend towards MOOC programs. Georgia Tech now offers a Masters for only $6,600 - Which degree would you invest in? > [http://www.slate.com/articles/technology/technology/2013/07/...](http://www.slate.com/articles/technology/technology/2013/07/georgia_tech_s_computer_science_mooc_the_super_cheap_master_s_degree_that.html)

</comment><comment><USER3> Possibly. If demand keeps up. But in 18 years, will parents who are still paying off their own college loans be willing to sign their children's terms of indenture?</comment>


iPhone app Gunman lets you have a shootout w/ friends via augmented reality - <AUTHOR> http://www.geek.com/articles/mobile/review-gunman-for-iphone-lets-you-take-down-your-friends-in-augmented-reality-20091218/

<comment><AUTHOR> This idea could go so many places: extra points for headshots, fleshwounds not counting, additional modes like a Counter-Strike-like Terrorists vs. Counter- Terrorists team battle of capture the flag.

Also, imagine a massively multiplayer version of this at a web conference.

</comment><comment><USER2> I'd thought of doing something like this a while back but there have been other priorities. I was thinking of naming it along the lines of "Phasers to Stun". Features would have included the ability to create a force field around yourself so that phasors/lasers could be deflected or you could launch a logic bomb at you're opponent who would need to solve a puzzle etc before they could continue (although this would breakup the game play). I also liked the idea of having a tracker that would ping, somewhat like the tracker in Aliens (trying to create tension as opponents got closer). You'd also be able play team games (e.g. capture the flag) where you could pickup virtual items but if you got shot, you'd drop your item which other people could then pick up. There were also different roles within a team, someone could be a medic, or a countermeasures specialist who could jam opponent systems etc.

The opportunities are endless, where you combine the real with the virtual geo-located world. Anyone for virtual hide and seek ...

</comment><comment><USER3> There was a similar program for the old Palm Pilots, where you used the IR capabilities to 'shoot' other devices. Unfortunately the other devices had to be pointed at you for it to work. I'm glad to see how far virtual gun battles have come in the 21st century.

</comment><comment><USER4> My friends probably aren't very good shots and easy to hit.

Can they augment Godzilla in there with some kind of killbot AI?

<http://affiliatemarketingebook.info/images/pink_goggles.jpg>

</comment><comment><USER5> It seems to use shirt color to identify a kill. That seems trivial to hack (both ways).

<comment><USER6> sure, but supposedly if you were playing with your friends, then everyone would want to play fair, or else it's no fun :)

</comment></comment><comment><USER7> I suspect that this is going to be the Pong of the augmented reality game: the simplest thing that'll be fun forever in endless variations, and something upon which amazing things can be built.

</comment><comment><USER8> Isn't this pretty much laser tag, except using different technology (camera)?

So it's innovative, but only in the aspect of being able to do this on the iphone with the hardware it has.

<comment><USER9> It also doesn't require special guns, no one has to wear bulky sensors which can be covered up, and it can be done on a device that many people carry with them wherever they go.

So it's innovative, but only in the aspect of being easier and having a low barrier of entry.

<comment><USER8> That's essentially what I said.

<comment><USER9> You missed my point - those are significant innovations.

<comment><USER8> I think the innovation lies solely in being able to implement this on iPhone's limited hardware. I didn't mean to de-emphasize that achievement. I just wanted to point out that being able to shoot your friends without them actually dying is something already achieved.

I also think that with customized equipment using GPS and image recognition instead of sensors could improve current laser-tagging offerings. Digital zoom for scoped snipers, gps for king of the hill/domination type games, etc.

<comment><USER9> Portable music was achieved with the Sony Walkman. The iPod is still innovative.

<comment><USER8> Right, and if you read my previous posts I _never_ said it was not innovative.

I've actually never played laser tag. I just imagined that it might be easy for someone, like me, who has never played laser tag, to attribute the perceptions of innovation of laser tag all to this application, when really the innovation is in reimplementing laser tag using modern mobile technology.

<comment><USER9> But then you downplayed that innovation because it is only iterative. My point is that most innovation - even meaningful innovations that change the technology landscape - are iterative.

<comment><USER8> I don't really think this is the next iteration of laser tag. It's a different take on laser tag, and I didn't mean to downplay the innovation at all. I simply wanted to point out that this ain't laser tag 2.0, but rather a new way to play the game. I want to emphasize their achievement in porting laser tag to the iphone platform, and not on their achievements of making shooting your friends possible.

Plus, all progress is either random, or iterative, so I'm not sure I understand your point.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> I've been waiting for someone to implement the game from the movie Gotcha!. Looks like it's been done. Like sabat said, why didn't I have the guts to pursue it.

</comment><comment><USER11> Face detection algorithms are no longer just for digital cameras. Bones points for shooting someone in the face?

</comment><comment><USER6> i'd be afraid of dropping my phone while playing this game ... seems easy to slip out of your hand while you're running around/ducking/tapping furiously on your screen. some sort of wrist strap (like those that come on digital cameras) would help, though

<comment><USER8> Maybe some of those cheap attachments like they have for the wii remotes, but instead turns your iPhone into a gun.

</comment></comment><comment><USER12> In the video it says that when you hit an enemy, his phones vibrates. How do they do that?

<comment><USER13>
        iPhone of person whose color was just tagged?

        AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

[http://stackoverflow.com/questions/1856538/iphone-sdk- shake-...](http://stackoverflow.com/questions/1856538/iphone-sdk-shake-and- vibrate)

<comment><USER12> I should've been more specific: How do your iPhone, on which you shot your enemy, send a message to the target's iPhone so that it can vibrate?

<comment><USER14> the most likely answer would be to use GameKit, which communicates via bluetooth and can be used to discover other phones that are nearby. no wifi connection needed.

<comment><USER15> Or perhaps their server keeps track of GPS coordinates to know when two online players are in target range of each other?

<comment><USER14> having just now read the article, it appears they are using wifi to connect players. bluetooth isn't usable by third-party programs if you've got an original 2g iphone, so they've widened their target market a bit that way.

therefore, there's no need for gps. i suspect it wouldn't be accurate enough to do any good, even if you wanted to use it. there's no reason to determine whether a player is in range or not; the program knows which players are in the game from the very beginning.

also, i'm guessing that they don't use an internet server to mediate games. there's no real need for one, and eliminating that need means the game is less expensive to maintain.

</comment></comment></comment></comment></comment></comment><comment><USER16> This is getting uncomfortably close to the project I'm working on. I'd better hurry.

</comment><comment><USER17> The only problem I have with this idea: why didn't _I_ think of it?

<comment> bjelkeman-again Now there is a game which is very close to one I was thinking of myself. There is going to be a lot of this stuff coming, people running around on the streets in their augmented reality world shooting dragons...</comment></comment>


Microsoft Introduces CoffeeScript...uh I mean TypeScript - <AUTHOR> http://www.typescriptlang.org

<comment><USER2> This really isn't very similar to CoffeeScript. It's a bit more like Objective-C, in that TypeScript is a superset of JavaScript. From what I can tell, there are really only two additions:

1) Type Annotations. These are just simple extensions to function definition syntax. So you can make a function like `function helloWorld(msg: string) {}`, and get static type-checking.

2) Classes. They add a simple ES6-compatible `class` definition syntax. (along with `interface`).

Since it's a superset of JavaScript, rather than a whole redesign of the language, any valid JavaScript file is valid TypeScript. But, similarly to CoffeeScript, TypeScript is compiled to JavaScript before execution (rather than being an IE-only runtime or something).

This is a pretty earnest, carefully restrained effort to patch two of the most significant pain-points in JavaScript. Personally, I find this more appealing in theory than CoffeeScript, although in practice it'll have to catch on first. Props to Microsoft for trying something good :)

<comment><AUTHOR> No doubt you are right, probably about all of this. But at first look, to me, it looked like CoffeeScript. More importantly my HN title is amusing, and we can always use a little more fun.

<comment><USER3> This looks nothing like coffeescript. Coffeescript is a perl syntax language which cross compiles to javascript, and has no common basis with JS other than fundamentals of programming. TypeScript is a superset of Javascript, uses identical syntax, and is loosely based on ECMA Harmony-- the future of Javascript standards. The only thing in common with coffeescript is that it's installed via node and cross compiles.

I see the humor you're trying to play here, but things like this are actually kind of rare-- microsoft offering a contribution to the open source community with zero gain to their own systems, and respecting established standards. To imply that they're ripping off CoffeeScript is irresponsible, and downplays the significance behind their work. I for one will be looking for ways that I can contribute to this project as it mitigates nearly every concern I had WITH coffeescript.

</comment></comment></comment><comment><USER4> Other than that it's compiled to JS, I see absolutely no relation to CoffeeScript here. It's just an ugly and statically typed version of Javascript for all those C# folks who want to hop on the fancy Node.JS bandwagon but can't sleep at night without their type safety...

</comment><comment><USER5> The TypeScript compiler seems to be entirely written in TypeScript: [http://typescript.codeplex.com/SourceControl/changeset/view/...](http://typescript.codeplex.com/SourceControl/changeset/view/d397c54a55db#src%2fcompiler%2fparser.ts) ... always a nice touch.

</comment><comment><USER6> Earlier submission: <http://news.ycombinator.com/item?id=4597716>

Urls are exactly the same, but duplicate detection failed for some reason.

</comment><comment><USER7> More like Dart than coffeescript, amirite?

</comment><comment><USER8> looks more like Dart than Coffeescript , in fact it is very similar to dart , so nothing new here , except for the visual studio integration. In a few years , you'll have to know js and one of these "languages" to get a js job ... that's the babel tower effect , the reason is most of the developpers dont like plain javascript. And ES6 is not likely to be operational within 5 years , from an enterprise perspective , since all these legacy phones and browsers will never support it (full ES5 is not even supported by most of the 2012 handsets) . ES6 is coming too late.</comment>


Easily plot realtime data (via Perl and GnuPlot) - <AUTHOR> http://users.softlab.ntua.gr/~ttsiod/gnuplotStreaming.html

<comment><USER2> Line 5 just made me spill my coffee (or I need to drink some more). Since STDOUT is the default filehandle, there is no need to muck around with that anachronism. A simple $| = 1 would suffice. This idiom was once useful for setting autoflush for a filehandle _other_ than STDOUT, but this is not the case here. For a lengthier discussion on this, including the apologies of Randal Schwartz for coming up with it (when admittedly other facilities were not available for the very specific use case it addresses) see [0].

[0] [http://stackoverflow.com/questions/196754/what-does- selectse...](http://stackoverflow.com/questions/196754/what-does- selectselects-10-do-in-perl)

<comment><USER3> A nicer way to do it that's not as obtuse, since 5.6 is to do

      use IO::Handle;
      *STDOUT->autoflush(1);

This ends up far clearer than either example, and the idiom even extends easily to all file handles, lexical or otherwise.

EDIT: That being said,

      system("sleep 0.02") == 0 or last

is even worse. There is no need to go out to a shell or even an external program for that.

      use Time::HiRes;
      ...
      sleep(0.02);
      ...

Not only will that work on far more systems, it will use less resources and is available to all perl's since 5.7.3 (development release from March 2002, first in stable release from July 2002).

<comment><AUTHOR> Thanks for this. Note that the "sleep" is not part of the plotting script - it's just an example that generates data for plotting. I updated the page with your suggestion.

</comment></comment></comment><comment><USER4> Perl/shell utilities to drive gnuplot come over and over on HN and Reddit. Gnuplot is _slow_. There's a better (and easier) way to deal with realtime data:

<http://www.thregr.org/~wavexx/software/trend/>

It's already been used for all kind of stuff (<https://projects.ardrone.org/boards/1/topics/show/491>, ECG, etc).

</comment><comment><USER5> Very cool! I use gnuplot and a simple Ruby script [1] to plot my ab results. I may take a crack at adapting this technique to a Ruby script so I can see my results in real time.

1 - <https://github.com/bradland/apache-bench-grapher>

</comment><comment><USER6> Got a better one for you: <https://github.com/dkogan/feedgnuplot>

As the script from the OP, this is a tool to plot STDIN. This one has been refined far more, so it's trivial to use and very powerful.

<comment><AUTHOR> "This program is originally based on the driveGnuPlots.pl script from Thanassis Tsiodras. It is available from his site at [http://users.softlab.ece.ntua.gr/~ttsiod/gnuplotStreaming.ht...](http://users.softlab.ece.ntua.gr/~ttsiod/gnuplotStreaming.html)

:-)

</comment></comment><comment><USER7> How is that simpler than, e.g., Python's matplotlib?

<comment><USER8> What is simpler depends on which method you know. I'd also use matplotlib in this case, if you already know Python it's great for some quick plotting.

</comment></comment><comment><USER9> Have you tried using tcl/blt?

</comment><comment><USER10> Perl is like a corpse of a beautiful woman. Tempting, but still so very wrong.</comment>


Auto-expiring TODO notes in Ruby - <AUTHOR> https://github.com/andyw8/do_by <comment><USER2> Might it not make sense to invert the parity of the environment variable and require its being set for do_by to be used? I imagine most would rather set an environment variable in their dev environment than ensure it gets set in every possible production instance... :/

As much as 'turning off asserts' is the classical style, that's more to do with the design of older instrumentation than the sanity of it.

<comment><AUTHOR> Good suggestion! I have noted it: [https://github.com/andyw8/do_by/issues/2](https://github.com/andyw8/do_by/issues/2)

<comment><AUTHOR> And it's now implemented thanks to joallard.

</comment></comment></comment><comment><USER3> Lovely language / solution mismatch.

Any compiled language would fit this much better - fail at compile time. Or in interpreted-o-world, at least do it at test time.

I guess it's just lovely when deployed, working, test-passing software suddenly starts failing on a server (all servers at once, globally), because someone added a TODO a few weeks ago.

<comment><USER4> From the README:

"In your production environment, set DISABLE_DO_BY=1 to disable checks."

<comment><USER5> Given that we are talking about lazy/overworked on top of lazy/overworked here, why any confidence that this will be done 100% of the time?

Putting time bombs in your code, regardless of a global configuration switch, is just asking for trouble.

<comment><USER4> I agree with you; my point was that while skrebbel spoke as if the point had never even been considered, it had in fact been considered.

I have to admit to a certain amount of pet-peeve-like sensitivity to people commenting in ways that make it look like they only read the title.

<comment><USER5> I am guilty of this more often than I care to admit. Ooops.

</comment></comment></comment></comment></comment><comment><USER6> Don't do that.

Some years ago I had the same idea and realized something like that with the C-Preprocessor in a C++-Codebase.

When did my Todo's expire? AFTER testing, just before a new release. With my idea of exipiring Todos I created a major pain in the butt for the team.

It would be different if some other "sort of" alarm would be raised when TODOs proliferate, but a failure in the code is not a good solution. (i.e. hook a todo checker into your contious build system, let the nightly build raise hell when there are too many todos - but do not fail the production code.)

</comment><comment><USER7> So there may not be much awareness so this, but <strike>Ruby</strike> Rails (as noted below, the annotations or part of rails/rake) has this feature that you can add special annotations # TODO # FIXME # OPTIMIZE comments to you code, and "$ rake notes" to list them. it also allows you to have a custom annotations comments : For a full description, see : [http://rubyquicktips.com/post/385665023/fixme-todo-and- optim...](http://rubyquicktips.com/post/385665023/fixme-todo-and-optimize- code-comments)

Better to make a # DOBY annotation and modify the rake task to shame if the date passed. You could also add this metadata to the existing annotations. If you what to automate the shaming, write a guard gem to watch for these annotations.

<comment><AUTHOR> This is a Rails feature, not a Ruby feature. But building something based on this could be useful.

<comment><USER7> Thanks Andy, you are correct! The annotations are part of Rails / Rake.

</comment></comment></comment><comment><USER8> Silly.

I fail to understand how the developer getting the surprising out-of-context (with regard to what the developer is currently doing) build failure due to time-bomb-TODO-comments suddenly is expected to experience an energy burst and fix the issue right then and there. After all, the developer didn't fix the issue when the comment was written!

I think this just leads the developer to either a) delete the comment or b) increase the due date.

<comment><USER9> After reading the title, I actually expected the code would do the opposite: remove the TODO because nobody found it to be the right time to address it over the specified period and they probably never will.

<comment><AUTHOR> Developers often add TODOs for tasks that seem essential at the time, but later become redundant.

There is also the use case of when you can't do something because you're dependent on something else, for example you might have a workaround due to a issue in one of your dependencies. Once that's resolves, you can update to the newer version of that library, and remove your workaround.

</comment></comment></comment><comment><USER10> Better to make it a NOOP and have an automated test that scans for it. Too much chance of exercising it in production otherwise.

</comment><comment><USER11> Wouldn't this be much more suitable to do in an IDE or compiler? Raising exceptions during runtime seems the wrong approach to me. I wouldn't be suprised if this is possible and used in e.g. Mylyn.

Another idea would be to automatically create a task/bug/issue for every TODO created (which closes when the TODO is removed)

<comment><USER5> or an IDE that just scans the code files, picks out the lines of comments containing "TODO" and put them in a list in the gui, so you see it all the time.

Or generate a compile warning instead of a comment. Then it will annoy you constantly, with no risk to production.

<comment><USER12> I think he makes the case (and I agree) that if you create a substantial number of TODOs and they manifest as IDE/compile-time warnings, they eventually become noise which you learn to ignore instead of fix.

</comment></comment></comment><comment><USER13> I'd see this with more value as a post-commit git hook. After a certain amount of time (or date specified) it would warn you that TODOs are about to expire, and either remove them or update the date. That way it can be project-wide and doesn't require execution.

</comment><comment><USER14> I like it. It reminds me of a concept [1] I saw presented at Fluent Conf this year, called Sunset Tests. The idea is that when you write code which shouldn't be a permanent addition to the code base (for example, a poly fill for IE 7, or an A/B test), write a test that checks for the existence of that code and fails if it's still there past a certain date.

I wonder if the TODO method could dynamically generate a test case that does the same.

[1] Everything is a Polyfill: Automate Deleting Code for Front End Performance - Rachel Myers and Emily Nakashima

[http://www.slideshare.net/eanakashima/everything-is-a- polyfi...](http://www.slideshare.net/eanakashima/everything-is-a- polyfill-33857559)

</comment><comment><USER15> Horrible implementation approach. Mixing runtime exceptions with project management that you're not guaranteed to hit while testing? lol.

A pre-commit hook is the way to go,

* Post-commit: You'll always catch the exception, but you'll be able to commit expired TODOs

* Pre-commit: you'll have to explicitly change the expired TODOs either by removing them (irrelevant TODO, todo became todone through a refactor, etc.), or discussing a better end-date ... but either way, you're forced to address the expired TODO and not run the risk of committing expired TODOs nor not taking a test path that would miss the expired TODO exception

</comment><comment><USER16> I started doing something much simpler: When working on a project I just create .todo files anywhere it makes sense. This way I can view, edit, add, and remove them very easily with simple shell commands.

I just enjoy the simplicity of `echo 'remember to test the milk' >> foo/.todo`.

<comment><USER17> I like your example. Especially because milk expires ;).

</comment></comment><comment><USER18> Why a function? I hoped it would just parse comments.

<comment><AUTHOR> I think that's a good idea. Perhaps based on a standard format such as '# TODO 2014-01-01 Fix me' ?

<comment> Ruud-v-A Why put the date in the comment itself? Just ask source control when the line was introduced, and set a max age.

<comment><AUTHOR> Interesting idea, but I'm not sure if that would be possible for all cases, for example what happens if the part of the line before the comment changed?

</comment></comment></comment></comment><comment><USER19> This is excellent. I always fail to keep track on my TODOS in files. Very useful.

<comment><USER20> My TODO comments show up in nice view in GUI I use (Eclipse). I'm sure other GUIs have similar views somewhere. I'm also sure that plugin to turn old ones into syntax errors could be done in a day or two. That sound like much safer approach then runtime exception.

<comment><USER21> A day or two, really? That seems like an awfully long time requirement for what should be a simple change.

<comment><USER20> I'm sure it is a simple change. The hard part is to find out where exactly should you do that simple change and how exactly should you do it. If you do not have experience with related APIs, you will need a day for googling and reading. Eclipse framework is huge and not all its parts are immediately understandable.</comment></comment></comment></comment>


The LESS CSS Grid - <AUTHOR> http://designshack.co.uk/articles/css/introducing-the-less-css-grid

<comment><USER2>

12

OFFS, people. You've got an excellent CSS preprocessor with mixin capability here, _use it_. Do something like this:

        #sidebar {
            .column;
            .grid_12;
            // other styling
        }

and then this:

twelve

It's easy, clean, and doesn't maul your markup.

<comment><AUTHOR> That's a great idea. I've been trying to think of better ways to combine the power of 1kbgrid and LESS.

<comment><USER2> Thanks - you can pretty much take any class-based grid system and use them this way in LESS (and SASS, of course).

(And if you're rolling your own, you can even be more concise - such as, instead of invoking theWidth() twelve times to build your classes as shown here, make an atGridColumn() function and skip making those classes.)

</comment></comment></comment><comment><USER3> Why cannot people just assign the required width to the proper elements without polluting markup with those .grid_x classes is beyond me. One may just put some .top_left_red_link and .orange_button there as well then.

If you do it properly and want your .features element to take more space you just go to your CSS and adjust width: accordingly.

If you are using some "grid system", then you go to your markup and change .grid_2 to .grid_4. And when you change markup to change presentation instead of modifying CSS—you are doing something wrong.

<comment><USER4> This. It is completely against the whole concept of separating markup from styling.

I recently stumbled upon a pretty nice CSS "framework" (it's more of a starter template) that doesn't have all the crap most grid-frameworks have. It's ironically called Less Framework 3[1] (has nothing to do with LESS.js or the parent article).

It basically boils down to a base adaptive-layout body width, and some comments that tell you the width you _should_ make an element if you want it to span _X_ columns on _X_ screen/device width and adhere to a grid

[1]<http://lessframework.com/>

</comment></comment><comment><USER5> I've always been a fan of typing things out in notepad++ and never even realized that there were CSS preprocessors. What's the advantage of using them versus using raw CSS?

It just seems like one more thing to learn, at this point...

<comment><AUTHOR> There's very little to learn, totally worth it if you ask me.

I'm also a fan of Notepad++, seems like it would be easy to integrate less.js as a plugin.

<comment><USER5> What kinds of benefits does it offer?

</comment></comment></comment><comment><AUTHOR> Sidenote:

If you are not a Ruby guy and want to use LESS without much hassle, try lessphp: <https://github.com/leafo/lessphp>

<comment><USER2> Or less.js, here: <https://github.com/cloudhead/less.js/>

<comment><USER6> Or as a Kohana module: <https://github.com/DanHulton/kohana-jscompile>

(Plug warning - I wrote this.)

</comment></comment></comment><comment><USER7> I like the idea, but working with Sass and the 1140px cssgrid.net (cssgrid because it degrades so nicely on mobile phones) I don't see much pain taken away there.

</comment><comment><USER8> how how people gone working with designers and grid layouts?

i have real difficulty getting them to stick to any kind of structure.

a grid seems very restrictive to me, so assume designers would get pretty shitty.

<comment><USER9> The restrictiveness is the main point; using a grid is a relatively easy way to divide a page up into areas, and to make sure that things line up --- which in turn contributes to having an overall "clean look". (If things on the page look like they could be lined up but aren't _quite_ , people read that as "sloppy", even if the things in question don't have much to do with each other functionally or topically. Using a grid is an easy way to avoid this sort of thing.)</comment></comment>


Show HN: Storytella – an app for authors, in development, looking for feedback - <AUTHOR> https://storytel.la/

<comment><USER2> I think it's a great idea but not sure if it's compelling enough as a stand- alone application.

Just toyed around with it for a few minutes but not sure how it's different from using Google docs?

Tracking your progress over time is compelling but it would seem that the switching cost is just too high to justify learning a new tool just for that.

Maybe I should have spent more time using it but I'd suggest focusing on the specific components of what makes your tool different than Google drive or microsoft word.

Also, I'd suggest letting people play with it or at least have a better sense of what they're signing up for because I'm sure a lot of people see a registration form and run away before even trying your software (people who otherwise might have registered if they got a chance to play with it first)

Along the same lines, I'd suggest changing your call to action button from "Register" to "Try it out!" or something like that. I can't speak for everyone but I have a feeling that young programmers tend to be averse to registering unnecessarily.

Along similar lines, making users go to a separate "register" page is just one more step that users can abandon the sign-up process. Rather make registration happen on the same page as they hit "register" if possible to remove the points in the process where people can give up.

The entity concept is really interesting - especially if I could link it to CSV or something like that but couldn't figure out how to get it working in the few minutes I toyed with the app.

All the best! :)

<comment><AUTHOR> Thanks for the feedback! Someone else has said similar things about registering and allowing people to demo the app without signing up so I'm adding that to my task list.

The entity system and the writing stats are probably the biggest differentiation from Word or Google Docs, so I'll make these features the core part of a demo.

Thanks again!</comment></comment>


Ask HN: Do you use Simple? - <AUTHOR>

Does anyone use Simple? I use Bank of America and satisfied with them. Is an online-only bank a good reason to switch? BofA has a good app and photo deposits just like Simple. <comment><USER2> I opened a Simple account with $500 and have not done a thing since then. Anything I need to do I can do fine with Chase, Wells Fargo, and my normal credit cards that accumulate frequent flyer miles. I also have an online savings account at Capital 360 (used to be ING Direct).

There are two reasons I haven't done anything with Simple: (1) getting money in and getting money out seems to be a bit of a pain (or at least I don't want to spend the microseconds required to figure it out); and (2) it's not a joint account with my wife.

Oh. And I like the frequent flyer miles that I get on my credit card. Three reasons.

And my current banking is acceptable, even if it isn't overwhelmingly fabulous. Four reasons.

And Chase and Wells Fargo have ATMs everywhere. Five reasons why.

/cue Monty Python etc.

One of the credit unions down the street from me rebranded itself as Simplicity Bank. <http://simplicitybank.com>. I wonder whether simple, minimal, etc. is all a fashion trend that will come and go.

Any bank that acquires YNAB <http://www.youneedabudget.com> and hosts it internally on their servers will get my business. THAT would be great.

However, the frequent flyer miles. I keep coming back to that. We run almost all of our business expenses through credit cards every month and as a result generate a metric ton of frequent flyer miles therefore free flights to places. That's real money.</comment>


Ask HN: Looking for a node.js throttled queue library - <AUTHOR>

Hi,<p>I was wondering if any of the Node.js masterminds out there could help me locate, if such exists, a library that basically lets me put functions in a queue, which is configured to only execute a function at a given interval. The context is that I would like to throttle API requests towards external servers, something that I think should be a rather commonly requested feature. <comment><AUTHOR> Update: I ended up creating this handy function:

<https://gist.github.com/1127863></comment>


Tax Breaks for Twitter Bring Benefits and Criticism - <AUTHOR> http://www.wsj.com/articles/tax-breaks-for-twitter-bring-benefits-and-criticism-1461947597 <comment><USER2> Benefits from shareholders in Twitter... criticism from people tired of this. I don't care how many heartwarming stories from the bright side of trickle- down economics is trotted it, it isn't the norm.

<comment><USER3> The norm has seen two decades of middle and lower class decline. The heartwarming stories are people actually being helped.

If tax incentives keep investment local, rather than profits in off-shore havens where taxes aren't assessed anyway, I fail to see the issue.

I'm all on board with closing off shore holdings loopholes for billion dollar corporations. But until that happens, this seems positive to me.

Edit: have you been to the Tenderloin? I ask not as a gotcha but whether you understand the state it and it's people are in (which you may very well).

<comment><USER4> I think this is spot on. Companies would not move to the Tenderloin without some benefits and this could change the area for better. It has a pretty good location so it should not take a lot.

<comment><USER5> Who cares about the "area." Patches of ground don't need to be improved, because they are happy as they are - not being alive. Improvements would benefit the _inhabitants_ of an area. So if your improvement of a patch of ground involves removing the inhabitants, you should really stop rationalizing what you're doing.

<comment><USER6> What inhabitants were removed? Didn't they move into an unused building?</comment></comment></comment></comment></comment>


Paper: Sharding with Oracle Database - <AUTHOR> http://highscalability.com/paper-sharding-oracle-database <comment><USER2> I've developed with Oracle before and it's a good database. It has its gotchas like anything, but I respect it.

However, this presentation is all PR blather. For example, in the MySQL Replication Limitations section, they don't even mention how Oracle does it differently. For example, if not async replication, do you do synchronous replication? So, when one change needs to be made, you hold everything up until it can be replicated? You're claiming "zero-data loss capability". That isn't possible. Let's say I insert something and before the server can even log that it happened (yeah, logs need to be written to disk and that takes time even if it's soooo minuscule) the server dies. Well, that's data loss.

Online updates are awesome! MySQL can be a pain sometimes. Oracle is not some sort of magic.

<comment><USER3> _You're claiming "zero-data loss capability". That isn't possible. Let's say I insert something and before the server can even log that it happened the server dies. Well, that's data loss._

No, because the client should see that the transaction aborted and retry it.</comment></comment>


Awesome resignation letter from a CEO to the company board - <AUTHOR> http://economictimes.indiatimes.com/small-biz/startups/housing-com-co-founder-rahul-yadav-resigns-as-ceo-board-to-meet-on-tuesday/articleshow/47155071.cms

<comment><USER2> Looks like he's back: [http://economictimes.indiatimes.com/small- biz/startups/rahul...](http://economictimes.indiatimes.com/small- biz/startups/rahul-yadav-stays-as-housing-ceo-but-softbank-takes- reins/articleshow/47163281.cms)

<comment><AUTHOR> May be their free marketing strategy :)</comment></comment>