skysight-inc/HackerNews huggingface dataset:
Keep in mind he doesn't care if they answer correctly. I think it's a great question. It's always good to ask a question like this, because C++ programmers often have to deal with these dark corners of the language. Knowing the whole language simply isn't an option. I expect candidates to run through the following questions until they can answer one satisfactorily (hopefully without any prompting):

1. Must it work according to the standard?

2. Is there a reason why it can't work?

3. Are you aware of it working or not working in any particular implementation?

4. Reasoning about how the relevant features might be implemented, can you guess whether it would work?

At some point candidates should express any doubts they feel about the advisability of actually using the technique, or about the conditions under which they would use it, and of course they should explain what further research they would do if the question came up in practice.

In my mind, a candidate can get full marks without actually knowing the answer to the question. I would actually prefer them not knowing, because then I'll learn more about how they think and how well they understand C++.
I agree, which is why I put it in the original submission. Nice that you included the proof - thanks.

I also like the infinite version: In every infinite graph there is either an infinite induced complete subgraph, or an infinite induced empty subgraph.

http://news.ycombinator.com/item?id=951250
Maybe you should actually state Cook's theorem. :-) (It states that k-SAT is NP-complete, btw.)

Why is it important? It was the first result that identified a naturally-occurring, NP-complete problem. Thanks to Cook's theorem, to prove that problem X is NP-complete, we can always use the strategy of providing a polynomial-time reduction from k-SAT to problem X.
I'd start logging all the previous calls to malloc/free?
> Where, then, is the desktop operating system not built of recycled crud?

You're willing to look past our massive advances in optimization, control systems, search technology, computer vision, etc etc, and pretend they don't exist...

... because desktop OSes still suck?
Why is alloca() non-thread-safe? Each thread has its own stack.
From what I can tell, SoftLayer's offerings are similar and the prices are better when compared to Rackspace Cloud. $99 at SoftLayer gets 250GB of storage and 2000GB of bandwidth while it gets only 50GB of storage and 500GB of bandwidth at Rackspace Cloud.

"Utility billing is essential for any Cloud platform and something else you will not find from a VPS provider. You pay for your server instances on a per hour basis, so if you only need an instance for a certain amount of days/weeks that is all you pay for."

SoftLayer does this, although they call each instance a "CCI" (cloud computing instance) instead of VPS.
I agree. I think the correct answer is "it doesn't matter if you can or not, you shouldn't."
I actually think this is the way to go. Think about it: Chrome just emulates the rest of it's own environment here. Web sites are updated all the time without update dialogs, why should the browser be different?
Not really, I suppose I'd describe it as a low-level language like C, combined with syntax which would be familiar to anyone who has used REXX. You can do things like splits in python to refer to a subset of an array, and it has a single loop macro, which is similar to ALGOL68's 'for'. Also, it has dummy sections, which are kind of like structs, except they can be associated with a specific pointer. So, rather than saying 'Employee->name' to refer to the structs name field, you just say name, and it knows which pointer it is based off of. You can tie many of these pointers together and it will follow them automatically, which is very useful, although it can get confusing.

That said, it does have high-level-assembler features, like being able to directly declare and modify registers. Pl/X also features a way to directly insert assembly code using a GENERATE macro, in which you have to specifically declare which registers/variables are either modified or referenced.

All-in-all, it's not a bad language; I prefer it to C.
Given that you're fetching, slicing and dicing, why can't you then provide an API? That would be uber-cool ...
Arg... It seems we can't escape twitter anywhere. More pointless drivel compressed into 140 characters for no apparent reason.
Hah, I didn't notice you put it in the submission, or I probably wouldn't have written out the proof. :P I like to show this to low-level math classes (I'm a grad student, so I end up teaching freshmen a lot) with two different colors of chalk on the board. Inevitably, at least one person thinks it's pretty cool, which makes it worth it.

BTW, the infinite Ramsey theorem and the finite Ramsey theorem are equivalent. Obviously, the infinite version implies the finite version. To show the finite version implies the infinite version, you can use the countable version of Zorn's lemma (which you prove from the countable theorem of choice -- note it's a theorem, not an axiom).
These are people you do not want to hire under any circumstances because they cannot think outside their initial preconceptions.

I know nothing about C++, but I know that this is bullshit. I also think that it's pretty ironic if you think about it for a minute.
Google Translator Toolkit Data API
Because people really do not like being unfairly or capriciously judged on interviews. For many engineers, doing well on an interview is very important for their life, and it is extremely frustrating to have a silly or unfair question.
That's brilliant! I up-voted you - no idea why it didn't stick.
Another favorite is Steinitz's theorem: the graphs of the $3$-dimensional convex polyhedra are precisely the $3$-connected planar graphs.

