Live data from Hacker News

Enough with the JavaScript already

fr.slideshare.net

191–200 of 231 posts

Re: Enough with the JavaScript already

#191

One can do a great many things with disciplined Javascript, and I shudder to think what Twitter was trying to do on their front-end that caused a 5x increase in load time compared to server-side template-rendering. That being said, I would very much welcome a high-performance alternative to Javascript that also runs in any browser -- something in the spirit of C or Java, which could be embedded in Javascript and vice…

I agree - but moreover, I'd like to see a single, cohesive replacement for the whole web stack. One standardized language to handle styling, scripting, server-side, and the document (in fact, let's just get rid of the notion of a document - we are building dynamic applications now, not documents). I understand that one reason we have separate languages is in light of security, but I think this could be made even bett…

Client- and server-side code is separated in literally every application to use a network, because they must necessarily be run on different computers. In most applications they can be the same language (C, C++, Java, etc.), but they have to be separate programs. I think what you're mostly complaining about is the JS lock-in on the browser side, which is a legitimate complaint, but a different one.

re:HTML - What's the difference between a dynamic document and a dynamic application, really? With JS and CSS3, HTML is unrecognizable - pair it with something like Backbone.Marionette, and the only thing HTML is doing is defining your display in a structured way, more like the XML definitions of an Android view than an old-school document.

Re: Enough with the JavaScript already

#192
post #59

Before "js everything", it wasn't just a plain simple pure web. It was flash and gifs and "dynamic html" that would break in half of the browsers, and you'd show a special version of your site saying "we're not paid enough to support your browser, go get another one". Clients never were reasonnable in their demands, nor did most of the site owner have good and simple tastes and care about efficiency, nor did half of…

I think this is very true. When Java launched I re-did the Sun home page as an applet. Bill Joy suggested that in the future HTML would be gone and each web page would be its own Java applet. He was mistaken of course :-) But as I've watched the emergence of 99% js pages I am reminded of his insight. His reasoning was pretty straight forward, the reason PDF (and that thing Imagen/Xerox did (DDF?)) existed was that to…

It's funny, the whole java applet thing was actually a better solution than JS in a lot of ways (shipping compiled/compressed bytecode with a security manager), just way, way ahead of it's time, and with a terrible windowing/drawing toolkit that meant it would never be adopted.

Re: Enough with the JavaScript already

#193
post #44

Enough with the no-context-attached slides already. Seriously, if you don't have a recording of the talk, or a transcript, at least provide an article or something.

I will never understand the utility of posting slides from a talk online without the audio.

One of the main reasons I come to HN is to learn how other people feel about certain things, predominantly from the comments section. Else it's just me in my cave.

It's obvious what point the slides were making.

The important part is that it said enough to inspire discussion and that it's qualified by its recency (posted last month) and by the experience of the person that gave the talk (front-end guy at Box).

Re: Enough with the JavaScript already

#194
post #71
post #53

Earlier quoted context omitted.

I like to think of it this way: Some languages allow you to shoot yourself in the foot easier than other languages, given the context and environment. Abuses and problems precisely show Javascript's defects. The more easily abusable a language is, the more defective it is. A lot can be said about familiarity with the language. Many examples in wtfjs.com boils down to (mis)understanding the language itself. Let's call…

You are 100% wrong. C allows you to shoot yourself in the foot much more easily and much worse than JavaScript. JS is a far more "safe" language to code in. No pointers, no memory allocation. Yeah JS isn't typed but the problems that you get into with that are nothing by comparison. And again, I'm not saying JS doesn't have problems, it does. But the problems this presentation is complaining about are not results of…

> No pointers, no memory allocation.

You mean no manual pointer management, no manual memory al location, right? Right?

> Yeah JS isn't typed but the problems that you get into with that are nothing by comparison.

Js is typed. Every language is typed. Is just isn't statically typed. Big difference.

>You are 100% wrong.

Strong words for someone who gets a lot of basic stuff wrong in a single paragraph.

Re: Enough with the JavaScript already

#195
post #60

Earlier quoted context omitted.

How does one even collect the data from 300 trackers?

Your 300 affiliate marketing partners run software from their affiliate network which automatically analyzes their tracking pixel server logs to determine how far the traffic they steered made it through your purchase process based on the pixels they requested (unique for each page) and the unique ID in their cookies. Then, their affiliate network collects the sales commissions and pays out the affiliate partners.

Ah, gotcha, that makes more sense. I was like, 300 individual sites with individual tracking on what page, what the, how the, etc. Thanks for the clarification!

Re: Enough with the JavaScript already

#196
post #27

All the includes are insane as well. Run Noscript or any other JS blocker and visit a few big sites and you'll see that you end up running JS from half the Internet. I'm joking of course, but some sites have dozens of includes from other sites, advertisers, CDNs, etc.

I installed Ghostery but did not set up any filters; with just that, it shows how much external resources / from which external parties things are loaded. Some sites have like twenty external dependencies, and multiple analytics gathering scripts (which may get embedded via the iframes of advertisers).

TechCrunch is the worst I've seen. 13 for me. Any other higher ones?

Re: Enough with the JavaScript already

#197
post #57

Earlier quoted context omitted.

Here's the painful part: Douglas Crockford wrote a book called Javascript, the Good Parts. If Javascript were limited to The Good Parts alone, it has the potential to be a beautiful well thought out language. It would be quite close to a beautiful well thought out language

Yeah, he did. As a javascript developer I wouldn't limit myself that much though - he considers using ++ a sign of bad code.

To be fair, Crockford gives his reasons [1] and the replacement is literally += 1 instead of ++. Given the very low cost of the change, and that it is an optional rule in jslint, I have no problem with it.

[1] See here for more discussion and links to Crockford explaining the reasons: http://stackoverflow.com/questions/971312/why-avoid-incremen...

Re: Enough with the JavaScript already

#198
post #192

Earlier quoted context omitted.

I think this is very true. When Java launched I re-did the Sun home page as an applet. Bill Joy suggested that in the future HTML would be gone and each web page would be its own Java applet. He was mistaken of course :-) But as I've watched the emergence of 99% js pages I am reminded of his insight. His reasoning was pretty straight forward, the reason PDF (and that thing Imagen/Xerox did (DDF?)) existed was that to…

It's funny, the whole java applet thing was actually a better solution than JS in a lot of ways (shipping compiled/compressed bytecode with a security manager), just way, way ahead of it's time, and with a terrible windowing/drawing toolkit that meant it would never be adopted.

I think that in the mobile side it actually went the way you describe. In japan docomo offered an open java platform (free to use, free to install, no gatekeeper for standard apps). Mobile html was only useable for dead simple things, there was no js of course, and any service with mildly complex things to do or show would be better to implement in it's own app. It sounds terrible, but the user experience wasn't that bad. The terrible toolkit part was solved by Docomo shipping it's own UI toolkit (no J2ME compatibility, but it was so much more useable), and I think at some point there was a way to launch an app from the browser without installing it but I'm not sure my memory serves me well.

The choice of java was made for security of course, and I never heard of any serious breach in 10 years following the mobile tech news.

We get the same phenomenon I guess with the "go the mobile app" redirects on websites that don't want to have x optimized versions of the same service.

Re: Enough with the JavaScript already

#199
There is a very important reason client-side js apps are appearing: managing stateful apps over a stateless protocol means spending about half of your time and complexity budget dealing with state transfer. Js clients bring us back to the days of true application programming. They use REST and HATEOAS in a very natural way that most app servers have not. Maybe it's time to let the server side handle what it's good at?
Post reply on HN