skysight-inc/HackerNews huggingface dataset:
The gemfile.lock must have been "gitignored" at some point, because it had much older packages than the ones in Gemfile. Background: all we had was a git repo and did not have access to any "living" installation.
You seem to be implying that the current minimum wage system is effective in some way. Try living in any city in the US on minimum wage...

Tips are weakly proportional to rents and other costs of living (restaurants have to charge enough to make a profit, and tips are a % of what they charge). Minimum wage is probably enough to get by if you live outside of a major city, but that is definitely not true inside them.

Businesses will pay whatever the minimum people will work for, which tends to be well below what society at large feels is reasonable. Obviously, because the business' interests are directly at odds with paying the employee a reasonable salary. With tipping, social forces decide what is reasonable, not the businesses.
I wanted to write this post after the left-pad debacle but I've been beaten to it.

I think we got to this state because everyone was optimizing js code for load time-- include only what you need, use closure compiler when it matters, etc. For front end development, this makes perfect sense.

Somewhere along the line, front end developers forgot about closure compiler, decided lodash was too big, and decided to do manual tree shaking by breaking code into modules. The close-contact between nodejs and front end javascript resulted in this silly idea transiting out of front-end land and into back-end land.

Long time developers easily recognize the stupidity of this, but since they don't typically work in nodejs projects they weren't around to prevent it from happening.

New developers: listen to your elders. Don't get all defensive about how this promised land of function-as-a-module is hyper-efficient and the be-all end-all of programming efficiency. It's not. Often times, you already know you're handing a string, you don't need to vary the character that you're using for padding and you know how many characters to pad. Write a for loop; it's easy.

Note that this is exactly the sort of question I ask in coding interviews: I expect a candidate to demonstrate their ability to solve a simple problems in a simple manner; I'm not going to ask for a binary search. Separately, I'll ask a candidate to break down a bigger problem into smaller problems. In my experience, a good programmer is someone who finds simple solutions to complex problems.

Note: rails is similarly pushing back against developers that have too many dependencies:

https://www.mikeperham.com/2016/02/09/kill-your-dependencies...
Let's say these are just prescient trolls. For our sanity.
No, its a byproduct of programming-interview-via-GitHub-repo
I would recommend reading the article!
You can't escape problems by bundling specific library versions. You just get a different set of problems. When you require a specific version of a library, you're making your code incompatible with anything that requires a higher or lower version of that library. You're also assuming there will never be a security fix that requires you to update your dependency.
It occurs to me if the company is that big, or that big of a target, it can manage to collect its servers directly from the manufacturer/supplier rather than rely on a third unrelated party for transportation.
Even if it doesn't increase kids' knowledge, it still draws attention to it (both to peers and the kid themself) and provides an opportunity for bullying.
Is Browserify falling out of favor? I've only just recently started to bundle my stuff with it instead of gulp's concat.
I am not entirely sure if Android is the best mobile platform out there. Apple continues to innovate at an incredible pace on its hardware and software. It is untouchable as far as HCI is concerned, they just seem to get most of the UX right. Its amazing to see them make computers that work and behave like a charm.

Pricing is unreasonable, TBH. And that's where Android eco-system has held an upper edge for too long now. Android as a platform, superior enough technology-wise, is terrible 'fragmentation' wise. Apple's laser sharp focus on UX around their entire line-up is commendable. To an extent, they think about their end-users at a level unparalleled at other tech companies-- not supporting flash, pushing aggressively ahead with ad-blocker support, adding a voice-enabled assistant, iCloud etc Apple's radical re-think of a smart-phone is a miracle. Almost everyone before them got it wrong. They are operating on some other level altogether.

Google, I think except for Google Now and their notifications scheme on Android have mostly been playing a catch-up with iOS.

I think Google faces the same issue with their Cloud offerings too. All the talk of the most advance platform/tech in the world and they still languish behind AWS and Azure.
It could have been a simple for loop with a break whenever one evaluates false. Blazing fast in every javascript engine, and easy to see all the code in one place.

Instead, it’s a slow tower of bloat, which you need to read 5 files to reason about.

Javascript implementation:

function passAll() {
var fns = [].slice.call(arguments);
return function() {
for (var i = 0, len = fns.length; i < len; i++) {
if (!fns[i].apply(null, arguments)) { return false; }
}
return true;
};
}

Or Coffeescript (including the function check):

passAll = (fns...) ->
for fn in fns then if typeof fn isnt 'function'
throw new TypeError 'all funcs should be functions'
(args...) ->
(return false if not fn args...) for fn in fns
true
The OP is deliberately talking about a completely different issue that just happened to be spawned from the recent drama.

