skysight-inc/HackerNews huggingface dataset:
I don't normally do this but Google Cache is being a pain for me so it might be being a pain for others. Here is the original article from http://webcache.googleusercontent.com/search?q=cache:http://...

I’m Adam, and i’m a recovering Singleton addict.

Posted by aschepis on May 2, 2011

My name is Adam, and i’m a recovering Singleton addict. There, i’ve said it. I used to use singletons all the time because they make doing some things, like sharing state globally, incredibly convenient. My code was littered with XYZManager classes. The defining trait of these classes was the static GetInstance() method that magically enabled me to get access to that object and its state wherever I wanted!! What a great idea, right?

What a mess! I learned over time that the cost of changing one of these things, or the cost of doing a major refactor was really high in terms of code change. And to make things worse, because my classes’ dependencies were hidden in implementation and weren’t transparent in the interfaces it was impossible to write real unit tests. This made doing a big refactor even less attractive.

So over the years, through work in the industry and coding on my own I’ve come to the conclusion that the singleton sucks, and that there are very few places where they are actually appropriate (logging comes to mind as one acceptable place). The fact of the matter is that most of the places I see singletons used in software they are actually just an enable for developer laziness.

So here is my off the cuff list of why singletons suck. Feel free to comment and add your own reasons (or counterpoints)

Singletons hide your dependencies. This makes code harder to understand
Singletons make unit testing difficult. It’s hard to mock out a global object that you can’t inject into a class
Singletons reduce reusability. If i’m writing a class that utilizes a singleton because my application will only ever use one then i’m limiting myself because I can’t use that library to write test tools that may want to simulate how many of these object (for instance, many users) interact with a system.
Singletons reduce scalability. A single, global object? Sounds like a source of contention to me.
Singletons are not good object oriented design, they are lazy!
It's a new online community for NFL and college football fans. We have a team of writers producing original content daily, as well as integration with 1000+ RSS and Twitter feeds from the football world. Members can follow any topics they wish - to be added to their own personal "stream" of information - and they can also set their interest level in each topic. Essentially, we're trying to build a true Web 2.0 football site that goes beyond 90's era message boards. The home page, in particular, has been tough for us because we want to highlight our original content but also make members aware of the various streams/communities on the site for each team, player, etc.
Excellent writeup. I agree, the last 2-3 years seem to have been real James-Bondian stuff in Pakistan.

Just to add to your comment: allowing the Kunduz Airlift (shortly after the invasion in 2001) was another of Bush administration's big mistakes. It allowed the top Taliban leadership to be airlifted out of Afghanistan, just when the NA troops had them surrounded. The seeds of today's insurgency were sown on that day; the top leadership survived, regrouped and still fight on today.
Google Panda Update: Google’s Obnoxious Attempt to Remove Web Spam
I have had an OCZ 120GB Vertex 2 for about a month now, and today updated the firmware to 1.33, in the release notes it says reduces the chance of data loss due to power interuption.

I would also advise making regular backups, checking SMART and for firmware updates regularly.

The previous drive I had was a Kingston 64GB and it still works after a year.
Your first comment is obviously bitter. Why aren't you happy OBL is dead?

|I've never known so many people that are either unemployed or underemployed, gas prices are higher than ever, and interest rates are going up. Inflation is out of control too.
The Dow is just a ruse, and really has nothing to do with the state of the average working class American.

How is this Obama's fault? He was handed a shit economy from Bush and has done as good of a job as can be expected having to deal with republicans who won't even vote to remove tax breaks for oil companies as they make record profits.

Reread my comment I said I think Obama will be reelected for those reasons not that I even believe them myself--Obama's economic advisors told him to ask for 3x the amount he asked for from Congress for the recovery package, and he only got 2/3 of what he asked for, so Obama isn't without fault, but he's done a good job cleaning house after Bush.

I plan on enjoying today and I think Obama deserves some due praise for this.
.....although the fact that you say you've looked at it and have no clue what it's about may be my first indication that we still have some work to do :-)
http://www.wordnik.com/words/compatriot

