Live data from Hacker News

The Single Piece of JavaScript on HN

blog.watchandcode.com

121–130 of 195 posts

Re: The Single Piece of JavaScript on HN

#121

Earlier quoted context omitted.

Would love to see "Enterprise HN" with Node and React and Redux (with server-side rendering), and how it compares (whether horribly or awesomely).

> and how it compares (whether horribly or awesomely). Given only the tech stack, it can go either way, depending on whether the implementor takes the easy, lazy route or actually puts some thought and hardwork into it. The problem is, as per good old Sturgeon's law, 90% of sites take the lazy route, and end up with tangled monstrosities that look like offerings to the Flying Sphaghetti Monster. (Also, it's interesti…

> Also, it's interesting how quickly 'cool new tech' can become 'Enterprise' shudder when it's widely abused and misused

Is this the hipster corollary to coding? Sure, Java was cool when only 100 people were using it...

Re: The Single Piece of JavaScript on HN

#122
Oh the irony ..

> Want to take your AngularJS skills to the next level? If so, check out our flagship product, Angular Course. Through 115 HD videos, you'll learn Angular and the latest best practices as you build a fictional startup.

Re: The Single Piece of JavaScript on HN

#123
post #122

Oh the irony .. > Want to take your AngularJS skills to the next level? If so, check out our flagship product, Angular Course. Through 115 HD videos, you'll learn Angular and the latest best practices as you build a fictional startup.

[I made the video]

I don't think this is ironic at all. When I mentioned "framework of the week hype" in my initial comment (https://news.ycombinator.com/item?id=11308043), I was thinking specifically about how people are handling the transition from Angular 1 to 2. I am in no way advocating using plain JavaScript to build your app. I even mentioned in the video that I rarely work with plain JavaScript.

There's a lot of distraction around Angular 2 for both existing and new developers, when it's pretty clear to me that Angular 1.9.x will pretty much look like Angular 2. If you read the release notes, this is very clear. They said the the primary theme for the 1.5 release was improving the upgrade path to Angular 2.

http://angularjs.blogspot.com/2016/02/angular-150-ennoblemen...

What this means is that keeping up with the Angular 1 release cycle will gradually transition you to Angular 2. But everyone in the community seems to think this is boring and wants to blow up their apps and go to Angular 2 right away.

This is the kind of thinking that I wish we'd see less of. Rushing to 2 when it's still in beta makes no sense from a business perspective. It only makes sense from a "I like to tinker with the new thing and try new stuff because it's fun" perspective. Some people will say it's a performance issue (since Angular 2 is better in that respect), but for the vast majority of apps that want to upgrade to 2 now, the improvements won't be noticeable.

Re: The Single Piece of JavaScript on HN

#124

Earlier quoted context omitted.

For the majority of cases that I've seen, these arguments are simply excuses to avoid doing real work. It's way more fun to decide whether your amazingly awesome Unicorn startup is going to use React or Angular, or Express vs. Rails, or whatever than it is to actually go through the hard work of building a customer base and making money.

Would love to see "Enterprise HN" with Node and React and Redux (with server-side rendering), and how it compares (whether horribly or awesomely).

That's already a pretty "modern" enterprise stack. I'd expect enterprise HN to run on Java EE (with an Oracle DB of course) :D

Re: The Single Piece of JavaScript on HN

#125

Earlier quoted context omitted.

What's most fascinating to me about this isn't the simplicity, it's that this code has lived for so long with almost no changes. It's a great counter-example to all the recent articles about JavaScript fatigue. It's good for us to see real examples of sites that aren't caught up in the framework of the week hype. At the end of the day we're trying to make stuff that works. ES5 vs ES6, React vs Angular vs. Ember vs. A…

Lol. For hiding a voting arrow after it's clicked. Yes, you're right. You don't need any of that stuff. But if you were to write an entire app in the style of those two functions, things would fall apart. That's not even a hypothetical, it's been proven over and over again that it doesn't work. How is everyone agreeing with you? Is there that much JS fatigue that we're looking at the equivalent of a horse-drawn carri…

I think the point is that there's actually little wrong with using standard HTML forms and hyperlinks most of the time.

There is an increasing trend to move the whole website to the client side to be handled entirely by the JavaScript as a single actual page.

Personally I find most websites work better with a simple round trip to the server to fetch more HTML.

So actually building an entire system in this style isn't out of the realms of possibility at all - you just only write JavaScript for the cases where there is a real legitimate benefit to doing so.

Re: The Single Piece of JavaScript on HN

#126
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 overgrown, and there is a place for minimalism, I really don't want to go back to the old days where every click reloaded the page and interactivity was really only done in flash.

Re: The Single Piece of JavaScript on HN

#127

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…

>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.

Re: The Single Piece of JavaScript on HN

#128

Earlier quoted context omitted.

What's most fascinating to me about this isn't the simplicity, it's that this code has lived for so long with almost no changes. It's a great counter-example to all the recent articles about JavaScript fatigue. It's good for us to see real examples of sites that aren't caught up in the framework of the week hype. At the end of the day we're trying to make stuff that works. ES5 vs ES6, React vs Angular vs. Ember vs. A…

The img.src trick is used by google-analytics to log metrics cross-domain as well. Pretty neat trick. Another thing to note is the "RESTful" nature of the links embed in the page. I guess its some form of HMAC with SHA1 + Nonce that authenticates requests for the server. It differs for every href. Elegant. auth=311110b7ef0f268cafa8616afcbfcec8d977111e

[deleted]

Re: The Single Piece of JavaScript on HN

#130
Is it just me, or it sounds... cult-ish / overly dramatic?

>> it wasn’t obvious to me that Hacker News had any JavaScript at all.

I guess he never votes.

>> I thought it would be weird and complicated, but it turned out to be quite the opposite. You’ll have to watch the video to see what I mean.

Well, it sends a HTTP request and hides an element. How on earth can it be complicated? I mean, ok, you can use The Framework Of The Week to do that and just that. Not everything that is related to HN/YC is some magical rocket science.

Post reply on HN