skysight-inc/HackerNews huggingface dataset:
The thing I really dislike are unit testing styles that use mock objects a lot.

I see some people say that you should test each object in isolation, mocking out any dependencies. That seems wrong headed to me.

I prefer my unit tests to test everything all the way down.

The only thing I would mock is the file system, which is useful for testing file loading code.
That’s just one side of the coin, though. While the binary tree played a role in the ”death” of the Usenet, services like AOL played another major role. Companies tried to make the internet more comprehensible for the average user and invented forms of communication that they thought of would be understandable by the masses and easier to sell (remember those pesky ”You’ve mail” AOL ads?).

Furthermore I don’t think it’s true that the Usenet is dead. There are still some active groups that rely on it. It’s just that there’s so much more these days. There are several social services competing with each other, there are a lot of web sites that let you discuss about things and are targeting specific niches.

Usenet wasn’t killed, it’s natural progress.
Ask HN: IDEs vs. Text Editors
I've seen really good programmers using both.

I've had a really good run with IntelliJ IDEA after horrific experiences with Eclipse.

I've used gEdit and SublimeText as well in the past while struggling with VIm and emacs.

I can understand that using a text editor brings you closer to your tools while an IDE can make you 'lazy'.

But I also feel that IDEs (at least IntelliJ IDEA) makes you way more productive and allows you to refactor with ease.

I currently use IDEA in a team that's full of VIm aficionados. No they aren't forcing me to 'convert' ;-) but I am a little curious.

I guess text editor + plugins could give you a pretty good mini IDE.

What do you use?

---

Edit:

Languages that I work with: JavaScript (Client + Server side), Scala, Python, Java, HTML, CSS, LESS, Bash
Offline attacks matter. The last few years have seen a continuous stream of high profile account database leaks. There are now some 1 billion known real user selected passwords that are readily downloaded from any of a number of shady sites.

It is irrational to assume that password database leaks won't continue.

The hashing scheme and salting matters less and less, as the total entropy humans can conveniently recall is quite limited and moore's law keeps marching.

We need a fundamental rethinking of security and identity on the internet, and IMHO the OSS world needs to get there before partisan commercial interestes.
Why is the sky blue (and not violet) by John Baez
This is correct. I didn't register, so I didn't demo.

In 15 minutes this app will disappear from my mind.
I get what you're saying (I designed a 4-bit CPU at university, prototyped it in basic TTL and got it fabbed and it worked (!) in two semesters) but it doesn't mean I'll ever be able to throw a useful microcontroller core out of the door or that the work I did was of any merchantable quality.

Progress is good but if you throw someone into industry too early, then you're going to hurt the reputation of the education methodology (which in this case deserves it) and the company who is employing them.
Uh no, it's about skills, and you learn a lot of them in 8 weeks which disproves that you can't learn any in 10.

Unless you're in the Navy, then it's about keeping clean so you don't piss off everyone else on the ship. :-)
Thanks. Just the process of reading a list and thinking about the reasons why things will/won't work & how is very helpful for starting to think of ideas. Also what makes these unique.
netbeans all the way.
This is one of the reasons I really like property-based testing à la QuickCheck[1]. The core idea is simple: you come up with an invariant for your code and the testing framework checks this invariant with randomly generated inputs. So when you're writing a test, you just have to come up with interesting invariants; you do not have to guess which inputs are edge cases.

[1]: http://www.haskell.org/haskellwiki/Introduction_to_QuickChec...

This may sound complicated and seem like overkill, but I've actually found it easier to use this style of tests for much of my code. Having randomly generated inputs can help find edge cases I did not even consider when writing the code in the first place--this addresses the bias issue you are worried about.

I also find that this style of test results in concise, easy to read tests. The usual "hello world" example uses the reverse function for lists. We want to ensure that for all lists, reversing it twice does nothing. The test would look like this:

prop_reverseTwice ls = reverse (reverse ls) == ls

It's very easy to tell what invariant you're testing for! (The prop_* name is a convention for this sort of test.)

While real invariants are often more complex, I find they are still usually easy to read right from the code for the test.

Anyhow: you should really try QuickCheck or something like it for your language of choice.
The most obvious thing would be to sanity check each player's location data. Someone who moves 100 miles in less than a minute is obviously cheating.
It must have some age on it, since I'm seeing some Google Wave URLs in there.
Well, this idiot gets to put "built a brand-new $25 million school" on his resume. He's benefiting himself without any cost, while screwing the taxpayers.
I found that I'd reached the same stage. If it wasn't multiplayer with the chance for competition, I couldn't get into it. If you're looking to branch out a bit though, I found just playing through co-op games with the same people I'd normally, 'train' with so to speak, was a great way to get back into the vibe of single player and non-competitive multiplayer.