Second definition from American Heritage Dictionary:

2. A colleague.
We do - we don't have degree requirements for anyone.
I would've guessed the same thing, but it looks like he hasn't been dead for long. I'm almost alarmed that we got the announcement without DNA testing having been completed (as appears to be the case), and no photos or videos have been forthcoming as of yet. This can only fuel conspiracy-minded chatter, even if temporarily.
You aren't testing the engine. You are testing that the unit, in your example the class Foo, responds correctly to the state and inputs you provide it. Decoupling those responses from other units such as the graphics subsystem gives you the assurance that under the tested conditions the unit works as intended.

What you are talking about is a regression or functional test. Same genus different species, still very useful but not the same tool.

Edit: Going to bed, if someone would like to explain by morning why this needed to be down voted so brutally I would be much obliged!
Um...odd timing that you posted this when you did...
Lots of typos in there.
A new model for microblogging
No worries. I thought the Planet without Laughter was particularly entertaining.

It's also amusing in its own way to watch my comments get voted down.

I have, undoubtedly played more +EV games versus a casino than anyone on this site. (And, yes, I will bet on that, too!) But some sort of egalitarian sense of correctness has driven the "value" of my comments below yours.

I cared enough to make a 2nd (and now third) comment about it, but really, I don't care. So that kinda sucks.
the first time i read it, i thought he was computing 2^N and turning it into a list of digits. but, no, he was making a list of that length.

so, if you're going to pose a challenge to people, you should clearly describe what you're doing and why.
We are celebrating the death of a murderer. When you see people in the middle east in the streets, they are celebrating the deaths of civilians. That is the difference, and a big one at that. I hope he rots in hell.
The Web Stack of Love...
There have been attempts to provide a better standard library in plain C, and in fact these are fairly well available in operating systems. The problem is that no library spans all platforms.

On Unix systems with Gnome, there's GLib. It's very well-featured, very portable and available as prebuilt DLLs for Windows, at least.

On Mac OS X and iOS, there's CoreFoundation. My humble opinion is that it's the best OO-style C library. I'd love to use it on Windows, but unfortunately Apple wavered on their original commitment of open-sourcing CoreFoundation. They stopped releasing the source, and getting CF to build became very complicated at some point. I've lost track of what's the current situation, but clearly this makes it very difficult to rely on CF for cross-platform applications.
Ah. I gave an example of running a unit test against the hardware. I'd like to understand why it's not really testable? Not to defend myself -- to better myself.
Openbravo ERP Review : ERP Critic
Some SSDs react to some failures this way. But not all SSDs, nor all types of failures.
There is a "read disturbance effect" on MLC flash that causes wear on reads. MLC flash gets multiple bits per cell using several voltage levels.

MLC flash is also around 5K erase cycles (and about the same number of reads until you need to do an erase-and-rewrite). Multiplied out and properly wear-leveled this is not a big deal.

We might be seeing crappy wear leveling, or badly written firmware, or the need for more ECC bits (yes, MLC has these, and they are /not/ optional) than the EE types think they can get away with.

I've been writing flash file systems since 1991. They're fun as hell to work with.
Google's Backdoor Access System into Gmail Accounts
Of course they interact with photons. Photons are how electric and magnetic fields are propagated. So if they can be contained by an electromagnetic trap, they interact with photons.
Maybe, but deleting seems easier. Also note that the NYT story is older, which reduces its ranking.

But yes, I agree - this is not the main story.
As usual, Japanese schoolgirls have picked up on this before anyone else:

"Long ago, Japanese schoolgirls discovered the edge a limbal ring can give you by wearing "limbal ring" contact lenses. They make the eye look bigger and more defined."

My question is: Who do these schoolgirls get their information from?
If you can run gnome apps, you should definitely try gnome-do. It's like the launcher, but more polished.

Gnome-DO is the main reason I'm staying with "ubuntu classic".
We also wrote a blog post that goes over our major points without specifically addressing each competitor:

