Live data from Hacker News

The Single Piece of JavaScript on HN

blog.watchandcode.com

181–190 of 195 posts

Re: The Single Piece of JavaScript on HN

#181

I see a lot of comments here about how not having js on the page is a great thing and lets get back to the old days. Lets be frank here, HN's UI is not good. At the very least it needs collapsible comments and responsiveness to mobile. The fact that HN is a success is despite its bad UI, or maybe because of the many HN readers out there that fix all the broken stuff on the page. While js on sites have surely overgrow…

Honestly, HN is great, and this: > At the very least it needs collapsible comments and responsiveness to mobile. I don't even want that. On root comments, simply add a link (let's call the text "next") that jumps to the next root level comment. That would solve my only complaint about the HN UI.

I'd like to see answers to my comments or postings in real time, not having to reload the page. HN doesn't allow me to do that.

Re: The Single Piece of JavaScript on HN

#182

Earlier quoted context omitted.

Honestly, HN is great, and this: > At the very least it needs collapsible comments and responsiveness to mobile. I don't even want that. On root comments, simply add a link (let's call the text "next") that jumps to the next root level comment. That would solve my only complaint about the HN UI.

I'd like to see answers to my comments or postings in real time, not having to reload the page. HN doesn't allow me to do that.

There's a bookmarklet: https://hnlivecomments.pex2.jp/

Re: The Single Piece of JavaScript on HN

#183
post #81

