The Worst Programming Interview Question - <AUTHOR> http://www.nomachetejuggling.com/2014/06/24/the-worst-programming-interview-question/ <comment><USER2> Hypothetically, if when asked this question in an interview I were to reply "I'd look up the canonical solution on the internet and just implement that. I have better things to keep in my brain than linked-list algorithms, and there's no way I'm going to beat decades of phd work off the top of my head", what would happen?

Obviously it depends on the job I was interviewing for. Let's assume I'm not angling for a position as lead on a distributed load balancing layer or something.

I suppose if they're looking to see my problem solving workflow then I'd look like kindof a dick. But then, as the article points out, so would they.

<comment><USER3> That's probably fine if you're going for a junior position where your job is to bang out code for designs that others have come up with.

But if you go up a few steps then suddenly the problems might not be that clearly defined and the set of possible solutions can be huge. A person who is constantly relying on Google to come up with solutions is probably not going to be that useful in design discussions.

I'm not defending the particular question, but on-your-feet problem solving is a real and valuable skill.

<comment><USER2> Oh I agree. That's exactly the stuff I keep in my brain instead of linked list algorithms, which have a _mathematically proven optimal solution._ Remembering them when I don't use them regularly would be a waste of brainpower which could be better used for solutions to business/UX/architecture problems, which one cannot solve with pure logic.

<comment><USER4> I am not so sure. It's not just about solving the problem, but sometimes it's also the willingness and mentality to tackle something that's outside your comfort zone, as well as the approaches.

For example, given the loop in linked lists question, even if a candidate is not able to solve it completely, a reasonable approach would be to break the general case to more specific, trivial cases, such as: what if the loop has known length, what if the loop starts at a known location, etc. Interview questions are not binary decisions, you can learn a lot from a candidate just by seeing how they respond to a question.

<comment><USER2> (Just to be clear, as this is a permanent and public record, I'm perfectly capable of doing this kind of thing. It's not really an unreasonable question to ask. I'm just being facetious because it's friday afternoon.)

</comment></comment></comment></comment></comment><comment><USER5> This question has an "a-ha" moment, but it is not required to solve the problem adequately. I wholeheartedly disagree with this statement:

> People like to pose puzzlers to "see how people think" but that's nonsense > in the case of puzzler questions. You can't reason your way through a > puzzler, that's why it's a puzzler

There are plenty of ways to solve this problem. They're not all optimal, of course, but you don't ask these questions to get the optimal solution, you ask these questions to understand how the person reasons about them.

This more falls on the interviewer than the candidate. It's upon the interviewer to encourage a dialogue about the problem and talk aloud through it.

Yes, some qualified candidates are bad at this. I'm sorry to hear that, but it can be practiced. Being good at interviewing can be learned. It's not terribly difficult. My number one pro-tip? Never do this:

> If you don't have the a-ha moment in the interview, you won't get it, and a > good chunk of your brain will be devoted to thinking "oh shit I'm blowing > this interview" rather than focusing on the question at hand.

Never think that you're blowing the interview. I got a job at Google and I know for a fact that I didn't get the optimal solution to some of my questions. It's not about the solution, it's about the process.

<comment><USER6> I've never been asked such a question, provided a sub-optimal answer, and been allowed to continue. Every single time, the next question then is 'Can you make it <faster|better|etc.>?' Maybe, but by this point, I already know this is a terrible place to work.

<comment><USER5> I've been in this exact same situation. And I was offered positions. I guess that's my point - I didn't always find the perfect solution. I was pressed to continue to think about the problem until whatever allotted time was up. I wasn't [entirely] judged based on my final solution; I was judged on my ability to reason about the problem and demonstrate competency in my coding abilities.

</comment></comment></comment><comment><USER7> It's a bad question if you expect a quick, explicit answer. It's somewhat less bad if you're looking to have a conversation about how to solve problems the candidate hasn't seen before.

I've used an arguably "puzzle" question that was presented to me in an interview with some success -- the missionaries and cannibals problem. There are three missionaries and three cannibals that you must get across a river. The boat holds only you and one other person. The cannibals on either bank must never outnumber the missionaries on that bank. It's a good question to see if a candidate understands how to apply some basic computer science concepts. It can easily lead to a 30 minute discussion at the white board, with no need to get working code.

My favorite question is completely different. "What do you like best about your favorite programming language and what would you change about it if you could?" Anyone who doesn't see any flaws in their favorite language, particularly if it's Java, gets politely shown the door.

<comment><USER8> > My favorite question is completely different. "What do you like best about > your favorite programming language and what would you change about it if you > could?" Anyone who doesn't see any flaws in their favorite language, > particularly if it's Java, gets politely shown the door.

What about the poor people who've found a language that they actually like, and understand the tradeoffs that were made? I suspect I recently failed an interview for not having a good answer to that question, but really, what am I supposed to say? If I thought there were significant problems with my favourite language, I'd find a better one.

<comment><USER9> I once voted -1 on someone for not having a good answer to this one a language that he had used for years. I regretted the vote later, as he turned out to be excellent.

Having said that, it does surprise me that people have a hard time with this. Certainly I hope that you like your chosen language and understand the tradeoffs being made, but that is the point of the question really. Surely you can reason about these tradeoffs and have a discussion in this area? If your language is Java and you talk about how you are ok with their decision on erasure because of the legacy concerns, that's a good answer. I may (or may not) agree, but it's still a perfectly good answer. :)

OTOH, it is strange to me that someone would have worked in a language for 10+ years and literally can't come up with anything that they dislike (even understanding the reasons for those limitations). No matter how good something is, it is hard to imagine working with anything (or anyone) for ten years without coming up with a few pain points.

<comment><USER8> > If your language is Java and you talk about how you are ok with their > decision on erasure because of the legacy concerns, that's a good answer. I > may (or may not) agree, but it's still a perfectly good answer.

I wouldn't feel comfortable answering "what would you change about X" with something I actually wouldn't change about X (though maybe I should).

(FWIW my language was Scala, and while I've only been using it for ~5 years there's very little I would change. The answer I gave was to use HLists rather than Tuples in the standard library, but that feels like a nitpick more than anything else)

</comment></comment></comment></comment><comment><USER10> I appreciate all the technical discussion of this question in the article and here in the comments, but I think the question is just a symptom.

The root issue here is the other interviewer and the apparent interview process.

 _> 'In the post-interview pow-wow, all of the engineers who'd interviewed him gave him the thumbs up, except my interview partner except my interview partner, who refused to hire him...'_

Yes, yes, optimizing for false negatives over false positives is all the rage, but this just sounds broken - wasting the efforts of a full panel only to accept an arbitrary single-question veto.

 _> '..on the grounds that he completely flubbed this question, and "any engineer worth his salt should be able to answer it."'_

Good engineers don't necessarily make good interviewers. Outright excluding someone based on any single question is just horribly self-satisfied behavior.

<comment><USER11> If you look at the structure of their pow-wow rather than its labeled purpose, you see that its real purpose is not to find a competent engineer but just to build a consensus. E.g. so nobody complains they wouldn't have hired the candidate.

It's the same principle which puts multiple men on a firing squad.

<comment><USER12> Good way to hire a camel when you need a mustang - your optimising for mediocrity.

Everyone does know the joke about a camel being a horse designed by a committee?

And should not have the chair/leader of the committee over ruled the outlier anyway.

<comment><USER13> You should absolutely get a camel over a mustang.

Even though they look like they're designed by committee, camels are an example of form following function. They're very well suited for their environment, and although they're stubborn, make good work animals.

A mustang on the other hand, is a feral horse. They're harder to domesticate because they've known freedom, and they've adapted to living in the wild by being smaller and more timid than horses selectively bred for doing work. If you really do need a horse, there are few cases where you need that horse to be a mustang.

If someone is hiring you because they think you're a mustang, you better hope they're caught up in the romanticism of cowboy stories instead of them being desperate for cheap labor or meat.

<comment><USER12> __WARNING __contains Sarcasam _WARNING_ *

Of course that why history is full literally full of elite heavy camel units who turned the tide in so many battles and why Alexander's companions rode camels and of course the charge of the heavy camel brigade in the Crimea.

</comment></comment></comment></comment></comment><comment><USER14> _> With all of those hundreds and hundreds of minds, this problem remained open for 12 years._

A very good point. Some people just forget that while solution can look simple when it's already known, actually finding it can be extremely hard and more akin to invention breakthrough. So such question is more similar to asking to prove some difficult theorem really, than to anything else.

</comment><comment><USER15> This article raises, sort of incidentally, one of the issues I've noticed recently teaching intro CS. Every CS2 class teaches linked lists, right? (Except for the ones that hit them in CS1, of course.) But: when was the last time you had to roll your own linked list?

Once, not _that_ long ago, it was important to cover linked lists (and other data structures) because you'd have to be writing them in order to implement a program of any significant size. Now, though, all the common ones are already implemented for you (and to be honest, we don't even use LinkedList all that often---array-based lists are better in most real use cases).