He is talking about learning to code vs asking google for implementations of even the most trivial things and about what a useful library is.
Functions are too small to make into a package and dependency. Pure functions don’t have cohesion; they are random snippets of code and nothing more. Who really wants a “cosine” dependency? We’d all really like a “trigonometry” dependency instead which encompasses many “tricky” functions that we don’t want to have to write ourselves.

This is a pretty weak argument. What is "cohesion" and why do we care that modules have it? Joe Armstrong, one of the creators of Erlang, has argued the opposite (http://erlang.org/pipermail/erlang-questions/2011-May/058768): that lots of small, individual-function modules are better than a "misc" module that grows endlessly and may overlap with other people's "misc" modules.

Calling a function instead of writing the code yourself doesn't mean you've forgotten how to program! The real problem here is the cost and risks associated with dependencies in general (both of which are actually lower for single-function modules), and the broken package removal policies of npm.
That could be one dependent module that got installed in 54 places. More likely, it was mostly various bots that install everything on some semi-regular schedule.
For now I suggest using lodash functions exported as modules.

For example: https://www.npmjs.com/package/lodash.mean

Or, in light of `left-pad`: https://www.npmjs.com/package/lodash.padstart

You get the benefit of a "small, focused" module but still rely on a large and stable project with a great maintainer that cares about performance and testability.
I think the flaw in the argument is that web applications that only run well on a single platform (Android) aren't really web applications. In that case you might as well build a native app.
I went through something similar recently. I moved to another country and in the process I had to buy something to replace my Note 4. I initially bought a Note 3 to replace my iPhone because I wanted to stop carrying a tablet. The Note was a "solution" to be able to read on the go at all times, play games, etc. all in one handy device. Upon moving I was really frustrated at first at the lack of options with large amounts of storage (my Note has a 128GB SD card) and a giant screen that were available from my new company's carrier.

The more I thought about it, though, the more I realized I was solving for a problem that no longer existed. I've felt recently like I spend too much time on my phone. I don't want to play games and watch movies on my commute any longer. I don't want to read books on my phone. I want to read an actual book or, at worst, on a Kindle where all I can do is read. I want to work my brain more, basically and the phone has become antithetical to that.

So I purchased a Nexus 5X. Low storage, barely enough space for my music, etc. I saw it as going as far down the phone food chain as I was willing to go without going to a flip phone. I've been really happy with it. I talk to human beings. I look at the world. And my phone really only has enough space for a few smartphone things like maps and music. It's perfect for what I want now. Fairly simple and limited. In this case limited is good.
Point 1 was addressed years ago by Google Closure Compiler, which used "dead code elimination".

Also, the Haxe language, which compiles to JS, has DCE.

Micro-modules is certainly a solution if you don't want to use pre-processing or compilers. So is copy/pasting, or manually writing your own util libs, which seems safer than relying on third parties to provide one-liners for you.
I'll admit I'm at least a little tarnished in my practices due to time spent in enterprises where external dependencies require 6 manager sign offs and a security team exemption, but if this were the case that you didnt want updates to the package, just that one version that worked -

If its just a few lines of code, just copy the thing into your code base? throw a comment in saying "came from xxxx" so anyone reading your code knows that it might look like a overly generic function because it is.
I'm not really sure whether or not I should to add my voice to the din, but I feel like this whole thing is more a problem with npm and what it allows vs. what it encourages (and the rather paltry standard libraries in Node & browsers), rather than a problem with developers feeling entitled to not have to write their sorters and padding functions.

npm actively encourages structuring projects as many tiny individual modules and dealing with the resultant dependency trees and deduplication. Both of these things (along with the ease of publication) combine to encourage people to share their packages.

They make it incredibly easy to consume code from other people, but but at the same time provide a similarly low-barrier mechanism to retroactively change published code. That combination seems like a way more deserving topic of criticism than the unending refrain of "developers these days are so lazy".
Have we forgotten how to program?

Maybe we've forgotten how to /just/ program. Everyone bangs the drum so hard of "let github be your resume." Incentivizing putting every brain fart you ever had out into the universe instead of just keeping it to yourself.

Just a thought.
Mach was a microkernel that tried to do a bit too much. Performance and security stayed horrible. Other designs had acceptable to great performance or security. So, it's not representative of microkernels in general despite being interesting research platform back in its own day.

Now, Darwin starts with Mach then basically adds BSD and graphic stack onto it in kernel mode. So, stuff that would have user-mode isolation and performance penalties due to Mach bloat has no penalty but less protection.

So, OS X is clearly not a microkernel system so much as incorporating a microkernel into a monolith. Windows similarly has a microkernel near its foundation for organization purposes I think. Linux is really modular inside similar to microkernels but clearly similarity ends there. So, there's lots of hybrid results where monoliths and microkernels styles are blended a bit for compromise of bensfits.
I wish I could say you were joking. At best it comes off as ivory tower idealism, at worst the complete naivete of someone who doesnt code.
If you want to talk about Hoffa and organized crime ties, why don't we talk about strikebusters, many of whom were cops? Hell, why don't we talk about Enron, or any number of companies who have committed crimes? I guarantee that if you tried to compare corruption done by unions and that done by corporations, corporations would have more by a landslide.
RFC1918.

If memory serves, it does say "should not" and not "MUST NOT" (cf. RFC2119). Thus, it's not technically a "violation" to do so but it certainly goes against the recommendations, IMO.

I also "do DNS for a living" (and have been for ~20 years) but I'm sure there's still things that I don't know. This is one of those often overlooked things simply because it isn't that common and one doesn't often see any major issues because of it.
11. Sometimes, the fastest way to get to the end is to throw everything out and start over

If this ever happens to me in my career I will start believing in god or whatever you want. Dealing with "legacy" tech has been the only constant in my life across several unrelated industries (even in the supposedly brash and agile games industry).
I still use my ipad1 every day, mostly for reading pdfs in goodreader.
No API, no thank you!
It suddenly feels like the 90s all over again.
Actually Nim's attitude is more suitable for group work because every group can have its own style of coding. A simple transformer could be used to normalize the code. However it would force the developers to qualify all imported conflicting names which is a good idea anyway.

You cannot do this in C++ and Rust. There you actually have to keep a consistent style.
Everyone keeps mentioning the lack of a standard library for JavaScript as an excuse for this shit show. IMO this is just a futile attempt to mask incompetence.
It's best to avoid casually throwing around the word 'racist', but I'd probably go with naive.
I eat out every day, and always tip the recommended percentage out of nothing more than it being a social norm. There was a period (about a month) wherein I decided not to tip out of principle[1] and it only made me feel guilty. I support the no-tipping movement as it takes the guilt out of what is supposed to be an enjoyable and relaxed experience (dining out).

Although I may end up paying the same (the cost of food will be increased to account for proper wages for the waiters), the main positive difference is the absence of guilt and pressure to stick to a silly social norm.

[1] Reasons: https://www.youtube.com/watch?v=Z-qV9wVGb38
Sensationalist stuff. isArray doesn't depend on anything, but lots of other packages depend on it. Why? Because it's actually kind of hard to tell the difference between an array of things and an object with integer keys. The Array.isArray function wasn't added to the language until ES5, so you need a way to shim older tests.

If you're writing only for modern browsers, you don't need it (if you actually visit the code in question you'll see it defaults to Array.isArray - in that sense, it's a polyfill or whatever). But if your code might run on old browsers, it can't hurt to have it, and it cleanly encapsulates a trick that you no longer have to remember the syntax for.
Malware infections from the Play Store have usually been on the order of thousands infected, with the occasional instance of 500k-1 million (http://www.ibtimes.co.uk/google-removes-13-android-apps-play...). XcodeGhost infected more than 500 million of a smaller total userbase (http://www.macrumors.com/2015/09/20/xcodeghost-chinese-malwa...). The numerator is an order of magnitude larger, and the denominator is an order of magnitude smaller, so a much higher percentage of iPhones have been infected with malware.
An Open Letter to Banks and Financial Institutions – Blockchain Cannot Be Tamed
FBI Contracts Cellebrite to Break into San Bernardino iPhone
I don't know why you were downvoted, but I agree with you 100%.

Pure functions are indeed a good target for modularity and deserve proper documention and proper testing, at the very least.

For the readers of this comment:

* How many functions did you not commented last time you wrote some code?

* How many functions do you leave untested?

* How many functions did you wrote more than once?

* How many "trivial" functions did you wrote that actually took you 3 hours, because it's actually tricky, so you checked other implementations and tried to wrap your mind around it.

Check haskell's hoogle to a small sample of this concept.
I'm thinking that someone wanted to learn about building and publishing a package and the ecosystem so they made this computationally trivial thing as a practical exercise.

Pretty much every package management system gets cruft in it like this. Example: for a long time someone had uploaded a random Wordpress core install into Bower.
All the comments here have answered the question quite well. Yes we have forgotten how to program and we want to argue about it.
NPM doesn't need to send a lawyer or any representative.

KIK must prove infringement to get a court order and they won't be able to because they claim no Trademark protection in any goods or services that `kik` deals in.

NPM could have been a dispassionate observer, but decided to take it upon themselves to arbitrate a Trademark dispute. To me, this opens them up to liability if they make any incorrect decision or findings. Why would they want to take on this liability?

There is no pressing need for them to become involved. They should have let Trademark courts handle Trademark disputes.
What's wrong with copy/paste?

Why do you need an external dependency on something so small?
Are there dishes from more than one country or ethnic group? If so, you now have a multicultural dinner.
If your package manager is so cumbersome that it makes a 14-line package not worth it, get a better package manager.

We haven't forgotten how to program. We've got better at it.
...and then the publisher pulls their library off npm, and another shows up and drops one of the same name in its place, with compatible version numbers (by happenstance or otherwise).
Of course pinning the versions and identifying the particular commit in the Gemfile would have solved it, as long as it was done for every package, otherwise we are back at problem n. 2 in my post above.

In this particular case, there were just 3-4 requirements (out of more than 100) that were pointing to a git repo, and only one of them also specified a particular commit. The other "git-requirements" were just cloning the latest commit from the respective repo.

> Automatically upgrading versions (i.e. not pinning versions) in a production build is an anti-pattern.

We did not have access to a production version, only to a git repo, that's the very reason why we had to rebuild in the first place. I can imagine all versions were locked when the system went into production years ago.
It's because your customer (who writes requirements) typically doesn't know 1) what they actually want, or 2) what capabilities actually exist. This is why a good customer will allow the company to help them write their requirements.
I think it actually is not. That's from some years ago and my memory of it is fuzzy, but at that time it was surprisingly hard to check whether a variable is a positive integer – maybe it was a negative one though and that was harder? You'd think it is just checking whether it is an integer and bigger than 0, or just checking whether it is bigger than 0. And it is. But to get that code to work reliably, regardless of whether it gets a string or float or an undefined, with the JS type system of that time and in multiple browsers, even the crappy ones, that took some time. There was one specific edge case involved.

