skysight-inc/HackerNews huggingface dataset:
Somehow, someone always forgets that engineering is about trade-offs, and so every few years we can an indignant series of articles about how stupid and ignorant today's programmers are and how we should all go back to the same processes that they called stupid and ignorant 4-5 years ago.

Relying on reimplementation, copy-paste, npm shrinkwrap, or various other ways of importing third-party code into your repository results in the following advantages:

1. You know exactly what goes into your product, and can audit everything for security, performance, or coding standards.

2. You often end up importing less, as third-party modules may have functionality that you don't need but other clients do.

3. You can modify the resulting code to add showstopper functionality, even if upstream doesn't want to.

4. You aren't subject to the whims of someone removing your dependency from the Internet or replacing it with a version that does something you don't want.

Relying on lots of little libraries installed via package manager gives you the following advantages:

1. You can easily install & try out modules that other people have written, letting you test out new features on users more quickly.

2. You can share code with other modules that have the same dependencies, often reducing the overall size of your system. This is important when there's a cost (eg. download size) to your total bundle.

3. You have less code for your engineers to read & maintain.

4. You can easily track licensing & contact information for your dependencies.

5. You automatically get any new features released by your upstream dependencies.

6. You automatically get security updates and performance enhancements released by your upstream dependencies.

The last is nothing to scoff at: imagine if the headline, instead of 'left-pad breaks the Internet!', had been a security vulnerability in left-pad which literally broke the Internet. Imagine how hard that would be to fix if everyone had copy/pasted the code or re-implemented it. This is not an academic scenario either: remember "Nearly all binary searches and mergesorts are broken", published by the guy who wrote the broken binary search implementation in the Java standard libraries?

http://googleresearch.blogspot.com/2006/06/extra-extra-read-...

Always copying your dependencies into your source tree is not the answer to this, no more than always relying on npm modules was the answer to updating your dependencies. They both have pluses and minuses, and if you really want to be a good programmer, you need to weigh both of them. For my projects, I tend to use whatever libraries I need when building them out (via npm, if possible), and then periodically audit the dependencies to make sure I'm still using them and they wouldn't be better off incorporated directly into the project. I wish more products did this, but I don't control what other programmers do.
The Chrome team should tell the Google Now Home activity team to show these apps in the drawer until they get the Android team to implement runtime (instead of install time) addition of launcher activities. It sounds like an instance of UX failure through non-communication.
I'm not American, so Day Of The Tentacle is how I learnt about the background to the Declaration of Independence.

I've since met several Americans who claim this is also how they learnt about it...
No, Browserify is still quietly way out in front of everything else (in terms of npm downloads).
I don't have any interest in anything with a speculative value. Sorry, but Bitcoin didn't make it - "the next big thing", i.e. Ethereum will not make it either as people have zero interest in something that's at the mercy of low-quality speculators. In this case, I really don't want my business to have anything to do with a speculative technology. As I said, the only two requirements are authenticity and immutability and you don't need Ethereum to implement it.
> Also, what are you talking about? Are you claiming that NTT nor TWTC can mitigate a DDoS attack? If so, you're massively wrong.

Both are in possession of large networks which allow them to mitigate DDoS attacks.

The small business with the 1gbps pipe isn't "mitigating" the attack. Their provider is mitigating the attack in return for payment.
I always suspected that to be true regarding Apollo project.

Well...

Today I see how much Soyuz-2 costs vs. how much spacecraft Soyuz costs... and wonder - may be it's still trickier to create Apollo and LEM than Saturn-V, even though in Russian history H1 turned out to be harder to make than the payloads...

Rockets are doing roughly the same thing, since 1957 - get things to orbit. While payloads keep changing - with all those stations, telescopes, probes, monitoring satellites etc. Rockets aren't that much "rocket science" anymore - but the payloads surely are. So may be - just may be - this law can be amended, a little bit.
Which is why it's so unsuited for writing non in-browser applications. JS was made for a purpose. We hacked it and discovered (or at least made popular) the benefit of having a fully async STD lib, of using callbacks to manage incoming connection and so on.

The wise course of action would be to take those very good ideas and bake them in languages designed for web/system programming, and keep improving JS for in-browser tasks.
One reason among others:

http://blog.codinghorror.com/the-case-for-case-insensitivity...
I've been to a restaurant that totally eliminated tipping in SF (Zazie in Cole Valley). They really, truly eliminated it, there isn't even a line for an "extra" tip if you feel like leaving one, and there is an explanation on the bill that they really have done away with tips. The price on the menu is the price they charge (there is still tax, of course).

Honestly, I loved it. It makes me want to go back. Worrying about how much to tip has always been a vaguely unpleasant ritual for me. It's not that I don't want to pay for good food and service, I am more than happy to pay for good service and food, I certainly don't expect anyone to work for free or poor wages. I just really found it refreshing to simply be charged the price that was quoted on the menu.

