Live data from Hacker News

You might not need JavaScript

youmightnotneedjs.com

151–160 of 254 posts

Re: You might not need JavaScript

#151
post #39

I'm cautious about using CSS to do things that feel like actual behaviours. For example, the modal that appears when you click on the button actually doesn't do things on "clicking" but focusing . This means if you tab over the button it'll load the modal, then tabbing away means the modal is gone. I can't tab into the content in the modal at all. How does that work with accessibility? Though I generally dislike the…

> The "Would you prefer a banana or a cherry?" just shouts "Please match the requested format" if I type "a cherry". I know chrome has nothing else to go on other than "the regex wasn't matched" but it's a bad end user experience. Localized custom validation messages for the provided pattern should be added as part of HTML spec. Someone should follow up on that, because it'll probably be too much of a waste of time f…

Yeah honestly banana or cherry is just screaming for a much simpler plain old radio input.

Re: You might not need JavaScript

#152

Earlier quoted context omitted.

Getting there! https://bestmotherfucking.website/

The first two were actually making a good point. This website (yours, presumably) is just jumping on the bandwagon and sticking an affiliate link in it. I'm not against affiliate links, but this site lacks substance.

The affiliate link does kind of bother me, but the rest of the page is pretty good. Especially about keeping real black as your font color.

Re: You might not need JavaScript

#153
post #60
post #38

Earlier quoted context omitted.

> Safari is the new IE6, stop supporting it and let it die. Not sure what old wives tales you have heard, but actually Safari was the first browser to 100% support ES6. And compared to Chrome, it uses 1/3 less battery...

He is parroting a year old clickbait headline ( https://nolanlawson.com/2015/06/30/safari-is-the-new-ie/ ) where the main gripes were that - Apple didn't attend EdgeConf 2015 - https://webkit.org/blog/ was not updated often enough - Safari 9 had a seriously buggy IndexedDB (fixed in Safari 10)

IndexedDB is actually not fixed in Safari 10: https://www.reddit.com/r/javascript/comments/545ylm/psa_inde...

Hopefully they'll figure it out eventually!

Re: You might not need JavaScript

#154
You might not need (to write any) Javascript, but you might still want modern UX with some AJAX.

I have some good news: http://intercoolerjs.org

You can add AJAX to your application without writing any javascript code, and you'll get to use REST (with real, honest to God HATEOAS) without even thinking about it:

http://intercoolerjs.org/2016/01/18/rescuing-rest.html

http://intercoolerjs.org/2016/05/08/hatoeas-is-for-humans.ht...

Re: You might not need JavaScript

#155
post #95

So let's show off what you can do without JavaScript...but also include SCSS as a dependency when the opening paragraph complains about a JavaScript dependency? Madness...but I digress. Some of these are cool examples. Others, like the modal, won't scale very well because now you can trigger modals by tabbing (breaks keyboard navigation) or most of the form examples as you'll likely hit many endpoints that require JS…

I agree, but I think you're putting the emphasis in the wrong place. A SCSS dependency isn't that bad because the client will never see it. What is bad is code that's hard to maintain. When I did a stint of front end development recently, I went in with the mindset that "JavaScript is evil for the user and therefore should not be used when avoidable". I discovered after a while that although you can replace JavaScrip…

Javascript is not evil, evil is when it's used unnecessarily, and when your page displaying 4-5 pages of text starts out 2mb without images and becomes 15mb as I scroll to bottom because you're pinging various third parties for analytics and whatnot, and when I can't view you pages where the essence is a couple paragraphs of text but you wanted to render it via Javascript and I have it blocked and you not whitelisted, and when I hesitate to use my schools web services for important things that may affect my academic career but god knows what's gonna break when on that halfe-arsed website, and especially when you mess with my history (my pet peeve).

These "you"s are rhetorical BTW, I'm not addressing kqr directly.

Re: You might not need JavaScript

#156

Earlier quoted context omitted.

Getting there! https://bestmotherfucking.website/

The first two were actually making a good point. This website (yours, presumably) is just jumping on the bandwagon and sticking an affiliate link in it. I'm not against affiliate links, but this site lacks substance.

HTTPS and full contrast text are important. The 2nd attempt is a downgrade from the first. This 3rd attempt is an actual improvement.

Re: You might not need JavaScript

#157

When I was hired on the Watson team, the first thing they asked me to do was help improve performance of their AngularJS-based website. It was all-around slow, especially for the initial page view. I stripped out AngularJS and most of the other JavaScript, and published a website that was almost pure static HTML. It loaded very quickly. My manager thought it was hilarious - his "JavaScript expert" came in and deleted…

I did just that same thing for a client. They were using React to make 1 AJAX request to Foursquare. The thousands of lines of code turned into 22 lines of vanilla Javascript. I was shocked.

Re: You might not need JavaScript

#158
post #86
post #42

Earlier quoted context omitted.

> default browser Hi, I'm Linux.

Yay for Midori, Konqueror, Epiphany, Dillo, lynx, and all the things a regular dev never have to encounter with :) ( By the way lynx is perfect to pierce through a lot of paywalls. )

Chrome is still the best choice for development on Linux.

The alternatives are Opera and Firefox. Everything else is like coding while wearing mittens.

Re: You might not need JavaScript

#159

Earlier quoted context omitted.

A large percentage of the "very skilled" developers I know will much sooner brag about how much code they deleted or didn't write than how much code they wrote.

That is already well known quality[1]. I find Parent work even deeper, he pivoted the whole thing to make his main skill a second class citizen because that's what it was to be in this context. [1] I regularly nerdgasm at LibreOffice releases reading how many thousands LoC they removed from the code base. ps: beside code golf, I think there should be a patch golf thing. Try the smallest changeset that fixes or add a…

I like the idea of "patch golf". If only people would at least do a diff before they commit to spot gratuitous reformatting or accidental changes :-(

Re: You might not need JavaScript

#160

Earlier quoted context omitted.

More than hilarious, I find it a serious skill manifestation.

A large percentage of the "very skilled" developers I know will much sooner brag about how much code they deleted or didn't write than how much code they wrote.

A very proud moment for me recently was when someone ran git stats and it showed I'd deleted more code than I'd written. It was glorious.
Post reply on HN