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.
Errorhandling and exceptions are great, because they don't ignore errors, but force you to deal with them. Javascript just runs and you never know the correctness of the state.
Have you tried to use strict? That should turn more silent failures into the "error handling and exceptions" that you prefer.
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...
Remember when checking the "block popups" box actually worked? there is these annoying new kind of javascript popup that doesn't technically open a new window but just takes focus of the browser and puts itself over the content, actually worse than a old style popup! can't browser block this crap? and even the "old school popup" is making a comeback...why are browsers no longer able to stop sites from opening new windows? i'm sure there are plugins that can do it but why should i need a plugin when most browsers claim to "block popups"? what's next blinking text making a comeback? also, how is it that those circular javascrip dialogs "are you sure you want to leave the site?" that go in a circle and make it impossible to close the window should be easy enough to block but for some reason i get stuck with those regularly enough which requires me to open a console and kill the process. The continued rise of javascipt wouldn't suck so bad browser would actually stay on top of blocking the garbage.
Knowing the internals of the JS optimizers leaves me unable to think of JS being "progress" as compared to stronly typed, imperative languages.
Rather the word "clusterfuck" comes to mind.
Frank Gerlach (see my other posts here)
End of story.
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.
It's sad we're still using a single client side language instead of having the option of running bytecode in the browser. Obscurated JS is just as difficult to read as bytecode, and the browser can also have an automatic bytecode to text "viewer".
Browers should get behind pNaCL or something similar.
You are wise and correct. A master programmer understands his place within the Tao.
http://www.canonical.org/~krag...
"Though a program be but three lines long, someday it will have to be maintained.''
Javascript is certainly leagues behind many other languages in terms of ellegance but it has one overwhelming advantage. It's the only option on the client that is generally supported. The javascript juggernaut rolls on because we can't write modern web applications any other way. Since most developers are getting forced into writing their client application almost entirely in javascript, it isn't too much of a stretch to throw in node and mongo to take it full stack, the performance and ease becomes pretty compelling at that point.
that has nothing to do with the security exploits, privacy invading and cpu wasting marketing technology, very low bar for coder proficiency that the rubbish known as javascript enables.
you can easily have sql injections in your c or c++ code if you are lazy.
Not if your SQL API only accepts parameters of type "sql_safe_string" (or whatever you want to call them)
sql_safe_string would be like std::string but all assignment to it will run the string through a sanitizer.
Passing any other type of string to the API would give an error when you compile the program. The compiler doesn't have a bad hair day or need you to be constantly alert in case a std::string slips though.
(PS: None of this applies to C, obviously, and your continued grouping of C with C++ is revealing...)
No sig today...
Heh, the database version of the recent computer sciences grad that applied for a position and was sure he could write a better compiler for us. Probate Court, K.C., IBM mainframe. He took a walk as well.
No idea why you say none of this applies to C, this can trivially be done there too.
Nobody here seems to be talking about the hacking and vulnerabilities that JavaScript brings to the table. Even slashdot had an article about what some security researchers are seeing - and they point out that JavaScript is part of the security problem. As more hacks like Target, Neiman Marcus, Yahoo and many others come to light, then the role of JavaScript in the hacks will also come to light. The general public will respond with a push towards more security conscious behaviour and JavaScript will be out the door.
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/
But Node.js allows only threading without a shared address space.
This means that in order to communicate between threads, you must serialize all your data (!)
Think about the overhead...
If Pandora's box is destined to be opened, *I* want to be the one to open it.
Ruby Is Smalltalk Minus Minus
That's a good story. I've had similar experiences. For example someone who was creating extensions to .pdf to essentially reinvent PostScript.
And hating every minute of it. I have as much time in as anyone, and I am thankful for people who think outside the box. Heck, free software and linux are "hip" and the only thing that kept MS from gobbling the world.
The non-hipster people wrote OS/2, and maybe it was fine, but it was stagnant and smelled that way. So thanks for your opinion, but I will still give props where they are due to the girl with the glasses and the guy with the fedora hat.
Thanks.
But it is FAST AS HELL?!
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/
What if one needs joins?
You mean, scorned by anonymous cowards who haven't learned a bit of the language? Yeah, sounds about right.
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.
Says the anonymous coward.
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
Seriously, does it really matter anymore? You want to write in JavaScript? Do it. You want to write in something else? Most other languages can be compiled down to Javascript without any major performance penalties. Basically, these days you can do whatever you want in whatever language you want, so what does it matter in the end?
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!
So don't use Javascript. Treat it like assembly and write it in something else like C++ that gets compiled down to Javascript.
http://noscript.net/
But it still is a bit of a kludge, compared to your broader insightful point. Chrome has something similar, but I don't think it is as good.
A 21st century issue: the irony of technologies of abundance in the hands of those still thinking in terms of scarcity.
Do they know what denormalizing is?
No sig today...
Please be specific. We already know you don't like them. The question is: why?
Because they trade away everything good computer science strives for in exchange for being easy to type and so that uneducated people can call themselves programmers without having to educate themselves. It's Visual Basic and Excel Macros all over again.
No sig today...
Realistically you use what your PHB decides and that is usually ado.net or some Oracle api. My info might be outdated by this sql_safe_string stuff is not part of SQL Server or Oracle and therefore doesn't exist in the eyes of the business world.
My bad. The "SQL" example required you to follow a link and read something.
It's not about SQL, it's about how weak languages lead to problems like (for example) SQL injection vulnerabilities. Read the page and weep over the method being proposed to "solve" this program.
No sig today...
Please give this language strong types. When you have megabytes of code and thousands of functions you can not rely on run time type checking. Its just too dangerous to do that.
http://michaelsmith.id.au
It's the QWERTY of programming languages: you can't toss it because everyone would have to toss it at the same time for the transition to work, and that requires either sorcery or an apocalypse.
Table-ized A.I.
"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!!"
You don't have to use Oracle's paid version. Almost all you're getting for your money is tech support. (Well, maybe a BIT more, but not much.) MariaDB is plug-and-play compatible (plus some enhanced features) and is free and open-source.
"NoSQL does not mean no sql. It means not only sql. For quick webscale performance you need low latency in the milliseconds."
You mean "for quick, massive-scale performance". Lots of modern, large web businesses use MySQL or PostgreSQL and have no complaints.
And yes, "NoSQL" does mean "no SQL". It is not appropriate to say "SQL is not designed for this", because SQL has nothing to do with that. You were referring to the database engine. SQL is just a query language and has about zero to do with the database engine. But in general, by popular usage, when most people say "NoSQL" what they actually mean is "non-relational", like for example key-value data stores. But while most "NoSQL" databases are non-relational, using "NoSQL" to mean non-relational is just plain technically wrong. I admit it has been a popular thing to do, but so what? Astrology is popular too.
"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."
Anybody who is trying to design for genuinely "big data" on a "shoestring budget" is an idiot. Amazon is big data. Ebay is big data. Joe's Surplus Warehouse is not big data. If the company becomes wildly successful, it might get to BE big data someday... but for the vast majority of startups, a relational database works just fine.
All this was part of my point: while non-relational databases might be all the rage, their actual justified use-cases are relatively rare. I can easily find you lots of articles by folks telling everybody how their decision to go with a non-relational database turned out to be a very bad decision. But then you can find them yourself easily enough.
Fads are fads, and recognizing them when they come around is a learned skill. Nobody is perfect at it, but getting caught up in one can be costly.
"Because they trade away everything good computer science strives for in exchange for being easy to type and so that uneducated people can call themselves programmers without having to educate themselves."
That's not really an answer. It's as vague as the GP to whom I was replying. What "things"?
Using Ruby as an example (because it was already used here): please explain what "things" it trades away? I am not aware of any. Not counting raw performance. That is one of the mentioned "known issues" with dynamic languages.
But what else? I am interested to know what "things" these are.
I had something like "NotScript" for Chrome in mind as opposed to Chrome's block all JavaScript option. But "NotScript" for Chrome does not have all the same features of NoScript (which inspired it) for FireFox. Related: http://hackademix.net/2009/12/...
A 21st century issue: the irony of technologies of abundance in the hands of those still thinking in terms of scarcity.
Lua: http://kripken.github.io/lua.v...
"Lua is implemented in portable C. It is possible to run C compiled to JavaScript at speeds approaching that of a native build (using the asm.js subset of JavaScript), which means that you can in principle run C code that happens to implement a VM at high speed as well. Of course this is theoretical until it is actually attempted - that is the point of this project."
A Sql.js demo: http://kripken.github.io/sql.j...
3D, just amazing Doom-clone: https://developer.mozilla.org/...
"BananaBread is a 3D first person shooter that runs on the web. It takes the Cube 2: Sauerbraten engine, which is written in C++ and OpenGL, and compiles it using Emscripten into JavaScript and WebGL so that it can run in modern browsers using standards-based web APIs and without the need for plugins. The project has several goals. First, to serve as a testcase for running a demanding 3D game in browsers: Having a working testcase lets us try out new browser features and to profile performance in order to make browsers faster. Another goal is to prove that games of this nature can run in JavaScript and WebGL, which many people are skeptical about. Finally, all the code in this project is open (and practically all the art assets), so others can learn from this effort and use this code to create their own browser games. The latest update of this demo uses asm.js for additional speed, and WebRTC for multiplayer."
The author's GitHub site, where there is a tool to compile LLVM output like from C to JavaScript: https://github.com/kripken
https://github.com/kripken/ems...
By others (MineCraft-like): http://voxeljs.com/
It's been said JavaScript is much better than we deserved... It's great to see all these advances. And I think you are right, the next two years will see the further spread of all this.
My own JavaScript experiments towards a social semantic desktop, with the idea that you could have a simple backend and do most of the heavy lifting of processing and displaying information locally in the browser.
https://github.com/pdfernhout/...
A 21st century issue: the irony of technologies of abundance in the hands of those still thinking in terms of scarcity.
Actually, Ruby's not a bad language. Though I'd avoid Ruby on Rails like a plague ridden rat carcass.
I once interviewed for a job at a company that made a compiler. They claimed to use techniques borrowed from holography to make their compilation better and faster. They even had a laser lab in the building, and I am not making this up. But I could never get any actual information about what this actually meant without an NDA... Half of me thought it sounded interesting, and the other half thought it was snake oil, and I was never really sure.
In motion pictures, each frame is displayed for 41.7 ms. How can lip sync even be expressed to a precision of less than one frame?
I use JS as a carpenter would use his hammer...
And most posters here feel that, to paraphrase the old saw about C++, "When JavaScript is your hammer, everything looks like a thumb."
Because "Web Developers" can't code, since they don't use the Holy C.
:-)
Of course one might also consider that "Web Developers" might actually be able to code better than those that "strive for all that is good about coding" since they have to deal with the bullshit that is HTML+CSS and get work done
My favorite usage of C was LPC via DGD. A technically interpreted "Object" C language. It was very elegant compared to many languages that were "invented" to run crap with html. I always felt it was a downright shame that DGD/LPC didn't find that niche. I don't think there would of been a need for JavaScript, PHP, and possibly many other languages that were created (primarily) to deal with HTML.
"[5, 10, 1].sort();"
You are going to throw down a basic sorting issue as a reason to hate JavaScript??? JS sorts alphabetically. Big deal. Frankly I think one of the biggest problems with JS is teaching people about prototypes and prototype chains. It can be a serious mind fuck for everyone from newbies to experienced programmers who have spent their lives coding in say, C++. I've had better luck teaching binary to six year olds.
Also...why is everyone hating on Rails so bad? It's been fantastic in the few places I've deployed it.
SlashDot?
I started on 6502 and I've been coding for 35 years. I love javascript and have written 100s of thousands of lines of javascript. I don't really need it to change to get useful things done with it.
perl -e 'print join(", ", sort(1,5,10)) . "\n"'
You were saying...? :)
Il n'y a pas de Planet B.
I hope not. I consider myself a rabid Julia fan, and for the past month I've been doing mostly Julia daily. But I don't want to see the language get dumbed down in order to accomodate general purpose programming, as it's proved to be stellar in what it's made for: numerical/technical computing.
Democracy is for the people; you only vote once per season and we'll do the rest of the work for you don't have to.
That's a little harsh. Javascript, as as language, isn't *that* bad. It's got plenty of annoying things, and plenty of warts, but as a language, it's workable with.
The problems you mention are mostly solvable. "use strict" solves a bunch of them, and then use jslint (or similar) to catch the bugs your compiler normally would.
If you really want a compiler, and to get away from some of JS's more annoying bits, then switch to coffeescript (which compiles to JS).
The meaning of words are defined by their popular usage, while the correctness of astrology is determined by whether its predictions are correct to a statistifically significant degree, therefore your analogy is false.
Forget magic. Any technology distinguishable from divine power is insufficiently advanced.
The meaning of words are defined by their popular usage, while the correctness of astrology is determined by whether its predictions are correct to a statistifically significant degree, therefore your analogy is false.
The meaning of words is eventually determined by popular usage. But it doesn't vary as much as you seem to think.
It is quite possible -- even common -- for popular usage to be different from the technical meaning of a word.
Even though current popular slang may say otherwise, NoSQL means "No SQL". Non-relational and "key-value store" mean non-relational. They are NOT the same things.
Further, my last sentence was not intended as "an analogy". It was simply an observation that popularity does not indicate correctness.
for killing the browser plug-in. It's not that javascript was a good option. It's the ONLY option.
Sounds like you're saying you were a coder before being a coder was cool. Typical hipster attitude...
It gripped her hand gently. 'Regret is for humans,' it said.
You sound very threatened. Like those Java devs (not all Java devs, but I've run into lot of these guys) that they've been producing by the metric ton for about oh, twenty years (or decades if you wish) who deeply resent having to learn anything new after graduation. As any JS dev can tell you, that's a really bad hangup to have in web technology, which I'm sorry to report to you has started to touch on just about everything.
You really don't need a compiler or static types to write decent maintainable code and believe me, I've seen enough Java and C# code bases from hell to tell you that they certainly don't protect from writing complete procedural spaghetti horseshit wrapped in meaningless classes either. If people would just be bothered to understand what the whole point of OOP was in the first place, they wouldn't sweat the lack of a compiler when doing anything non-trivial in a different style of execution environment.
Have you ever learned a lisp-like language or gotten very far with C#'s first class functions? If you haven't, give those a whirl and then come back to JS and stop throwing tantrums every time it doesn't behave like Java or C or C++ just because it looks like them.
I don't know about you but I won't be trusting anybody to maintain their down-compiler as JS continues to evolve. That would be short-sighted to say the least.
Speaking as a JS dev who's had to put with some pretty ugly Java, I'd be happy if the average Java developer would content themselves with simply actually understanding what OOP is supposed to do for them rather than assuming that the 18-method-calls-to-retrieve-some-static-data-for-a-basic-web-service mess they've made is actually OOP just because it's all wrapped in classes by default.
For cross-platform desktop OS apps with node handling the file I/O and JS and web technology handling all UI concerns inside a window. Only the Python community does cross-platform as well, IMO.
I'm sorry, but the whining in this industry is getting pretty epic. Learn the !@#$ing tool. It's not Java or C#. You CAN write maintainable code without static types. JS and Python devs have been doing it for some time now. And believe you me, it would really help C# and Java devs with their primary languages if they learned how to.
I would actually disagree with the statement that it's paradigm free. While I respect C# as a feat of language design, one thing I don't like about its implementation of every language feature it can get its hands on is that it doesn't have a very strong opinion and there's just a crap-ton of syntax you have to learn as you work with it (although given the alternative I'd rather have first-class funcs in any language at the expense of bonus syntax). JS encourages OOP and functional used together and has strived to do a lot with a little syntax. Strictly imperative isn't really possible if you're using it for web UI as much of the DOM relies on event handlers and you can't really escape the topics of closure or OOP when you start doing non-trivial stuff from there. Functions can be classes or methods or in many cases both.
JS sorts alphabetically. Big deal.
It is kind of a big deal when the common sense dictates that it should work otherwise, and every single other language gets that right.
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.
Sure there's a concept of privacy –simply don't let the compiler see the private stuff (i.e. don't put it in your header), and of course there's a concept of encapsulation – it's called writing functions that accept a data structure as their first argument, and only exposing the public ones via headers. C actually does a much *better* job of privacy and encapsulation than C++, as C++ requires you to write about private implementation details in public places (the header).
You also couldn't do things like implicit conversions to sql_safe_string to make it more friendly (assuming you want that).
You certainly can't do an implicit conversion, no. You can of course do an explicit one, but this is true of C++ too, and of course the programmer is a moron if they do this.
(And Joel is still wrong and Javascript still rubbish, which is more important than starting a C vs. C++ thread...)
Agreed, this is literally the example I use to demonstrate to people why they want a more strongly typed language than the one they're using. People seem not to realise that the type system can prove a lot more things than simply "you're passing a boolean to that if statement", and when exploited correctly can be made to prove some seriously important safety properties of your program. Another example that I use (which is very similar) is having a file transmitted over the network, and requiring verification that the file is actually valid, and is not giving all kinds of crazy values we don't expect, and may crash us. We can then trivially use the type system to prove that that verification actually happens before doing any real work with the file.
Some suggest the idea of a database is against the very philosophy of OOP. Databases tend to be attribute-centric, where-as OOP tends to want custom behavioral wrappers around each object: you don't "share verbs" in OO unless an object wants to.
If each object has its own little interface, then you have no standard database operations that apply to all objects, at least not without some sticky compromises. Databases are essentially about standardizing operations on things/entities/objects. OO doesn't like that: each object is "special".
Table-ized A.I.
Whose common sense? Someone that is so thoroughly entrenched in their ways that they are unable to embrace change? Please.
Common. You know, that's why it's called "common sense".
There's nothing wrong with change in principle, but only when the change achieves some positive objective, not change for the sake of change. In this particular case, sorting numbers as if they were strings is 1) a change, that 2) serves no useful purpose, and 3) is actively harmful. Why would anyone want to embrace that?
There are a finite number of ways to improve things. There is an infinate number of ways to make them worse. People who pick something at random and expect the change to make things better, do not have a good "track record" !