http://sidaza.posterous.com/51234289
Black short hair styles
The good thing about short black hair style is that they are almost fuss-free, its low maintenance and it is pretty much easy to style.
No : Intel X25-M G2 160GB running Windows 7 since 2009-10-28.
Mathematics is an empirical science
We're definitely not competing with YouTube, but I certainly see your point about getting customers first. It's a valid one, and we were just too miserable in our jobs to wait for that :)
I've never heard anyone argue that it would react any differently to gravity than normal matter. After all, the only difference is the electrical charge of the particles. They have the same mass.
Antimatter is just matter moving backwards in time, so it interacts with photons (which by the way, is its own antiparticle). This is one line of reasoning which strongly suggests antimatter should fall down not up in a gravitionational field.

although iirc Dark matter is something does not interact with light.
If you're not using the SSD for some of your data files, you're losing out on a lot of the performance. I keep all my code working directories on the SSD as well. Compiles of even large projects just scream from an SSD.
"Portable OpenSSH" is the result of adding "portable" to "OpenSSH". OpenSSH itself is clearly the main project.
No, the old boogieman is dead. The new one is some other guy who it turns out has been the major driving force behind Al Qaeda for the last few years. Every news channel was sure to mention this once every 5 minutes or so last night. Just because we "won" doesn't mean we should end the game!
I believe that the benefits of a social network such as Facebook outweigh the risks. The problem is that, it is very hard to quantify the positive effect which arises from small interactions. Sure there is huge scope for improvement, but one could have made similar arguments against telephony when it was invented.

I believe we are still to see rise of real social network based applications. e.g. something that allows us to estimate trust for a person, given his and your social network.
Your original comment is being downvoted because it doesn't explain why the comment it says to be unhelpful is (or at least that's my best guess; I obviously don't know the intent of every downvoter). HN tends to frown on comments which add nothing to the discussion. Also, if you're a "demonstrable expert" then you should be able to actually explain why the original one was unhelpful rather than just asserting that as fact and expecting everyone to believe you.
Idon'tknowwhatyou'retalkingabout! :)
I like it!

Here's a few suggestions you could think about.

- Link the generation of invoices to existing apps/online services. No invoices work alone, probably you need to tap onto existing apps/services to help simplify users's adoption of your app.

- Er.. why are you not making $$$ from it? Have a paid and a free options. One way I can think of the paid option is to allow users to save generated invoices.
This is neat. How do you plan to make money on it?
The article about Sony and PSN data stayed #1 for over a day if I recall correctly. I don't think that an article with 770 up-votes (that's an incredible number, for any article) would be #15 after 11 hours unless it had been repeatedly flagged. It's probably for the best though. Many of the comments for that article are inflammatory and that could also be the reason why it was flagged.
No. I am not a physicist, but my understanding is that certain devices that have been proposed for use in space manipulation devices (e.g. wormholes, alcubierre drive), require either a form of matter that has reverse gravity or thousands of times the available energy of the known universe.

http://en.wikipedia.org/wiki/Worm_hole#Traversable_wormholes
http://en.wikipedia.org/wiki/Alcubierre_drive
hey, I clicked the "buy the digital version" in chrome and I got this http://imgur.com/GYcrR (page not available). i tried in Firefox and it worked... maybe you want to check that out.
Especially because once we've sorted out what he is trying to demonstrate (I think) it seems dead trivial to duplicate? I mean, the only thing stopping me from doing that same demo with blazing speed in the deadly slow Rakudo Perl 6 compiler is the speed of calculating 2^100000....

PS For what it's worth, I'm guessing he's doing something more interesting than the dead simple implementation I'm imagining...
"Actually explain?" Come on, read it. It says "casinos make money, but if you count cards, you make money." It's a worthless statement and it has nothing to do with the comment it replies to.

