skysight-inc/HackerNews huggingface dataset:
Easiest to read? The middle. The way I would write it for my own use is closest to the top, but the easiest to read is the middle.

Always using braces, and giving them their own lines makes nesting as unambiguous as possible and the extra white space reduces density making foreign code easier to digest.
But would those in favor speak up? Haven't you noticed that all the SOPA-supporting media outlets have been rather mum about SOPA?

They want it to pass without being noticed because they can't sugar-coat this one for the American public.
Open Education and freedom to teach computing
This brought back memories of the browser wars. Back then it was "Should Microsoft be allowed to use its control of the desktop to bundle Internet Explorer with Windows?" Now it's "Should Google be allowed to use its control of search to bundle Google+ data with search results?"
> Unfortunately social responsibility does not fly in the name of profit. That is what I mean by exploitation.

Profit? How about the buyer?

You're free to tell Apple that you won't buy unless they pay enough so workers can have BMWs. If Apple believes you, it will do so and pass along those costs.

What? You're not willing to pay for workers to have BMWs?

You're awfully free with other people's money.
Anatomy of a bad bug fix
Commenting so I can look at this later.
reddit is a horrible hellhole
I think the point about reliance on and obsession with modular code is a valid one, even though it's so entrenched in programming culture now. Donald Knuthe makes a similar (much less inflammatory) argument here (Ctrl-F "black box"):

http://www.informit.com/articles/article.aspx?p=1193856
Even though I doubt there's anyone on here who actually supports SOPA, this could at least get people to do something about it and call their representatives on that day.
>My wife is a doctor

If mine were a doctor, I'd be lazier too.
I don't want my laptop to go to sleep when I close the lid, especially if it's plugged in. Is there a setting on Macs for that yet or do you still have to run a 3rd party app?

That behavior is one of the most annoying defaults ever, in my opinion.
Do i smell an opportunity for competing sites? interesting...
The UK extracted immense amounts of wealth from India alone - where is China's India? Africa was plundered in all senses of the word by western Europe. It's not just Spanish gold that I'm referring to.

My point is that the strength of the UK economy of the time wasn't just 'factory workers', conquering a quarter of the world's landmass and nicking their stuff also helped significantly. China can't replicate this.
Another Volley in the Israel-Saudi Hacker Spat
How do you embed flash ads in structured data?

Are people willing to make micropayments for access?
Honestly, I don't see the point. The effectiveness in the blackout is going to lie in its ability to inform users who might not be aware of the threat SOPA poses: I think the number of regular perusers of HN who are unaware of SOPA is middling at best, which might not be true of Reddit, Wikipedia, or some of the bigger sites considering the blackout.

That being said, anything helps, and this is the sort of issue where action trumps inaction.
Are you a lawyer? as I understand it a court would have to declare a monopoly and in this case none has.

Purely from a commonsense point of view however there is no such thing as a monopoly on information retrieval.
Actually I was thinking 'unsustainable' rather than revolutionary.

Having lived in/through/with the birth/blossoming/commercialization of both the microcomputer and the non-factory robotics businesses, I find the breathless ecstasy of 'getting into production' a wonderful thing, but its a lot like falling in love, there are a lot of things that happen next that you're going to have to live through.

Given that they are taking nearly zero margin on these devices (at least according to this post), they have many pot holes to look out for:

1) Their Chinese factory turns out to be some guy's brother-in-law who got them a cheap price because he's using counterfeit parts. Or worse the guy that bid for the job expects to build the factory to build them with the money your going to pay him up front.

2) Their board vendor tech sneezed and accidentally added a direct short to the films they are using to make the boards.

3) The part they ordered for the USB connector is discontinued by the vendor who gave them a price of $0.25 and its now only available from some other vendor for $2.25 each.

4) The pick and place robot put a set of boards on 90 degrees out of kilter, so the entire batch has all the parts soldered into the wrong places.

5) The customs guys open them up, and not seeing the requisite safety symbol/OfCom/FCC/ISO/CET whatever certificate denies them entry into the country