The proof isn't hard, but a bit too long for this space. :-)
And I am willing to bet you that he can sell at least one

Okay, even if he can sell one, so what? That "one" is pretty arbitrary.

I can bet you if Arrington put up a preorder page of a product called SUPER-CRAP, he could sell more than one. Again, so what?

The end goal is not to sell one. It's to build a successful business. And that requires significant(even if unequal) contribution from both prod dev and marketing.
You have mixed up the terminology, vigorously. :) And that is the exact purpose of the question. To distinguish c++ programmers from pretenders. If you don't know C++, the question is nonsense, but if you are going to be writing code, you should understand the execution model sufficiently to answer it.

"Yeah, this one time I double allocated a vtable on the stack of a doubly-linked binary hash."
Interesting quote from the article:

"Jeff also relayed an interesting philosophy from Mark Zuckerberg: 'Work fast and don’t be afraid to break things.' Overall, the idea to avoid working cautiously the entire year, delivering rock-solid code, but not much of it. A corollary: if you take the entire site down, it’s not the end of your career."
It feels like Rackspace is grasping at straws to differentiate their products from the competition.

Examples:

oversold-nature: this is common in OpenVZ setups and some others, but not Xen and at least Amazon and Linode are both on Xen (as are prgmr and ChunkHost). You have your dedicated resources.

instant-provisioning: Linode and Amazon both have this for the most part and it's true that Linode might not have the capacity to launch 100s of instances at once all the time, but that isn't a consideration for most.

cloning: I know this can be accomplished with Amazon and I'm pretty sure with Linode as well (might be a support ticket, though).

no bloatware: I haven't used a VPS provider that had it.

persistent storage: everyone has this - even Amazon now with their EBS which is way more flexible.

hourly billing: not something that most need, but it is an advantage over Linode.

utility bandwidth: basically a way for them to charge you high prices for bandwidth.

resource granularity: an advantage over Amazon, but most VPS providers are in line with Rackspace.

--

Rackspace has a good service with a great history (both as Cloud Servers and as Slicehost), but this article is trying to create product differentiation where there isn't really much. Slicehost/Rackspace haven't reduced pricing since it was introduced over 3 years ago and they're trying to maintain a premium position as Amazon reduces their prices, Linode becomes a larger competitor, and lots of other smaller companies try to enter the space. That requires product differentiation.
The way I thought about it, concurrent access to objects allocated via alloca() would probably not be explicitly protected by a lock. Threads can also be killed and spawned while other threads are accessing its stack contents. Anyway, I can think of more use cases where it's a bad idea to allocate objects on thread's stacks that you're planning to share.
Twitter is they.
WPA2 (or WPA-AES) and a 64-character password. It's not like people type in their network password every time they join the network. This is one of the areas there it's not that much of a hassle to use a long password since you normally just type in the password/passphrase when setting up the network connection (and people are possibly used to long, random-character passwords from using WEP keys).
How to trump Microsoft, Google & Yahoo - The Venture Matrix
The thing is, I could, but because I'm not at all related to HN in any official way, it would be up to me to change how the API gets data from HN whenever HN changes anything at their end. That would mean there'd probably be a delay between HN making changes and me making changes, during which time any applications using the API wouldn't work.

I'd happily do it with the blessing of the officials at Y Combinator :)
C++ is my main language these days (and my guess at the answer happened to be correct), but I think this interview question misses the point.

The key to using C++ successfully, like it or not, is not to understand what happens in every possible circumstance (this is pretty much impossible). The key is to carve out a subset of the language (and some usage patterns) that you know how to use and stick with it. I wouldn't use delete this without consulting the documentation first, even if I suspect it's legal (hell, I use "idiomatic" delete maybe once in 5000 LOC)
Do you find it useful, in your field, to understand how your tools work? If so, perhaps you might allow that if someone is interviewing for a job using another tool (C++, in this case) that they might be expected to know how that tool works.

Also, with respect, it's fairly clear from your second paragraph that you don't understand the terminology being used at all. Which is okay, it's not your field. But, it makes your assessment of how complex this discussion is somewhat suspect.
I'm not sure what the distinguishing features are between a command-line app and a terminal app (I think that it's pretty pedantic to say that there's a difference, though I'm all for pedantry and I'd love to know what the difference is).

I think hnsh is a command-line app. It uses text-based input to do things based on that input -- sometimes opening other applications, and sometimes printing things to the screen.
I've seen such a demo as well. Was it written in C++ so the core of the app could be developed and tested in Visual Studio?
I did as well. Savory.
Isn't this kind of vote fraud commonplace?
This is very good news. Less spammy shitty apps makes more room for real developers, and less frustration for users.
The 'Wii' sold OK in English speaking markets so I don't see what the problem is.
Goodness I want to downvote you for not having even the remotest idea of what you are talking about.
The T-Mobile G1 was updated to 1.6 a couple of months ago.

