HN user

jariz

45 karma

https://jari.io

Posts1
Comments15
View on HN

Using JS over CSS for sizing elements rarely is a 'better solution', mostly because of flashes of unstyled content - especially on mobile where it might take longer for the JS to fully initialise.

Like other comments on here say, just use height: 100% instead.

Yes, so let's all keep reinventing the wheel, over and over again.

I know the author uses pretty extreme examples, but I still don't see what's inherently wrong with the mentioned packages.

- it does what you think it does:

`isOdd(2)` is a lot easier to understand than `value % 2`

- even though most of these are one liners, it's one line of code less that you have to maintain

- if the package is at least somewhat popular, it's highly likely it has measures for edge cases; stuff I wouldn't have thought of when writing it myself.

On top of that, mentioning left-pad is really cliche and weak at this point (bear in mind this happend 2 years ago), npm has taken measures and nothing similar has happend since then, and even then, it was still a fairly isolated event - the whole thing actually took 10 minutes.

I'd much rather take a rare, yet-to-happen-again chance that a package goes down, over having to rewrite simple utility functions over and over again, every month.

They could've made an open standard that not only websites but other search engines could implement as well, but then again why would they do that? They'd lose a competitive advantage. I think AMP is very deliberately locked in to google.

Read the TPP 11 years ago

This is great and all and is something that should absolutely be shared, however, if the intent behind this project is to share it with 'the average' person it's completely useless. No one's going to read through that entire thing, I'd expect them to at least put up a summarized version.