I downvoted dtby's comment because the reasonable way to deal with worthless comments is to downvote them, not post a followup saying "This comment is completely unhelpful."
Just had a failure last week on my OWC drive. Replacing it wasn't too bad (had to wait a week) but made me realize that with so much stuff in the cloud, the failure of laptop drives doesn't really bug me or slow me down.
Last year we read about the Administrations proposed legislation that would require software companies to build "backdoors" into their online communication systems [1], but as Assange points out, they may already be in place.

[1] http://www.cato.org/pub_display.php?pub_id=12196
Please do yourself a favor and click on the "reviews" link.
Ping: Don't Count It Out
>"Singletons are not good object oriented design, they are lazy!"

Hmm, so perhaps that says something more about OO than "singleton style"?
I think the "falling up" argument comes from the conception that antimatter is the time-reverse of matter.
> virtualenv... falls down pretty hard on mouldes that require C bindings

Care to elaborate? virtualenv has worked fine for me and that plus pip means that the rest of the community can use and understand your code and all of its dependencies without having to have access to you or your machine to figure them out.
Five Legal Traps Every Entrepreneur Should Avoid
Not to mention that it would take a LOT of mass to balance out the weight of the board and the person riding it.
Thank you! I really appreciate your explanation.

By those definitions, shouldn't the number of pixels (circle area) reflect the deviation, rather than what it currently does (the square deviation, aka variance)?

In that case, the area should grow proportionally to the deviation, not to the variance.
I didn't explain why it was (demonstrably) summarily unhelpful because I assumed it was clear to anyone with a basis in logic, without even a nod to the fact that I happen to know how it works in practice beyond the theory.

In case anyone happens to continue to be confused: see, also: No true Scotsman.
JavaScript performance and a Webkit hotspot
Intel claims a 0.4% annual failure rate for their most-popular last-generation drive, the X25-M.

http://images.anandtech.com/reviews/storage/Intel/320/reliab...
My only complaint about the launcher is it takes a variable amount of time to expand. I haven't nailed down what causes it, but sometimes it pops open right away - and sometimes it takes a couple seconds. It's also nearly impossible to right-click on an item - the panel disappears right before I'm able to click. I partially blame that on the shitty trackpad on my Cr48, though.
I think you're comparing apples to oranges. An article from the mainstream media about bin Laden's killing is nothing out of the ordinary.

This link, however, is likely the first time in history that something so covert and meticulously planned has been exposed in real-time by someone experiencing it himself. We get the opportunity to see it from his perspective without the media's filters - just raw data. This is incredibly fascinating to me.
Why does it happen?
SEEKING FREELANCER. REMOTE OK

triviatise is looking for a designer. Help make our site not look like crap. Contact me with a link to your portfolio

Thanks!
Switching to Linux, you're doing it wrong (redux) (less angst, more help)
Informers and Persuaders
If the failure is not being able to write the block, then all blocks are still readable you just can't write any more. Any other failure not so much. Also note the read may fail at the OS level if it can't modify the last access time.
Seriously, matter moving backwards in time? This is amazing. I never had a reason to learn more about antimatter until now. Thanks <off to wikipedia>.
Just compile some Scala code to get an interview
Brightcove Granted Broad Patent For Online Video
I cannot agree with that, it's just as easy to add new methods as to learn to pass a new string as the first argument. How is it more "forward compatible"?
Very easy to say all this in hindsight. If it was that obvious then mid-sized cities would have been under scrutiny for years.
Well, that is a workable solution, but then, I'm sure you're already aware of that, seeing as you use it already ;) Personally I prefer having the object appear in the published interface, it helps highlight the existence of a dependency, but your way doesn't seem horrible either. I suspect that it depends a lot the language you're using. I'm a C programmer, and optional parameters are quite verbose in C, so I would never choose your solution, but in Ruby or Javascript your solution could be quite clean.
There are two counterpoints to this. The first is that capital gains taxes tend to be on investments made with income you've earned, so there's already been an income tax. The second is almost all of the uber-rich made their fortunes by growing a small company into a big one, so it's not as though they're already being taxed (through progressive corporate taxes).

