The JavaScript Juggernaut Rolls On
JThaddeus writes "An article in TechWorld Australia summarizes the latest opinions on JavaScript from ThoughtWorks: 'There is no end in sight to the rise of JavaScript... "I think JavaScript has been seen as a serious language for the last two or three years; I think now increasingly we're seeing JavaScript as a platform," said Sam Newman, ThoughtWorks' Global Innovation Lead.' The article touches on new additions to JavaScript tools, techniques, and languages built on JavaScript. As the fuller report (PDF) says, 'The ecosystem around JavaScript as a serious application platform continues to evolve. Many interesting new tools for testing, building, and managing dependencies in both server- and client-side JavaScript applications have emerged recently.'"
Great... more single-core-hogging fun ahead...
Is the word "platform" officially over? My fucking toaster is a bread-browning platform.
Breakfast served all day!
Why don't browsers come with a generic scripting engine (in addition to, or replacing, the JavaScript virtual machine) that runs some sort of intermediate language a la .NET CIL, or LLVM IR, etc.?
Then we could use pretty much any scripting language we wanted with the content.
Why do the worst technologies that are just barely able to solve the problem always make it? Is the developer community collectively really this stupid? I fear it is...
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
I just started on a web project that is heavily javascript (even though it's an ASP.Net app). It feels like I stepped back in time 10 years. I'd have code not execute. Why? Some error somewhere in the code that was ignored. I had a typo on a property set somewhere else. No error. Why? Because javascript created a new property with the typo and set *that*. And every change requires me to run the app to see if it works, because I don't have a compiler to check the basics out ahead of time. And then, because I'm debugging an app in one window, when I'd open a new one to read the news, I'd hit other, non-ignored errors on those pages (advertisements) because 90% of commercial pages these days have error-laden javascript because people rarely check for error conditions. Horrible language.
In my 35 years of professional programming, getting good at dozens of languages, I've only run across 2 I've actively disliked. Javascript is one of them (tcl was the other). JS is a crap language that IMHO can't be fixed. If they ever add an honest garbage collector to the base language then most programs will delete themselves upon execution.
...a programming language (still) doesn't have to be good in order to see widespread use.
single-core-hogging
I don't see how that needs to be the case. Everything except IE pre-10 supports Web Workers. Firefox is moving toward the process-per-tab model popularized by Chrome, and the refactoring project is codenamed Electrolysis.
Arguably, it should have been Python, which is a better language. But Python has a problem. Python's little tin god, Guido von Rossum, is in love with his own implementation, CPython. CPython is a naive interpreter. (A "naive interpreter" is one which does the specified operations in the specified order, with little optimization across operations.) In CPython, everything is a dictionary and a lot of time is spent doing lookups. This allows everything to be dynamic. In Python, one thread can patch objects in another thread while both are running. Objects can gain or lose elements on the fly. Even running code can be "monkey-patched".
The price paid for that excessive dynamism is that a Python compiler is hard to write, and an optimizing Python compiler can't optiimize much. Google tried in-house to make Python faster, and their "Unladed Swallow" failed humililatingly. (A different group at Google then developed Go, aimed at the same problem of producing something good for server-side processing.) The PyPy crowd has tried, hard, to make an optimizing Python compiler, and with an incredible amount of complexity under the hood, has made considerable progress, but not enough that PyPy is used much in production.
Pascal went down for a similar reason. Wirth was in love with his elegant recursive-descent compiler. But it didn't optimize, couldn't handle separate compilation, and had no way to handle errors other than aborting. Python seems to be headed for similar irrelevance. It hasn't even been able to replace Perl, which ought to be as marginal as "awk" by now.
Read the essay "Worse is better" and you might understand more about what causes this
Why are some developers obsessed with performance? The user probably isn't. They don't care whether something loads 2 seconds quicker
I thought loading faster was the difference between the user staying on a document and the user hitting the Back button to return to someone else's document. Web search engines have recognized this and have started to penalize slow-loading documents.
I'm kind of surprised that there is not one good comment about the benefits of javascript up above this yet. I mean you can off load sooo much data to the client cpu. With the latest in webstorage and the sqlite port to JS I can actually create a friggen database server running on the client. WebRTC and WebSockets are seriously about the change everything in the next 1-2 years....I'm curious how many of the above posts are done by folks who actually do web development? It is pretty much indispensable these days, and really pretty awesome, so get used to it.
neorush
Platform is the wrong word. Something like node.js might be considered a platform, but not JavaScript itself. JavaScript is flexible, C-like, has first class dictionaries and JSON makes them super simple to serialize. It's one of those languages whose flexibility can actually be a hindrance because you have end up having to get pretty deep to find the structure ... maybe it is a platform.
[ECMAScript] tries to look like a member of the Algol tree, but its internals behave more like Lisp.
In other words, it implements the original plan for "M-expressions" in Lisp.
My beef with JS is that it is a regression from the time of PASCAL or Ada (or should I say ALGOL ?) where good programs are nicely structured by means of proper data structures.
This means:
1.) Reliability is unecessarily low. You never know how many feet an object in variable "monkey" might have. Usually two and sometimes just one, zero or 312.
2.) Security: A lack of type-safety regularly results in insecure programs. Plus, it is quite difficult to reason about program safety in absence of strong typing.
3.) Hard to optimize: Strongly typed languages result in programs which can be quite easily optimized for execution efficiency. Compare that to JS, where the optimizer has to "infer" "typical runtime type" and then optimize for that "dynamic" type constellation. Of course, exception code must handle the "differently typed corner cases", too.
That implies: Bloated optimizer/JIT compiler plus all the nice zero-day exploits which result from this. Donning my tinfoil hat I would say JS is a godsend for the TLAs.
In summary: JS is a regression from the state of the art of 1970s. "IT" is actually forgetting the great achievements in Software Engineering that resulted in Algol. With JavaScript, computing has gone even further down the path of sloppiness and anti-reliability. Let's face it: 99% of people are in this profession for the love of money, not for the love of constructing reliable and correct systems.
Dipl.-Ing.(BA) Informationstechnik Frank Gerlach
Gäufelden
Germany
As a counter-concept, look at this invention of mine:http://sourceforge.net/p/sappeurcompiler/code-0/HEAD/tree/trunk/doc/manual.pdf?format=raw
One thing I personally like about Javascript is that it covers all three of the currently most popular programming paradigms.
You want an imperative style of development? Javascript can do that, check.
You want an object-oriented style of development? Javascript can do that, check.
You want a functional style of development? Javascript can do that too, check.
Some would argue that by covering so many different paradigms, it ends up covering none of them as well as languages that are designed for a specific paradigm from the ground up, and I wouldn't really refute this point... but it easily does all three of them well enough to still be profoundly productive when developing in any of them, and this means that a programmer is relatively free to pick the paradigm that best models the original problem when designing a solution. This, in my experience, results in shorter development cycles, and frequently much less buggy code.
File under 'M' for 'Manic ranting'
Try this in your favorite console: [ 10 , 1, 5].sort()
You cringe you lose.
As someone who actually has 2 decades in the industry you don't sound like someone with that kind of time at all. Us middle aged folks look at NoSQL and think "Network database" or CODASYL databases are coming back. We weren't attached to Java-EJBs and expected a lighter weight version, Ruby seems like a scripting language...
Stop trying to pretend to be older. Older people saw shit when you were young that isn't used anymore and that's hard to fake.
PEBCAK itself is an example of PEBCAK
It implies that the user is a filter that takes input from the chair to input it into the computer, and does not use the monitor feedback system at all. Go ahead and draw the control flow diagram some time.
Can you be Even More Awesome?!
I think you should stop using computers for a year and meanwhile try to get laid by an actual homo sapiens woman.
Why are you in favor of inter-species mating?
I have decades of industry experience in Silicon Valley as well. And really, your post comes off more as a bunch of whining than an actual critique. There are always going to be new technologies, and the people who are heavily invested in the previous generation of technologies will always groan about these dag-gone kids with all their newfangled ways of doing things. Heck, I've been guilty of this kind of thinking myself.
But you know what? When we entered the industry as young whippersnappers, the previous generation of programmers said the exact same kinds of things about us.
And somehow, despite all that, progress marches on.
People who say "sheeple" have about as much sophistication as an AOL user, and in fact are probably actually AOL users.
"We would truly be better off without JavaScript, without NoSQL, without Ruby on Rails, and without the hipsters."
It's all very well and good to have opinions, but you make some strong specific complaints here without actually giving reasons for those opinions. Many people disagree with you.
What is your problem with JavaScript? JavaScript DOES, in fact, have some very serious problems. For a classic example that was linked to here just yesterday, try
[5, 10, 1].sort();
I happen to share your dislike for JavaScript, but I can give actual reasons for having that opinion.
NoSQL has its problems as well. While for some narrow uses it does offer great performance, if you step outside those narrow bounds even a little bit, you are forced to code many of the functions normally handled by a relational database, manually. I have never had to implement a huge distributed high-performance database, so in my case the NoSQL use-case is limited to very simple local non-relational data stores. But again, I can articulate a reason for not caring for it: the theoretical basis for it is weak, what actually constitute proper use-cases for it are rare, and it creates a lot of manual coding that relational databases handle on their own.
But now we come to Ruby and Rails (which are 2 different things). Yes, Ruby is a dynamic language, with all the (well-known) shortcomings of dynamic languages. But other than that, what do you have against them? Please be specific. We already know you don't like them. The question is: why?
It's not just the hipsters, it's also people like Joel Spolsky - the god of hipster programmers.
eg. I've lost count of the number of times I've seen this article referenced on the web and every time I see it I want to bash his head against something solid.
"Making Wrong Code Look Wrong"? Really? How about making wrong code *be* wrong? How about not having it compile at all? How about an SQL library that doesn't accept unsafe strings as parameters?
If you really want to, you could get the compiler to convert unsafe strings to safe strings on the fly ("implicit type conversion") to avoid having to educate the junior programmers.
All SQL injection problems could be eliminated at a stroke, now and forever. How is possible that people aren't doing it?
They're not though, because that would require a strongly typed language...and that's not fashionable.
Joel also rants endlessly against languages with exceptions (there's some of in that article), fails to grok very basic C++ concepts every time they're mentioned (eg. stack unwinding), but the hipsters worship him as some sort of a guru. /rant over
No sig today...
I started back in 1978 and I remember someone coming in to pitch a database technology in 2006 for which they had patents pending and it would replace relational databases. They kept describing it using catch phrases and turning rows into columns and I just couldn't grasp WTF they were talking about. I finally asked them to draw a picture and they mapped it out on the white board.
I then asked if they had ever read about IMS and hierarchical databases. They had not. I wished them good luck on their patents and sent them packing.
people are learning to turn that rubbish off
OK, *some* of it applies to C.
C can't do it as anywhere near as neatly or safely as C++ though because it has no concept of privacy or encapsulation.
You also couldn't do things like implicit conversions to sql_safe_string to make it more friendly (assuming you want that).
(And Joel is still wrong and Javascript still rubbish, which is more important than starting a C vs. C++ thread...)
No sig today...
But Node.js invented threading and is a webscale and a rockstar language!! non blocking async/IO was invented by javascript. I can get code and can piece it together in parts and run it in parallel. Amazing this was never invented before.
http://saveie6.com/
NoSQL has a great future. The article posted with true ACID will be a blessing.
Here is the problem with a crappy ultra expensive solution from Oracle or Microsoft. It can't scale and prices go up on an expontential basis if you try to make it do so. Zdnet a few years ago put in a price tag for running youtube.com on Oracle's database instead of Google's NoSQL solution. The price tag was almost $8,000,000,000!!
NoSQL does not mean no sql. It means not only sql. For quick webscale performance you need low latency in the milliseconds. SQL is not designed for this. Joins slow things incredible and so do threads with blocking I/O which is the appeal of node.js and ngix that use event driven technologies.
It is nice when you have small data and an employer who already has a license but outside of this for a startup traditional relational databases can't cut it for big data on a shoe string budget.
http://saveie6.com/
If in a room full of developers, I am an "average" developer, but I also tend to approach things logically. I do my research and choose the appropriate tool to get the job done efficiently, with code that is generally accepted by the greatest user base. My clients would not want me to hand them over a product that could not be easily understood and modified by other average developers, "Anyone know a Python developer?", "No, but I know someone that works with Ruby"... In the real world this is incredibly ridiculous. The term "average developer" is also looked upon poorly on this board, and unfortunately, this being 2014, people should not require a 4 year degree to code, code should have evolved enough by now that average people should be able to put words and thoughts into simple code and have it do what is intended. It is the hardcore developers that overcomplicate what should be incredibly simple. A business term, "Where there is pain, there is opportunity", and I hear all of the time, so-called hard-core programmers with their noses up complaining about JS. I come from a world where you do not complain about something without presenting a solution, and of all these posts there is hardly anything worthy of a "solution". Apparently there is a lot of pain towards JS, so maybe one of you smart people should chase the opportunity to build a solution; just understand that no matter how perfect you think your alternative is, if no one uses it, it is useless. I use JS as a carpenter would use his hammer, I don't complain about the hammer, but if one of you smart folk were to build a better hammer that saved me time and money, I would surely use it.
NoSQL is just a cache, except if it gets messed up you're screwed, unlike a cache which can be reinitialized. But if you want to use it, skip the overhead and use BDAM
The problem is JavaScript was only really designed to do small simple things, but just like the shitpile that is X86 it's been extended and kludged in ways that I'm sure the creators never intended or imagined and nowadays it is being used to run game engines, database engines, emulators and virtual machines!
The fact that you NEED a browser with a good JIT to visit JavaScript-heavy pages without responsiveness turning to molasses just shows how out of control things have gone.
It's only because we have such a ridiculous excess of CPU power that people can get away with this; It's bad enough that the web is so polluted with crap that it would take several minutes for the average web page to load over a modem or non-G3/LTE phone, but that we need accelerated or highly clocked CPUs and craptons of memory just to be able to render and run many pages makes me want to scream!