skysight-inc/HackerNews huggingface dataset:
That this is the top comment restores my faith in humanity, because it is exactly what I came to say: the adherence to 80 columns has nothing to do with refusal to accept change, and everything to do with enforcing readability. If a function is so many scopes deep that 80 columns has become unruly -- or if function or variable names are so long that this is an unacceptable limitation -- that's a reflection on the code, not on the 80 column limitation. The code should be refactored, intermediate expressions assigned to local variables, etc. -- all of which greatly assist readability.

Additionally, and as others have observed as well, the author (mistakenly, in my opinion) assumes that 80 columns was imposed by the punchcard rather than the punchcard reflected an approximation of readable line length. That this line length has an innate readability can be confirmed with this experiment: take a book off of the bookshelf, open to a random page and input a random line of text in your fixed-width text editor. Hardcover or paperback, small font or large, old book or new, you will find that the line is almost always less than 80 columns -- and often surprisingly close. One can quibble about the exact number, but it is clear that there is an innate connection between line length and readability -- and that enforcing that line length is an easy way of enforcing minimum standards of readability.
A year. A year of an apparently excellent programmer's output -- perhaps 2% of everything he will ever accomplish. To port a stable project to an 18 year old language.
I mind being the target of surveillance (in fact, my job largely consists of advocating against it) but I think there are different communities and cultures of programmers, and those different cultures have different attitudes toward privacy, power, and authority. Inhabiting one or more of those cultures, we might not be very aware of the others.

I read a bunch of people on Twitter and I was realizing just recently that almost all of them are people who are extremely suspicious of state power, extremely antiauthoritarian, and spend a lot of time trying to figure out how to learn more about electronic surveillance and thwart it. These attitudes feel normal and familiar to me, but I don't even have to look very far on Twitter to find people who are harshly criticizing them.

So one thing I've been thinking is that privacy advocates, rather than assuming that all programmers share our values, should be trying to figure out why some communities of programmers came to value privacy (and be skeptical of state power) so much, and whether there are paths to spreading those values in other communities.
Git is not just about git diff. For example, it gives you the ability to find which changeset introduced a regression by doing a binary search on the history and running tests automatically on each revision. The culprit could be a change made months ago.

To do so on an IDE with local history, you'd have to Ctrl-Z backwards all changes (not meaningful commits, but even small changes) linearly.
| There's a difference between a few people arguing and a controversy.

Only on average. We are fully capable of being irrational as large groups...
Told ya!! http://arstechnica.com/information-technology/2014/03/facebo...
If anyone is still reading this thread, I optimized the javascript solution and algorithm, speeding it up by almost 20,000x and beating the C++11 one by almost 1,000x. Post is here: https://news.ycombinator.com/item?id=7858485 .
Learn Swift: A Facebook Group
Hi, I attempted to address your argument in the section roughly titled "Node.js has super concurrency!". You may have to scroll down "below the fold", so to speak.

I presented two different ways of writing a single-threaded, event-based function that can handle "an awful lot of concurrency without ever thinking about threading issues or managing thread pool size to balance memory and concurrency". Essentially, it is possible to get good concurrency in a single thread without the use of many nested callbacks or abandoning the language's natural control flow primitives. It's not necessarily the case that you can't have both event-based concurrency and sane code.
> If he can come along and sell the tickets for a markup, why won't the sellers sell directly to the buyers and capture that whole amount for themselves?

I imagine the event wants to fill as many seats as they can. In addition to ticket prices, they also have food, drinks, merchandise, parking, etc. to sell.

If a scalper buys five face value tickets at $50, they would only need to sell two at $150 (3x prices are common) to profit. Even if they don't sell the other three, they've made money.

So the way I see it:

Venue: Loses food/merch sales for 3 people

Fans: 3 people weren't able to attend (tickets gone, can't/won't afford/buy inflated price)