Unfortunately, eliminating tipping can be complicated, and evidently can also lead to a higher tax bill…

http://www.sfchronicle.com/food/article/Eliminating-tips-bri...
Ανάπτυξη στις στοιχηματικές εταιρίες
I don't think it is bad at all. For a lot of project where saving even a minute matters.
Ah OK, yes that is fucked up. So there are subconscious biases at play in tipping, which is all the more reason to get rid of it. You'd think the social justice folks would be at the forefront of advocating such a thing, but alas ...

It is pretty sad that HNers are quick to downvote your post while demonstrating little inquisitiveness.
Umm...

https://www.google.com/transparencyreport/userdatarequests/l...

http://images.apple.com/privacy/docs/government-information-...

There's not that much difference between what the two of them provide to governments as a response to legal requests.

Also note that Apple continues to operate in China while Google refused to cooperate with the government there and gave up huge business potential in that country.
The latest version of lodash (4.0.0) doesn't support IE 8, so you would need to polyfill isArray() yourself or use a pre-modern lodash version.
Machines will generate enormous excess wealth in the future
Kudos are actually due to all the normal people, outside the echo-chamber. Who not only declined to participate in fear or politics but in many cases wrote movingly about the value of open access.
Yes, I found a number of the stylistic changes made in Lodash 4.0 made it more complicated to upgrade than needed.

Dropping the this param with no period of deprecation? Pretty breaking change to make with no warning. Renaming first/rest to head/tail? Was it really worth it? Particularly when they go the opposite direction of replacing traditional functional names with more explanatory names by removing the foldr alias for reduceRight.

All this in a language that doesn't make it easy to do automated refactoring means that you basically break everything upgrading to Lodash 4.0 so you can't refactor parts to the newer style piece by piece.
I think we missed the point here. The fact that it's 11 lines is meaningless, this could have been babel itself.
What if it was well-tested?

What if it was well-typed?

What if it was awesomely documented?

Would that be ok? I'm asking, because a lot of the discussion in this post comes a single simple function being a dependency.
Vice's Toxic: West Virginia provides a great visualization of the effects of mountaintop removal, which, in Appalachia, turns lush mountains into industrial moonscapes.

http://www.vice.com/video/toxic-west-virginia
Yes that's true, but there was also a general feeling at the time (among investors, journalists, armchair experts) that cloud storage was a crowded space (there were like 8+ players in the space at the time [1]) and that Dropbox was either too late to the game or it was impossible for anyone to deliver a product that would appeal to the mass market.

It took them a long time to raise funding as a result.

[1] http://techcrunch.com/2006/01/31/the-online-storage-gang/
Packaging is the new programming.
You shouldn't necessarily assume that waiters receive a lower base salary than kitchen staff. In some places (e.g. large parts of Canada) minimum wage is minimum wage and, at lower class chain stores, waiters are paid the same hourly wage as kitchen staff: minimum wage. They can easily more than double their earnings with tips but, in most places, tips are not shared with kitchen staff to a significant degree. This means the people who bring your food to you often make a lot more than the people who make your food. This bothers me.
The problem is not that we forgot how to program, the problem is that we never actually learned how to create a good programming language which avoids these problems.

Just look at the whole build system and module hell of C and C++...

I totally like the language C++ but I hate the tooling around it with a passion. As long as you only need stuff from stdlib then you are fine, but as soon as you want to create some custom library for use in your other projects? Which should compile on Linux and Windows? Either you use make and Visual Studio solutions or you have to fight with cmake... Just thinking about it makes me angry.

For this reason I just don't use C++ very often. It is way easier to just use Python because most stuff is just an 'import library' away and you can concentrate on your actual program instead of fighting against the build system.

But god forbid you actually try to ship your Python program to your customers...

Why do I as a programmer have to deal with all this crap? I want to focus on programming and not on library management amd writing make files. My CPU is idle 95% of the time so there is enough processing power which could solve these problems.

I have high hopes for Rust and it's integrated build/module system!
A personal pet peeve is when people refer to having lots of features as "bloat." It's generally very nice to have lots of features all in one place without having to do things manually, or find somebody's potentially-sketchy plugin/app.

My test for "bloat" –

1. Has the project grown so large that it's starting to run into real-world performance issues? (I can't imagine this could be the case with even the largest of shell configurations except on very low-end embedded devices).

2. Has the project grown so large that bugs are popping up faster than the developers can do maintenance? Is there no or only one person who can read and understand the entire codebase? (AFAIK, no and no).

3. Are there many undocumented/poorly-documented features? Are there features that are both undocumented/poorly-documented and dangerous? Are there many deprecated or outdated features that have yet to be removed? (AFAIK, no, no, no).