So now their role in (my) CS2 is chiefly as setup. I still need to cover linked lists because they establish concepts that will be important when we get to trees (links) and to more general graphs (cycles and the lack thereof), as well as in operating systems (continuation inodes, memory allocation) and other areas.

But implementing an honest-to-god plain-old linked list holding ints or strings or whatever? Who does that anymore?

<comment><USER16> This is a question I see asked all the time and it's absolutely mind-boggling to me that you could ask it. Who do you think writes the linked-list libraries you use? Do you think the libraries just magically appear when someone wishes them up? Do you think we should use the current set of libraries forever, calling them "good enough", and limiting ourselves to current programming languages for all of history? That's what will happen if we no longer teach people to write these things; or else (more realistically) we leave it up to them to make the same mistakes and waste time solving the same problems which were solved decades ago, because no one ever bothered to teach them the answers. Give it a few years and we'll have no one left who can program in anything but javascript; no one left to write the browsers! --- or so I worry when I read HN sometimes.

<comment><USER15> You'll notice I'm not suggesting we stop teaching them. But what you describe are specialised applications; my point is that where linked lists were once something that every programmer, large and small, could reliably expect to have to write repeatedly, they're now something that are only _directly_ relevant to, say, library maintainers.

</comment></comment></comment><comment><USER17> I think an unreasonable question (ie, of a practical situation in which no one will ever find themselves) deserves an equally unreasonable answer:

Write a program that starts at the head of the list and in a loop follows the "next" pointer on the current list entry, halting when the pointer is null. Run the program and wait. If the program never ends, there's a cycle in the list.

<comment><USER18> I have had this problem in real life. I had a graph database, and I needed to find the end of a path in the graph. If the the path looped back on itself, my program would not terminate.

<comment><USER19> This occurred to me as well: the graph data model is one of the few areas in which you might practically need to address this problem. Again, however, a lot of these issues specific to the graph data model are open research questions and not really appropriate to an engineering interview.

</comment></comment></comment><comment><USER20> What if you gave the answer immediately after asking the question and then judged the candidate by how much their face lit up?

<comment><USER21> But why? One puzzling thing about our industry is our obsession with finding suitable proxy indicators for programming ability.

But we can test for programming ability directly.

<comment><USER20> Oh, I agree. I just thought it was interesting to think that a bad question might be improved by giving its answer away.

</comment></comment></comment><comment><USER22> Disagree that this problem never arises if you're not implementing a linked list data structure.

Here's a file a customer sent you that describes their organizational hierarchy:

      ID    Name            Manager
      1     Alice           4
      2     Bob             1
      3     Charlie         8
      4     Dave            -
      5     Elise           3
      6     Fred            2
      7     Gemma           1
      8     Henry           5

Is this a valid hierarchical tree? Okay, it's not exactly the same problem, but it's certainly similar...

<comment><USER23> Technically in the context of an org hierarchy that would be detecting cycles in a directed graph, not a linked list cycle. I don't think the algorithm to detect cycles in a linked list applies to general graph problems, and the problem is much harder for graph cycles.

<comment><USER22> It's not a generic directed graph either, though - each node only has one outbound link. The sequence of parents for any given node is a linked list, and a cycle in that list is invalid. You certainly don't need to run tortoise and hare for every node path looking for cycles. There are other approaches, clearly - reachability analysis starting from each root node, for example.

But if I were to ask you to write a routine to find the root node for a given node based on that data, then ask you to guard that routine against finding yourself in an infinite loop or stack overflow, tortoise and hare would be a legitimate answer.

Just trying to make it clear that just because the question asks about linked lists, doesn't mean it's always about abstract data structures.

</comment></comment></comment><comment><USER24> The article seems to imply that the turtle and hare algorithm is only valid solution for this problem, which is certainly not the case.

This problem can be also solved by building big set of already seen list nodes or adding bit to list nodes themselves. Whis is both something that everybody should be able to come up with and implement.

I think that this is in fact quite good interview question because while there is one non-obvious perfect answer, it also has some sub-optimal solutions that are pretty obvious and simple to implement.

<comment><USER21> You're right, though I think he's talking about the weird type of interviewer who expects candidates to know obscure, non-intuitive optimal solutions to these problems.

I once met an interviewer who liked to use the "reverse a string" question, except he was expecting candidates to know the XOR trick. Suffice to say few, if anyone, ever got past his "filter".

Primadonna interviewers who use interviews as ego-strokes are a problem in our industry. It's where the stupid "why are manhole covers round" questions came from, and it's where these hyper-optimized algorithms questions come from.

</comment></comment><comment><USER25> _' Between 1955 and 1967, the problem of "how do we determine if there is a cycle in a linked list without modifying the list" was an open problem. Meaning, any number of PhD candidates in Mathematics or Computer Science could have written about it as part of their dissertation. With all of those hundreds and hundreds of minds, this problem remained open for 12 years.'_

Were there any computer science graduate programs between 1955 and 1967?

You're not dealing with "hundreds and hundreds of minds", you're dealing with those minds who 1) heard about linked lists, 2) heard about or realized there was a cycle detection problem, and 3) devoted any energy to that problem as opposed to the myriad other problems available to a mathematics or electrical engineering graduate student. All of this has to have happened between 1955 and when the problem was solved _in advance of_ starting to write the paper on it, _in advance of_ publication of the paper in 1967. The paper also presumably included a proof of correctness that isn't being asked for in the interview.

The interviewee has the further advantage that they know there _is_ an answer in the space of the constraints the interviewer has drawn. As they suggest less optimal solutions, those constraints get tighter, and the answer gets easier to find. If they have been through an undergraduate computer science course, they probably _also_ have more familiarity with linked lists than most of the people attempting to solve the problem before 1967.

None of which is to say that failing to find the answer deserves disqualification - that's probably still unreasonable - but the picture is nowhere near as absurd as presented.

</comment><comment><USER26> I disagree with the author that this is a "puzzle question" that requires an "a-ha" moment. Quite the opposite, it is an easily solvable algorithmic question (maybe with a little guidance after the candidate suggest suboptimal solution). Also, the good thing from the candidate point of view is that it is the sort of questions you can prepare for.

<comment><USER27> >sort of questions you can prepare for.

The point is why do you need to prepare for and regurgitate these silly answers that you will almost assuredly never ever ever use in your day to day job?

<comment><USER28> +1 to that. Most programming jobs are about integrating a bunch of different technologies together to solve a business problem. In 20 years I've never written a linked-list or sorting algorithm for work yet interviews are increasingly narrowly scoped to algorithm questions. I've found that these questions are usually asked by young people because they are fresh out of school and have been led to believe that knowledge of algorithms is the most important consideration. Give them a decade of creating products based on css, html, node.js, nosql, yessql, etc and they will come to realize that programming is more about understanding what a customer needs and finding the most efficient way of delivering a solution. Ability to work with other, lead a team, write clearly, explain to customers the tradeoffs and costs of different solutions are actually way more important than knowing how to find a cycle in a linked list.

<comment><USER29> But how do I test all of that in 30min or less? Do I have to actually get to know the person, their work history and their strengths? Does that mean I have to read the resume before I enter the room?

</comment></comment></comment></comment><comment><USER30> Has anyone actually answered this question on the spot without help and without knowing it? Probably not without help, but then how do we judge the amount help given to an interviewer?

I have been going through my own crises of interview question. My go to question for interviews which I have asked of about half a dozen candidates so far, wasn't completely flubbed only once. The only people I know who gave the good answers besides myself were my boss and our intern from MIT during mock interviews. I have been grading the candidates not on being able to write the solution in code like I intended, but on being able to come up independently with bits needed for the solutions. This has been quite unsatisfactory. How do I know if my question is too hard, or if something else is wrong, like prescreening of candidates?

<comment><USER31> Yes, I did figure it out. Actually, the answer I came up with was slightly different: it was pretty clear that I had to move the first pointer to get inside the cycle. Once I was inside, I thought the second pointer would need to move a lot to find the cycle, rather than just going two hops. So I proposed to advance the first pointer by n, and the second one by exp(n). Maybe it would go faster, who knows.

By the way, this was the question at my first interview ever, so I do remember it quite well.

PS: I interviewed many candidates since, and I would never ask such a question.

</comment></comment><comment><USER32> > In this case, the generally "correct" answer is a tortoise-and-hare > algorithm, where you have two pointers at the head of your linked list, one > traverses the list two nodes at a time, and one traverses the list one node > at a time; if ever the pointers point to the same node, you have a cycle > somewhere.

I'm an extreme novice to programming. I don't fully understand this.

1) How can you traverse a linked list two nodes at a time? Is this just short- hand for "go to the next node, then go to the node after that, and call that one operation"?

