Live data from Hacker News

Enough with the JavaScript already

fr.slideshare.net

211–220 of 231 posts

Re: Enough with the JavaScript already

#211

Earlier quoted context omitted.

I want a specific format to our proprietary systems. In C# I can just say "date.Format("dd.MM.YYYY")" or what ever I want.

Granted that's a bit tidier than doing this in JS: var myProprietaryDateFunction = function(dt) { return dt.getDate()+'.'+dt.getMonth()+'.'+dt.getFullYear(); }; But in JS, you can pass that function around like a village bicycle -when I think back to my C# days, it makes me wonder how I ever did without functions as first class objects and a slew of other really great things about JS. A lot of those things are brainb…

uh, this won't have leading zeroes like DD.MM.YYYY format would have

Re: Enough with the JavaScript already

#212
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…

"at least we can read most things on mobile devices"

True but we don't need Javascript for it. I think that's what the article is about. We can make cool stuff without or with less Javascript.

Re: Enough with the JavaScript already

#213
post #71

Earlier quoted context omitted.

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.

That's semantics. He didn't get the "basic stuff wrong in a single paragraph" at all. Bu not having to worry about pointer or memory allocation at the the point of coding, it is entirely reasonable to say that JS the language has none. Yes, of course the interpreter does that, it goes without saying. JS is weakly typed, when writing no type declaration is needed, so it is said that JS isn't typed. Your comment is akin to that of a grammar pedant by not addressing the argument, just the manner in which the points were made.

Re: Enough with the JavaScript already

#214
Just because it's badly abused doesn't mean it's bad per se. Let's say you build your SOA: JSON API + Mobile App. At this point, if you plan to build a web app to browse your content, it's very hard to render pages server side without code duplication/collision with the API. If you go with the full js MVC approach you can reuse your api and just worry about the templating and event binding. Maybe this approach doesn't yet scale to the size of Twitter, but I hope the web moves towards fat clients optimization.

Re: Enough with the JavaScript already

#217

Earlier quoted context omitted.

I think the main points WebSocket vs. unrestricted TCP sockets is: 1. Support for a browser-appropriate security model (origin-based) 2. Not requiring extra work to pass through HTTP-friendly (and everything-else-hostile) firewalls.

I assume you would apply the same origin policy to the connections. The firewall point is good, although I don't understand why you would want to block general TCP connections but not websock.

A lot of corporate environments prevent you from connecting to anything but port 80 and 443. Websockets is the only way for you to multiplex your tcp-like connections over port 80.

Re: Enough with the JavaScript already

#218

Earlier quoted context omitted.

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?

How many trackers are detected by Ghostery on individual articles on these sites?

Boing Boing has 12.

The Atlantic has 13.

Huffington Post has 16.

The Onion's AV Club has 18.

Wired has 19.

Re: Enough with the JavaScript already

#219

Earlier quoted context omitted.

with JavaScript, there is no need to know how computer works, so why would anyone learn(deeply) about that?

You act as though Javascript will take over the programming world -- I can confidently say that it won't

mind you it will ... ( and i'm not pro javascript ).

Re: Enough with the JavaScript already

#220
post #118

Funny thing is, I use JavaScript libs like Ext JS because they don't impose HTML/CSS on me. I can write the whole application in JavaScript and I just have to mess with the DOM and it's ugly friends when in trouble.

doesnt matter , they use it under the hood. and the fact that you have little control over how ExtJs actually uses the DOM will not make your app faster...
Post reply on HN