skysight-inc/HackerNews huggingface dataset:
This is a bit of a "gotcha" question.

I have absolutely no faith that someone in an interview who doesn't figure out the scoping issue in the interview doesn't understand Javascript scopes. In the "real world" of a job, the problem is presented like this: "This code exhibits the following behaviour: It outputs a four every time instead of one, two, three, and four Find out why and fix it, please."

Given as a gotcha, I would stare at the code, and possibly figure out the scope issue. Then I would keep staring. Is this the only "gotcha," or has the interviewer diabolically inserted two bugs and I have to find the second one?

The entire process would make me feel like I was in an adversarial position, where the interviewer is trying to point his finger at me and yell "FAIL! I pwn3d you with my l33t Javascript questioning skillz!!"

FWIW, I think I understand the solution. In fact, I wrote a blog post about the exact same thing:

https://github.com/raganwald/homoiconic/blob/master/2010/10/...

But nevertheless, I know that from time to time I unwittingly make this mistake when coding and quickly fix it. I don't have a lot of confidence I would be guaranteed to get the correct answer in an interview every time.

Which is maybe why I don't like it as an interview question: Perhaps I'm not smart enough to get the answer right every time. Perhaps the only questions I like are the ones I like to be asked :-)
http://news.ycombinator.com/item?id=2064240
I wish it were possible to delay the loading of images using JS. That would allow them to be swapped for images that were the appropriate resolution for the device looking at them.

This is this big issue with responsive web design. There is a solution, but it requires both modifying HTML and additional HTTP requests:

http://filamentgroup.com/examples/responsive-images/
At least Techcrunch is able to identify his religion in the bio box at the bottom.

</sarcasm>

[edit]
This guy's religion is not mentioned...
http://eu.techcrunch.com/2011/01/19/former-nokia-guru-turns-...
Is Google too weak in the software patent wars to protect Android?
The issue we were talking about was maintainability.

Giving links longer expirations is trivially easy, and I already do it in cases where it matters, like submit buttons on big forms.
Ask HN: Need good patent lawyer in San Diego area
We're needing some help finding a good patent lawyer in the San Diego area who specializes in web/internet patents. Any suggestions?
Boring rookie question. Add a closure. I expect it does a good job of sorting out people who know js from those that have no clue though.
I have several problems with the CNN article this one is based off of.

1. Why take a screen shot of the spreadsheet?

2. Why are there only 11 amateurs? Amateurs greatly out number pro but in this table they're a minority. Seems like sample bias to me.

3. Where is the context and the history? The bloggers all predicted larger increases then the pros. Do bloggers always predict higher numbers? If so it's no surprise they did this time.
The haunted USB cable uses this idea, too: http://imakeprojects.com/Projects/haunted-usb-cable/
Linus Torvalds discusses features added to 2.6.38-rc1
In the U.S. software is copyrighted, not patented. Business Processes (and other processes) are patented. Those processes may be entirely manifest by a particular software implementation, so we think of the patent as being for a software product. Business process patents are murky law right now, google "Bilski".

So one line would be: if the idea isn't patented, or it is, but you don't think the patent is valid, and have the money to back up your claim, or just feel ornery, then go for it.

People replicate functionality all the time. Why should that be unethical? I wouldn't just replicate it for no good reason. A good reason, and one that the spirit of the law is supposed to support, is, does it provide new value to the customer? Coincidentally, that is the same question you should be asking yourself if you plan to take your work to market.
violating their warranty

How can you "violate" a warranty. As most I think you can void it.
2. If you can't read code well, how the hell are you going to be able to write code well? Too many programmers are terrible at reading code and that correlates IMHO with being terrible at writing it.

If you're planning on being an author, it's useful to first be able to read, and to read loads. That's how you learn.

The interview question is a simple rookie js question that basically asks "Do you know javascript to any degree".
I think you have a very enlightened approach, Edw519. I actually take it one step further and ask candidates to work on problems or portions of problems the company actually has. E.g., how would you approach fixing this bug.