2) If you can detect when two pointers are pointing to the same address, couldn't you solve the problem by traversing the list one node at a time, storing the addresses of each node in an array, and checking to see if the array contains any duplicate values at intervals?

<comment><USER33> With regards to (2), this is one way of solving the problem. However, your solution uses O(n) memory (where n is the size of the linked list), and the tortoise-and-hare algorithm uses only O(1) memory. Here's how it works: [http://en.wikipedia.org/wiki/Cycle_detection#Tortoise_and_ha...](http://en.wikipedia.org/wiki/Cycle_detection#Tortoise_and_hare)

<comment><USER34> unless the interviewer plans to move the goal posts, there was no specified memory restriction in the original question.

<comment><USER18> Complexity optimization is a generally useful skill.

"moving the goal posts" is called "every month at work, when you finish 1 task and then move on to another task, instead of going home and getting paid to rest on your laurels"

<comment><USER34> moving goal posts, is "I asked you for x, you provided me with x, but I really wanted y, so now I'm going to tell you you're wrong"

You want someone to answer a programming question within a particular set of boundaries, you set those boundaries.

<comment><USER25> I don't think it has to be "wrong". If I were asking this question, and I was provided with "store them in a hash", I would say something along the lines of "that's a correct solution" and _then_ add additional constraints.

"How you adapt in the face of additional constraints" is very much relevant to programming.

</comment></comment></comment></comment></comment></comment><comment><USER35> Had that exact question given to me before, but it was in the form of a closed book "pre-screening" written test.

I simply put down my pen, walked out of the room and told the recruiter if this company was hiring based on these type of questions I would be a terrible fit :)

<comment><USER29> They were likely hiring to fill a PHP dev roll writing CRUD web forms too, right?

I've been places with tough interviews and incompetent developers and the opposite as well. One does not necessarily correlate with the other.

</comment></comment><comment><USER36> I would love to find the definitive resource for preparing for interviews like this. Besides answers like "just be awesome", is there such a book or page?

In the past I've searched for various compendiums of algorithm interview questions and saw the cycle detection one come up. I knew I would never be able to solve such a problem on the spot. This blog post initially put it in perspective for me, that its pretty much a BS academic question that you have to already know the answer to - until I read the comments here, full of totally awesome alpha SV nerds who are saying "I instantly got the optimal answer without any foreknowledge". Now I don't know what to think.

</comment><comment><USER37> After a 10 minute phone screener I now rely on a paid pair-programming session to identify good candidates. This is what you're going to hire them to do so why waste your time asking questions that at best form a poor approximation of their skills?

</comment><comment><USER38> If I do not know any better, the first thought that would come to my mind would be: "Wow, this company has really messed-up code base, and people here cannot even get linked-list done right. Do I really want to work here?"

