Javascript Frameworks Are Amazing and Nobody Is Happy
wekeroad.com
wekeroad.com
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.
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...)
It is a noble desire though.
It seems to be aimed at games and graphics. There is not a single complex form, multi page flow or interactive layout in the examples.
edit: explanation: I really dig it!
edit: Heh! Go thank Elm's author, not me. :-P
First off, they identify browsers, not features. If a user disables JS, you can't detect that.
Worse, you would need know every UA string out there. This is, of course, impossible when a new browser shows up. And even if it weren't, it's not an elegant way to handle the situation of different browsers having different features. You're either going to have to do a separate code path for every version of every browser you support, or you're going to have to create a dictionary on your server to tell you what features are supported for each UA string, and then essentially do progressive enhancement on the server side. At that point, you're going through an awful lot of effort to do the work on the server instead of the client, with no clear net gain.
But the problem of new browsers is worse still. When existing browser vendors release a new version, they don't want all of the new features they added to be ignored by sites that rely on the UA string. And when someone makes a new browser, they don't want it to have everything disabled on every site it renders. So they go to elaborate lengths to load down the string with as much crazy as possible to trick sites into misidentifying them as existing modern browsers.
It's usually a poor business trade-off to slow down the several hundred million Chrome, Firefox, and IE users for the sake of a few thousand users on a new browser. Numerous studies (first publicized by Google but replicated several times since) show a direct link between latency and conversions: the slower your webpage is, the fewer people buy from it.
Pre-IE9, most browser-specific hacks weren't of the form "Old browser X doesn't support new feature Y". They were of the form "IE does things differently." That required shipping a version for IE, and shipping a version for everyone else. If you gate these with feature detection on the client, you need to ship the IE code and the conditionals to gate it to the client.
Post-IE9, most browser-specific hacks are of the form "Emerging web standard X would be very handy but isn't supported in browser Y, so I'm going to emulate it with Javascript." That involves shipping JS to old browsers, not to new browsers.
But the idea of progressive enhancement is not just about supporting everybody's browser so that you will get more conversions in the short term. It's about the long term. Targeting the majority and saying "screw the fringe demographics" is what led to Microsoft having control over web technology years ago, and it's important to our livelihood to prevent that from happening again.
^^^^ 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:
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.
For example, look at email clients. The native mail apps on my Mac and iPad can show me all of my inbox in one big list. I can scroll through tens of thousands of messages naturally, easily jump to the bottom or top of the list, etc.
Web pages cannot support this. Yahoo mail attempts to present the messages in one big list, but the experience is pretty bad. The scroll bar looks fake and feels wrong, find doesn't work like you'd expect, the scroll thumb changes size and jumps around as you scroll, scrolling to the bottom is Sisyphean, etc. And Yahoo mail is one of the better webmail clients.
Gmail didn't even try. Instead it refuses to show more than 100 messages at a time, with buttons to paginate.
When I work on web pages, I don't get a feeling of freedom or flexibility. Instead I find myself forced to compromise on the user experience over and over again, just like Google and Yahoo did with their webmail clients.
Frankly, a list of tens of thousands of messages sounds completely worthless to me. The first email application I've ever really liked and use all the time is Gmail. I think Google helped to redefine what the email interface should be, so much so that other desktop apps sought to imitate many of their features.
I believe that some of the limitations on performance actually force developers to build better interfaces than what you'd get if a desktop application was built in its place. I have to focus on what is most important and determine the best way to deliver that functionality to you. I suppose that's why I find myself anymore using web applications far more than desktop apps. The only native desktop apps I use anymore are things that I have to have the performance for (IDE's, Photoshop, etc...)
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.
That is a weird thing to say. Maybe it is just me, but when I use JavaScript, I cannot stop worrying about the possibility that there is yet another corner case I have not contemplated. Admittely, C++ is full of corner cases too; but, in my experience, it can be coerced into being a more or less civilized language by making a list of strictly verboten constructs, including, but not limited to, void pointers, manual resource ownership management and casts other than static_cast. When you leave these out, you actually have a smaller language that is easier to reason about. With JavaScript, no list of bad constructs can do - you need to actively rely on the semantically crazy stuff to do anything useful.
The only thing I can think of that you might mean is function scoping, which I would agree with.
One of the core technologies behind VB6 (COM) remains widely used in Microsoft Windows today.
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.
What's wrong with wanting better? How awesome would it be to have a safe, well engineered browser that wasn't limited to just HTTP, HTML, CSS and Javascript?
Give me a full duplex network stack, native graphics and broader input controls. Give me file access and a multi-language runtime! Sandbox it all, I don't care!! Microsoft has done all of this (exceedingly well, in a very short time) with Silverlight which can run dynamically downloaded C#, F#, VB and Python modules on Windows, OS X and (limitedly) on Linux. It could definitely be done better by a more open group.
At home the only web applications I use, are the ones I am forced to, like hotel booking systems and forums, because USENET is moribund.
Do we?
> Web apps have won the desktop
Tell that to my text editor, photoshop or audio editor. Or my email client - or even the native Evernote application. For all of these there's no serious web version.
This comment might sound snarky but I'm honestly trying to think of what web apps I regularly use. And I can't come up with one.
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.
The basic fact is that prototype-based OO, for example, is much less practical than class-based OO. Experienced developers comprehend JavaScript's attempt at it just fine. This understanding doesn't change its inferiority, however. This is exactly why so many developers need to compensate for JavaScript's lack of desired functionality in this area by trying to fake class-based OO using the limited functionality that JavaScript does offer.
The same goes for many other aspects of JavaScript. Bad tools are still bad, even in the hands of experts.
I'm not really sure what you're talking about when you mention "evolving standards". If anything, JavaScript's standards haven't evolved well at all. Harmony is only now proposing the addition of core functionality that has been present in other languages for decades now, and should have been in JavaScript from the very beginning, too. JavaScript is merely "evolving" to where it should have been many years ago.
1. Types (classes)
2. Encapsulation (private, protected)
3. Polymorphism (virtuals)
4. Code reuse (inheritance)
While it is much better than prototypal inheritance, it is still less than ideal. On the other hand, there are languages like Haskell and ML which compartmentalize better these concepts:
1. Types: algebraic data types and type synonyms
2. Encapsulation: modules
3. Polymorphism: type constructors (parametric), type classes (ad-hoc, Haskell only)
4. Code reuse: derived type classes (Haskell only), functors (ML only)
The result of providing these features independently from one another is a net increase in flexibility. You can have, say, a module that exports two or more types, and a single function inside that module that can manipulate the internals of both types.
===
Edit: And Rust gets this right as well, of course!
1. Types: structs and enums
2. Encapsulation: modules and crates
3. Polymorphism: generics (parametric) and traits (ad-hoc)
4. Code reuse: trait inheritance and trait instances for generic types
A lot of people who know JavaScript and several other languages very well don't hate on JavaScript. JavaScript has more than it's share of warts, obviously. We all know the story: it was written in a week, etc. It also has more than it's share of good parts, though, and if used correctly it is a very expressive language. In my experience, the haters are more frequently people who don't know the language as well. Clearly our experiences differ. I find it hard to believe, though, that anyone experienced in both languages would claim that JavaScript was worse than PHP, and PHP is still the most common back-end web language.
Actually, you can implement prototypal OO in a class-based language. First of all, you need a single class with two members variables and a member function. The member variables are a pointer or reference to a base object, and a hashmap from strings (member names) to objects (member values). In C++, this would be a std::unordered_map<std::string, boost::any>. The member function is an overload of the subscript operator (operator []) that takes a string argument and checks whether the hashmap contains the string as a key. If string is indeed a key, then its associated value is returned. Otherwise, the same subscript operator is evaluated for the base object and the same string. If there is no base object, then either an exception is thrown or a special undefined value is returned.
The feasibility of doing this is no big surprise. After all, dynamically typed languages are a very, very restricted subset of statically typed languages: http://existentialtype.wordpress.com/2011/03/19/dynamic-lang... . The main reason why users of class-based languages do not do this is that this breaks type safety for very little gain.
Actually, the supposed encoding of class-based OO in a prototypal language is not correct from an operational semantics point of view. In a statically typed OO language, methods and member variables must be known to exist, so they are directly used. The prototypal "encoding" fundamentally relies on testing at runtime whether methods or member variables exist, because it uses the mechanism described two paragraphs above. So it actually does something different than what statically typed class-based OO languages do.
> It also has more than it's share of good parts, though, and if used correctly it is a very expressive language.
For me, an expressive language is not a language that lets me encode hacks (after all, even C can do that), but a language that lets me encode mechanically checkable assurances that my code will work in specific ways. This allows other programmers to reuse my code with full confidence that it will work in the way they expect it to.
Are you talking about JavaScript's "this" keyword? I did not mention it in my preceding comment, because that is an implementation detail of JavaScript functions. I think my point still stands that (static) class-based OO languages are sufficiently powerful to encode the semantics of prototypal inheritance.
> Also, note that I wasn't talking about statically-typed class-based OO specifically. Classical OO exists in plenty of dynamic languages too, so your comments about type systems are kind of out of place.
You have a point there. When they say "classes", I usually think C++ classes or Eiffel classes, but you are right that there are dynamic languages that uses classes, too.
Oh? So in an example where B has a method m, and A inherits from B, how is it that `this` refers to something different when calling B.m() than when calling A.m()? They're the exact same function.
That said, I do need to clarify. I was talking about implementing classical inheritance with prototypal inheritance, and implementing prototypal inheritance with classical inheritance. You can implement either using base language features if you want to create a new object system, but that's not what I was referring to.
Just like in regular class-based OO languages, "this" is an implicit argument of every method that refers to the object on which the method was invoked.
You can even avoid manually doing all the "this" juggling yourself: Make a delegate class, which holds a reference to a method (including its captured variables) and a reference to the "this" object. When a method is retrieved from a an object, actually construct a delegate referencing both the method and the object. (If the method is retrieved after traversing the inheritance chain "upwards", fix the "this" reference along the way "downwards".) Finally, when a delegate is assigned to a variable or as a member of another object, get rid of the "this" reference and assign the method only instead. Client code never gets to see the "this" juggling.
That said, I do need to clarify. I was talking about implementing classical inheritance with prototypal inheritance, and implementing prototypal inheritance with classical inheritance. You can implement either using base language features if you want to create a new object system, but that's not what I was referring to.
The additional constraint of not creating a new object system prevents me from making OO of any kind at all in C, but leaves most scripting languages that implement "classical inheritance" very open to implementing "prototypal inheritance". This is partly because they actually use "prototypal inheritance" and expose a "classical interface" as the primary one, so fiddling with __mro__ feels a little like cheating. If I want to avoid fiddling with the existing __mro__ and build my own, I can override __getattribute__. This certainly doesn't feel like making a new object system to me, but it also doesn't feel substantially different from overriding [] in C++.
But a static OO language can faithfully reproduce the operational semantics of prototypal inheritance.
Edit: Now with method binding that works instead of not working!
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?
No. Never has, never will be. It's just a plainly obvious fact, no explanation needed.
2. can be loaded instantaneously with no installation procedures.
No. see above.
3. and no plugins
No. see above.
5. is broadly accessible to people with various kinds of disabilities
No. What makes you even barely think this even slightly applies?
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)
I'll give you that one, but not without a windows machine, and a multi-thousand dollar piece of proprietary software.
I'll admit I am not sure whether you mean BASIC or VISUAL BASIC. But none of these points apply to either, 6 even less.
1. was true at the time Basic was released, but so what? it has none of the "features" that we're actually talking about, and is less powerful than even javascript version 1. By the time visual basic had our beloved features, 1. was no longer true.
Your argument is "it's different this time" because of reasons 1-7. I'm claiming 1,2,3,6 are not different when compared to Basic, at the time Basic was released.
1. was true of BASIC for a brief time in the 80's, but was never true of VB
2. Not applicable to Basic (you had to type basic programs in by hand from a book, not exactly instant), not true of VB
3. Not applicable to Basic. What does "plugin" even mean there? You still have to type it in by hand. Not true of VB
5 was true of neither as you've conceded.
6 was true of visual basic, but never true of basic- to the degree that we're talking about sophisticated GUI apps, not simplistic text based adventures or weather quizzes.
2. You can load Basic programs instantaneously. They're interpreted, and the interpreter came with the operating system or even the computer's hardware. How is JS any more instantaneous? You didn't have to type in a whole Basic program every time you wanted to run one - I'm guessing this is the confusion here.
3. There were no plugins. That's all that claim 3 ever was. I don't know how typing in a program by hand is relevant at any rate. Surely every program has to be typed in by hand, unless you're doing visual programming.
6. I thought this was about Basic itself, which did not take a team of 20 engineers four years to develop. As for applications, at the time it was really simple to program in compared to something like C.
So it comes down to 4, 5, 7. These aren't true of Basic, but they don't necessarily make JS a winner:
4. Basic programs were portable to machines that had interpreters, and there were lots of them. But sure, it probably wasn't as portable as JS, as I don't know if you could run it on a mainframe. C is a very portable language though, and always has been, so why does this mean JS wins?
5. Improvements in accessibility compared to the 80's applies to all technology. How is the disability support in JS better than other languages?
7. Home computers were IN YOUR FUCKING HOUSE! at the time Basic was popular. But non-Basic programs ran on those computers too, just like non-JS programs run on your phone. Miniaturization benefits all languages.
I'm not even saying that the features you listed are bad features, nor am I saying that JS is a bad language. I'm simply refuting your primary claim about JS superiority due to some list of features, and about how this is different than all the other times. All popular languages have their place, by definition, and JS is one of them.
And BASIC is just FORTRAN for people who couldn't program and didn't have a real computer or pubes.
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...
Now, if you wanted to move forward a few years then the Amiga could do those things using some proprietary graphical modem software and a bespoke graphics/interaction language whose name totally escapes me at the moment. It wasn't BASIC.
But, you know, you needed an Amiga to use it, and almost nobody had one.
..( a google search later and )..
oh hey, here it is
At least in Europe, I can assure most people that could buy computers mostly had an Amiga or Atari ST at home during the 16bit days.
Our main interests were games and demoscene related (assembly programming and pro-tracker).
I'm only pointing out that the c64 had networking capabilities -- because he said it didn't.
You're being exceedingly defensive and argumentative in this thread.
and no, YOU'RE being extra argumentative in this thread.
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.
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.
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.
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.
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?)...
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.
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/)
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.
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...
I don't feel sorry for anyone who hasn't had to work with relational databases.
The problem with relational databases is that constructing queries for anything but the simplest operations is incredibly counterintuitive, and easy to screw up in subtle ways. Then, the data you get out is usually nothing like the actual structure you need, so you have to process it and squish it into the shape you want. The common results I've seen of this are 1) programmers writing loops to execute simple queries that they can understand, and 2) programmers writing insanely inefficient or totally broken complex queries. And that's assuming that the database was designed correctly (or even sanely) in the first place.
And yes, you can use an ORM, but then it becomes even more questionable whether you're getting any sort of benefit over NoSQL.
The crux of the problem is that the standard-issue persistence mechanism for web development is something that superficially appears to be accessible via ordinary programming knowledge, but actually turns out to have been developed by a long lost Martian colony whose technological evolution followed a radically different path from our own. MySQL is not something you should jump into without having at least read a book on relational database design, and that's a step that many programmers clearly do not take.
Current NoSQL solutions clearly have their problems too, but from what I can tell, they don't seem to be insurmountable ones. And at least it's a step in a new direction, even if it's not quite the right one. Bad database design and use is a plague, and it's pretty clear by now that education alone isn't a practical solution.
Funny to see younger developers rediscovering this type of tooling that was killed by C and VM environments.
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.
But are you sure it isn't nicer to just complain? It's certainly easier! ;)
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?
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.
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.
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)