It also has the side benefit of letting candidates see our codebase, bug tracking, etc.

As far as asking how technologies work under the hood. I really don't care if a web developer knows how pointers work, etc. If they can consistently get challenging problems done, that's all I need to know.
I've not done much profiling/performance (especially on older browsers) yet. My use case for the whole thing was to do a fire and forget POST to a separate domain.

Honestly, flash might be the best solution for something like you're talking about. I was just going for something with almost no dependencies that was stupidly simple.
Doctors perform first robotic knee-replacement surgery in Salt Lake
At one point one has to step back and ask what the hell we've created.

I mean really: creating hidden iframes with onload actions that post to another domain. I don't know whether to be proud of our ingenuity or sad that this is the cutting edge of interprocess communication for the web.
Thanks but I'm really not that old :)
As to your point, I guess it depends on what your friends use facebook for. As a place for some smalltalk and humor - sure, they probably would never worry if the whole world reads it. But not suitable for discussing anything at all, since you have no control over the audience. And most people don't realize that their inner-circle private discussions are most probably world-readable - I'll save some space and won't list endless possible consequences.
Here is my version in Clojure: http://clojure.pastebin.com/dd5ccDkP

Runs pretty fast, even for large mazes.
This article gives a brief background on the various bitmap image formats (ignores vectors) but ends abruptly in explaining their best use cases.

For those looking for a rough answer, the best rule of thumb for web work is to use jpg for actual photos (being sure to adjust the compression level to balance quality and size) and png for graphics like logos.

Jpg is well suited for large dimensions and broad color range, but on graphics with sharp edges, artifacting is definitely noticeable, making logos look blurry. Png is best here due to its support for transparency and losslessness, but a poor choice for photographs if bandwidth is any consideration. Gif works as well for graphics, but the limited color range can result in poorer edge smoothing in a trade-off for file size.

Also be aware that IE6 doesn't support transparency in pngs without implementing a simple hack first. Hopefully the days of bothering with that will soon be gone though.
It does seem to be an "official MSFT" account.

Although from interviews I've read with Allen his view seems to be - I got lots of money, I'm enjoying writing cool code and I have a yacht the size of a small country - who cares about the past.
I think it's important to be able to separate business from friendship. The worst is when you're romantically involved with one of your start-up partners. Never do that.

It also helps to start companies with people who are exceptionally laid-back, but you have to also realize that with that sometimes comes laziness. It's hard to find teammates who are both laid-back and highly driven/motivated, but when you do, they're solid gold. Whether you're friends before/during/after your endeavors is immaterial at that point.
This should be expected, bloggers are the 'market'. This is the expected result of the efficient market hypothesis.
The market will beat estimates of professionals (or any one individual) most of the time. This is exactly why an index fund will outperform most mutual funds even before the fund manager takes his 2%.

The guys that can really guess the market usually start their own hedge fund. And they use ingenious methods, such as one hedge fund that orders satellite photos of Wal-Mart parking lots and estimates quarterly performance based in part on those photos.
Appscale : Open Source Platform for Google AppEngine Apps
You are correct! It was a PowerBook, wonderful little machine. It landed on the bottom rear corner, DVD drive broke, big dent, whole case buckled a bit but continued to work perfectly otherwise.
StartupBootcamp to launch in Madrid, Berlin and London
I could see that as a good page to redirect to in your hosts file for distracting sites like HN, reddit et al.
This was easy, because right after it started I remembered that I needed to go check my pot roast in the slow cooker.

I'm all for adding more peace and quiet reflection to my life, but watching a javascript timer count down for two minutes on a website with a picture of the ocean doesn't count.
No, it doesn't because j is in the same scope as i.

Your confusion is because of a javascript quirk

for (...) {
var foo = bar
}

is actually the same as

var foo
for (...) {
foo = bar
}

Notice how you only ever have one foo

What you need is:

for (...) {
(function(bar) {
var foo = bar
})(bar)
}