The list goes on and on. One of the challenges of manufacturing is knowing not only what the parts cost but what costs the system is going to impose on you. You need to build in a margin that covers both otherwise you'll underestimate what it will cost you to build a product.

So new manufacturing experience aside (and its going to be a great learning experience if they can keep reminding themselves that it is a learning experience), it sounds like they have a really great way of bringing home to the politicians how their policies affect jobs locally. It almost seems like a reasonably responsive government should sponsor some group to manufacture a new product domestically and then carefully track the barriers to doing so and eliminate those that are amenable to a political fix. Tariffs on imported semi-conductors (protecting the local fabs?) and electronic components when such components cannot be locally sourced seems like a good starting point.

I certainly hope they will be able bring that message clearly to Parliament. It would be refreshing to have really hard to object to facts in the debates going on.
USDA Driving Towards Both Food Insecurity And Cyber-Insecurity?
Good for them, though I still find it odd how silent Digg has been on this matter even though it would most definitely completely destroy them.
Even the lead DOJ prosecutor who went after Microsoft in their antitrust trial thinks Google is a monopoly (http://money.cnn.com/2011/03/31/technology/microsoft_google_...).
Wait are you being sarcastic?

UK = Great Britain + Northern Ireland

Great Britain = England + Scotland + Wales

So technically if they're registered in the UK they're a part of Ireland I suppose.
The technical definition of "do no evil" was that google search would not promote any single entity based on who they are, rather they would let algorithms and data govern the core ranking. This seems to be the first VIOLATION of this principle. A HACK has been inserted into the core search ranking where if the content belongs to google, it is being given a preferential treatment and higher score. Why should a photo on picasa be more highly ranked than one on flickr? Seems the ranking team is just taking a short-cut by only using the data on google's internal properties in the ranking.. Come on, crawl the rest of the web !! There is interesting content out there..
No it doesn't, it's not bundling if both products are free and it's not bundling when you don't actually own any of them. There are important nuances between the two cases that some people choose to overlook.
Are they? For sure they have the largest market share, but isn't lack of substitute goods a necessary condition for monopoly? IANAL, but I use Bing all the time on IE9 because it's the default search engine and most of the time I can't even tell the difference. I certainly haven't found a reason to change it.
"Burger King says People and Chefs Will Suffer From McDonald's Big Mac"
How to integrate F# and Notepad++
What about caching database connections? Opening a new connection on every request can be very slow, particularly for Oracle.
How to use Google's Personal Results launch for your brand
My Dad always took powernaps and still does. He has the ability to sit down in just about any reasonably comfortable chair, and go to sleep on command. He can then wake up 5, 15, or 30 minutes later and be fully alert. Noise, light, temperature - doesn't worry him.

He laughs about it but it's got to be a skill built up over years by practicing.

The one trick he did teach me for a mid-day nap was to lie on your back on the floor and put your legs up on a chair (calf muscles on the seat, feet against the backrest). For some reason it really seems to help, I assume it's circulation related.
"Before the switch to heap memory, this program probably ran just fine because the stack allocated memory will probably have a '\0' character at the end on accident."

Stack memory is not preinitialized to '0' either so using stack memory would show this 'defect' as well (as others have pointed out this is a defect in the calling code, not in copy).
knowtheory was right, follow the MDN SpiderMonkey links to http://hg.mozilla.org/mozilla-central/js/src -- beware that http://hg.mozilla.org/tracemonkey is an inactive repo.
Why Your New Year’s Resolution is Bound to Fail, and What You Can Do About It
There are still going to be very few Redditors who are not aware of SOPA and its implications, even if a larger percentage than HN.

I started typing up a post similar to yours until I stopped to think about it. I think that there is more to this than just awareness. Reddit going down for a day, not only makes those few aware who were not already, but it stands to motivate those that were aware and had not yet taken action. Another big point for me is that Reddit taking the first step may motivate other web companies to follow suit. In that respect, I definitely support HN participating.
Free Day is Tomorrow
Setup a hashtable of keyword -> wikipedia link.

Check every word in the document against it. One check per word should be O(word count) ish, shouldn't it?

Hashing every word will have a cost, but will be roughly the same for each word so I'll brush it aside as a constant, setting up the hash will have a cost, but shared over the number of documents to check. Checking every word sounds expensive but so does looking every word up in any data structure or searching every dictionary word in the document keywords and links have to be stored somehow.

My biggest hesitation is it can't be that easy or all you and the interviewer would be saying it, so I must be glossing over some big cost somewhere, right?
Hmm - I will be contacting a few MP's about this nonsensical tax situation.
There is a reason that NO major web application you name is written in C++, Gmail, Facebook, Google Docs, YouTube. There are major advantages to writing web applications in a higher level language and almost no advantages to writing them in C++.
Levels in Renderscript
Parrot alert!

relying on security through obscurity isn't usually a very good choice.

Real-world alert!

Camouflage paint works for tanks.
Important distinction: that's 13% of smartphone sales, not total market share.
Numbers for sales available here: http://news.cnet.com/8301-13579_3-57355900-37/iphone-4s-inch...

Numbers for total market share here: http://www.macrumors.com/2011/12/29/apple-and-android-gain-s...
This looks fantastic, especially with the integration with HTML5BP. Awesome work!

Just wondering if you considered using RequireJS instead of namespacing? Backbone plays quite nicely with RequireJS if you use James Burke's version which has been forked to be compatible: https://github.com/jrburke/backbone/blob/optamd/backbone.js

More info here: http://jcreamerlive.com/2011/12/09/backbonejs-modular-app-us...
Google, you have now gone over to the dark side. The technical definition of "do no evil" was that google search would not promote any single entity based on who they are, rather they would let algorithms and data govern the core ranking. This seems to be the first VIOLATION of this principle. A HACK has been inserted into the core search ranking where if the content belongs to google, it is being given a preferential treatment and higher score. Why should a photo on picasa be more highly ranked than one on flickr? Seems the ranking team is just taking a short-cut by only using the data on google's internal properties in the ranking.. Come on, crawl the rest of the web !! There is interesting content out there..
Me not being a lawyer doesn't make google less suspect for monopolistic practices. The US senate has been investigating it[1] and and new concerns are raised now[2]

http://www.washingtonpost.com/business/economy/google-faces-...

http://betanews.com/2012/01/10/googles-new-personalized-sear...

In any case, the one who should be worried is facebook, not twitter. It's also interesting to note how google is going at greater lengths to promote G+ than it did with any of its products before.
How to map connections with great circles using R
Appreciate it, thanks. I definitely have tests that run instantly because they just use a mocked database, and ideally all of my tests would do that because I agree having them run instantly is so much better than waiting around.

I'm going to be more attentive to how long tests take from now on, and try and avoid a backed DB when possible. Thanks!
Since when do all pieces of server-side software require a hosted version to qualify as not "purely academic"?
Where the Trees Are
Gorilla Glass 2 Is Tougher And 20% Thinner
I thought about putting an order in for 10K boards. I think if you look at the 'tv dongles' which is basically a small system running a flavor of Linux driving a TV [1] you'll find at $35 each they are a no-brainer. Here's a dead simple idea, TV dongle with Web cam for 'facetime' on your TV. If you've got a cable IP network, you use Skype or some variation (hell Google talk w/ Video) and you're done. Plastic molded case and poof.

Using the camera and simple gestures (think Kincect 0.5) make an instant 'hangout' using G+ on your TV. Wave your hand, point at your circle, and blam start hanging out.

I've got like a zillion ideas of ways to turn a $35 board with HDMI+Networking into serious bank. I'm not unique in this regard.

[1] http://www.alwaysinnovating.com/products/hdmidongle.htm
Visualizing binaries with space-filling curves
My first though after reading your comment was that there's probably a very small number of people that read HN and support SOPA. After thinking about it a little bit more I realize that my dismissive attitude was inappropriate.

When Reddit goes down there are going to be news stories about it and these will raise awareness about the issue to people who aren't Reddit users. If HN or any other sites join in then they will most likely be mentioned in these articles and to the casual reader this will only make the message stronger even if they aren't familiar with the actual sites. In addition, HN has a huge audience of people who are in a position to blackout their own sites. If HN were to join in then I think that this could be influential in making these people consider more seriously whether they should follow suit which will only further the reach of these actions. At the very least, HN being down could serve as a good reminder that opposing SOPA isn't enough by itself and that if we really care about this then we should be contacting representatives or doing something else that could have even a small impact.

For these reasons, I would also be in favor of HN joining in support.
I find these articles to be silly. A lot of it depends on what you need to accomplish on your computer. The right tool for the right job.
I feel that way about cars. The new digital controls are awful and slow compared to the old sliders and dials.
> There are still going to be very few Redditors who are not aware of SOPA and its implications,

I don't think this is true. Reddit now reaches a very large and wide non techie audience. I have no data, but I'd guess more than half of redditors haven't heard of SOPA.
no matter what site does the blackout, they need to run a simple web app that generates your representative's phone number based on zip code.
Won't they also have repercussions if sopa goes though? A short term loss could be a big long term gain.
US-born game developer sentenced to death in Iran
I wish every city's website were this beautiful
On the other hand, with the common understanding of the word "hacker", do we really want news stories mentioning a site called Hacker News opposing SOPA?
There are always bought politicians parroting some special interest, that doesn't mean that they have a clue: http://searchengineland.com/dear-congress-its-not-ok-not-to-...

And what about innocent until proven guilty?
For people interested in programming languages, the author here is one of the principal developers for the Rust language. Considering that Mozilla is planning to use Rust to implement a new highly-parallel browser engine, I can't help but wonder if they have (very) long-term aspirations to write a new Javascript engine as well to complement their (somewhat less long-term) Javascript-based DOM implementation. See also www.slideshare.net/BrendanEich/future-tense-7782010

In any case, this blog has several really thoughtful posts on language design (though I admit, much of it is over my head).
Relying.

By definition, if we're talking about a tank, that's merely one layer of many. Obscurity can be a fine one layer of many. It had better not be the layer such that you are relying on, though.
> This is business. ... Let them hash it out.

When is a disagreement not business? Why should we be unwilling to take sides in a negotiating even when it is "business?" When a person's negotiating position is so bad that they use suicide to opt out, I feel sympathy, and I suspect that humanity might me better off if their position were improved by non-capitalist intervention of some kind.
Learning How to Code Is A Waste Of Time
Sure, it's super awesome that there are a ton more resources out there for people to learn to code, but without the fundamentals I'm not sure what's going to happen.

Codecademy has decided for 300k people they should learn JavaScript because they can build a game with it. People are heading into a black box without rhyme or reason as to what they are getting themselves into.

I don't see how this is any better than picking up a Dummies book. Let's add some more context to these "how to code" sites so that people don't get discouraged 1/4 of the way into learning.
SeanLuke, that is exactly how I'd write it too! ✼Whitesmith fistbump✼ — Related: I love the Wikipedia talk section on it: http://en.wikipedia.org/wiki/Talk:Indent_style#Whitesmiths_s...
But for the talented developers and/or programmers on the team, it's a complete productivity and sanity drain. Moreso if you're, say, part of HN's target audience, because you'll know all the modern web development techniques, and you'll be able to use none of them.

I have had an absolutely terrible experience with it, which sadly isn't unique amongst these big PHP projects.
Cory is a tremendous fiction writer, but this particular article isn't. Sure the government passes bad laws. They always will. How did prohibition work out?

A talented hacker has much more power than any official. If people want 'locked' systems that can't be hacked it shouldn't ruffle your feathers. They're not hackers.

If you close the door on reality it will come in the window every time.

The sky is always falling. The end is always near.
What repercussions are you talking about?

Reddit isn't as large as Google, but they also have millions of daily users and depend on their site traffic for their income.
Even before that there were pre-payment schemes, I think you could get a 3 month or annual card for ~£15/£35 or something.

Helpful mostly to people with chronic conditions (IIRC unemployment/disability benefits tend to include relief of prescription charges).

I was quite happy with the prepayment scheme, so really the only difference is I now pay them £60/yr (quarterly cards, oh the optimism) less directly.

As an additional pointless anecdote, I do actually get a prescription for Paracetamol, since it means I can get it in boxes of 100 rather than the stupid 16/32 purchase limit for OTC sales. It's easier for my doctor to tick the box than write a short note for the pharmacist, it seems.
Well, "very close" might be an exaggeration. C# has lazy evaluation, generators, LINQ, generics, and functions as first class citizens, while Java has... none of those. Or what amounts to none of those.

Overall C# ends up being a much more expressive language. Though obviously C# and Java are closer than C# and Lisp.
A prime example of why money needs to be taken out of politics. It takes all this shouting from the 99% but nothing speaks to the congress members like the sweet dollars of the 1%.

If wikipedia was able to raise $20M in donations, an anti-sopa fund raised for lobbying could be quite effective, but then congress members would look utterly corrupt.
But there's a great deal of difference between shooting targets and real combat, punchbags and live oponents, ball throwing machine and live adversary just as much as doing whiteboard problems by yourself and during an interview.

It's not the same experience.
Or anyone making music, or editing video. The commercial offerings in those areas still far outstrip anything available on Linux.
I love it when someone starts attacking my whiteboard problem by writing down something other than code, such as sample input/output pairs to test their algorithm against.
You can argue that either way. Disabling one's product for a day might hurt the bottom line, but this bill might hurt their very existence.
It's described briefly in R. D. Tennent's Book Principles of Programming Languages, but it doesn't really go into much depth about the ramifications. Did Tennent write a paper with more discussion of the principle?

(I got a hold of a copy after I ran into the topic previously: http://blog.marcchung.com/2009/02/18/how-closures-behave-in-... )
Note: Article identifies that Amazon does everything these days. Notice also: Amazon has a non-compete agreement, and lives in a state where it's enforcable. It's harder to leave when you have a noncompete with a company that competes with everything.

That is all.
"An accident is an accident" was being said by the insurance specialist, and in reference to the insurer's responsibility. In context, it was meant to say nearly the opposite of what you're inferring - something more along the lines of, "We can't pick and choose like that." Which is true; doing so would defeat the whole point of mandatory liability insurance.
Thanks.. Works.. All set!
How about a site called Y Combinator opposing SOPA?
Internal reporting apps and _dumb_ ? hmm... interesting observation and... lack of truth.

PS: Lots of downvote when it comes to Java and GWT eh...
It's funny, I think every interviewee who has apologized for their bad handwriting has been at least 50th percentile in handwriting legibility.
You are right I remembered incorrectly.
Advanced Programming Techniques Using Scheme [pdf]
Understood, it just catches people off guard and they get mad at C
Does anyone know what happened to Wikipedia's proposed blackout? It would be best if the different websites doing this could coordinate.
A web site where people stranded on a deserted island can let the world know where they are - and to send help immediately.
No, you will not be taken seriously. Seriously.
The Sleekest Way to Find Missing iTunes Album Artwork
How Closures Behave In Ruby (2009)
Don't get me wrong, I haven't yet seen an Intel graphics chipset that I would voluntarily choose again, particularly since I am a heavy user of OpenGL on Linux.

But I still don't think this guy's presentation counts as a fake demo.

And who knows? Maybe someday Intel will deliver a solid product for my purposes.
A lot of people who I have on Facebook aren't especially tech-minded but still share a lot of content from Reddit. It will be a good thing if they learn about SOPA.
>> it's not bundling when you don't actually own any of them

In legal terms you don't own Windows either - MS gives you a license to use it.