4. Are there many features that both duplicate and do not improve on functionality found elsewhere? (Debatable and mostly subjective).
Note that according to spacex fuel is only 0.3% of the cost, but materials are also only 2% of the cost. (http://www.space.com/21386-spacex-reusable-rockets-cost.html)

A rocket is not worth 10s of millions in raw materials, so it is the process of creating it that makes it worth tens of millions. So the 10s of millions of dollar question is: how much cheaper is the process of re-using a rocket vs the process of building a new one? It seems impossible to ever fully recoup the other 97.7%, but how much can they?
“Keyless locking systems have to provide equal security [to] normal keys.”

But what is equal? Any valet can easily copy a normal key; someone with a photograph of your key can likely do so as well. Both of those are harder to do with proximity based RF systems.
require the ultimate
wow, this administration is really down on whistleblowers
In college I changed my oil and filters. It was a pain getting under a car a few inches off the ground, disposal was tricky, and I had to spend time cleaning up nasty gunk. I also could only do it when the car had not been driven recently.

The fundamental problem with changing your oil is that it involves oil. I saved $30, at the cost of an hour of my labor. As soon as I had a job, that equation didn't make sense.
So, I suppose you could do something like this instead.

function leftPad(str, width, pad = ' ') {
const actualWidth = Math.max(str.length, width);
return `${pad[0].repeat(actualWidth - str.length)}${str}`;
}

And that would do a leftPad pretty well, and be reasonably robust to stuff like the required width being less than the string width, the padding character being multiple characters long, and so forth. It doesn't do any type-checking of course.

It also doesn't work on older browsers - both string.repeat and template strings are new. You could fake it with string addition, but addition behaves oddly in the case your arguments are numerical, whereas template strings handle that. There's also a trick where you can say (new Array(desiredLength + 1)).join(' ') to make a string that is the appropriate length, but you've got OBOEs to worry about if you're not paying attention (Array.join puts the character between the elements, so you need an n+1 array for an n-length string). Also, at least on some browsers, Array.join is pretty cruddy, and you really ought to construct the string with an old-fashioned for loop.

Javascript has all kinds of weird corner cases and lots of browser compatibility problems. The fact that someone's written a decent implementation of something that should have been standard in the String object means I don't have to worry about it.

Of course, I do have to worry about stuff like losing access to left-pad when someone throws an npm tantrum, or dealing with future build issues if npm becomes untrustworthy. A cryptographically sound package manager seems like a reasonable want, especially after this week's issues.

But if your take-away from this whole problem is "meh, javascript devs are lazy", you're missing the point.
Committed five hours ago: https://github.com/lydell/line-numbers/commit/711f6ad0eb1771...

This mess appears to have convinced the author of that.
This doesn't make much sense. Even if apple made their own, unless they will be shipping with their own fleet of delivery trucks with armed guards not on the take, how would this differ from shipping dell machines, or if they do go this route, why not use their own guarded shipping for Dells and netapp stuff?

Not only that, but they can confirm the firmware after receiving the equipment, unless they suspect the CPUs machine code, but then who will they get their CPUs from?

And besides, it's not like they'll be tearing out all the netapp, dells and Cisco --everyone even amazon have them all, from what I hear.
...and now you can have all the bugs introduced in all the versions of the library! Yay!
How do we know if whoever doesn't think it's their patriotic duty to do so?
What if you have an agent that can understand not only the rules of a generic game, but the metagame as well? I think that would be a good stab at unbounded nondeterminism.
Yeah I agree that polyfilling makes more sense than depending on lodash just to get isArray(). I wonder if we'll start seeing the sorts of "you don't need..." rants about lodash that we've seen about jquery for some time now?
Doesn't even need to be old movies. Certain types of video content in the US is legally required to have subtitles(e.g. a lot of youtube content). You could programmatically download them and use that as your training set. And, since it is a transformative work, you can train your models even on copyrighted works freely.
I guess if the original poster had chosen a better title for his HN submission, like "Android's good for progressive web apps" he wouldn't have started a flame war.

"I ditched iPhone for Android" is always going to rekindle the iPhone vs Android flame war. The original poster is to blame.

It's a pity Android fans always feel the need to compare everything they do to Apple's software and devices. I guess it's the imposter syndrome that comes with being 2nd to the marketplace?
Here's a proposal (that I'm sure others have come up with in the past) -- why not create one big, community backed "batteries included"-type module that would implement all the small, commonly used functions. This could combine all these ridiculously small libraries and greatly reduce the number of necessary dependencies for a package. Extending the standard library should be just that: standardized. If the entire community focused on one project like that they could just as easily write the same code (but with smaller package.jsons, less require()s, and less time spent learning new libraries/searching for the right libraries. In fact, it would be great if something like that could be packaged as a standard node module so you'd get the same sort of quality assurance as you get with official projects.
The participants were picked in a blinded process, and the participant in question agreed to leave their personal politics at the door as they would at work.

So not in this case.
I call this kind of attitude the "Tea Party" of JavaScript development. The reason why we currently have JavaScript tooling fatigue is exactly because Tea Party developers insist on writing everything themselves instead of trying to build a better abstraction. The lesson here isn't not fewer dependencies: it's managing dependencies. NPM should not allow someone to arbitrarily remove modules that other's may be depending on. It's like building a bridge and them deciding to remove it after a whole city now depends on it.
I actually have 2 USB 3.0 ports. USB 3.0 was first available on ASUS motherboards in late 2009 [1]. Thunderbolt wasn't available at that point but it was unveiled with the Thunderbolt Display, which was July 20th 2011, so coming up fast on 5 years old tech at this point. I personally have no use for 20Gbps transfers so TB2 has zero draw for me to upgrade.

Talking about hyperbole, you're comparing brand new hardware vs something that was released in 1999 (so 16 years of moore's law) against the point that the hardware apple uses in it's cutting edge desktops/laptops is pretty comparable to the stuff commercially available 5 years ago, which is a valid point.