Scalper: Made $50
Until Guantanamo is closed the U.S. military will will always "be a net negative" from a human rights perspective.
We use webviews, but try to intelligently integrate them into the app.

Things like back button, transitions, caching, and offline mode are designed to work automatically w/ little or no configuration.
Introducing Pseudo IPv4
Poll: What do you fear most about traveling into space?
I am doing research on perceived fears of traveling into space. I figured this might be a great place to do a survey to get me started, and also discuss the many potential threats. Most likely none of us have been in orbit, but I am wondering what aspects of the hazardous environment people tend to worry about.
Spacecraft failure at launch
Spacecraft system failure (air, water, temperature control, navigation)
Running out of food/water
Perpetual falling
Damage caused by other orbiting objects (junk, meteoroids)
Re-entry (high velocities, heat)
> Most of the time is spent on generating the random string

when i took out string generation, i went from 1.2 GH/s to 1.8GH/s (although, i'm assuming my string generation was much simpler)

> I very quickly realised looking through the entire possibility space in order would be unproductive

you say that, but it's not as unproductive as you might think. assuming the hash function is uniformly distributed (hah), there are 4 billion hash values that could result from a string. if we can check 2 billion a second, we should see a result every few seconds. maybe my search space pruning was particularly bad, because i see on average ~4-10 a minute, and they are usually quite clustered together. this suggests the hash is not uniformly distributed (although a cursory glance at the function should make it obvious to people with a maths background).

anyways, it was good fun to poke around :) cheers for sharing!
I really enjoyed Gary Bernhardt's response to this discussion: https://www.destroyallsoftware.com/blog/2014/test-isolation-...

You should read the whole article, but to motivate:

> This post was triggered by Kent's comment about triply-nested mocks. I doubt that he intended to claim that mocking three levels deep is inherent to, or even common in, isolated testing. However, many others have proposed exactly that straw man argument. That argument misrepresents isolated testing to discredit it; it presents deep mocks, which are to be avoided in isolated testing, as being fundamental to it; it's fallacious. It's at the root of the claim that mocking inherently makes tests fragile and refactoring difficult. That's very true of deep mocks, but not very true of mock-based isolation done well, and certainly isn't true of isolation done without mocks.

> In a very real sense, isolated testing done test-first exposes design mistakes before they're made. It translates coupling distributed throughout the module into mock setup centralized in the test, and it does that before the coupling is even written down. With practice, that preemptive design feedback becomes internalized in the programmer, granting some of the benefit even when not writing tests.
No. First, every kilogram we send to Mars will be hugely expensive, so low mass will be prioritized over long-term sustainability for research and exploration missions.

Second, the plants chosen for bottle gardens are very sturdy and tolerant of non-optimal environments. Humans are a lot more sensitive.

If you're interested in the topic, read "The Martian" by Any Weird, a very well-researched SF story about an astronaut who gets left behind during a Mars mission and has to survive for several years using equipment that was only specced to sustain the expedition for a month.
Have a read of the gist comments. It is contrived to an extent, and the original author acknowledged that it wasn't the ideal way of doing things, just an example of a direction you could go.
Good point. Thanks for the correction.

The fact they're finding it in many other sports and in military personnel, as pointed out in the FAQ, makes me pretty skeptical that this is a disease strongly linked to nonconcussive hits since hockey players and soldiers aren't butting heads every day. But it's pretty hard to draw conclusions while the data and definitions are so vague. Do you know if they've looked specifically at populations of long-time football players with no concussions?

A review article from 2012 had this to say

> While it is clear that anyone who suffers repeated head trauma, regardless of the mechanism, may carry the risk of developing CTE, there is no clear consensus on how much or how little trauma is needed to cause CTE. While most feel CTE is a manifestation of repetitive trauma, the question still stands if it can be caused by a single TBI [10]. In a study by Johnson et al., widespread tau and beta-amyloid deposition was found in the brains of individuals who suffered a single traumatic brain injury. The study included the examination of postmortem brains from long-term survivors (1–47 years) of a single TBI () versus uninjured age-matched controls (). Results showed NFTs to be exceptionally rare in young uninjured controls, yet were abundant and diffuse in one-third of TBI cases.