http://www.gsmarena.com/tmobile_g1_and_mytouch3g_get_android...
> For many engineers, doing well on an interview is very important for their life, and it is extremely frustrating to have a question they cannot answer.

FTFY
tl;dr : Dean lied about having advanced degrees. Now consults kids trying to get into Ivies.
I'm cold on C++ (haven't coded in several years) but let me try this out:

deleting "this" releases memory held by the instance data of the object. The programmer can't be sure that any subsequent references to that data will return valid data (although the compiler will allow it). Static data and type-level methods should be fine to call -- although every time the program counter ticks you can't be sure that you're continuing to walk through uncontaminated memory.

I think that's it.

Sounds like a BS question to me because you're going way, way under the hood with exactly how the compiler runs the code. It's like those coding questions where you have to start byte-counting to get the answer. Neat trivia perhaps, but I'd much rather have somebody who delivered clean, organized, easily-maintainable code and got the answer wrong.

EDIT: Seems like I've seen delete this on several occasions (although I can't remember where), but hell if I'd use it unless I had no choice. Even then, it'd be the last statement in the method.
ECMAScript (JavaScript) 5th Ed. released
It's hard to find a good (reasonably priced) VPS provider in the UK. This is fantastic news. I've been considering moving from The Rackspace Cloud to Linode for a while now.

Just signed up. My average ping is now 11ms!
most recent entry from his blog:

1. My identity is revealed.
2. Duke knows about the van.
3. I... am... fucked.

http://spartanstudent.blogspot.com/2009/12/no-he-dint.html
It seems like cliques like this should be pretty easy to statistically discover.

Does anyone have a dataset I could try this on?
Very cool. I am interested in learning where they got their data from, and how they trained their image recognition algorithms.
It isn't the same price though. There is a setup fee of 150 euros and a monthly rate of 70 euros. This is in comparison to a rate of 80 usd a month with no setup fee. There is a fairly large difference in cost there.
I first heard of George Hart in connection with Zometools, a fine educational toy for current or future hackers.

http://www.zometool.com/
I believe he is referring to an economies of scale type scenario. With a high-tech product (or most any for that matter) the manufacturer/developer has to pay huge sums of money before a single commercial unit is shipped. Fixed costs such as plant and manufacturing equipment are cash drains whether one or one million units are sold--hence the name fixed cost.

Yea, Fusion Garage has created a tangible product. To get it to the masses, however; they must convince the public they want it. Of course theres people who are already excited about it, but that certainly won't bring in enough revenues to keep the lights on at the end of the day.

I'm personally just getting tired of the same tired Business vs Tech banter. If we are to advance our industry and continue to create great innovative products, we must recognize eachother's strengths and weaknesses. Thats when the magic happens IMO.
I couldn't help but notice they stayed away from discussing round trip http request/response latency. (Or really any other performance metric.) I'm not sure how good Rackspace cloud is in this regard, but other cloud options do not test well. If they are not drawing attention to it, it leads me to assume they would rather not discuss it.
In the realm of programming, I consider 'word' to mean a unit of code.

I agree though, it's perhaps not the best word to use.

Use what you enjoy using though. But please don't buy the FUD about verbosity.
I have to clarify: It's not just about guessing the password. If you do guess it, even on WPA2 you could just try logging in . Try too many times, and someone might notice. But on WPA-PSK, you can capture some traffic, and then run huge tables of passwords against it, you don't have to do any login attempts until you find the right one. And yes, WPA2 is safe against that.
Worry about better things.

Seriously, what's your concern? There's a very low chance that someone will be determined enough to use tools like these to hack into your LAN, and even if he'll do that, so what?
It's not really "original" though is it, it's the natural conclusion that everyone's coming to.
This feels like kind of a cheap answer, but I know that with Visual Studio you can step into most standard library functions, even if it ends up being at the assembly level; I assume the same is true for gdb.

Is the not asshole answer to be stopping right before the malloc and taking note of memory consumption and determining how much malloc is trying to allocate?
Me too. OTOH I do like to find regular routes that are nice but cheap. SJC -> EWR on continental used to be $700ish in business class.
The real reason it works is actually deep magic. Dirichlet's theorem states: given any two positive coprime integers $a$ and $d$, there are infinitely many primes of the form $a + nd$ where $n$ is a positive integer.