If Apple wants to shame the market for not upgrading in the last 5 years, maybe they should offer a valid reason to upgrade outside of a marketing campaign appealing to 'want' and additional software features which a recent change actually made free anyway.

The idea that I could replace my PC with an iPad pro is just plain wrong.

[1] http://www.pcworld.com/article/174672/Asus_Debut_First_USB_3...
Not to mention the fact that adding many floating point numbers in a naive way results in a serious error accumulation, which is why things like Kahan summation algorithm[1] exist.

[1] - https://en.wikipedia.org/wiki/Kahan_summation_algorithm
From the Microsoft Project Oxford Speech API link:

Speech Intent Recognition

... the server returns structured information about the incoming speech so that apps can easily parse the intent of the speaker, and subsequently drive further action. Models trained by the Project Oxford LUIS service are used to generate the intent.

Do others offer something like this?
> Your comment is the only one I have seen making such a big issue about the variable naming.

It reminds of people who dislike Lisp only for its "ugly parentheses".
a) I think that's a fine number of tests for a module this simple, which is itself an argument in favor of small modules. And I think it's four more assertions than anyone implementing this inline in a project would have.

b) The details of this particular project are orthogonal to the philosophy of small modules generally. Whether or not this module is well implemented or well tested has no real relation to whether or not it is a good idea to compose tiny modules.
True, but it's common to have requirements of the form "^1.0.0" (especially since this is the default of npm i --save). It's easy to publish a new version that would be installed by a project declaring a dependency in this form.
The problem is the customer are not paying for the service in the bill. The restaurant pays the waitstaff low or no wages and expects them to earn their wage from the tip. It is nothing more than crude tax avoidance.
I agree that it's annoying because I like to play games on the bus where I also don't have internet. I'm just saying that in a way, this was caused by people pirating too much software.

I wish I had a solution which didn't require the apps to go online but I don't.
This service seems pretty limited - does not cover fringe cases (cardinality of 1) and cardinality > 2. Also, it lacks ratings and/or emoji reactions - a must have these days! It lacks vouching and requesting feedback - also very important social elements. No Fitbit integration either! Now automatic ordering of condoms from L!

Joking aside, I can't believe anybody would try to make the world a better place by easing promiscuity!
I do agree with you, but my point still stands - how would you, looking at the photo, know that this is multicultural? I have no idea. The woman may have a very similar culture as the men.

Multicultural here is misused as a thinly veiled term for 'there's one not-white person in this photo', like the way the term "diverse" is often a coded term for 'non-white'.
Thanks for the comment. It seems like a great product but I'd imagine you will have to re-tool it for states that have stricter telemedicine laws, correct? For example, the ones that require a video conference or things along those lines. Those were the states I was referring to.
Webpack v2 also tries to use the static part of es6 modules (for DCE ?)
http://www.imdb.com/title/tt1396227/
This problem speaks volumes about the myriad shortcomings of the JavaScript standard library, in my opinion.
Pretty bad except for keyword spotting.
Frankly, I'm not sure I'm up to that. I don't have much in-depth experience with this project, with the finer points of zsh, or with maintaining projects in general. I'm not entirely sure I could do a better job than nothing at all. However, even if I were more capable, I still don't think it's right to try to take over someone's project without some more clear sign that they are uninterested in continuing it.
It seems to me that the JavaScript VMs should get together and start including standard library. That would also give the benefit that those would be highly optimized. They can keep it small at first and focus on number and string manipulation.
Ever hear of extraordinary rendition? Now that will blow your mind.
A in-browser web application requires the left-pad module. Should it include the 500kb library that includes a left-pad function, or import just the 10kb version, which having left-pad function as a module by itself allows?

Yes you can use left-pad module in a browser application using the npm install infrastructure.