A few weeks ago I turned off javascript in my browser out of principle and to see if progressive enhancement was still a thing web developers cared about (hint: it's not). I was pleased that HN worked fine, and the only annoying thing was that voting caused a page reload. It's nice to see this get the attention it deserves! Developers! You probably don't need javascript to achieve 90% of your goals. It will just slow…

The next major update in all browsers absolutely must be this: inability to turn off JS. Because no one in a sane state would EVER do this now. Why not a checkbox to turn off HTML? It would be just as "useful"... I do need JS to achieve all my goals that can be achieved with JS. For those things that can be achieved without JS but often mistakenly involve it (hamburger menus, animations etc), I use plain markup and C…

Also, I'm not a "paranoid freak"

I'm just curious about how the web works and how modern sites use JavaScript.

Maybe I'm talking out my ass, since UX isn't my field, but I imagine that 90% of UX is "the application allows me to do the thing I'm using it for, it has logically layed out screens, and navigating between screens is fast and intuitive." I think hypermedia accounts for these concerns. Sure there are some annoyances, like "voting on a comment or article causes the screen to flash." It's a little jarring but everything still functions. You can sprinkle some JavaScript in, like on HN, to smooth that over.

Re: The Single Piece of JavaScript on HN

#184
post #171

I see a lot of comments here about how not having js on the page is a great thing and lets get back to the old days. Lets be frank here, HN's UI is not good. At the very least it needs collapsible comments and responsiveness to mobile. The fact that HN is a success is despite its bad UI, or maybe because of the many HN readers out there that fix all the broken stuff on the page. While js on sites have surely overgrow…

HN is a success despite its UI because it was written in a Lisp and because it has the cachet of Y-Combinator behind it. If this exact site were written in PHP, and posted as a Show HN in an alternate universe, no one would consider it anything but a toy, and no one would be defending the layout with the same cargo cult mentality that HN seems to inspire.

Why compare the margins of nonsense (lisp and php)? If a site like this were written in Node.js and with mobile users in mind, it would be in all means superior to what we see right now.

And right now I see yellow outline around this textarea, which is WebKit's default and they didn't even bother to remove it to make this textarea look the same in all browsers, let alone adapt it for mobiles.

Re: The Single Piece of JavaScript on HN

#185

Earlier quoted context omitted.

I'd like to see answers to my comments or postings in real time, not having to reload the page. HN doesn't allow me to do that.

There's a bookmarklet: https://hnlivecomments.pex2.jp/

How is this usable on mobiles? And... Why do I have to rely on a piece of third-party software in order to get features present in any really modern website?

Re: The Single Piece of JavaScript on HN

#186
post #174

Earlier quoted context omitted.

>responsiveness to mobile. Please no. I like being able to zoom in or out, and too often "responsive" means no zoom and either huge or miniscule text.

"Responsive" doesn't mean those things. Just because some sites fail to design a decent mobile experience, doesn't mean HN (or you or anyone else) can't.

I remember some of the early HTC Android phones had text reflow enabled by default. That was almost always good enough and it would be "responsive", but for some reason mobile browsers don't seem to offer it anymore.

Re: The Single Piece of JavaScript on HN

#187
post #180

Earlier quoted context omitted.

The next major update in all browsers absolutely must be this: inability to turn off JS. Because no one in a sane state would EVER do this now. Why not a checkbox to turn off HTML? It would be just as "useful"... I do need JS to achieve all my goals that can be achieved with JS. For those things that can be achieved without JS but often mistakenly involve it (hamburger menus, animations etc), I use plain markup and C…

Your site will be much more usable in developing countries with low spec mobile devices and high latency, low bandwidth networks if you design it to function first without JavaScript. You will reduce page weight, and client side CPU usage.

Client-side CPU usage, as well as page weight, isn't a problem if JS is done right. Angular-like bloatware certainly ruins all the zen. But that doesn't mean you should rush to another margin and make everything server-side. Modern web technologies allow you to keep everything beautiful, smooth AND lightweight. But in order to achieve that, you'll need to learn more than a couple of bloatware libs like angular or jquery. In fact, you need to forget them and start thinking for real. And study, study and once more study MDN manuals.

Language doesn't make Web slow and bulky. People do.

Re: The Single Piece of JavaScript on HN

#188
post #180

Earlier quoted context omitted.

Your site will be much more usable in developing countries with low spec mobile devices and high latency, low bandwidth networks if you design it to function first without JavaScript. You will reduce page weight, and client side CPU usage.

Client-side CPU usage, as well as page weight, isn't a problem if JS is done right. Angular-like bloatware certainly ruins all the zen. But that doesn't mean you should rush to another margin and make everything server-side. Modern web technologies allow you to keep everything beautiful, smooth AND lightweight. But in order to achieve that, you'll need to learn more than a couple of bloatware libs like angular or jqu…

Agreed! Learning the latest and greatest library isn't going to make you a better developer. I'm not saying client side scripting has no place on the web, I'm just saying for many purposes its place is overrated, and that basic functionality can be provided through hypermedia alone.

Re: The Single Piece of JavaScript on HN

#189
post #171

Earlier quoted context omitted.

HN is a success despite its UI because it was written in a Lisp and because it has the cachet of Y-Combinator behind it. If this exact site were written in PHP, and posted as a Show HN in an alternate universe, no one would consider it anything but a toy, and no one would be defending the layout with the same cargo cult mentality that HN seems to inspire.

Why compare the margins of nonsense (lisp and php)? If a site like this were written in Node.js and with mobile users in mind, it would be in all means superior to what we see right now. And right now I see yellow outline around this textarea, which is WebKit's default and they didn't even bother to remove it to make this textarea look the same in all browsers, let alone adapt it for mobiles.

I'm implying that language elitism and faux-intellectual posturing are among the reasons this community seems to correlate the simplicity of the layout with its own intellectual purity. That same elitism would cause the same community to dismiss the same site out of hand, were it written in a language it was popular to hate.

But yes, it could be written in any language and still have a more progressive layout, and people would hate that the site appears mainstream or, heavens forbid, looks and acts more like Reddit.

Re: The Single Piece of JavaScript on HN

#190

Earlier quoted context omitted.

HN's design is fantastic - it is totally perfect for its function. Collapsible comments are a pig to use. HN looks and works great on mobile now (it didn't used to but they did a redesign in the last few months). Downvoters do you care to explain why you disagree?

> HN looks and works great on mobile now (it didn't used to but they did a redesign in the last few months). For the record, after the redesign the comments looks worse on Windows Phone. I know, no one gives a damn about WP, but a "proper" mobile redesign would work on every browser.

Shameless plug, check out my HN app for WP8.1 called Hacky News. It's very fast and has collapsible comments.

Link: https://www.microsoft.com/en-US/store/Apps/Hacky-News/9NBLGG...

Post reply on HN