</comment><comment><USER39> I had this in an interview (back '96). Came up with a linear time constant space solution: create a new node, push it on the front, reverse the list, check if the 1st node is the same one you pushed, if so it has a loop, otherwise it doesn't. The downside is you need to reverse again to get the original list.

Another answer is to mark nodes using the low bits of the next pointer. Also linear time, but also requiring clean up. I can see how not knowing c would cause people to think this question was somewhat unfair, but I didn't see it that way.

<comment><USER40> How would you reverse a linked list with a loop?

<comment><USER41> If your list is laid-out a contiguously in memory as structs with both next and prev ptrs, you can visit each member using ptr arith and switch the values without actually walking the list using next and prev. Ditto if there's an underlying data-structure involved such as an array.

<comment><USER40> How could you have a linked list with a loop in contiguous memory? Or in an array?

<comment><USER25> You allocate an array of objects that contain pointers, then link them together. It does not have _all_ of the typical benefits of a linked list (in particular, there's a hard max size and may require a _fixed_ size, depending on just what you're doing to it here) but it does allow O(1) reordering elements for a list-order traversal, while also allowing a linear traversal through memory.

<comment><USER40> If the linked list has a loop, but you don't know it, how do you figure out the length of the list to allocate enough space for your array? How do you copy the list into the array without traversing the list? How do you traverse the list without hitting the loop and looping infinitely?

<comment><USER25> If you know that all the elements in the loop are _already in the array_ then traversing it is easy. Of course, if you have an upper bound for the length of the list, there's an easier check...

</comment></comment></comment></comment></comment></comment></comment><comment><USER42> I don't think interview must entirely be related to the practical world. I mean having a very hard and interesting practical problem is the best of both world but not necessarily the only way to go. If you want to know if the candidate can really build things you can check out his github/resume. I think the 45-min interview is just to determine how smart the candidate is. If you want to determine if someone is smart you put them in a very hard situation (not necessarily a practical one) and see how they reason about it.

</comment><comment><USER43> Timely yet on-topic ;) [https://twitter.com/tom_forsyth/status/482337551718440962](https://twitter.com/tom_forsyth/status/482337551718440962)

<comment><USER44> Tom Forsyth listed one of the reasons--when a storage is explicitly expressed. The other two that I can think of are for external linkage and non-constant expressions on the rhs. In the end, you really don't know without some introspection. It's up to the compiler. External linkage is one that will force storage, but in general const will require internal linkage and fold expressions accordingly (at least for primitives).

Edit: I would never expect anyone to actually remember or need to know that for an interview. It would be definitely something you would re- discover/discover because you _had_ to run into it.

</comment></comment><comment><USER45> I completely disagree that this question is irrelevant. I can imagine this exact situation in compiler design where you have dependent types that can't have infinite loops (in pseudo-code where forward declarations are not needed or implied):

type a = b

type b = a

If a program has a structure like this with cyclic dependencies, then the compiler must be aware of this and break. (At least, I can imagine a situation where this could be a desired attribute.)

<comment><USER46> You are mixing up cyclical linked lists with loops in a graph. The reason why the question is bad stems from the fact that it's specifically about linked lists.

<comment><USER45> I could definitely be mistaken, but I don't see a difference between a linked list and a graph. They are two ways to represent the same thing. That being said, if he asked me to find cycles in a linked list, I might determine the adjacency matrix and check for loops:

[http://stackoverflow.com/questions/16436165/detecting- cycles...](http://stackoverflow.com/questions/16436165/detecting-cycles-in-an- adjacency-matrix)

This is at least very easy to reason about. However, if you are still right my thought process is just very wrong.

<comment><USER25> _" I could definitely be mistaken, but I don't see a difference between a linked list and a graph."_

A linked list is a particular type of DAG (or at least DG). The relevant distinction between linked list and the general case is that a linked list restricts nodes to (zero or) one outbound edge. This is relevant to the problem at hand, because you only have one tortoise and one hare and so they can only follow one path.

<comment><USER47> Right. As a graph theorist might put it, a linked list is a directed graph with a vertex-disjoint path cover consisting of exactly one path. I.e., linked lists are specialized graphs. The tortoise-and-hare algorithm can be generalized to detect cycles in any connected graph, as long as a consistent traversal order is used.

<comment><USER25> _" The tortoise-and-hare algorithm can be generalized to detect cycles in any connected graph, as long as a consistent traversal order is used."_

But not in O(1) space, right?

<comment><USER47> I think it depends on how the graph is represented. With the "standard" representations, it would be O(n) space in the worst case, where n is the number of nodes in the graph. You'd still only need the 2 pointers, but the traversal itself would need to also remember which paths it has not yet visited. The worst case is when the number of paths is much larger than the length of any particular path. The best case (apart from the null graph) is equivalent to the linked list, where there is only one path in the cover.

I can imagine representing the graph as a list of paths, in which case the tortoise-and-hare algorithm is O(1) space, though the graph itself would be (potentially much) larger. Virtually every other operation on such a graph would take a performance hit, too.

There may be other factors I haven't thought of, but you're right that the generalized algorithm could not be as space-efficient as the special algorithm.

It's worth noting, though, that the original question poised in the article did not place an O(1) restriction on space.

<comment><USER25> _" It's worth noting, though, that the original question poised in the article did not place an O(1) restriction on space."_

For sure.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER48> The page is down, so here is the cached version: [http://webcache.googleusercontent.com/search?q=cache:rwL5dDE...](http://webcache.googleusercontent.com/search?q=cache:rwL5dDEDvTsJ:www.nomachetejuggling.com/2014/06/24/the- worst-programming-interview-question/+&cd=4&hl=en&ct=clnk&gl=uk)

</comment><comment><USER49> A not quite serious solution [1]:

       Let m = size_of_current_process / sizeof(list_node) + 3
       Let np = pointer or reference to first node in list
       while (np != null)
           if (m-- == 0)
              return HAS_CYCLE
           np = np->next
       return NO_CYCLE

[1] this approach might actually be acceptable in some circumstances

</comment><comment><USER50> I don't want to complain but one of the major culprits who conducts these kinds of interviews is Amazon. After going through their interview process, I'm of the opinion that they basically want you to memorize careercup, geeksforgeeks and leedcode and just spit it out in chunks at appropriate times during the interview.

</comment><comment><USER51> " _... 'Write a function that can detect a cycle in a linked list'...You can't reason your way through [that question]...all you're doing is testing if someone has seen your particular puzzler before or not._"

I think I'll take a pass on interview advice from this character.

</comment><comment><USER52> Once in an interview I was asked to implement a synchronization mechanism between processes using shared memory. It turns out this is the petersons algorithm. I mean if I could solve this, I would be Peterson :) heck, even smarter because I would do it in 20 mins.

</comment><comment><USER53> I'm no fan of this particular interview question, but the article takes it too far. You can figure out tortoise-and-hare algorithm by reasoning (I'm pretty sure I did the first time I've seen the problem - although not in an interview setting). The key is to recognize that there's a very limited number of things you can do given all the constraints: moving pointers is pretty much the only tool you have.

If it indeed took 12 years for the algorithm to appear, it's likely because finding loops in a linked list isn't a very common problem, not because the algorithm itself is that hard.

<comment><USER45> Nor is the 12 years thing particularly good reasoning... By that thought process, it took humans hundreds/thousands/millions of years to develop a compiler, so how can I be expected to develop one over the course of 4 years in college? Or even over the course of my life?

<comment><USER54> Not exactly a valid analogy, because his start date isn't "the beginning of human history", rather it's the development of the linked list data structure, which is the first point at which humanity possessed sufficient knowledge and tools to figure out the cycle-detection algorithm.

Given that we didn't have the knowledge or tools necessary to make a compiler hundreds/thousands/millions of years ago, you'd have to bump up your start date considerably.

<comment><USER45> Sure, I stretched that too far. But hopefully the point is made. Then should we expect no students (or anyone) to be able to build a compiler (or os kernel) in any amount of time given the internet and whatnot? While I may be articulating this poorly, I think my fundamental issue with his point is solid.

</comment></comment></comment></comment><comment><USER55> I am the guy who asks that question on every interview. You can hate on me now! Let me clarify. I don't expect the candidate to get to the "a-ha" moment at all. I make my expectations very clear upfront so that the other side wouldn't panic. However, I expect to see how the candidate would approach the problem with the right attitude so I could get some insight of his/hers thinking patterns. I personally wouldn't mind if an interviewer asked me something in the lines of "how would you build a nuclear plant?", although I have no knowledge on the matter.

</comment><comment><USER56> Uh we did this in our first year CS curriculum...you are telling me your interview candidates can't even do what a first year CS freshmen can?

<comment><USER41> Are you referring to tortoise-hare algorithm? I refuse to believe CS freshmen regularly come up with this _on their own_. Maybe a few percent, everyone else is googling or relying on huge hints from the lecturer.

If you were referring to a more trivial algorithm (e.g. linear space), I think you misinterpreted what the interviewer was expecting and would not have gotten the job.

It's also worth noting -- esp if you're referring to the TH algorithm -- that CS curricula are not standardized and that there are probably dozens of "clever trick" algorithms you haven't seen and couldn't come up with on the spot (e.g. can you initialize an array in constant time?), but someone else thinks is trivial because they happened to see it in a lecture/read it online.

</comment></comment><comment><USER57> My solution would have been: Simply have a wrapper around the linked list that keeps count of the elements (+1 for insert, -1 for delete, initialized with 0). Traverse the list. If your traversal takes more steps than there are elements, you can stop it and conclude there's a cycle. I wonder how the interviewer would value this answer...

<comment><USER58> If you argued that many programming languages already provide list.size() or equivalent (more so if I told you "in a language of your choice" before), I'd swallow my pride and accept it.

Then I'd suggest you try the other way, but it's a perfectly good answer.

<comment><USER59> _list.size()_

The problem is, in Java and probably many others, that method computes the size in linear time by traversing the list. The javadocs for java.util.LinkedList note that this was a decision taken so that splitting a list at an arbitrary node, etc. could be a constant-time operation.

</comment></comment></comment><comment><USER6> What all algorithm and idiotic interview questions (like moving Mt. Fiji) are great for is the interviewee himself, not the interviewer. They are a _huge_ red-light indicator that there is something wrong with the engineering culture and department at the company you're interviewing. While there are exceptions, in my experience, there is such a direct correlation between the two, that questions like this have led me to walking out of interviews (politely of course). Why continue if you know you won't take that horrible position? Obviously, if you're hired to write algorithms, then it _might_ be a different story, but most programmers are simply not writing new algorithms. Ever.

<comment><USER60> Isn't writing algorithms almost the definition of programming?

<comment><USER41> I think "coming up with interesting algorithms" was the intended meaning.

In which case, no, everyday programming is mostly not about designing algorithms. Otherwise, programmers would spend most of their time with journals and books, with a few days of programming each month.

<comment><USER60> Interesting is fairly subjective but ultimately you are designing processes to solve problems. If you cannot demonstrate ability to solve a simple, well trodden problem how will you be able to solve a new one?

<comment><USER41> > Interesting is fairly subjective

Interesting is a social construction. As such, I would define interesting as worthy of publication in a first or second-tier conference at some point in the history of the field.

> If you cannot demonstrate ability to solve a simple, well trodden problem > how will you be able to solve a new one?

0\. I've seen many well-respected researchers who have solved truly interesting, new-to-humanity problems stumble on well-known problems others consider easy and/or fundamental. In fact, this is probably true for every single researcher. And doubly so for practitioners. One person's fundamental technique is another's blind spot.

1\. Simple != easy to come up with. Often _exactly_ the opposite! Take the TH algorithm as an example. It's a very simple algorithm. Small. Simple. Optimal. Awesome. Not trivial to discover, however.

2\. Well-trodden -> unless the algorithm is absolutely fundamental and taught everywhere (e.g. sorting), you've given up on testing problem solving skills. You're just testing whether the person's intro/DS/algo professor covered this particular algorithm (and maybe their memory). Or, more likely, rather their random interview studying happened to hit your pet problem. Since curriculum is not anywhere close to uniform in CS -- even among top schools -- this is just silly.

3\. Simple problems don't always have (simple) solutions. Create a fair voting scheme.

<comment><USER60> It depends on why you are asking the question. Are you literally demanding the candidate spit out the optimal answer immediately? If they can they it means they can remember their algorithms class which is a good signal.

If not, can they solve it with a naive method and then make reasonable attempts to iterate on that, even if they never hit an optimal solution?

It is a little like a high end restaurant asking a trainee chef to make an omelette, which is apparently common in the culinary industry.

<comment><USER41> > Are you literally demanding the candidate spit out the optimal answer > immediately?

I think the author of the article is indicting situations where this is the case. Perhaps he could have been more explicit up front, but reading between the lines this is the situation he's complaining about.

> If not, can they solve it with a naive method and then make reasonable > attempts to iterate on that, even if they never hit an optimal solution?

If I were asking the question, absolutely.

> It is a little like a high end restaurant asking a trainee chef to make an > omelette, which is apparently common in the culinary industry.

Are there omlettes that are "optimal" (very awesome in some sense)? I honestly don't know (and if so, man, I want one!)

</comment></comment></comment></comment></comment></comment></comment><comment><USER61> Come on, this is like the easiest problem you could have gotten during Google's, Microsoft's or Facebook's phone screening interview. If you can't figure it out in 10 minutes, then you should forget about working there.

I miss the old times when these puzzlers were asked during interviews. My theory is that you can recognize an excellent place of work with a great future when they actually ask you these sorts of questions as it attracts certain kind of excellent and creative people. I could see the "interestingness" of companies being shifted as they abandoned these questions, first Microsoft (picked up by Google), then Google (picked up by Facebook), like they were passing some kind of "greatness" token (MS->G->FB).

I was told at Google that I solved two problems like this during an interview that nobody solved before me in 15 minutes (one led to a super complicated math formula and dynamic programming, the other I solved optimally but differently to their solution, and provided an optimality proof based on discrete calculus). It was the greatest and most challenging interview in my life. I miss it, all interviews nowadays are just boring as hell :-/

<comment><USER62> What did you exactly prove during this interview? That you know to write readable code? That you are know to code in team? Did you write any test case during this inteview? Any docs?

<comment><USER61> I proved that my solution had optimal time complexity using discrete calculus, for a highly non-trivial problem that requires to come up with unexpected ideas under huge stress.

They saw my own open-space real-time software 3D rendering engine with texturing and shading (C++/Asm) at SourceForge already, they saw my own SQL server (many students at my first university were ripping it off for their own class projects in the next years so it was a mistake to make it open) as well as other projects I did prior to that interview so they were familiar with my coding style and quality.

Also, before that while working at SUN I did some work on a test suite with 10,000s of tests, many of them for SUN's own compliance with one of their standards, making sure it was executing on a distributed cluster every day for every branch they had in order to ship the best quality to customers. Many of these tests were for obscure cluster failure cases using custom bleeding-edge test frameworks. So the answer is no, I didn't write any test at Google interview, it wasn't required.

How can you prove you can code in a team during an one-on-one interview? At best you can give hints that you are willing to discuss stuff and change your progress on input from the interviewer and explore if there is any sort of chemistry between you two, which is about all you can do.

I really hate this kind of nitpicking, averaging everyone to a "normal" level, trying to find something wrong in someone because she or he goes against (IMO) lazy typical stereotype. Enjoy your mediocrity! Are there still hackers on HN?</comment></comment></comment>


Monsieur Bébé: The Brief, Strange Life of Raymond Radiguet - <AUTHOR> https://www.theparisreview.org/blog/2018/04/10/monsieur-bebe-the-brief-strange-life-of-raymond-radiguet/ <comment><USER2> I'm starting to wonder if occultists were the original hipsters.

* Have massive orgies, sexually "deviant" behavior

* Don't conform to societal norms of dress and behavior

* Against the political establishment and occidental culture</comment>


1Password Adds Subscription Plan for Individuals - <AUTHOR> https://www.macstories.net/news/1password-adds-subscription-plan-for-individuals/ <comment><USER2> I'm heartened to see that AgileBits hasn't removed the single purchase option.

I'm viscerally averse to paying for a software subscription, especially when the essence of the app requires significant investment and/or dedication to the platform. By purchasing a software license, I can at least know that even should I choose to never again spend another cent on the product, I retain control and accessibility to the data that I've entrusted to the application.

<comment><USER3> Disclaimer: I work for AgileBits, makers of 1Password

We have no plans to remove those options, but we have de-emphasized it a bit since we believe the subscription option is better for most people. That may be a slight be counter to the people reading Hacker News, but just chiming in to say we haven't forgotten about you and the standalone option will continue to exist :)

Kyle

AgileBits</comment></comment>


Ask HN: Would you spend time watching best hyperlapse videos? - <AUTHOR>

Something like these http://hyperlapse.rocks <comment><USER2> I suggest you post this as a Show HN: hyperlaspe videos.

Your current title is click bait.

<comment><AUTHOR> Ok done!</comment></comment>


The Death of the Pageview - <AUTHOR> http://www.readwriteweb.com/start/2010/03/the-death-of-the-pageview.php

<comment><USER2> > The dot-com crash showed us that the eyeball-based business model was a > failure.

That would be more convincing if it weren't hosted in a web page supported by an ad about half an inch away. The only failure was the market's ridiculous valuations for startups that would have been viable businesses if kept smaller.

As for on-page interactions vs. pageviews, yeah, that's one of many drawbacks to releasing a crippled javascript-only application instead of semantic resources that have URLs and actually become part of the web.

<comment><USER3> > that's one of many drawbacks to releasing a crippled javascript-only > application instead of semantic resources that have URLs and actually become > part of the web.

yeah, crippled applications, just like gmail?

<comment><USER2> Gmail can be forgiven for not contributing useful content to the web at large. Everyone expects email to be private and not really available for repurposing. Anyway, gmail was written competently and it works well without scripting turned on, though its URLs aren't as RESTful as they could be.

But something like a public blog with content thoroughly entombed in a gmail- like interface would suck. Which doesn't stop people from doing it.

</comment></comment></comment><comment><USER4> I know I'm paranoid, but why on earth does this page load a hidden java applet? It took forever to display, i was like wtf, and then I see the java console application appear and then I was like, _even more_ wtf??

There's been an increasingly aggressive trend toward tracking user behavior and it's disturbing. I don't know what that java applet was for, but it was invisible, which makes me feel uncomfortable with rww.

<comment><USER5> They're also running some javascript that pings a tracking server every 10 seconds you're on the site. If you have Firebug installed, you can watch it go on the net tab.

<comment><USER6> Sounds like you guys need to install ghostery (a Firefox anti-tracking plugin) <http://news.ghostery.com/>

Though it blocked 6 of the 7 different tracking scripts on that page, it didn't seem to kill the Javascript one. (I have whitelisted Google Analytics)

<comment><USER7> is this needed even with adblockplus? [edit - adblock doesn't stop the js pings with the default us subscription] [edit2 - or with an explicit listing; i ended up blocking them via dns] [edit3 - no i didn't; firefox is ignoring my dns?! confused...]

<comment><USER4> firefox can't ignore dns. on windows, you have to do

       ipconfig /flushdns

to clear your dns cache, then restart firefox

<comment><USER7> i intend to look again this evening - i may well have made a mistake, but i couldn't understand what was happening (i am on linux, restarted firefox, and also restarted nscd; i didn't modify hosts, but did add a master record for the domain to my local network's name server - "host" and firefox were, apparently, inconsistent) (i was so surprised i went into the code and checked it was using a name and not a numerical address...)

</comment></comment></comment></comment></comment></comment><comment><USER8> That article read like a "Special Advertising Insert": sensational headline, junk data, fluff, and then a "oh by the way, we've got the solution" pitch tossed in.

Death of the pageview? Really? Facebook has an ARMY using analytics & tools as he suggests to do ONE THING and that is boost pageviews.</comment>


The Marvel of Mozart's Letters - <AUTHOR> https://www.spectator.co.uk/article/the-marvel-of-mozart-s-letters <comment><USER2> When I was a teenager, I had no love for Mozart. An aunt who did used to tell me: "you will appreciate Mozart when you get older." Now I wonder if she actually meant when you get younger. I was a humorless pompous prick then.

<comment><USER3> Since childhood, Mozart is my big idol in classical music. Then, some people told me the opposite: you like Mozart now, but later you will discover better music. I listen to a lot of other composers, and like many of them, but nobody gives me the same kinds of feelings as Mozart.

</comment></comment><comment><USER4> Excerpts from his letters were also set to music by Michael Nyman for a film project: for example, "O My Dear Papa": [https://www.youtube.com/watch?v=cN1xc0wqeBg](https://www.youtube.com/watch?v=cN1xc0wqeBg)

Though the piece I like best from that film is "Profit & Loss", which has invented lyrics based on Mozart's finances & his father's imagined reaction to them: [https://www.youtube.com/watch?v=q9Ts9GoBv1s](https://www.youtube.com/watch?v=q9Ts9GoBv1s)

</comment><comment><USER5> 'Composers' letters can make frustrating reading. But with Mozart, you get the whole personality — candid, perceptive, irresistibly alive and packed with filth'

<comment><USER6> Sorry for mentioning this, because you will never be able to forget it. But regarding Mozart and filth, IMHO every adult should know that there is a piece of Mozart called "Leck mich im Arsch" (Lick my arse).

[https://www.youtube.com/watch?v=C78HBp- Youk](https://www.youtube.com/watch?v=C78HBp-Youk)

For connoisseurs, it's Köchelverzeichnis 382c

</comment></comment><comment><USER7> I own a copy of "The Letters of Mozart and his Family" and they are a wild bunch, especially the letters addressed to: "Cousin Buzz Fuzz".

</comment><comment><USER8> Got some .epub by any chance?

<comment><USER9> [https://archive.org/details/lettersofmozarth000861mbp](https://archive.org/details/lettersofmozarth000861mbp)</comment></comment>


Experience Report: Developing the Servo Web Browser Engine Using Rust [pdf] - <AUTHOR> http://arxiv.org/pdf/1505.07383v1.pdf

<comment><USER2> The section on open problems is interesting. Can anyone comment on their real world impact?

 _5\. Open problems

While this work has discussed many challenges in browser design and our current progress, there are many other interesting open problems.

Just-in-time code. JavaScript engines dynamically produce na-tive code that is intended to execute more efficiently than an in-terpreted strategy. Unfortunately, this area is a large source of se-curity bugs. These bugs come from two sources. First, there are potential correctness issues. Many of these optimizations are only valid when certain conditions of the calling code and environment hold, and ensuring the specialized code is called only when those conditions hold is non-trivial. Second, dynamically producing and compiling native code and patching it into memory while respect-ing all of the invariants required by the JavaScript runtime (e.g., the garbage collector's read/write barriers or free vs. in-use registers) is also a challenge.

Integer overflow/underflow. It is still an open problem to provide optimized code that checks for overflow or underflow without in-curring significant performance penalties. The current plan for Rust is to have debug-only checking of integer ranges and for Servo to run debug builds against a test suite, but that may miss scenarios that only occur in optimized builds or that are not represented by the test suite.

Unsafe code correctness. Today, when we write unsafe code in Rust there is limited validation of memory lifetimes or type safety within that code block. However, many of our uses of unsafe code are well-behaved translations of either pointer lifetimes or data representations that cannot be annotated or inferred in Rust. We are very interested in additional annotations that would help us prove basic properties about our unsafe code, even if these annotations require a theorem prover or ILP solver to check.

Incremental computation. As mentioned in Section 2, all mod-ern browsers use some combination of dirty bit marking and incre-mental recomputation heuristics to avoid reprocessing the full page when a mutatation is performed. Unfortunately, these heuristics are not only frequently the source of performance differences between browsers, but they are also a source of correctness bugs. A library that provided a form of self adjusting computation suited to incre-mental recomputation of only the visible part of the page, perhaps based on the Adapton [HPHF14] approach, seems promising._

<comment><AUTHOR> Note that the paper was written a while ago, so things are a bit outdated (like the integer overflow bit).

> Just-in-time code.

I'm not the expert on this, but JIT is where a lot of perf wins can be had for javascript. JIT might even be the best place to work on if you want to make your polished JS engine faster.

As far as security goes, goto Lars' reply.

> Integer overflow/underflow.

We now do exactly what was suggested in the paper. Rust enables overflow checking in debug, and we run our CI in debug anyway (release mode build integration is half baked now and I need to work on that)

A concrete example would be a loop that just goes on incrementing something. `for _ in 0..n {ctr++}`. This would be zipped to ctr+=n in release mode (optimizations and no bounds checking), but in debug mode there would be bounds checking making it harder to optimize. Additionally in the real world analogue of this toy example, there would be other slowness in debug, and we wouldn't hit the overflow condition.

Here's a case where a Rust API has issues, but only when bounds checks are off: [https://internals.rust-lang.org/t/rc-is-unsafe-mostly- on-32-...](https://internals.rust-lang.org/t/rc-is-unsafe-mostly-on-32-bit- targets-due-to-overflow/2120)

> Unsafe code correctness

So, Rust being Rust the situation is vastly better than C++ or similar. But we still have tons of unsafe bindings and also unsafe being used for perf. Last rust upgrade we had an unsafe transmute of a refcell that broke stuff and caused a confusing segfault in some code far away.

Proving correctness is hard, though. C++ is riddled with undefined behavior, and `unsafe` shares a lot of that UB, _plus_ more UB due to assumptions that rustc makes. When you write `unsafe`, writing code as if you're in the wonderful world of C++ won't work. There are assumptions like "&T will never be mutated" which rustc will make, which should hold even in unsafe code, and if you do something to break that, you cause UB.

On top of that Rust hasn't been properly formalized yet. So this is something that's still far off for us. However, a limited form of correctness checking sounds doable-- but I don't have much knowledge of formal checking to be sure of this.

Of course, a limited form of unsafe correctness as proposed in the paper

<comment><USER3> Ms2ger told me recently that a majority of the unsafe code in Servo (ignoring the stuff needed for FFI) was to work around the lack of DST coercions (Arc<Trait>) and virtual structs. With the former landing soon and the latter being in the design phase, how much unsafe code would be left working around missing Rust features?

</comment></comment></comment><comment><AUTHOR> There have been lots of great posts about experiences with Rust these days, but nothing about really large applications. While I may be writing about my own experiences with writing Rust for Servo later, I thought that this might be a useful thing to share to fill in the gap.

Note that it was written for an academic audience, but it isn't too dense :)</comment>


Is it legal to send email to people who didn't finish the checkout flow? - <AUTHOR> I've been noticing a trend recently, where a lot of e-commerce sites require a email before calculating shipping. Sometimes I'm comparison shopping and I realized that I can get a better deal on a different storefront. But then weeks later I'll continue to get spam emails which I obviously never signed up for.<p>This feels very not legal <comment><USER2> It's legal to send emails to anyone. However, when I get such an email, I immediately respond to it saying that I'm crossing that company off my list.

<comment><USER3> Businesses in 2020 seem to almost understand the impacts of their actions. Maybe in 2030 they really will but it may be too late for some of them.

Unfortunately today some still don't understand the difference between marketing and harassment, particularly you see that with web content publishers.

In the case of email, bad practices mean that your delivery rate drops a lot. Practically email list hygiene is enforced by the "bounce rate" and not the complaint rate -- stupid spammers will spam email addresses that don't even have a "@" and they have a much worse time than others.

(I wonder, I have filters to delete mail from anyone who spams me. Could I hack my email server so these emails bounce and cause more trouble for the senders?)</comment></comment>


Figure this out and you may have a business. - <AUTHOR>

Just got done with this pretty good book on marketing called "Selling the Invisible" by Beckwith.
Most important thing I got out of it was the points you need to cover to have a complete value proposition to any potential customer; you usually need to cover all points to get people to take their wallets out:
We are (who are you?), and we do (what do you do?) for (who cares what you do? who do you serve?) who need (what special needs do those you serve have that they can't take care of without you?).  Unlike our competitors (who are they?), we're different in this way (how so?) and that's important and people care about that because (what's the unique benefit to your difference?).
Pretty simple, but how many startups you think can fill in all those blanks?  I'd be willing to bet next week's beer money most people never think it through, from a marketing perspective, past the "who are we" part ... maybe the "what we do" part. <comment><USER2> A pithy homily does sell business books. I can't disagree.

But often the answers to these questions are found (or changed) by experimentation. The point of a scrappy startup tends to be that experimentation, not a sophisticated execution of a great idea.

I've read your comments, and while I appreciate your economics perspective, and I do agree that's immature to pretend to be a sophisticated business when really what's being built is a sloppy experiment, it's not going to be well received to attack the focus of this community: experimentation.

<comment><AUTHOR> I don't see how most of your post has anything to do with what this post is about.

This post is not about a "pithy homily". It's not intended to "inspire" anybody with platitudes. This is about understanding the underlying reality of what makes people care enough about your "experiment" to pay you money for it.

I was under the impression that people here were starting startups in the hope they they may one day become successful businesses. To make that transition all the questions above need to be answered. I thought that might be relevant to some people as being able to answer all those questions is something lots of startups, Y-related or not, have trouble answering.

> The point of a scrappy startup tends to be that of > experimentation, not a > sophistacated execution of a great idea.

Well, that may be the point of _your_ startup, but this post was for people who want their startups to be about good enough execution of an idea that paying customers think is great.

That translates into financial transaction which translates into a functional business.

Experimentation should be the points of students still in school, major corporations with money to support it, and people who are tinkering while having another source of income. If you quit all that and "dropped out" of the system to start a business, well, the _only_ point is to figure out how to start making money. Especially over the next 4-5 years.

To the extent the tinkering strays away from that and becomes absorbed in itself for its own ends, you'll wind up with an interesting experiment, not a startup that becomes a business.

That's not me "attacking" the delicate egos of any programmers, that's cold, hard economic reality. Whine if you wish but people still won't hand over their increasingly scarce money to you as long as you pout instead of figuring out how to answer all the above questions.

<comment><USER2> I think that we should argue between ourselves in a long thread... starting now. So far, I have the last word!

<comment><AUTHOR> How could that possibly be when this post comes after yours?

<comment><USER3> Because you, dear sir, have less karma in your post.

</comment></comment></comment></comment></comment><comment><USER4> Well put. While people say dont worry about the business plan, just get your product launched, they really need to look at the overall idea of how the big the market is. Know exactly who you are targeting and how big that target is. Personally, i find the best way to do this is to write a detailed plan out for your teams own benefit. Its worth the time to write your plan out now and make changes before you spend hours on end coding the product, only to change course. But thats the business students perspective for you...

<comment><AUTHOR> Not to mention that even an informal business plan forces you to do away with your own fluff and focus on stone-cold reality that will not go away until you address the questions it poses.

<comment><USER2> Lol, have you ever _read_ a submitted business plan? In my experience, most business plans are exactly the opposite: focus on fluff.

<comment><AUTHOR> Uh ... not sure what business plans your talking about, but I would take the worst business plan any VC gets and wager that more people would pay money for whatever it describes, however poorly, then stuff that most programmers put up on the web with a "me and all my programmer friends think it's cool, so give me your money, how about it?" approach ...

<comment><USER5> When Greg Mcadoo of Sequoia spoke at YC last week he said that Sequoia looked for startups founded by people solving problems they themselves faced.

<comment><AUTHOR> Good for him.

I'm sure he, like all VCs everywhere, says exactly what he means and would _never_ tell an audience of prospective entrepreneurs what they want to hear just so he doesn't narrow his own investment options in the future.

Not sure what a speach on venture capital funding has to do with creating a successful business based on convincing customers to hand you their money, but I digress ...

Let's say a "business" is defined as "getting a venture capitalist to write you a check."

Try to get him to follow through with cold, hard cash for for, say, a problem you face that nobody else cares about, let alone cares enough to pay for.

For example, go call him up and tell him, "I have this problem: there's this annoying poster on Hacker News called "NSX2" and rather than manually respond to posts he puts up that I disagree with, or, for that matter, rather than respond to any such posters, in a flash of inspiration I created this superb program that summarizes all the key points of my essays into a set of 79, prioritizes their uses as responses, and anticipates what annoying posters are most likely to say based on empirical data I've collected since starting Hacker News and matches their anticipated annoying posts with a point in one of my essays that has the most statistical probability to express what I disagree with and how. Fund me."

Please let me know how that works out for you.

<comment><USER6> "Not sure what a speach on venture capital funding has to do with creating a successful business based on convincing customers to hand you their money, but I digress ..."

VC's are an integral part of the setup for many startups that go on to become successful businesses. The list includes Google, Cisco, Ebay, and almost all other big tech companies.

<comment><AUTHOR> Perhaps you're aware that these days VCs are exponentially more likely to invest in you if you have paying customers than if you have a solution you think is interesting but nobody else agrees with you enough to pay you for it.

And I think Ebay was actually making money and showing a clear proof of concept before it got funding. Google began during a period of collective insanity; I doubt they'd be able to raise a penny with a similar starting proposition today.

Cisco I have no idea about.

But as for "all others", not sure what you mean but Microsoft, for example, was making money as a private company before getting VC to help with the IPO process, and the terms they got investment on a clear indication of their cash-based negotiating leverage at the time.

Oracle if memory of my reading serves correctly was making money first.

SAP had paying customers ...

When you say, "almost all other big tech companies" started off with VC as a prerequisite, can you specify what you had in mind?

<comment><USER6> What I mean is that not all products can be developd using only your own money, and even less can be grown to successful business without taking in money from investors. This is a normal procedure in many startups, where the goal is to grow fast. This requires money, and this money comes from investors.

And if the best search engine we had today was Altavista I don't think it would be a problem for Google to raise money today.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> well, the YC app asks at least 2 of these. so anyone who applies to YC thinks about them!

What do you understand about your business that other companies in it just don't get? (how so?)

Who are your competitors, and who might become competitors? Who do you fear most? (who are they?)

</comment><comment><USER8> Sounds like the beginnings of a summary for SqueezedBooks.com :-)

</comment><comment><USER9> His books are great. Good advice about forgetting about who you are and focusing on selling the benefits of your business.

</comment><comment><USER10> I have enjoyed all of Harry Beckwith's books. Short, to the point, all the stuff that goes without saying but worth another read anyway. "What Clients Love" is also very good.

"I'd be willing to bet next week's beer money most people never think it through"

Are you a heavy drinker? If so, one of us can set up a poll while you get out your checkbook.

<comment><AUTHOR> Sadly, I am not a heavy drinker. Usually 1 six-pack of Sapporo Light and 1 six-pack of some sort of Belgian white ale is my "thing."

But for what that's worth, that comes out to about $16 per week. Which I have full confidence I'll get to keep the majority of based on a poll like you'd describe.

I would venture that 95% of "startups" never get past my personal modification of question #2 from the consumer perspective, ie, "We do this."

Consumer version: "What do you do _for me_?"

Go ahead and start your poll! I got 16 bucks to play with!</comment></comment>


Show HN: Bit of News – Intelligent news summaries - <AUTHOR> http://bitofnews.com/ <comment><USER3> My favorite terse world news source these days is [http://en.wikipedia.org/wiki/Portal:Current_events](http://en.wikipedia.org/wiki/Portal:Current_events)

For a long time I've wanted a new source that will only show me stories that are likely to be relevant in a year. If no one is going to care or remember something in a month, then I'd rather just skip it. Portal:Current_events is as close to that as I've found.

What I love about it: very short summaries with the most important details about stories that people might still care about in a year, no sensational or partisan headlines, one click to excellent summaries of the issues, and I can easily catch up after missing a few days, whereas many news sites make it hard to see what they looked like even yesterday.

Take for instance the top story on bitofnews.com. The Portal:Current_events summary is:

"A roof collapse at a grocery store in Riga, Latvia, kills more than 50 people."

So it's more up to date than the bitofnews summary that has "at least 32," and if I care where Riga is instead of reading "Riga, which is the biggest city in the Baltics and its biggest seaport" I can click the Riga link and see a map and photo and population etc. If I want to know about the ongoing event, I can click the "a roof collapse" link and I'm presented with a pretty good summary of the issue.

I'm happy to see more news sources like this appear though. My only problem with the Portal:Current_events is that it doesn't have a good RSS feed and if I check it more than once a day, or mid-day, then it can be hard to see what has changed since my last visit.

<comment><USER4> Another vote for Wikipedia's Current Events portal. So much better than nearly everything out there.

</comment></comment><comment><USER5> I'm impressed - clean interface, consumable, and actually really great summaries. The e-mail newsletter version of this sounds very useful. It would be great to be able to select the categories you're interested in too.

I actually have been working on an app that wakes you up in the morning with a voice reading your schedule for the day, the weather and the latest news, and the API for this looks perfect to fill the last part.

<comment><AUTHOR> Sounds cool! When you implement it, please let me know (email in profile). I'd be glad to feature your app on the website if it's using the API :)

</comment></comment><comment><USER6> I was going to ask what happened with the bit of news bot on reddit [0], but I see it just resumed posting!

I don't check it all that often, but I like getting a summary of recent news by browsing the bots user page every so often. Was saddened to see it inactive for the past two weeks.

[0] [http://www.reddit.com/user/bitofnewsbot](http://www.reddit.com/user/bitofnewsbot)

</comment><comment><USER7> Wikipedia cofounder Larry Sanger is working on something similar, not yet launched, called 'Infobitt':

[http://infobitt.com](http://infobitt.com)

(Unsure if that'll be its launch name, and there's certainly room for multiple approaches in the faster/fairer news space.)

</comment><comment><USER8> Previous discussion: [https://news.ycombinator.com/item?id=6498625](https://news.ycombinator.com/item?id=6498625)

</comment><comment><USER9> Very nicely done!

I would check out Twitter bootstrap or look for a font, that's the only thing that I dislike is the times new roman font. For a website that's focused on consuming text summaries, efficiently reading / understanding is important, and having a readable clean font is too :D

<comment><AUTHOR> Thanks! What type of fonts do you recommend?

<comment><USER10> OpenSans, Lato

<comment><USER11> I would like to chime in and recommend a serif font. Maybe PT Serif.

</comment></comment></comment></comment><comment> brown9-2 Looks neat, but you might want to dig into what went wrong with this Bitcoin story:

 _Rise of Bitcoin: Is the digital currency a solution or a menace? (+video)

The Christian Science Monitor - <USER2>

She downloaded the software that would allow her family-owned floral shop/cafe to accept BTC, as Bitcoin is known._

</comment><comment><USER12> These are actually really good summaries, though in one case it was to commenting policy that was summarized, not the article... Still I think the best summaries I've seen.

I'd love to know what the tech behind this is like.

<comment><USER13> The new Xbox vs PS article summary is horrible, though:

      * It's also a great gaming system – it has great games this year.
      * Ronald Reagan was president, MTV had just launched and choosing a video game system was easy.
      * " This holiday season buying a video game system is a bit more complicated.

</comment></comment><comment><USER14> This is a good chance to mention an alternative news in bullet points site, tldr.io, which uses human created summaries.

[http://tldr.io/discover](http://tldr.io/discover)

</comment><comment><USER4> I subscribed to the email service a while back. Then on the day the Iranian embassy was bombed, what'd I get summarized?

Celebrity news.

I won't subscribe again unless there's a "nothing trivial" policy.

</comment><comment><USER15> The "summaries" are just bullets. Use a better summary API. [https://www.mashape.com/stremor](https://www.mashape.com/stremor)

</comment><comment><USER16> Seems good although Quartz ([http://qz.com/](http://qz.com/)) daily newsletter seems more than enough for me.

<comment><USER17> I like Quartz a lot as well but it's too focused on economy stories.

</comment></comment><comment><USER18> Umm.... isn't this a REPOST??

</comment><comment><USER19> Very cool! Do you use TFDF and then extract the most "meaningful" sentences?

<comment><USER20> The About page mentions it uses PyTeaser [1].

[1]: [https://github.com/xiaoxu193/PyTeaser](https://github.com/xiaoxu193/PyTeaser)

</comment></comment><comment><USER21> Do you have any plans to add RSS feeds?

</comment><comment><USER22> quite similar to [http://www.readborg.com](http://www.readborg.com)

</comment><comment><USER23> There's a similar Android app called Circa.

<comment><USER24> No, Circa has a large team of actual human editors. That's why the content is good.

Also, Circa started out as an iPhone app. The iPad and Android versions came later.

</comment></comment><comment><USER25> reminds me of summly</comment>


Indie game designer spent three years and $180,000 making a masterpiece - <AUTHOR> http://www.msnbc.msn.com/id/26336877/ <comment><USER2> _"Games these days are designed so that people finish them. They have a big story and you're supposed to able to get to the end if you just sit down in front of it long enough…and I object to that on some level," he says. "If games are supposedly presenting a challenge to the player, then they should be truthful about that challenge and they shouldn't spend their time lying to the players."_

Now this is the kind of news that should be on first page of HN.

</comment><comment><USER3> To be honest I wouldn't have even tried this without knowing its story, but I just played the trial and think its fantastic - I love how it doesn't tell me anything, its for me to explore and understand on my own! After playing that, I realize I actually hate tutorials in games, games don't have to baby sit me.

Not sure if I'll be buying it, I generally just play CoD4 or GTA a few times a day to get some adrenalin pumping if I'm working at home, not sure when I'd play this, or if I'd get a little bored after a while.

<comment><USER4> _I love how it doesn't tell me anything, its for me to explore and understand on my own!_

Free Play, in Ender's Game by Scott Card.

<comment><USER5> All fun and games until someone loses an eye.

<comment><USER6> Then it's hilarious

<comment><USER7> Oh, the subtext...

</comment></comment></comment></comment></comment><comment><USER8> How did an "indie game designer" get $180,000 and the time over three years to make this? There is more to this story than just "a smart, brash nerd with a dream can make the best video game ever..."

<comment><USER9> " Funding the project with money earned from working on experimental PS3 Cell- processor gaming projects for IBM, Blow began coding Braid in December 2004." <http://www.computerandvideogames.com/article.php?id=194727>

It seems like Braid is and still-is a high-demand game mercenary. Regardless of how it was funded, I think the fact he conceived and created a game mostly by himself in an industry where teams of creative individuals with multi- million dollar budgets struggle (death marches) to ship games is remarkable.

"The Art Of Braid: Creating A Visual Identity For An Unusual Game" by Braid artist David Hellman [http://www.gamasutra.com/view/feature/3753/the_art_of_braid_...](http://www.gamasutra.com/view/feature/3753/the_art_of_braid_creating_a_.php)

<comment><USER10> The full link on Gamasutra is here: [http://www.gamasutra.com/view/feature/3753/the_art_of_braid_...](http://www.gamasutra.com/view/feature/3753/the_art_of_braid_creating_a_.php?print=1)

This way you don't have to keep hitting next.

</comment></comment></comment><comment><USER11> This sounds eerily similar to Chronotron:

<http://scarybuggames.com/2008/05/chronotron/>

<comment><USER3> Its exactly like Mario, just with a different (nicer) skin (and music!!) and time warping abilities.

<comment><USER12> Braid is sort of similar to both of those, but also very, very different. It certainly has its own identity.

</comment></comment></comment><comment><USER13> video of game: [http://www.gamespot.com/xbox360/action/braid/video/6194163/b...](http://www.gamespot.com/xbox360/action/braid/video/6194163/braid-e3-2008-stage- show-demo)

</comment><comment><USER7> Inspirational. This is the sort of game I've been waiting to play.</comment>


Building a Startup Ecosystem in Japan - <AUTHOR> http://hiromaeda.com/2010/04/29/building-a-startup-ecosystem-in-japan/

<comment><USER2> In the last month since quitting my job I've traveled almost all around Honshu (Tokyo to Osaka and back again, huzzah) talking to entrepreneurs, and I'm very optimistic for the future here. Japan has a lot of things going for it: dissatisfaction with salarymanhood as a career and life plan is at an all time high, the talent pool for engineering and visual design is deep and cheap (approximate salary of engineering employees in Nagoya: age times $1,000), and outside of some parts of Tokyo bootstrapping is a very appealing option.

The cultural issues are tractable, especially after we get a few exemplars of success in local communities. In my town we have a little iPhone development subculture because a handful of guys struck it rich on the App Store lottery, and folks tell me about it everywhere I go. When I went to file the tax papers for my business they assumed I was in iPhone development because, hey, young guy with a software business, clearly he is one of those new App Store millionaires. That beats the previous image of a young guy with a software business: homeless vagrant.

There are now about twenty-ish firms doing iPhone stuff within two miles of my apartment. This is in _Gifu_. (Americans can pretend I just said Kansas, which is our spiritual counterpart in the US.)

<comment><USER3> What about business structure options? I may be wrong, but I've always thought of Japan as being a non-ideal start-up location as far as the onerous business regulatory environment and the high rate of corporate taxation. Is any progress being made on these fronts?

<comment><AUTHOR> There are many tax, fees, and legal barriers that make Japan not very friendly for startups. Unfortunately, there is no progress there (as far as I know).

</comment></comment></comment><comment><USER4> Is there anything like an HN community for Japanese startups?

<comment><AUTHOR> I think <http://www.hatena.ne.jp/> is the closest to an equivalent to Hacker News. Maybe 2chan?</comment></comment>


The Top 3 Developers on Stack Overflow are .NET devs - <AUTHOR> http://stackexchange.com/leagues/1/alltime/stackoverflow

<comment><USER2> They're also all based in Europe. You've got to wonder if the effect is something to do with there being a large number of .NET users and relatively few experts.

That and Jon Skeet is a phenomenon. Seriously, I've answered questions that were ten seconds old only to discover that by submission Jon had posted a more detailed and just plain better answer in the time it took me to compose three lines.</comment>


Murder victim's father: random bad acts are the price of a free society - <AUTHOR> http://hotair.com/archives/2011/01/10/video-slain-girls-father-says-attack-the-price-of-a-free-society/

<comment><USER2> "Video no longer available"

Transcript from googling[1]:

      "You can't solve problems with guns."
      "We don't need any more restrictions in our society..."
      "If maybe the gunman had some friends and family around him prior to this, this wouldn't have happened."
      "I think there's always going to be random acts... but our family believes there is a lot of good people out there... If we live in a country like the United States where we're freer than anyone else, we're subject to things like this happening... and that's the price we have to pay."

[1] <http://www.abovetopsecret.com/forum/thread649110/pg1>

</comment><comment><USER3> Major respect for that guy.

</comment><comment><USER4> Question is, who is ready to pay the price?

<comment><USER5> It is thinking contrary to this man's words that cause the general public to say things like _"Sure being x-rayed at the airport is invasive, but it's better than the alternatives"_.

We should never give up freedoms because of random and incredibly rare acts of violence.

<comment><USER6> "Those who would give up essential Liberty to purchase a little temporary Safety, deserve neither Liberty nor Safety." -- Ben Franklin

<comment><USER7> And they will end up with neither, probably dragging the rest of us down with them.

</comment></comment></comment></comment><comment><USER8> That is way too high a price to pay for the freedom of mentally unstable people to have access to guns.

<comment><USER9> > That is way too high a price to pay for the freedom of mentally unstable > people to have access to guns.

The police had plenty of opportunities to do something about that, and decided not to. (It's unclear whether that was due to his mother's political connections.)</comment></comment>


The Value Chain Constraint - <AUTHOR> https://stratechery.com/2019/the-value-chain-constraint/ <comment><USER2> This is a bit too generic for my taste. I overall agree with the value chains he outlines for each company, but it gets too general when trying to say why Amazon is failing at groceries and Google is failing at Cloud.

I know there's something else he's trying to say, but all I read is "it's outside of their core competency".

<comment><USER3> yes that's basically it, it's outside their core competency, not with tech/r&d/product but with the value chain.

amazon knows how to source, warehouse and deliver non-perishibles, but groceries (perishables) require a different, more urgent value chain that doesn't build on their existing expertise. they effectively need to build a parallel business (which they jump-started by buying whole foods).

with google, it boils down to "google sucks at sales and service" (value delivered outside technological expertise).

this is a high-level initial analysis (as you'd do in an mba strategy class), which is probably why it feels generic. you'd typically delve deeper into the leverage points, like logistics for amazon and sales and marketing for google.

</comment></comment><comment><USER4> How does Ben Thompson know that Microsoft Azure holds the second position in the cloud market? Even though they are growing substantially according to their earnings call, Microsoft doesn't disclose what the numbers are for Azure. They only release it their numbers for Cloud, which includes a lot of products

<comment><USER5> Amazon shared Gartner's ratios at their last Re:Invent: [https://youtu.be/ZOIkOnW640A](https://youtu.be/ZOIkOnW640A)

AWS: 51.8% Azure: 13.3% GCP: 3.3%

<comment><USER6> From what I understand, azure includes a lot of office 365 customers.

</comment></comment></comment><comment><USER7> fwiw -- i'm a very happy customer of amazon fresh. just an hour ago i received a $100 delivery (+tip). I think the $15/month subscription fee (on top of the amazon prime annual fee) is pretty steep though. But it's still worth it for me.

I live in the city and don't have a car, and grocery delivery is a huge benefit for me. I remember several years ago, I'd take a $30 uber ride to my preferred grocery store, buy ~$100 worth of groceries, and charter another $30 uber back. the extra transportation cost + the physical hassle of lugging all those groceries around, is something I never hope to repeat again.

<comment><USER8> How does that compare to something like Instacart, or other delivery options? Curious if you've tried them.

<comment><USER7> Never tried Instacart.

Giant (a grocery chain) has a delivery service called PeaPod. I used it a couple times. Selection wasn't as good, delivery times weren't as flexible.</comment></comment></comment>