There are obvious flaws to this scheme, but it's pretty hard to tax income in a fair way. Some places (notably the EU) favor using a consumption tax instead.
But it is just as easy to do that will a full userdata in lua. You just hook up the newindex metamethod. Even more powerfull
Despite friction in China, Google digs in
Yeah, seems like we kill him every other day.
He shouldn't have done it. He's saying some outrageously bizarre technical things. For example, he claims a big advantage of node libraries is their "purity", but it's pretty obvious that he doesn't know what that word means¹. See: http://www.reddit.com/r/node/comments/h1m2o/i_am_ryan_dahl_c...

He also says he wishes JavaScript didn't have garbage collection, like C. He says, "Too many people ignore the "no garbage collection" feature when designing languages." But javascript's object model really wouldn't allow manual memory management.

The final weird thing is talking about Akka in node, but admits he's had limited success. What I don't think he gets is how the scheduling for actors works. It's actually an alternative paradigm to the callback soup that Node uses.

¹ When we're talking about a programming language, it's not unfair to ask that we not mix up terms already used in the programming world.
Hiding IO latency in Python generators by async prefetching
I found it odd that we are celebrating a death. Seems somewhat barbaric.
If it's so clear to anyone why the post was unhelpful, then why would we vote up your comment saying that? What does it add?

You don't only get downvoted for being incorrect.
>expected to just figure stuff out

I'm not trying to belittle people who need help, but those who don't like to figure stuff out might be in the wrong field...
Swebbo – Social Bookmarking Platform
Swebbo is a sensible social bookmarking platform that comes with some unique and exclusive features to tick, save and share your favorite bookmarks. Like Delicious and Digg it provides tagging facility and it also supports login via Facebook and Twitter account so you don’t have to register for a new account here.
I agree that "gratifies intellectual curiosity" is overly broad, and often used to justify things that probably shouldn't be on HN, but I think HardyLueng has a point with "Also remember that hackers are typically young and a large part of their psyche can be defined by that monumental event happened almost 10 years ago."

9/11 and the War on Terror have defined my generation. The death of one of the most focal figures of this conflict will likely have massive effects. There could be plenty of interesting discussion on what will happen as a result of this.

Unfortunately, as with most political topics, responses seem to be largely simple reaction, rather than in depth analysis. It's possible that this could lead to interesting discussion here, but it mostly didn't, in my opinion.

Now, does it belong on Hacker News? I don't know. My first thought was "politics/news, flag it", but I'm less sure now that I think about it. If we occasionally get topics like this that are massive news, but not necessarily directly HN, I think it's ok. But if we start getting them daily, something has gone wrong. Every once in a while for a world-changing event is fine, but it should only be for truly momentous news.
سيلا شاهين 
سيلا شاهين سيلا شاهين سيلا شاهين سيلا شاهين سيلا شاهين سيلا شاهين سيلا شاهين سيلا شاهين سيلا شاهين سيلا شاهين سيلا شاهين سيلا شاهين سيلا شاهين سيلا شاهين سيلا شاهين
This comment is, actually, unhelpful.

At least most of us are taking for granted that bit of knowledge, as to actually have this conversation about card counting. Thanks for clearing it up for us.

Furthermore, its position in this thread makes it an entirely offtopic reply to a legitimate question.

Please downvote. Greying out my response will get many more people to read it.
I think I should've been more specific—I know that the two interact, but I wasn't sure if they /react/. That is, would collision between photons and antimatter produce the same sort of decay as matter-antimatter collision. Some research suggests that it indeed would.
Ernest Shackleton‘s 1907 ad in London’s Times
Ernest Shackleton‘s 1907 ad in London’s Times, recruiting a crew to sail with him on his exploration of the South Pole - http://i.imgur.com/DgC1g.jpg
Not saying that it's as feasible as normal engine, but when you ride a bike you pretty much fill it with matter that explodes violently when ignited. Then you ignite small parts of it to make the bike move...

We may still see some normal devices which use antimatter in one way or another.
I use PeepOpen and NerdTree. It's not as good as what you describe but good enough for me to use every day.