which create a new foo every time you loop
I don't know about the FreeNX server, but if you use a lightweight window manager like fluxbox 600MB of memory will be more than you need for most things.
Startupbootcamp launches in Madrid. Next up: London and Berlin.
Hi jhamburger, thanks for the comment!

I'm the author of the article and want to present a different perspective:

I don't think you're being completely fair to these guys. Sure, they're Apple enthusiasts but they're also digging significantly into the data to back up their analysis. For example, check out one users' analysis on Apple's Cost and Cost Ratios to Revenue: http://www.postsateventide.com/2010/11/apple-quarterly-compa... (Found here: http://www.macobserver.com/tmo/forums/viewthread/79667/).
I do the same on the Phoenix light rail; This site's layout performs really well on mobile devices; Loading a beast like Digg on my N900 would make me twitch for kill -9.
Tweets can now become Techmeme headlines or discussion. So tweet away
So Qwiki is search for the illiterate?
Its a better experience on some phones than others; "Surfing the web" in Blackberry's browser is closer to "drowning the web" and rendering nothing correctly.
With bookmarks you need only type an alt-b -- it toggles.the bookmark.

What you want here is to get back to a sentence. I'd highlight it instead.

At the beginning of a sentence, press the 5-way center down and

then continue to the right or down (or even across a page) and when
you get to the end of the sentence or partial paragraph you want,
press the 5-way button down again.

That creates a highlight (underlined) and is faster for me than

doing it on my NookColor with my finger, which invariably gets the
wrong letter or row.

When you want to find your highlight (or note), press the Menu

button and go down to "View my Notes & Marks" and you'll get a list
of the ones you made in the order they're in the book, with context
and a link to the annotation.

That's a pretty good solution. You'll also find a personal

private,password-protected annotations webpage of all your notes for
a book, on the Amazon servers. See how at bit.ly/webknotes1 as it's
a really useful feature.

If you don't want your annotations backed up to your area on their

servers, just go to the Kindle's Home screen and use the Menu button
to get Settings and turn off Annotations Backup.

APOLOGIES. I have no idea how to edit on this. The first one I did w/normal word wrapping while writing didn't wrap when I was reading and most of it was off the screen. This final result is very odd. :-)
>...Apple has a clear business interest in making it less easy for random people to enter that market.
I can see why Apple wants to do it, but wouldn't we think it wrong for Ford to seal their engine compartment with a security key that only Ford dealerships could open, preventing competing mechanics? Yes, in a frictionless economy consumers would factor this in to their purchase and not buy from Ford. But in the real world, this is a pretty easily correctable market failure (which can be traced back to the small number of competitors) which governments usually limit through competition laws.
People in the third world can't afford the bandwidth to watch videos like this, especially when it's so anemic on actual information.
I of course left the page before long, but if you put an advert on there to appear after the countdown, I guarantee it will get much higher click through than normal. Why? Because when people have invested time in something, they're strangely more positive about things and more willing to go along with the program (perhaps to get the payoff that's been missing so far, but even if there's none they will rationalise that it was still a good use of time). Might help if you make the advert slightly more interesting/mysterious than usual though.
The N900 also has the only implementation of Firefox Mobile. Adblock Plus is in my pocket.
This is a technology and not a solution. What you have to do is apply it to an array of problems and see if it solves one of them.

For example they could combine the technology with augmented reality software. In this case I could point my mobile phone to a painting at a foreign museum and instead of reading about it, I get to still have my face up (not down), enjoy the art and listen to its description/history.
Whoa, that was pretty quick. Thanks!
You have given plenty of examples of morally wrong things being done for financial gain. That is not news. People have been corrupt and greedy for thousands of years.

What you have failed to do is show any evidence at all that companies are legally obliged to be corrupt and greedy.

On your link about warrantless surveillance, scroll down to the long section on legal issues. While there is no question that the government asked for, and got, a lot of that information, the legality of the request is quite a different matter.

And now for the concrete counter-example, when the NSA asked for Qwest's cooperation, they didn't get it. This decision has materially affected Qwest's financials because they were shut out of a lucrative NSA contract.

