272 points · by EvilTrout · 13y ago · 200 comments
Congrats Javascript--on almost being as good at data-binding and layout as VB6! Me, I'm going to keep kvetching about javascript frameworks until flexbox is widely supported, the strongly-typed language flavor-of-the week actually is stable, and frameworks like angular don't embrace silent failure modes as a feature.
1. it's in a runtime that is in more machines than any other in history.
2. can be loaded instantaneously with no installation procedures.
3. and no plugins
4. On almost any platform, linux, mac, windows, ios, android, windows phone, blackberry, palm, chrome OS, even game consoles. Including the nintendo DS!
5. is broadly accessible to people with various kinds of disabilities
6. doesn't require a team of 20 engineers taking 4 years to build. (which other tech has achieved, and arguably much better, but not combined with the other things above)
7. Works on miniature computer machines small enough to fit in your pocket, and can download your app wirelessly. From the air. in your pocket. FROM FUCKING OUTER SPACE
(incidentally, did HN skip out on the whole ordered list notation of markdown?)
edit; To add a couple more points:
* SEARCH ENGINES can automatically index your shit.
* We have these things called hyperlinks which allow automatic, ubiquitous and pervasive interoperation everywhere.
I see a common pattern on HN where whenever the topic of javascript comes up, all you see is pages and pages of wretching about how AWFUL it is, and how you could do X in Y language Z years ago already. That's not the hacker spirit. A hacker looks at what's out there, and what's possible, shuts up, and builds something awesome with it. (and then wretches about how awful it was)
In fact, the WORSE the underlying technology used to build something awesome, the more proud the hacker is that they achieved it. Where's that spirit?
Sure it's not as nice to program in as your favourite language or environment, but it's come a long damn way. would you give it a minute?
There's the stuff we wish we could have done 50 years ago but couldn't. There's the stuff we could have done 50 years ago but only one person could do it by making a $1m multi-user computer not so multi-user. Then there's the stuff we didn't even know about. They're all awesome.
Yes, Javascript has genital warts, but I don't have to care. I can write sorta-lisp, which means I can layer my own stuff on top, and it magically works. I mean, emscripten!
The things that I miss, like automatic image-based persistence, are coming back anyway, and they'll be fast, probably open source, and can be integrated in a hazy, drunken, weekend.
JavaScript has many similarities to BASIC!
At one point, yes, points 1-5 were definitely true. Thank you for reminding me! Don't forget about BASIC!
Here's just a few of really big differences:
1.) BASIC didn't have a DOM. 2.) BASIC didn't have network abilities. 3.) BASIC didn't have advanced language features. 4.) BASIC wasn't didn't load and execute from a simple network request.
BASIC was SUPER important to the command line PC-era, just as JavaScript is really important to the cloud-era.
Microsoft and BASIC... Google and JavaScript...
Because JavaScript is attached to the DOM, and the DOM, aka, web pages, are SO crazy successful at delivering, presenting, archiving and navigating media, it really adds a level of longevity to the language that BASIC could only have dreamed of.
Are you sure about that? My C64 w/300 baud modem was able to hit BBS's...
Yeah, but a hacker also doesn't waste his precious life time with subpar and awful technologies (unless he's forced/paid to do so).
That's why in my free time I rather fire up emacs and hack away in Lisp instead of building JavaScript webapps.
That's total garbage. The browser does awesome presentation and layout with the markup you give it and you can control what happens via declarative CSS. VB6 couldn't even make a dialog look nice when you changed the system to Large Fonts.
Silent failure? You must have forgotten `on error goto 0`.
I would. I've been doing web development for a long time, along with many other types of development, and although there are quirks (as there are with anything), you can do nearly anything via web layouts. The flexibility of the system, and things people have accomplished with it, is really amazing when you stand back and look at it as a whole.
It is a noble desire though.
edit: explanation: I really dig it!
^^^^ YES. Although:
1. there was Java in the browser until recently when the Government said not to use it. Eh, it was dead anyway (in the browser at least- very few new projects using it).
2. there are those things called Flash/Flex/Air/etc. that Jobs killed when Apple wouldn't support them- they still live too all over the place though.
3. HTML 5- it's not just for breakfast anymore.
4. Javascript isn't just there because it is the only thing- morons at Google, etc. helped make faster JS compilers/interpreters. How is another scripting language going to erupt if they keep making the bad one faster. It's like PhP all over. Bastards.
Now back to the post to comment on just one thing:
> Just take 10 minutes and read the documentation! 10 minutes!
I was with it and then I read that and thought, "That's bullshit. Total bullshit." So #1 magic JS MVC framework? AngularJS. AngularJS documentation? Yes it has it... but even though I understand it, when something goes wrong, it is not RTFM, it's TFM: Too Fucking Magic. Batarang doesn't help when things aren't wired correctly, and when it does, it is not written for the beginner. EmberJS? EmberJS has only a community of hardcore Rails devs and Sproutcore people that didn't care it got renamed twice (sproutcore->amber.js->EmberJS) and DHH won't embrace it, so it's is F.U.C.K'd- even one of its big time proponents admitted it would be years before it is ready:
To use an analogy: I'm not saying the plane doesn't fly, but I am saying the plane seats are uncomfortable.
Also, this is a total aside: what if there actually was a way to stuff like C++ on a computer in sandboxed environment that could be loaded automatically by a user in a seamless way? If that happened, if you took away Javascripts monopoly of the highly portable and convenient environment, it'd be dropped so fast you could blink and miss it.
This is what asm.js enables for non-garbage-collected languages, and what Binary Data enables for garbage-collected languages.
But I think you're overestimating how much people want to move away from JavaScript. The overwhelming majority of Web pages never leave the JavaScript interpreter in Firefox, because they just aren't bound on JS execution speed. What is far more important than raw JS speed on most Web pages is ease of development and DOM/CSS performance. I think it'd be hard for C++ to gain much mindshare on the long tail of Web sites, even in a world where asm.js was universal, easy to use, and 100% of native speed.
JS has plenty of faults, but one thing it's never lacked is convenience. Conversely, C++ has many virtues, but one thing it's never had is ease of use. Given that calculus, I expect JS to continue to dominate for a long time.
The performance of web apps is much worse than that of desktop apps, for example. Complex desktop apps written in C, VB, and PowerBuilder ran just fine on 486 or early Pentium systems that have a very small fraction of the processing power and resources of a modern system. Yet it's still common to see web apps in general perform quite poorly on these modern systems, while doing less than the mid-1990s apps did.
Developers at least have some choices when it comes to desktop apps. They can use a multitude of different languages, along with a variety of different libraries and frameworks. This is a much richer ecosystem than what we get with web development today, where you're basically stuck with JavaScript, or a language that's nothing more than a slight veneer over JavaScript (CoffeeScript, TypeScript, and even Dart). Don't even bother mentioning asm.js or Emscripten. Asm.js is merely a rancid subset of JavaScript, and Emscripten is experimental at best.
The portability argument isn't even valid. Languages like C, C++ and Python offer superb portability today, especially if used with one of the extremely cross-platform GUI toolkits available for making desktop apps. Given that almost every major JavaScript implementation today is written in C and/or C++, the portability of JavaScript is inherently no better than than of C and C++.
The ability to communicate over a network isn't anything special, either. All sorts of desktop apps have been doing this for several decades now.
The distribution argument also isn't valid. The package management systems offered by most Linux distributions, for example, are far nicer to work with. They make it trivial to find and install native apps, and unlike web apps, you get to choose if and when you upgrade, rather than having changes forced upon you time and time again.
The sandbox argument is also irrelevant. Various mainframe and UNIX-like OSes have offered several different ways of jailing or otherwise isolating processes for many, many years now. It's nothing new. But unlike the browser, they give real control over how much access is allowed, and without imposing horrid performance loss.
All of these limitations of web apps come together to make for a user experience that isn't enjoyable.
At best, web apps can imitate desktop apps, usually at a quality and user experience level 10 to 15 years behind desktop apps. It's objectively incorrect to claim that web apps "rival" desktop apps, when all of the evidence shows that they clearly do not.
You throw out "the distribution argument also isn't valid" as though firing up a Linux package manager or going to download some binary program on Windows/Mac is at all comparable to simply clicking a URL in an email. Not to mention the security implications of desktop distribution.
No, the mediums are not comparable. Your rebuttals consist of "your argument isn't valid" but offer no counterpoints, rather, they simply describe the way desktop development is done these days. It's fine and dandy that you think desktop programming is the state of the art, but there are vast differences between web and desktop environments, and it's why things like the Chromebook can exist.
There are many people these days for whom the internet is the computer.
One of the core technologies behind VB6 (COM) remains widely used in Microsoft Windows today.
I love Angular and perhaps in some places, and at certain times silent failures make sense (but would a console.log kill you?) but yeah... A-men!
This might sound like a bad thing, but it actually makes the page work without confusing the expression syntax with endless or statements.
That said, I do see your point - it's frustrating to find something not working due to a typo in an expression, with no errors to point it out. A halfway solution could be some kind of debug directive/tag that logs when an expression doesn't evaluate? Or perhaps something integrated into Angular Batarang? (https://chrome.google.com/webstore/detail/angularjs-batarang...)
VB6 is by no means a good language, but JavaScript is much, much, much worse.
Nor does JavaScript... "use strict";
Being what it is, JavaScript has come on a long way. Saying "avoid this specific feature" does make a language better. The same can be said about specific features of JavaScript (with, eval) but I'm sure you wouldn't make the same argument.
The fact seems to be that people are stuck in their ways and hate on JavaScript because they don't know the language as well they could and they haven't kept up to date with the evolving standards.
I love JavaScript, but I hate having to switch between BackBone, Angular, Dojo, etc. between projects. Learning each one, as well intentioned as they are, winds up being a productivity hit at some point, if not semi-regularly.
In a way I feel as if I've spent more time learning how to get things done w/JavaScript frameworks, than actually getting them done.
Heaven forbid you go back and maintain the stuff written with the old version of the framework...
For example, in LAMP context, I hit the problem you mention w/the Zend Framework 1 -> Zend Framework 2 upgrade path, as well as with Kohana 2 -> Kohana 3. ZF 2, in particular, pushed a lot of loyal ZF devs away, and after trying to upgrade existing projects, and use it for new projects, I'd say rightfully so. Now I'm stuck maintaining a large handful of projects built on top of unsupported frameworks.
I think the answer is 'sometimes', but these days people treat these new layers of complexity as non-negotiable.
Furthermore, the general shittiness of post-y2k developers has seeped into the corporate veins of tech companies everywhere. So this is why you see Go "gunning" for Ruby or Rust "gunning" for Go, or whatever. And I speak from experience. When I was in my late teens (I'm 27 now), I totally thought Javascript sucked; and, in many senses, it's not an ideal language. But I mean, I was really out there with my shitty (and uninformed) opinion that JS sucks.
Fast-forward a couple of years after I forced myself to do a lot of development with many (many) languages -- as opposed to being force-fed X or Y language by Z company -- and I have a different outlook. There are very few languages (or frameworks, for that matter) that suck -- furthermore, saying X sucks is simply insulting the (probably much smarter than you) author of X. This doesn't happen much on HN (people usually have well-thought out opinions) but it's very apparent on SO or the myriad of other forums/newsgroups.
I now love JS. I don't think it's amazing or anything, but I've been having as much fun writing JS as I've had writing C (which is saying a lot -- C is very fun). If I could get a freebie, though, I'd have to say that C++ sucks :P
So I agree with the sentiment of the OP and I think this is more prevalent now rather than 10 or 20 years ago because we have a much larger community of developers. Which, in some ways, is good but in others can be bad.
Buying one book every six months would have been a lot cheaper.
They'll still sell you that subscription, of course (http://msdn.microsoft.com/en-us/subscriptions/buy.aspx). Nowadays though the documentation portion is all available free on the Web (http://msdn.microsoft.com/library), at least. Progress!
Compared to CGIs/PHP? Yeah, sure, finally it almost behaves like a normal GUI library. And the way things going, we're probably going to get our Taligent/MFC library soon...
I know, the OP (and Louis CK before him) were mostly arguing against the Nirvana fallacy, where people complain about the status quo as opposed to some mythical idea of perfection. Problem is, I don't see the whole browser stack as superior to previous art (i.e. definitely not mythical). Things like NeWs or Smalltalk.
The closest thing would be something that does almost everything in JavaScript and would abstract the HTML/CSS underpinnings away, but that's certainly not the current approach to "proper" web design (ExtJS would come to mind).
Honestly, I'd be hard-pressed to find any prior system with that many layers (VBScript?)...
You're right, though, I used to buy volumes of Inside Macintosh and read them, cover to cover, over a cup of tea. I learned C++ from a book, too. I actually miss that style of learning; I like to understand my tools comprehensively, and not to just skim whatever I need from the reference and leave the rest as a mystery. I know that there are lots of programmers who spend their whole careers glomming together bits of other people's libraries, but that just doesn't appeal to me.
It was basically impossible to get any information about CS fundamentals before I got access to the WWW. I guess people in universities must have had access to textbooks, but as a working professional I didn't know enough about what I didn't know to even know there was something to look for, much less have anywhere I could try to find it.
I think you're presenting a false dichotomy, and expressing inappropriate disdain for people with different learning styles from your own. For one thing, you can gain a deep understanding by using a library, language etc. in a nonlinear fashion. For my part, reading a book about programming from front to back 5 times and working the examples will leave me with long-term retention of somewhere in the neighborhood of 0%. Actually using the language and libraries and digging deeper as I need to gives me a far stronger grasp. I don't know everything there is to know about every feature of Core Graphics under OS X, for example, but three years since I last touched it, I could easily ramble for hours about all manner of crufty real world knowledge that I gleaned from using it.
BBSes were linked and people transferred files and knowledge everywhere, much like they do today. FidoNet existed, which had a good sized community. I bought one of my first PCs on there. This was many years before eBay and Craigslist existed. ASCII text files existed, which contained a wealth of information. One of the few free sources of information on how compilers work is an ASCII text file. People still refer to this source, despite being nearly 2 decades old now (http://compilers.iecc.com/crenshaw/)
Granted, I do not really think it is that bad, but still, the "dark ages" were hardly dark in this sense. I've been reading some of Knuth's "selected papers" series lately. Just reading about how he and others approached problems is amazing.
It wasn't the Dark Ages.
Maybe more like the Early Dawn Ages.
Both approaches had some good sides to them and it's a shame that they're not even considered as options now, which GP seems to demonstrate.
I wrote out a lot of pseudo-code and drew diagrams and when stuff didn't work I could often figure it out by poking through the K&R book or the manual for my compiler.
As it became easier to spread code and ideas it also became easier to spread more sophisticated but sometimes opaque libraries and tools, and perhaps ironically it is those new libraries and tools that most require the increased communication because while they offer more power they also introduce more complex bugs and quirks.
Things used to really suck, and now they're a lot better. That happens every generation--mankind's physical culture does keep on improving in a lot of ways. Older people are proud of all the progress they've made. And young people take the new and improved stuff for granted and complain.
But that complaining is a good thing! Expectations keep increasing with every generation. If we didn't always have new people coming on scene and getting frustrated with the status quo, then we'd stagnate as a culture.
The kids are all right. It would be nice if they appreciated what they have more. On the other hand, they'll get old and have the same experience too.
I feel sorry for many of the younger developers today who only know of JavaScript, PHP, NoSQL and web development. They don't know what they're missing out on, nor do they truly know how inferior their tools are.
And when it comes to getting serious work done, we still use C, C++ and Fortran today. Yes, they've advanced in many ways over time, but I think they just go to show how much better many technologies were in years past. Even modern tools just can't compete with them.
I still have not found the easy and power of fox to do data task and the RAD way of delphi in any tool I have tried...
Funny to see younger developers rediscovering this type of tooling that was killed by C and VM environments.
I don't feel sorry for anyone who hasn't had to work with relational databases.
The old-timers are looking at the youngsters getting excited about only having to walk 1.5 miles uphill in the snow.
And scratching their heads, because they remember the days when they had hovercraft to get around.
While it's good to maintain a positive attitude and congratulate ourselves on the progress we've made, it's unwise to call ourselves "awesome." We're anything but.
Web development is still way harder than it should be. Javascript is still much worse than it could be. Node.js is still a bad plan. Software is very much in its infancy. We're still 10-25 years behind the state of the art in the industry, and many people get defensive if you point it out because their egos are tightly coupled with their work work methodology.
It's not hopeless, but it's nowhere near done. And hyper-nested callbacks are a primitive that we should grow beyond, and numerous methods to do so are not only possible, but already researched and proven before you and I were born.
If we stop focusing on what's "wrong" and take a moment to see how incredible people's reach and speed-to-market is compared to even 10-15 years ago, we might actually take a moment to stop talking about how terrible everything is and marvel at just how far we've come.
Glass half-full is what I'm trying to accomplish here.
Depends. If they're still 20 years behind academia, they deserve to be saying it. If they still have this weird culture that abhors modern advances in favor of "getting shit done" and wastes time arguing what kind of text editor matters, they deserve to say that.
> Glass half-full is what I'm trying to accomplish here.
I like to say that the glass has 118.29 cubic centimeters of water in it.
Are you intentionally referring to a superficial positive veneer hiding serious, fundamental, and widespread problems [1] or are you meaning to refer to a "golden age" [2] instead of a "gilded" one?
There are a lot of advantages to web development, but in terms of tools really helping you to whip up something that meets the standards of the day, we still haven't caught up to those times. Meteor is the only framework I've used that I'd say is as painless as Delphi and its like were at the time.
But are you sure it isn't nicer to just complain? It's certainly easier! ;)
I think people are pissed when they start with a new framework is the lack of ERROR messages.
I wished errors were more verbose. I don't care if the error message takes 5 lines. When I'm used to a framework, i'll know from the second word what is the error.
On the other hand, when I don't know the framework, I have no ideas what is assumed and what isn't. Print all the remotely possible culprit. That will give me an idea how it works.
Errors will help me learn and progress.
https://github.com/mookid8000/Rebus/blob/master/src/Rebus/Co...
1. Web apps are incredibly useful and convenient. Web apps are always up to date and pervasive because the Web runtime is everywhere. Some apps only need ever be Web apps.
2. The Web was designed to be a feature-rich hypertext system, not an application runtime and system-wide UI framework. Web apps will never be as good as native apps, something that was rediscovered in mobile devices.
Both are true. Both will be true for a long time to come.
Like I know you're just dying to tell someone their argument is absurd, precisely backward, badly false, from another reality, or some other hyperlogical sounding construction that no human would ever actually use in normal conversation - but chill OUT. Do you really need to immediately jump into a flame war about BASIC?
Can't you just chuckle at the fact that yeah, we are all kinda entitled turds form time to time when it comes to tech, and then like go about your day and build something and go home?
I mean come on -- "It's going to space, give it a sec." -- that's funny.
Then it was a matter of seeing if he was going to drop the ball (there were some fumbles) but maybe "x is awesome and nobody is happy" will be the aristocrats for a less obscene demographic.
So yeah, we can bitch about the 19 location-aware social cloud startups announced each day, but it's also good to get frickin' excited with what you can do for free with some stuff you download onto a laptop while on an airplane.
Imagine going up to your 8-year old self and saying,"You know that Atari 800 you love second only to your dog? Look at my PHONE! It could tell you the weather right where we are, without having to tell it where we were! I could look up what you were doing right now! Um, look at these birds going after these pigs!"
Having said that, not all JS frameworks are built the same. ;) And you're entitled to have a preference and not be "Louis CK'd" into loving everything under the sky.
When I started with NodeJS, I was like a kid in the candy store. Before I blinked there were hundreds of npm modules supporting everything including aws management to controlling robots.
I have tried a lot of nodejs web frameworks. They are all amazing and I wish them success but I have realized that there is nothing great to be gained by using JS at server side compared to using say rails.
Web sockets, anything with many thousands of concurrent connections is better in node.js. They each have their strengths, which overlap very little.
It wasn’t long ago that building a site that worked on a mobile was the most fantastic and impressive thing they had ever seen. Before that, there weren’t even ‘mobiles’ to have ‘sites’ on.
If the demands put on programs were the same as they were 10, 20 years ago, I would have my week’s work done in 5 minutes. But it’s not amazing any more, it’s boring and usual and old as soon as it is released. Our customer or boss just saw a new example up on nvd3, so d3’s dead now, and you better have already learned nvd3 (that’s a pretty old example), oh and it still works on a mobile, and fills my retina display, right? Oh and it doesn’t move properly when I scroll on my android tablet. That’s the same as an iPad, right? Oh and John said it’s broken in IE.
Our demands come from our customer’s expectation that this stuff is easy now. And hells yeah it is SO much easier than it used to be, but it’s far from being as easy as they think it is.
We usually only have an hour to get going in a new framework, if it’s not clear after that, we move on, because something newer (better?) just hit #1 on HN.
But let’s remember how exiting all of this is. Programming has changed for the better. It’s cool and in demand now. People are paying us to do the cool things we used to dream about, they just might not be giving us quite enough time, so we blame the frameworks.
Browsers have gone far. Browsers are amazing. Frameworks are still boring.
It's not surprising that this can be taken to the extreme as we strive to continually optimize our tools, which are especially flexible since they are spun out of almost pure abstraction.
A healthy dose of perspective is helpful to reminds us that at the end of the day we solve problems and make cool things.
Though dealing with poorly designed man-made abstractions can be frustrating, we are fortunate to have the opportunity to improve our tools and environments and it's especially incredible how collaborative the effort is (open source) compared to some other industries.
Louis CK sums it up better than I could ever articulate
https://www.youtube.com/watch?v=KpUNA2nutbk&feature=player_d...
Note the line at the bottom of the piece:
> Credit: http://www.dailymotion.com/video/x8m5d0_everything-is-amazin...
It's an easy way of excluding people under 40. Like when we talk about being afraid to visit Northern Ireland or getting nuked.
Well, only for certain type of apps - static input/output forms -, this maybe true. But none of them is amazing for any further type of apps.
You can be happy because you don't know any further.
"Wow, beaming to the surface is so much faster than that goddamn shuttle. And ... hey! This shirt wasn't this shade of blue before! Mother$#)!($&!"
I just love that. I've encountered that attitude so many times.
Javascript(PHP?) tend to attract people who wants instant reward, without too much work..
to point out that a little more is easy to see that even here at HN.. when a new project come from c/c++/go etc.. the tools are more sophisticated and take more planning, labor and research to see the light.. so this kind of projects tend to endure a little bit more
on the other half javascripters launch are more fragmented and you see a lot of iterations over the same problems already solved by previous framework as just because its a matter of taste combining the technologies one like most..
i cant say this for every developer of course, im sure there are people away from this pattern.. but its a just a feeling from the outside.. i come from other generation i guess.. ut when i was younger pascal, delphy and php were cool and just get things done.. i think its also a question of age.. when you are younger you are more pragmatic, and want everything fast and instant.. Javascript is that platform now.. the one who tends to call the younger and people who are starting programming..
this is not a critic, and not a bad thing at all.. its just more a general observation.. so excuse-me if i was unfair in anyway (thats the problem with generalizations though)
Well the problem with pragmatism its just that... people start doing things with a low critical thinking about the tool they are using.. they tend to experiment less with other languages and the different solutions those languages may point out..
so the problem pointed out by miguel de icaza over the callbacks.. they were spread all around in the code like if they were the solution for everything.. or just _to get things done_
to be fair this is not _just_ a problem of javascript or another language.. its technology in general and the open source..
people should be more cooperative and less competitive.. why create a new blog engine just because you want to use another template system and do not try to help the other project by adding the template system you like..
there are much of ego in technology today.. people want to be the new linus torvalds, or the new steve jobs.. but behind all of those big stars, and what they acomplished, there A LOT of people working in the same project , all together.. so its the real spirit of cooperation behind it, even if they dont tkae the medals.. they deserve it they are also the everyday heros
you can argue that this is may outside of the scope of this post.. but im trying to point what i think are the real reasons, of why those things are happening.. and its not enough to look just at technology.. we need to take a look at the people behind it and how they move..
just my 2 dollars (because this comment its a little big for 2 cents)