Not that it was impossible, but I still remember having to search for it and being astonished that that was necessary.

Sure, should not apply anymore like that.
You know what's worse? Javascript numbers are all floating point numbers, which means integers are 53 bits long. So, you might think this library would try to address issues this can cause, but nope, this is the average statement you'd write if you didn't know was a mantissa was and had never heard of big.js, bignumber.js, decimal.js, crunch.js or even strint (which represents integers as strings because wtf not).
I wouldn't even think of looking for a package that does something as simple as the ones mentioned. If I need to pad a string, my first thought would be to create a new function, not look for a package...
...you're making your code incompatible with anything that requires a higher or lower version of that library.

Actually that's not correct when using node/npm (or anything else in the ecosystem like browserify). That is one of the impressive things about this platform: any number of different versions of the same module can be required by the same app. It would be nuts to do that in your own code, but as long as the craziness is in your dependencies it really doesn't matter.
Completely agree here - the problem isn't micro-modules. It's partly just a lacking standard library for javascript and largely just exposing issues in npm that the community was pretty ignorant of until just now.

The whole "amaga, it's a whole package for just ten lines of code" is just elitism. Given the number of downloads on things like left-pad, it's clearly useful code.
Unless I have gone crazy google has had a STT available to tinker with for awhile. It is one of the options for jasper [1]. Hopefully this means it will be easier to setup now.