Then again if you're happy with things that way, then no need to change things up.
Also see http://ethercalc.com
The app seems pretty slow, it cannot be perceptibly slower than Excel for this project to kick off. You can find lots of low hanging fruits by running the Chrome audits.
Curious, which languages do you work with?
(Full disclosure: I'm a teetotaler)

Everything you described also applies to Spain. Here, it's usual to have a beer while eating (wine is less common for young people); but, usually, "drinking to get drunk" is the norm in weekends and evenings. Many people actually do it on Thursdays, even if they still have to work or have classes the following day.

Here, most people wouldn't call it a problem.
Let me ask you this: is the original Porsche 924 really a Porsche for you?
you should hire a native english speaker to write your marketing copy
I think that's more towards some kind of integration testing. You're supposed to test one unit independently, and then write integration tests that actually tests that the whole system works. Not saying that's the best way but i think that's how people think.
Five Tips That Can Make You a Better Negotiator
this sort of thing is why the 3rd and 4th gen consoles were able to last for so long.

NES games were produced for 11 years after the console was originally released (and the console itself was produced for 20 years!) because of this flexibility; SNES games were produced 8 years after the console was released as well.

Not that I disagree that cartridge logic can extend the lifetime of a console, but the Playstation 2 is 12 years old, and Playstation 2 games are still being produced too (e.g. FIFA Soccer 2013). The last batch of Playstation 1 games were released in 2005 (with minor exceptions in other regions), the PS1 was released in 1994.
Agile tips for beginners and wannabes
From my reading on the subject I am not sure if the current Linux kernel will support a thunderbolt NAS.

That and the lack of ecc memory is what currently holds me away from buying mac minis for hosting.
I prefer my unit tests to test everything all the way down.

They already have that, that's called integration testing. Unit testing is trying to test as small of a unit of code as possible - this helps you identify exactly where the error is. If all of your tests are integration tests and something fails, you have no idea which part of your stack the problem is in.

Obviously different projects require different kinds and amounts of test cases, but I prefer a mixture of both unit tests and integration tests (unit tests for small, complex blocks of logic, integration tests for most of the other stuff).
what is really scary is not the proposed law but the public relation campaign google is mounting against it.
It is a (very likely) unprecedented internet lobbying effort involving not only googles advertising network, but also a link on google.de (no longer visible).
To a casual observer, watching the short youtube clip or reading the campaign slogan "Willst Du auch in Zukunft finden, was Du suchst?"("Do you want to continue to find what you're searching for ?") it could seem like the government was trying to shut down google search.

It seems like a scary prospect to think of the ways google, a private company, could start to use its unparralled reach to lobby for legislation in its favor around the entire globe.
Brilliant project. Thanks for sharing. You should send this to the people at raspberrypi.org and/or adafruit.com as I'm sure they would feature it.
I'm going to reblog it at www.recantha.co.uk and put all the images inline to make it easier to read.
Nice one!
I find that simply assert'ing all non-trivial assumptions and invariants in the code is the form of unit testing that works the best in heck of a lot of cases.

If there's need for explicit tests, just use the code in the right way and see it exit cleanly. Then use the code in the wrong way and see it assert (first replacing the assert() with a throw/longjmp to catch failures without aborting).

Asserts also double as a concise context documentation. When an assert is triggered, it's typically easy to see what its condition means and what has gone wrong. So it's a win-win all around :)
2 problems here, first, can you use competitors data for comparison and making your data better? Second, calculating difference is very difficult and size of difference could be overwhelming. But first issue is the main problem.
So, you prefer your unit tests to be integration tests?
That's the sort of reasoning a cost-conscious, penny-pinching, supply-expert executive would make.

A customer-centric chief obsessing about software quality, with $70bn sitting in offshore banks, would probably make a different one.
> I don't see why this is unequal nowadays for women or other minorities

In the United States, women's median income is still 77% of men's median income. (And, yes, before you bring up all the various stupid talking points, that figure accounts for all the various factors like taking time out of a career to raise kids etc. etc. US government statistics account for all those kinds of differences and still show a gender pay gap that is closing very, very slowly.)

According to a 2003 study, white workers earn approximately 14% more than black workers in the United States across all sectors.

Only six of the CEOs of Fortune 500 companies are black, only 20 are women.

Prisons in the United States hold six million people, a 772% increase from 1970 to 2009. The War on Drugs has heavily targeted minority black communities. 40% of the prison population is black despite only making up 12% of the national population. We've seen the story countless times before: shitty schools, no economic opportunities, so crime becomes the only option and prison the only solution. If you don't think there is a heavily racialized component to how the prison system works in the United States, you don't understand the prison system in the United States.