http://www.hindawi.com/journals/rerp/2012/816069/

The last sentence seems to support the idea that the appearance of symptoms is an important threshold, but it's hard to tell what they mean; could also be that anyone cracking heads enough to get sub-concussive CTE are likely to have picked up at least one full concussion.

> I'm a big guy and I live in the south, so you can bet I played my share of football growing up--there are definitely a lot more repeated hits to the head in football than any other popular youth sport

I played 11 years of football, mostly on defense and mostly with my head, and I fully agree. I coach youth football, so any data that would show a dramatically higher risk for football than other sports (which are generally regarded as acceptably risky) is of great interest to me.
Nothing crazy required
public EmployeeController(EmployeeMapper mapper){}

public Employee create() {
...
mapper.save(employee);
return employee;
}

Done.

All you do now is create a mock employee mapper in your tests, and you can verify just what you want in the Controller instead of anything else

You've got
* Single responsibility classes (Controller manages employee creation business logic; Mapper is a dumb database wrapper; If you want to go even further, use a Repository instead of a Mapper to introduce one more layer of abstraction between the data model, that way you can slide in caching or in-memory replacements, or what have you at will)
* Clean dependencies. There's nothing hidden about what this class needs to get it's work done
This is a strange debate these days. For me TDD made me a much better programmer. I'm not sure how I used to work without it. It saved me on many occasions. It does lead to better quality (from my experience). Frankly I don't see a single downside. Seriously.

Is it hard ? Sure.
Strangely, if the hashCode() method in the Java version is replaced with one generated by Eclipse, the java program runs much slower.

In fact, the execution time is more than doubled.

Why is this so?

The Eclipse generated version of hashCode():

@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + goats;
result = prime * result + lions;
result = prime * result + wolves;
return result;
}

The version in the original code:

@Override
public int hashCode() {
final int magic = 0x9e3779b9;
int seed = 0;
seed ^= this.goats + magic + (seed << 6) + (seed >> 2);
seed ^= this.lions + magic + (seed << 6) + (seed >> 2);
seed ^= this.wolves + magic + (seed << 6) + (seed >> 2);
return seed;
}

The two HashCode() methods both have about the same execution time.

Example:

Forest.makeForest(517, 555, 506)

With original hashCode(): 8.177 s

With Eclipse generated hashCode(): 19.237 s

(100% repeatable with only a few 100ms diff between executions)
I've been using it for 2 years and I still end up googling almost everything beyond pull/commit/push.
The easiest way to render these problems irrelevant to you is to not support the product, either for providing work or buying it.

Freelancer and sites like it are is designed to provide the lowest common denominator in skills at the lowest possible price. It's a rat-race to feed on one's own body to prevent starving to death.
It's interesting that there are any short-sat no-shows anymore. That is literally a free meal at an amazing restaurant.
He says:

> Having only raised $1 million in funding, the vast majority of the deal proceeds would go to employees. Also, a significant piece of the deal—more than 10 percent—had been set aside for restricted stock for them.

It mentions 12 employees, so if you figure ($25.5m - $1m) * 10%) / 12 = about $204,000/per person in stock. We can only speculate about the non-stock allocation.
Fund manager sets goats grazing in blighted Detroit
That blog post is 100 times more interesting that the above article.
Tight living quarters
On bbot.org I return 410 on robots.txt, for tedious ideological reasons. Doesn't stop spiders requesting it, of course, since that check is probably hard-coded.
> I think these are more about the incredible toughness of the shrimp involved.

Pretty much; this guy[1] claims that basically, the shrimp slowly starve over the course of a couple years, shrinking after each molt.