Would be nice if they just open sourced it though but I imagine that is at crossed purposes with their business.

[1] https://jasperproject.github.io/documentation/configuration/
Nobody has forgotten. These people never knew to begin with.

NPM/JS has subsumed the class of programmer who would have previously felt at home inside PHPs battery-included ecosystem. Before that, a similar set of devs would have felt at home with Visual Basic. Seriously, go visit the comments section on archived copies of the PHP documentation. You'll find code of a similar nature. If PHP had had a module system 10+ years ago you would have seen this phenomenon then. Instead it was copy and paste.

This isn't elitism, it's just the way it is. The cost of a low barrier to entry in to a software ecosystem is taking in those who don't yet have software engineering experience.

Nobody should be surprised that NPM, which I believe has more packages than any other platform, is 90% garbage. There are only so many problems to solve and so few who can solve them well, in any language. Put 100 programmers in a room, each with 10 years experience, and you'll be lucky to find 1 who has written a good library. Writing libraries is really hard.
> What kind of a fucking awful system do we have where hot white girls are better coworkers simply because they're hot white girls, and not because they do a good job?

Uh? Is that just your opinion or are there studies to back it?
I think Azer should have just said no, waited for npm to force the rename/removal and then pulled all of the repo's. To me, this thread reeks of corporate damage control.

Also it should be stated that mproberts spent the last 6 years ladder climbing at Kik and I can understand that this likely feels like his baby.

But Kik's self-entitlement in this case is abhorrent. The package has existed for years and imposing themselves on the developer the way they did is sad, but not surprising given the current patent/trademark climate.

It's clear that npm has also done some cleaning, they've gone and tried to remove all evidence of the kik npm package being available in the first place. Even the single "kik" page on npmjs.com has been removed from the Wayback Machine. Talk about thorough.
Is Julius really state-of-the-art? Looks like they use n-gram and HMMs. Those were the methods that achieve SotA 5+ years ago. My understanding is that Google and Microsoft are using end-to-end (or nearly) neural network models; these outperformed the older methods a few years ago. Not sure how CMUSphinx works under the hood.