Now show me the shareholder lawsuit against Qwest for failing to maximize shareholder value by refusing the NSA on this matter.
Poll: Logical implication in action
Superseded - see
http://news.ycombinator.com/item?id=2125005
instead.

=========

In the light of a recent article (http://news.ycombinator.com/item?id=2121428) by Tim Gowers about the difficulties some people have with mathematical logic, I wondered what people here would answer to this question.

Suppose I have four cards. Each card has a letter on one side, and a digit on the other. I arrange them so that you can see "D", "3", "K" and "4". I then claim that every "D" has a "4" on the other side.

Which cards do you need to turn over to see if I'm right?
Just D
Just 3
Just K
Just 4
D and 3
D and K
D and 4
3 and K
K and 4
D, 3 and K
D, 3 and 4
D, K and 4
3, K and 4
OK, the client must send periodic pings to the hub in order to receive updates.
Well, if in the top 10 there were only a couple bloggers, that would be a reasonable statement, but the top 9 were all bloggers. That doesn't sound like random chance to me.
Alexa Thinks Yahoo is AnshikaPackersMovers 
Yahoo's Alexa profile has been taken over by a spammer?
From a support point of view (now that they run their own stores with people to repair stuff), it cuts down on the "I know what I'm doing" guy incidents. If you are competent enough to locate and buy the proper screwdrivers, you probably won't destroy anything. Everyone else will just take the thing in for repair.

I am currently at a college and our PC Techs tend to get some interesting problems with PC's brought in by people who tried to repair them. It is kinda ugly.
I simply can't take the risk that the next 2 minutes is when I'll find my cofounders, build my prototype, and raise an oversubscribed angel round.
Texting woman falls in fountain, files lawsuit
I think you're confusing a lot of different things here. This is dealing with predicting quarterly results, there isn't any direct connection with the stock market.
iPhones with these screws are already in the US, I bought one in late December 2010 and it appears to have the five-point screws.
When I first saw this, first thing I thought was, "She should have had a Windows 7 Phone". Heh.
Entertaining 404 Error Pages
Sharp commentary, Thomas. One thing that sticks out to me is how Apple straightjackets their products. Apple corals the entire user experience down a narrow path. Power-users hate the constraint of this Apple straightjacket, but at the same time, new consumer-level customers -- grandma with her iPad and cousin Alice with her iPod touch -- benefit from the simplicity of the straightjacketed experience.
I disagree. If you're concerned about how you're doing on Google, it makes sense to have to go to Google to find out.
http://en.wikipedia.org/wiki/Mindfulness_(psychology)
(Norvig's (Lisp) Interpreter (Ported to CoffeeScript))
ROFL, Carol Bartz wake up!!
Am i the only one that checked the content of background.js (in ~/.config/google-chrome/Default/Extensions/[extension-id]/etc... on linux)?
"Group buying"? I don't think I'd call a bunch of individual customers a "group" just because they visited the same site on the same day. I also don't think I'd call the site a "group" because the site didn't buy anything, they just arranged a deal for the individual customers.

"Group buying" would be people coming together as a "group" and buying a LOT of 1 thing, then splitting it up.

If we're going to call Groupon "Group buying", every newspaper in the US (and possibly the world) has been doing it for decades.
Why Events Are A Bad Idea
There might be another issue at play here: perhaps the investment firms represented by the professional analysts have incentive to under-predict a company's performance in their public-facing reports.
also when the server redirects me back to the wrong origin

Sounds like that could be a bug. Was http://news.ycombinator.com/item?id=2120756 the page you were on when you replied?
Ask HN:  Getting Better
I am senior working to finish up my undergraduate degree in Information Sciences and Technology. As you might have guessed, IST is no CS degree. I came to school not knowing what I wanted to do. I was always kind of geeky growing up and I know a fair amount about tech so I decided to major in IST. My programming experience was very modest and I wasn't sure I even liked so I didn't think I would get through CS. Time went on and after having to work a internship at which I did PHP programming I found that I actually did enjoy the craft. I learned as much as I could at work and this got me more work at two different startup companies doing Rails development. I worked hard at each and I really fell in love with the hacker/startup lifestyle. Unfortunately I have only been at it for about a year and half.

As I mentioned earlier in this post, I am graduating this spring. I have not yet been able to find employment. I somehow managed to get a phone screen Google in Pittsburgh that is scheduled. I feel like I really lucked into it. Regardless, I have been trying my hardest over the past few weeks to learn some CS principles on my own. I ended up purchasing Introduction to Algorithms due to the recommendations from this site. I have excepted that I am not at the level I need to be at yet to get through the interview with Google. However, I am really motivated to get better. I was wondering what the best approach is to tackle the self education of CS? Should I read the book only when I need to reference it, or should I work through all the chapters doing all of the exercises?

I want to get better so that I don't have to take a job after school that is just a pay check. I want to be able to work in a place that I continue to get better and hone a craft that I just recently discovered a passion for. I just can't afford to get a CS degree at this point.
She's a porn star, why do you think getting her to say sexual innuendos counts as "trolling"? Isn't that part of her job description?
Many interviewees, when presented with `say("hello")("world")`, understood that `say` was a function that returned a function, but few were able to actually implement `say`.
To be fair, though, the original headline ("Do companies have 'personal privacy' rights?") does not convey the new information accurately - some editorializing seems sensible, in this particular case.
Another example of prior art would be the Electric Minds community, which was an offshoot of the Well in the mid-90s, and took the best and brightest people in certain fields to moderate online communities within that topic area. The people were "famous" in a certain space (although not to the average person-in-the-street).

See http://www.rheingold.com/electricminds/html/
Works if you remove "25": http://core.ecu.edu/engl/tpc/MennoMenno/ftp/williams%202000....
I was fine until a (1) popped up in my email tab...
Nokia also doesn't cut deals with carriers to subsidize the cost of their phones like many Android phone manufacturers do. "$520 for a phone? I can almost buy a laptop for that!"
So here's question for the HN crowd. What if someone advised you to "not look for funding" for your startup because "there is a bubble and when it pops you will be screwed"?
Site's down for me - has it been slashdotted by HN? (so to speak)
This is such an informative interview! Great job StartupLi.st team! keep up the passion and hard work :)
Tesla’s Challenge: Build $30k Mainstream Electric Car by 2015
Why wouldn't it be possible? Just make placeholder div tags with fixed and accurate size (unless you don't mind re-flowing as they load - I dislike it), then JS the device type and create img tags on the fly.
Surely bloggers do not only always outperform Wall Street analysts, but there are certainly scenarios, such as this one, where they do get it right. I agree that CNN's sample size could be statistically inaccurate, but the blogosphere is pretty difficult to measure.

I think the point of the article is that the number of individual investors is growing, and since there is such a plethora of information out there and easy channels to share opinions, the financial sphere is rapidly evolving online.
But some kinds of denials between people carry with them such obvious implications of value judgments. Such as "Beware of he who would deny you access to﻿ information, because in his heart he dreams himself your master." Some people are similarly wary of any who would deny them access to their own property, reasonably thinking that perhaps such a denier, in their heart, dreams that such property is truly their own.
This is a universally accepted practice in consumer electronics and not a universally accepted practice in automotives. Singling Apple out over it doesn't seem productive to me.
Which flow-of-control paradigm do you prefer?
(I)IT is all about money
The Garage: The movement to create open-source style innovation inside Microsoft
The Daily Start-Up: Hitting The $1 Billion Mark
Strong headlines can come across as flip in a Reddit-y sort of way, but it's really dependent on the link. I think grellas has a pretty good handle on what is and isn't fair to say about a legal proceeding, so if he says AT&T got mauled, I don't feel qualified to complain about the headline.
Help out a poor, ignorant American: what's a "social class"? One of the Gazillionaires mentions that "everyone in his social class" lost someone they knew in the Mumbai terrorist attack. In 25 words or less, what's a "social class"?