[1]: http://www.petshrimp.com/opaeinfo.php
If Tesla Made Bike Lights, They'd Look Like This; The Story of Sparse
That is why HN has a voting ring detector. :p
This, exactly this!
The title is a bit misleading in my opinion, but it was a good success story nonetheless. Congrats to Brad and the team.

Edit: By title I meant subtitle. I think it was changed on HN.
Intel Core i7 4790K Should Be A Great Linux-Friendly CPU
My first idea was clickjacking and social networks, but that probably is impossible.
If you want a neighborhood by neighborhood view of Detroit's blight problem check out http://www.motorcitymapping.org
Why does our government keep doing this shit.

It's the same thing they do with muslim groups by egging on the crazy loner to do stuff (checkout Radiolab).

It's like a microcosm of the bigger problem in our society. The government help give guns to crazy people, and then throw a fit when they shoot up schools.
OpenStep Confusion
>You're either ignorant or amoral.

Unfortunately rayiner is neither, as a look at his comment history makes clear. His morality is just antithetical to yours and mine.

To paraphrase and invert an H.L. Mencken quote, it seems in any dispute between a citizen and the government, it is his instinct to side with the government; he is for all efforts to make men virtuous by law.
The theory for test-first is you'll come up with a more testable design, and have better, cleaner, more focused tests if you write them first, then design the code based on the tests.

