News for hackers. Stuff that matters.
Re:How true hackers write JavaScript by fb03 on Wednesday September 05, 2018 @07:45AM (#17917019)
Way better than loading megabytes of .js just to display stupid animations and other useless gimmicky stuff.

This file is just in consonance with this website's style: concise, terse, to-the-point and with minimal bs.

Of all of my currently in-rotation news websites, this loads and reacts the fastest, no matter where I am or how crippled my current connection is. I am sure they are factoring load times and speed over 'shiny new features'.

Keep going, YC!

Re:How true hackers write JavaScript by davnicwil on Wednesday September 05, 2018 @08:49AM (#17917394)
Animations being badly/over used aside, this is a bit of a straw man argument.

If you load megabytes of JS to do animations, as opposed to using CSS, then yes you are just doing it wrong.

Things aren't either exactly right and done one way, or else terrible. You can of course have bells and whistles like animations if your usecase requires them (HN doesn't!) and still have a fast loading site with clean code, if you do it right.

Re:How true hackers write JavaScript by fb03 on Wednesday September 05, 2018 @08:59AM (#17917448)
I agree with you. And the animations example was simply one of the bad offenders (merely one of the symptoms of the disease).

The disease is overutilizing buckloads of js scaffolding which is blatant in the majority of the websites right now. Even a small blog now "has to have" the latest xzibit framework which pulls 32 foobar dependencies, all gulped into one huge blob of minified compressed clusterfuck-pack.

Re:How true hackers write JavaScript by davnicwil on Wednesday September 05, 2018 @09:26AM (#17917680)
Yeah, I guess it is a tradeoff between engineering productivity and performance. Both are features. Past a certain level of complexity it is usually the correct decision to choose the framework and toolchain so that you can deliver and maintain features at all. "Make it work -> make it good -> make it fast" is very relevant here.

Though I agree about what you're saying for blogs and other content sites, where the tradeoff is clearly inappropriate in a lot of cases. With that said, things like https://www.gatsbyjs.org/ offer an interesting '3rd way' here, allowing you to keep the productive toolchain and framework stuff but still serve a blazing fast static content site.

Re:How true hackers write JavaScript by ttn on Wednesday September 05, 2018 @09:53AM (#17917943)
I was at the bottom of Africa last month with unstable internet connection barely faster than dial-up. HN was the only site I could connect before getting timeouts and bs.
Re:How true hackers write JavaScript by praneshp on Wednesday September 05, 2018 @11:58AM (#17919111)
I get one of your points, that some sites should work in the bottom of Africa. But there is a counter-point here, no? Why should a site be developed for the worst of connections out there? Is there a middle point here?
Re:How true hackers write JavaScript by mr_toad on Wednesday September 05, 2018 @10:58PM (#17923609)
If it works on a crappy dial-up connection it should be nice and fast on a decent connection. Slow loading pages turn visitors away.
Re:How true hackers write JavaScript by vntok on Sunday September 09, 2018 @09:22AM (#17945784)
Horrible designs and lack of features do too.