10 ms·
I miss those times. I could spend hours complaining about the depressive current state of the web, I imagine being a newcomer to such world and have to handle t
by trevormcneal 4y ago
I miss those times.
I could spend hours complaining about the depressive current state of the web, I imagine being a newcomer to such world and have to handle the over complexity of the current scenario without knowing that things could be simpler.
I remember seeing a team member migrating a project from grunt to webpack, the project was just a 404 page. "You need to compile your assets" they say, just a cat *.css > site.css would do it. Or even better, just do it inside the HTML and that is it.
People who need a JS library to check if a number is odd or even went way too far, I'm not exaggerating - https://www.npmjs.com/package/is-odd https://www.npmjs.com/package/is-odd
- 5350-uiop-1130 4y agoFirst job title in 2007 was "web master". 15 years later and i feel more like a web dinosaur than a web master. sick of it all.
- surrTurr 4y agoThere’s also is-even[1]. It has one dependency: is-odd [1]: https://www.npmjs.com/package/is-even https://www.npmjs.com/package/is-even https://www.npmjs.com/package/is-even https://www.npmjs.com/package/is-even
- dgb23 4y agoThis has to be a joke right?
- SenHeng 4y agoisOdd and isEven pop up often but they and all those other packages were explicitly created for the sole purpose of boosting the author's profile. https://news.ycombinator.com/item?id=29241943 https://news.ycombinator.com/item?id=29241943
- dncornholio 4y agotoo be honest, a comment of someone doesn't make it true. It could be he has actual use cases for these repositories. Just that someone thinks it should'nt be used like this, doesn't mean it's true. It seems like a lot of people think they think how npm should work, while forgetting to see how npm actually works. There's even an example of a well respected npm author that has repositories with just a few lines.. Y'all just love to hate on npm
- oneeyedpigeon 4y ago> It could be he has actual use cases for these repositories. If that were true, it would be useful for the author to actually explain that in his repo documentation. As it is, concluding that this is a joke is by far the most reasonable response.
- smoldesu 4y agoThe "joke" is that you can determime whether a number is odd or even with a modulo in half the code and a fraction of the storage space of a library. There is no use case for it because it's a built-in feature of the language, and in the age of inane web bloat, supply chain attacks and Javascript cargo-culting, I think laughing at stuff like this is perfectly warranted.
- layer8 4y ago> you can determime whether a number is odd or even with a modulo Or you could check the lowest bit. Better to abstract away from that implementation decision. ;)
- _Algernon_ 4y agoNow the only right thing to do would be for the maintainer of is-even to rewrite it to depend on is-odd.
- layer8 4y agoThat would be even odder.
- marban 4y ago183,453 weekly downloads — wth?
- nicoburns 4y ago> "You need to compile your assets" they say, just a cat *.css > site.css would do it. The sassc CLI app is pretty good for this. It's a single binary, has a watch mode, and just compiles SASS to CSS. Although for a 404 page that probably is unnecessary (unless it's pulling in shared styles from somewhere else of course).
- Cthulhu_ 4y agoI for one have had enough and hopefully, in future projects, I can posit to just write basic HTML / CSS, maybe some JS, and not pull in everything else. That said, I've been in the Go ecosystem for a while and while the language itself is fine, it's the associated mindset and catchy oneliners that have been more valuable to me as a developer.
- sjaak 4y agoIt's funny, the package is-odd has dependencies itself. It depends on a package called `is-number`. Go figure. I finally understand how `node_modules/` directories grow to 100s of megabytes for the smallest apps Turtles all the way down.
- likortera 4y agoIt is a trade off. In most other ecosystems such as Java, Python, PHP, etc if you have a dependency A that depends on B 1.0, and a dependency C that depends on B 2.0, you cannot have both of them installed, so you either pick one or the other, or some intermediate version which works in all cases, but many times you end up not being to use one of them or, worse, not able to upgrade either A or C because you cannot resolve all the dependencies anymore due to constraints. In node you can do this, you can use both A and C even if they use their own, incompatible B versions. If both A and C depend on the same (or compatible) B version, then you only have one as in the other ecosystems. And you can always enforce and override what final version you want if necessary. This, plus usually the inclusion of documentation, type definitions, source and transpiled code is why node_modules is usually pretty big. But you don't ship node_modules "as is" to the browser (200MB node module does not mean a 200MB bundle). And usually this is not a problem for any modern laptop or server. Is this better? Is this worse? Can't say, it is just a different tool with a different trade off. But just "node modules 10Gb is bad" to me only tells the bad side of it, and usually comes from a lack of understanding of how this works and how it compares to other systems.
- zepolen 4y agoAnyone not committing the entire node_modules to their repo is in for a really bad time when npm goes down or gets compromised.
- likortera 4y agoNo, that's fixing the problem in the wrong way (by using your code version tool as an FTP more or less), complicating code reviews and unnecessarily growing your code repository. If you want to be safe if NPM goes down, what you need is to keep an archive of built "binary" releases, either zip files, docker images, or whatever. You can also have internal NPM proxies or caches too. Committing external dependencies in the codebase is a terrible solution. And no, google doing it doesn't mean it is good for everyone else, probably more likely to be the opposite to what you need.
- duxup 4y ago>hours complaining about the depressive current state of the web That's pretty much most HN content about the web / front end development. I find HN al but useless for that topic now. I've had this thought in the back of my head that a lot of content / comments are on HN are folks who do a little, not a lot, and are really annoyed that they have to do any front end development, so then we get rants about this and that... they're not fundamentally wrong, but as a web dev I find them a little skewed and completely useless / just negativity. Like how many "I made this rando personal blog without a framework" and "there's too much javascript" (page includes lots of javascript) and etc that gets boiled down so far that it is pointless? We're at the point a loading icon gets upvoted on HN to bitch about SPAs ... and I don't know about you but a hell of a lot of pages can sit at a loading icon that aren't SPAs. How disconnected is that? Front end development discussion a land fertile for bike shedding and just about every topic can dip into it now, movies, music, all media really ... questions about who pays for the news, censorship, etc. Somehow it all gets pulled into the tech discussion as well. Sometimes I just want to find a place to discuss it where we find neat things to do and less campaigning about every other topic.