If you write the code first, then try to write the tests after, you may have to refactor code to support testing (if you're not used to writing testable code), or you might end up having to do very convoluted tests to make them work (see above re: 3-level mocks), or you might just accept subpar test coverage
Benford's Law is fascinating, and has been covered many, many times here on HN. Here are a few:

https://hn.algolia.com/?q=benford%27s+law#!/story/forever/0/...
Only if you put too much value on every little thing lining up. Your indentation levels will still work out, and beyond that people have better things to do than futz around lining up all their comments perfectly...
Probably root fungus and bacteria symbiosis. These have been made in biology classes for decades, this is just a particularly massive example.
When the option to buy on the website or on the App Store is presented like this, which do the authors usually prefer?
Neither in Safari 7.0.4
Agnosticism is a subset of atheism.
Same experience. I middle clicked on the tab and...it...closed. Without an issue.
I fear about classism developing due to living in different gravitational conditions. Somebody born and raised on Mars, or the Moon likely will never be able to travel to Earth. In fact within a generation it'll be completely obvious how more physical capable a just immigrated Terran will be over a native Martian.
> I suspect this is a very fine balance - if you're off by just a little, one or the other would die.

This is an illusion; it's a dialectic between the two. Problems lead to a shift in balance, not a death.
I get the modal when the window opens but not when the tab closes.
> Preventing servers from selling items does not encourage people to use Minecraft Realms

If it eliminates revenue streams from their competitors, what do you think is going to happen? I have to imagine that Mojang will offer more robust features in the future, so they might not be comparable now, but in the future it will be closer. Maybe they will offer "add a plugin" option to their service. They could offer cash to plugin providers if their plugins get used. (ala the Apple Store)

> I completely believe that Mojang are starting to take their EULA seriously in an effort to protect their customers

I generally agree with this assessment but I don't see "protecting their customers/improving the overall Minecraft environment" and providing a better experience than third party vendors sa mutually exclusive. In fact, they are likely closely aligned up to a point.
New Professional Networking App NextSociety
Why Microsoft should end Techweek sponsorship
Show HN: Take picture and get movie description with Android
I meant your site is down, at least in Firefox. Looks like a certificate problem. http://imgur.com/k5AEzvD.png
More Changes and Developments in Online Gambling
Man, that ending is brutal. So the point of building a business and selling it is so you can post about it on Facebook? Congratulations on all the effort and succes, nonetheless.
>That is to say, if Netflix is really the sole driver of Network upgrades, why does Verizon have to subsidize their costs of business?

Because Netflix has a higher brand affinity and customers of Verizon will be outraged due to what they perceive is shitty customer service buy a quasi monopoly.

The consequences is damage to Verizon's business because customers would switch if they could, but they can't.

Verizon doesn't HAVE to subsidize Netflix's business but they should if they don't want a legion of pissed off Netflix customers who feel trapped by their ISP.
The really critical point I'd like to highlight is this one:

> Marin’s team sent over a list of hundreds of technical, legal, and business questions that we’d need to answer for the deal to go through...Tracking down document after document was tedious beyond compare.

Having your ducks in a row as much as possible can make a huge difference in the complexity, risk, and overall stress of doing a sale/acquisition.

I don't mean Day 1, of course, but once you're starting to have conversations around acquisitions, it's really helpful to make sure your books are clean, that you have clearly documented your software stack, all of the third-party code you use and licenses, all of the contracts and MSAs you might have signed iwth your customers, employment agreements with contractors, and so on.

It's annoying, but once you have it done it's relatively easy to keep up to date.

When we sold our last startup, our CFO had done this 10+ times before, and on the first day of the due diligence, he handed over a URL for a data room with hundreds of documents, categorized and neatly organized. The acquirer's lawyers said it was the easiest DD they'd ever seen.

EDIT: I sentence misplaced words in a
Frog templating language
CTRL+W closes the tab without the modal appearing
I do think there is a massive double standard (which you can see from western media discussions of government surveillance in non-western countries, especially before a year ago). Government surveillance outside of the west is easily seen as repressive, invasive, and a sign of the lack of respect of states for human dignity.

The U.S. State Department even funds efforts to help people elsewhere evade monitoring by their own governments. They have a new round of funding proposals open right now. (By the way, I don't mean to criticize these efforts; I think they're completely appropriate and beneficial, and I think they've funded some good work, from what I regard as benign motives. It's just funny to think about the way that different parts of the government think about communications surveillance when they're putting a different lens on it.)

I've been to events where people confronted western government representatives about this issue, and they usually talked about the importance of being a liberal democracy, which, to put a pejorative cast on it, immunizes you from criticism for doing the same things that you criticize other states for.
Considering most languages (even most new ones) ignore many more decades of programming language research, 18 years is pretty good: it was cutting edge PL research at the time.
IPv6 support for 4chan
I always disagreed with that quote, and hate it when people roll it out like it's some sort of irreproachable truth.
"everything they call is callback based, returns a Q promise, returns a native promise, is a generator, is a pipe, or some other weird thing because it’s Node.js. (Just tell them to check the type signatures.)"

I think this addressed your question indirectly.
Use SAVE15 to get 15% off total purchase
It's not exactly addressed. They just say it might work.
Want to buy the largest video game collection in the world?
Redmond is patching Windows 8 but Not Windows 7, say security bods
What's wrong with charging to expose functionality on a server you own, just because that functionality involves code written by somebody else?

For example, let's say I run Mac OS X server on a computer somewhere and charge for user accounts on it. I'm charging people for the bits of code written by Apple, right? But surely this is completely reasonable of me, and Apple has no place to tell me that I can't charge money for this.

Taking it further, maybe I allow free accounts which only have access to a few shell commands, and then you can pay more to unlock other commands. Again, I see nothing wrong with that, even though I didn't make those other commands.
43% of the world's compute power was manufactured last year
Animated Day-Night Cycle With CSS and SVG
Now you can download memes from 4chan marginally faster!!

(I'm really glad they did this, because at 4chan's patented "SOON™" dev pace, it'll take us another decade to add native IPv6 support.)
The most significant downside is opportunity cost; all code is eventually throwaway code, and if you are doubling your authoring burden by writing code and tests on a throwaway prototype, you are iterating half as fast as you could be.

But in my personal experience, most programmers err heavily on the side of failing to test thoroughly something that will become a long-term solution, not on the side of over-testing their throwaways.
Next up, Hacker News. :-)