And despite all the stories about "the pink dollar", gay men get paid less than their heterosexual counterparts.

In the United Kingdom, according to figures by the Office of National Statistics, women are paid 14.9% less than men.

Tell me again how men and women are equal and how we are living in a post-racial, post-discriminatory society where we are all equal.
I agree that approach != landing, but the title of the video is "landing".
That's what I thought until my first summer internship at a Rails shop. Our unit test suite could take a very long time to run (on my Macbook Air dev machine, it would take 15-20 minutes to run). The slowdown came from testing ActiveRecord models with many dependencies, and that we were creating sample models. As a result, our tests hit the test database multiple times, which made them slow down.

Our solution was to start mocking as many models as we could, which really did improve test runtime.

(Slight edit: after reading the other replies, now I really understand what integration tests are for.)
"Plus a paper map"

I'd never go anywhere risky without a paper map and conventional compass - I actually rarely use a GPS when out on the hill because I want to keep my navigation skills reasonably sharp. I generally only use a GPS device to confirm decisions I've already made in rather "tricky" situations.
Original post from almost three years ago:

http://news.ycombinator.com/item?id=1190974
> Typically that meant that women, minorities, and the poor couldn't learn programming and so never went into computer science.

I understand that poorer people have no opportunity to learn programming and other less-immediately applicable topics outside of class, but I don't see what's stopping women from learning how to code. Most middle class people today spend their entire days on facebook--why is it "harder" for a woman to take some time to learn how her computer works when countless men begin learning in their late teens/early adult years?
That's quite opposite for me, I write code with lots of tiny errors (most of them 0,1 based array sizes or not understanding how API works), so I test as much as possible. But tests true value is regression testing. I can refactor something, and test knowing that if I messed something up, test will flare up.

I still try to avoid errors, but it's pretty much nigh impossible.
Australian medical centre infected with Ransomware Malware
You're placing entirely too much importance on particular categorizations, "comfort" has much more to do with "what you're used to", than the idea that people are constantly fretting about how population densities in their environment match up to their own self-identification.

As a bi-racial male of the darker persuasion (which in America is basically "not-white"), I find myself much more comfortable around predominantly "white" groups because that has been the most common environment for myself throughout my life.
Disabled gmail
Can anyone help
My gmail account has been disabled and I can't access my old email. Unfortunately I did not buck up my account for many reasons. What should I do to get my emails
How many issues do you think may be hidden by mocking out the database layer? It's easy to write bad data due to a subtle bug in a query builder for example and then write garbage into the database. Mocking would make that significantly harder to catch.
Guess what? Back in 2009, I started using a method to remember long passwords with a huge # of letters, numbers, & special characters.

Gw?Bi2009Isuamtrlpwah#ol,n,&sc. (31 characters)

Create memorable sentences and create a password using the first letter of each word & all the numbers and punctuation. After entering it 10 or so times you'll get used to it pretty quickly.
I use text editor when I start learning any language, and after spending sometime I switch to IDE.

for Java I used Netbeans but moved on to eclipse
for PHP I prefer text editor Notepad++.
Uggs clearance sale
Not for the media. This would be a media gold mine.
I hope there wasn't any permanent damage, I'd feel responsible.
It'll take years before it becomes part of the spec and all other implementations will catch up. D had it for ages.
Acme [0] via Plan9port [1].

[0]: http://acme.cat-v.org/

[1]: http://swtch.com/plan9port/
North Korea: On the net in world's most secretive nation
There was a discussion about this subject 3 months ago : http://news.ycombinator.com/item?id=4417367
What makes you think Tim Cook is sitting on his thumbs. Did he not fire two top-level execs over the maps fiasco?
"Artists and authors aren't going after the library for copyright concerns the same way they go after torrent sites."
> They might if the library would share everything digitally, which would directly compete with the artist's own marketing efforts

"Websites don't go after big search indexers like Google and Bing but will and can sue local scrapers who never entered some type of agreement with the website."
> They don't go after Google because they (supposedly) make something out of getting scraped
> GPS navigation systems have already killed:

I think that's a bit of hyperbole: people relying 100% on a GPS/map/whatever when they should have used their heads a bit more is what got the boy in the article killed. Doesn't look safe? You're not prepared? Turn around! Don't go into places like that without a full tank of gas, plenty of water, some food, and if it's cold out, some sleeping bags/blankets.
> In my opinion, a programmer must write a good code. And leave the testing to the QA.

