Live data from Hacker News

Left-pad as a service

left-pad.io

161–170 of 269 posts

Re: Left-pad as a service

#163
post #8

Hahaha - isn't it hysterical how everyone using npm for small reusable code pieces! Aren't they morons! How stupid of people to trust their package manager to be consistent and correct and return packages they were expecting. How stupid of people to reuse small often used functions that only do one thing well. How does everyone taking the piss intend to protect themselves from this in their OS package manager, or PPM…

This [1], discussed in another thread is an incredible summary of the issues; I hadn't even thought about packages that are required by other packages; it can lead to literally thousands of deps :-o.

Node/npm and the web need a standard library that can be included piecemeal, from a well trusted source and packages that only depend upon this small subset should be highlighted.

require('std/string/pad');

[1] http://lucumr.pocoo.org/2016/3/24/open-source-trust-scaling/

Re: Left-pad as a service

#164
post #90

Earlier quoted context omitted.

That's just a no-true-scotsman fallacy. And pinning versions just means you lose automatic updates, which is surely the point of using a package manager in the first place. Otherwise you might as well just download the package and include it verbatim.

No, it's not an NTS fallacy. And the package manager is mostly useful for tracking updates and simplify the process; having it automatically update is completely optional, and personally, I never do.

No, it's not an NTS fallacy.

No True Scotsman is so often mis-attributed, that the mis-attribution needs to be its own fallacy.

Re: Left-pad as a service

#165
post #8

Hahaha - isn't it hysterical how everyone using npm for small reusable code pieces! Aren't they morons! How stupid of people to trust their package manager to be consistent and correct and return packages they were expecting. How stupid of people to reuse small often used functions that only do one thing well. How does everyone taking the piss intend to protect themselves from this in their OS package manager, or PPM…

In most other languages you end up with a poor approximation of npm's micro-libraries via stackoverflow copy-paste.

Actually thinking about it, an ideal solution would be a combination of stackoverflow and npm: all the solutions to a problem grouped together in one place with community votes and comments, and then you can subscribe to an answer from your code.

Re: Left-pad as a service

#166
My gut feeling tells me serious software engineers who look down on javascript programmers are feeling justified now. Brogrammers are exposed, hence the lot of knee jerk. Indeed, it is pretty funny, but dependency management still remains a hard problem.

Re: Left-pad as a service

#167

Earlier quoted context omitted.

We run almost everything on Wordpress and still make fun of PHP. And JS. And Java. And ObjC. And Ruby. And Python. Every language has its share of problems and sometimes you just have to vent.

Sure, but: "we make fun of every language/every language has its share of problems, etc." is a completely different statement/message than "everybody makes fun of PHP" -- which singles it out as some huge abnormality...

apparently the humor of the post was lost on a few people...

Re: Left-pad as a service

#168
post #140

Reminds me of Fizzbuzz enterprise edition: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...

fizzbuzz npm edition:

    var zero = require("number-zero");
    var hundred = require("number-one-hundred");
    var isDivisibleBy5 = require("is-divisible-by-5");
    var isDivisibleBy3 = require("is-divisible-by-3");
    var isDivisibleBy5and3 = require("is-divisible-by-5-and-3");
    var numberToString = require("number-that-is-between-one-and-hundred-to-string");
    var fizzbuzz = require("string-fizz-buzz");
    var fizz = require("string-fizz");
    var buzz = require("string-buzz");
    var incrementByOne = require("increment-by-one");
    var forLoop = require("for-loop");
    var ifCondition = require("if-condition");
    var elseIfCondition = require("else-if-condition");
    var elseCondition = require("else-condition");
    var lessThan = require("less-than");
    var print = require("print-string");

    forLoop(zero, lessThan(hundred), incrementByOne, function(i) {
        condition(isDivisibleBy5and3, print(fizzbuzz),
            elseIfCondition(isDivisibleBy3, print(fizz),
                elseIfCondition(isDivisibleBy5, print(buzz),
                    elseCondition(print(numberToString(i))))));
    });

Re: Left-pad as a service

#169
I'm late to the left-pad discussion. I thought it was considered a bad practice to depend on an external repo as part of your build process. At my company we use Artefactory to host our maven libs. Even if one were removed maven central our builds would continue to work fine (in theory).

Re: Left-pad as a service

#170

Earlier quoted context omitted.

My comment wasn't directed at the OP it was directed at the community and these weekly community bashing cycles.

If you want to actually know the "why", I don't think any one person can answer for certain but I have noticed similar trends on HN and attribute it to the culture necessary among start-ups: brutally challenging assumptions and discovering failure points. I think that kind a culture is necessary in quickly shutting down projects that have a high likelihood of failure before too much time is invested in them. Unfortun…

> brutally challenging assumptions and discovering failure points

Nicely phrased. I'd apply this to engineers in the general too. People can often speak of them (and me) as difficult; when this is really what is needed of people that make things happen. Especially on critical infrastructure. You can't really wing details on the integrity of the bridge you are building.

Post reply on HN