This result is one of the deeper facts of analytic number theory. I have no clue in hell how to prove it other than "look it up in Hardy and Littlewood."
WTF @ Evilmunky.com
WPA-PSK uses the name of the network as a salt. There exists rainbow tables for millions of passwords for many of the most used network names.

It doesn't really have to be random, just not something widely in use. In other words, just don't leave it as "linksys", I'm pretty sure that even a 13-char random string doesn't help you then. :)
Not having firm contracts up front was just silly - on Arrington's part. They've pulled a Microsoft on him, and it's fair enough. It's a jungle out there, and on a personal level, I don't feel any sympathy for tech crunch at all.
I can bet you if Arrington put up a preorder page of a product called SUPER-CRAP, he could sell more than one. Again, so what?

People like to exaggerate that a good marketer can poop in a box and sell it, but at some point it becomes scamming. And I guarantee you that the likelihood of getting sued and losing even more money goes up astronomically.
I think I agree, though you never know. My instinctive reaction is they should have pushed on the price. Smaller screen, whatever.

While this may prove to be an incredibly useful device in the future, it hasn't yet. At the moment it's in the toy category, like the ipod touch. It's almost twice the acceptable price for a toy.
If you compare JRuby with MRI Ruby, the memory consumption is indeed higher in JRuby. I am no expert in JRuby but as far as I know, the problem with it is that it can not fully take advantage of threading and thus suffers from similar problems as the MRI + some additional memory overhead.

A Java web application however needs very little additional memory per request-handling thread, which makes its memory footprint much smaller when many parallel requests are involved.

100 ms for the home page in my Java app might not be great but, considering that 7 separate queries to the database are involved and that it runs on a very weak server, I think it is quite decent. And because of the use of concurrency (threading) there is a good chance that 100 ms for a single request translates into more than 10 requests per second. But I still wouldn't call my webapp lightning fast. I was calling java lighning fast because in my case I still get decent response times on bad hardware and with an inefficiently programmed application (7 db requests that could as well be cached and only refreshed every hour or so).

You are absolutely right about the rails app however. The 1 second response time is not normal. I just measured again and suddenly I get similar response times as for the java app. The server must have been under heavy load before (maybe the automatic backup). I admit that my quick measurements are not very representative and apparently not reproducible reliably, but still: about the same response time as the Tomcat with no database activity and on a faster server. I also checked a different rails project of mine running on an equivalent VPS. Pages where two simple database request are involved, which, when directly invoked in psql, take 15 ms, take 300-400 ms to load if not cached.
Since we're chiming in on possible solutions, why not do the most general thing first? Check memory usage of the system and process right before segfault, check environment variables that govern malloc behavior (i.e. MALLOC_OPTIONS, OS X-specific ones), check if using (s)brk() system call succeeds right before that, check ulimits.

Then you can either litter break points and start stepping or load the core file in gdb, and start looking closer.
You have to consider out-of-band console access (which VPS services provide), you're not responsible for hardware failures (your VPS provider is, and will replace transparently without your involvement), support is available 24/7 beyond "please reboot my server", and transit typically ends up cheaper and you don't have to deal with it. You also don't have to pay for remote hands (oh, look, you do there). All around a much better solution for hosting than any dedicated plan in the world.
While the adventure of van-living is fun and the rant on loans and cost of education are true, I think you can get the education you need in a financially responsible way without having to live in a smelly van all alone. I made it through my undergrad by working part-time, living at home, and going to state and community colleges. It took me over 5 years but I had no loans of any kind at then end. Maybe that's the difference between CS and English majors.
"But to people not already familiar with what’s going on the same patterns are not very illuminating; they are often even misleading. The language is not alive except to those who use it." struck me as significant, and "The standard of correctness and completeness necessary to get a computer program to work at all is a couple of orders of magnitude higher than the mathematical community’s standard of valid proofs." is the closest I've ever seen to someone stating the one of the most important differences there.
well, this generalization is a little out of left field, I suggest you go read Zed Shaw's post about rails is a ghetto
http://www.zedshaw.com/rants/rails_is_a_ghetto.html

although there are improvements, its still relevant
I'll take that at face value, because I'm autistic.
Like this? http://www.youtube.com/watch?v=l6Vuh16r8o8
With a high-tech product (or most any for that matter) the manufacturer/developer has to pay huge sums of money before a single commercial unit is shipped.

This really only holds true for a cutting edge product like a new CPU or the first iPod.

For everyone else like the JooJoo/Crunchpad, these electronics are assembled from commodity parts and manufactured in Asian factories on the cheap.

If preorders are taken, there is absolutely no reason for Fusion Garage to maintain a huge stockpile and the corresponding risk. This is why made to order companies like Dell are so successful.