Aside from the "not my problem" vibe that gives off, I strongly disagree. QA is helpful for covering weird user interactions and writing tests against bugs discovered in production, but you as the programmer should know what your code is supposed to do while you're writing it. Best write tests then rather than six months later when you've forgotten what it was for.
I just copied that reply from the person that built the actual rack, but I would love to hear more about your iOS testing infrastructure/process!
Homebrew has some pre-built binaries too. From the FAQ: "Homebrew does provide pre-compiled versions for some formula that take a long time to compile (such as Qt which can take many hours to build). These pre-compiled versions are referred to as bottles and are available at: http://sf.net/projects/machomebrew/files.
Against Maintenance
Reblogged here:
http://www.recantha.co.uk/blog/?p=980
All of which is true, but it leaves me wondering if Vic Police have informed Apple - seems like a far more effective way to save lives than issuing a statement that will be read by pretty much no-one...

I mean as an absolute first step, they should as a minimum report the problem by using the -in-app error notification system...
On the contrary, this is the good kind of medicine. Emergency treatment saves your life, but leaves you with a damaged heart. This research looks towards repairing the damage.
Yes, but I have to hit enter first. And, having hit n a couple of times, I haven't found a way to easily add more letters to the search pattern (but I am pretty new to Vim). Also, I (believe) I need to escape out of search mode if I want to use * if I found the word I was looking for and want to find more occurrences of it.
It comes across a bit harsh worded that way, but if you look at it purely from the point of view of a VC looking for a decent ROI, most of will be "losers" - most startups fails, and while many founders will try again and again and many will eventually make it, a large portion will never succeed at getting growth enough for an investor like YC to make a decent return.

If it was meant as a personality judgement, then I agree with your assessment. But if you view it as purely a statement about their odds of success at present time, it's just business.
I think you can also charge a lot more than you currently do
So, you get to say something incredibly invalid and easily disproven like "you can not learn any skill in 10 weeks" because I wrote an essay in 2008? Four years ago?

Let me guess, you aren't very good at this whole logical argument thing which why you're just wrong here.

Again, merchantable skill is subjective and based on the free market, so no, I could learn a "merchantable" skill in 2 hours. Cleaning toilets comes to mind as one very such skill.

You're just wrong. It's possible to learn skills in 10 weeks of 8-10 hour days, and learn them well. It's possible to become a junior programmer in that time. It's possible to learn a ton of different skill in that time. You actually meant mastering these skills, and just refuse to admit it.
As an aviation enthusiast, I was surprised to learn something from that video; If you look closely, the rear landing gear appear to align with the direction of travel. I always thought they were fixed.
Long history of switching back and forth between them.

I started with Turbo Pascal and Think C, which I guess were very early IDEs, then used Notepad for my early Java/HTML/Javascript days as a teenager. Discovered JBuilder at my first professional job, it was a revelation. Switched to Eclipse (which had just come out) just as that job was ending, and used that for most of my Java courses and hobby projects in college. Did PHP using Notepad++, attempted to use both PyDev (Eclipse) and Wing IDE for Python but found them lacking. Attempted to write an Eclipse plugin for Dylan. Eventually learned vim so I could edit PHP files on the server, and stuck with it for Haskell. Used all 3 of Netbeans/Eclipse/IntelliJ in my first professional job, and wrote a Netbeans plugin. Switched to vim for my startup, which was all Python/Javascript/HTML/CSS/SQL. Stuck with vim at Google, now use it for basically everything.

I'm not anti-IDE, I like a lot of the functionality available in it and wish I could get at some of that from within vim, but ultimately it's not worth it for me now. Eclipse has difficulty indexing the Google code base because it's so large (I've heard reports of it taking up to 2 hours to startup), so I'd much rather stick with vim and pop up an editor instantaneously. I have enough memory issues just running our build system and frontends on my workstation.
There are a few road in France (some very famous Tour de France "col") that I know become part of a ski resort in winter time. Sure the road is indeed still there but for several months a year you need a pair of ski, a pass and the skill to manage a red track.

The important point to note though, is that independent of the quality of the map in your GPS, there is plenty of indication along the road. Turn by turn indication is great, but indication on the road itself should take precedence.

I don't know what makes somebody follow blindly a magical widget in a way they would never follow local people giving them indication. ( I had quite often the situation of friends following the GPS instead of my indication, despite having lived in the area for 30+ years. )
Put his on eBay! Ha!

What was that scam that lit up HN last week? Pay for item. Report item as "not as described." Get reversal. Keep item?

It looks like a cool collection. I didn't know games would be worth this much. Especially considering how practically all aren't in mint condition, many have missing manuals etc.
Cheap A Line Sweetheart Chiffon Wedding Dress
custom Chiffon A-Line Sweetheart Wedding Dresses online sale, buy discount Chiffon A-Line Sweetheart Wedding Dresses through large selection at elegantpark.com in top quality.
Startups, Ignore Distribution At Your Own Peril