What's the deal with MongoDB and the node.js community? I don't find non relational databases that enticing and there are javascript drivers for postgres [1].
Probably because mongoose is so well written, it feels inferior to use another kind of ORM library. I'm guessing nobody has written something as good as the activerecord library in the ruby world for node.
I mean you're kind of trying to say "Why not X?" The answer is X would probably work fine, but Mongoose got there first, set the standard, has lots and mindshare, and is very well written and tested.
Could most everyone use D instead of Go or Java? Yeah, probably they could. Is one significantly objectively better than the others? Probably not.
I've used Mongoose extensively and it just works. It feels really idiomatic and has a lot of love in the community. I don't have a reason to look anywhere else.
what he meant (i think) is use MongoDB in a lean manner - which is to say, try to get something off the ground, and if it takes off, switch to the most appropriate DB then (which might be Mongo).
JavaScript "developers" feel the need to not use any other language than JavaScript, so they decided to shove it into as many unnecessary places as possible, even if their code more frequently ends up being an unmaintainable mess with no noticeable performance gains.
You are so right. Why try new things and test new ideas. Everything we have is perfect as it is! No need for a car, walking will get you there! We don't need moving pictures, books are fine!
Do you even know anyone that works in Javascript? I happen to like JS but pull out PHP or Python or whatever I need to get the job done when I have to. And I'm not an exception.
I've seen your flawed argument used more and more often around here lately. It's pretty disappointing to see.
Somebody speaking out against deeply broken technologies or bad ideas that have received a lot of hype lately does not mean that such a person "hates progress" or is "resistant to change" or any utter nonsense like that.
Likewise, adopting so-called "new ideas" or "new technologies" does not necessarily mean that real progress is actually being made. JavaScript and NoSQL, for example, are generally regressions in most respects, even relative to 1990s- or 1980s-era technologies.
True progress happens when we move beyond our current abilities. It is not progress in any sense when we start using inferior programming languages or databases, for example.
I always seem to see you in any thread involving "new" technologies that you find "inferior", most of which are not very new and, like all technologies, are tough to put on a precise inferiority/superiority scale in an objective context-insensitive way. I'm beginning to move past annoyance to pure curiosity - why do you care so much what technologies other people find useful? In what way does people's enjoyment of Ruby/Rails, Javascript, NoSQL, etc. harm you so much that you have decided to come and be nasty any time anybody speaks positively of them?
Software doesn't exist in a vacuum. It often has a lifespan far in excess of the involvement of the original developers. It can also have a very serious impact upon its users, its subsequent maintainers, and any organizations they may belong to.
I could not care any less if hobbyist developers want to use Ruby on Rails, JavaScript and NoSQL for own their personal projects that nobody else ever uses or has to maintain.
It's a different situation when such objectively-flawed technologies are used beyond that, however.
The broken software you or others write today using such horrid technologies may very well end up being inherited and maintained by me or one of my teams later on. We won't be happy when we have to waste time, effort, money and opportunity dealing with it and its flaws.
There are numerous, far better options out there. There are just no excuses for using poor technologies these days.
Your goal of seeing higher adoption of technologies you like and lower adoption of those you don't makes sense but your approach is misguided. I rarely see you speak positively of technologies you like, rather than negatively of those you don't. I rarely see you reasonably describe the shortcomings of technologies you don't like from a place of apparent expertise, rather than making ungrounded categorical statements ("hobbyist", "objectively-flawed", "horrid", "poor") about technologies that it doesn't seem like you have bothered learning about in any depth except that necessary to confirm your biases.
Plenty of people would prefer to inherit my broken software using horrid technologies than your broken software using different horrid technologies, and vice-versa. This unnecessary us-versus-them-ism in technology drives me crazy.
I can tell you why I dislike programming in JavaScript (those aren't necessarily faults of javascript itself):
1. Complex code usually contains some horrible callback spaghetti, which is not pleasant to debug at all.
2. General flakiness, or, as I call it, the "WTF happened?" syndrome. I run into this all the time. Change or add something - suddenly you find the web page broken. Okay, so there's a bug somewhere. Click developer tools - console... blank. No error messages, nothing. Just you and the broken web page. Just the other day I was trying to integrate a select2 input field into some angular.js-powered page and ran into all kinds of weird issues. But why does it even have to be a problem? Why can't I just stick a new control into a web page with a click and maybe a few lines of code? Hey, remember those things called "Visual Basic" and "Delphi"? UI programming with these was a blast, all the controls looked and behaved the same across all applications. And then there was ActiveX. The idea behind ActiveX is almost futuristic compared to the shit we have to put up with.
3. Type system. Made a typo in a variable name? Bad luck, Javascript will introduce a new variable and you'll have fun chasing a non-existing bug. Oh, look, here's a function: "function foo(param)". I wonder what does it do? Unfortunately, the previous maintainer has not left much comments, so now I have to dig through the implementation to find out what the parameter should be and what values the function may return.
These are my main issues with javascript. I hope sometime in the future we'll throw out the whole Javascript/HTML thing and start writing web application front-ends in a language that is more geared towards UI programming. I can imagine having a nice declarative language (instead of HTML) to describe what the interface looks like, and a statically typed imperative scripting language to describe UI behavior. It would also be awesome if these technologies allow for painless integration of independent UI components (a bit like ActiveX controls). But those are just dreams...
I hear you. I have extensions to your points and disagree here or there but, in general, all your points come down to the same thing: the developer toolchain for JS really frickin' sucks.
Web development is a pain. Web developers have to deal with at least five separate technologies to get anything non-trivial to show up on the page. HTML, CSS, JS, server-side language, persistent store. Each one brings its own config languages or preprocessors, maybe some kind of build system, and, of course, mo' tech mo' problems as they say.
(An aside: I think select2, specifically, is really beautiful and an absolute pain to actually use with any other framework in real usage)
There's some truth to the argument that JS development is merrily rediscovering development methodologies pioneered decades ago:
1. "Yay! With RequireJS I can do real dependency management!"
2. "Did you see that article on how to do conditional breakpoints in Chrome dev tools?"
3. "Using type annotations in the Closure Compiler let you add some kind of type checking!"
All that said, it is getting better:
1. Always use a linter. JSLint if you wanna cry, JSHint otherwise.
2. Callback spaghetti in JS is equivalent, in my mind, to cryptic one-line pointer arithmetic in C/C++. It's a symptom not of the language itself but of the programmer's hostility to future maintenance.
3. Declarative widget-y tech is the future of web front-ends: between AngularJS directives and the evolving Shadow DOM specification (to name two), we're moving in the re-usable component direction.
We're never going to throw out JS. Ever. Every browser vendor would have to simultaneously switch to some staggeringly amazing technology all at once as well as convert all the old browsers as well. It's not going to happen.
JavaScript, if measured by installed runtimes, is the most popular, wide-spread language on the planet. Count the devices in your home that can run JS. That's its true strength, I think.
It isn't necessary for everyone to switch to something new at once. If one big browser accommodates a different language, someone will use it. If it is popular, it will be adopted more broadly.
Not to mention, it can be compiled to javascript at first, for backward complatibility. Actually, Google's Dart comes to mind, but I haven't really used it to make an informed judgement about it...
The problem with javascript and the tooling related to it isnt something to do with the existence of great tools. Ofcourse, tools that are pretty mature and really good, as found for other languages dont exist for javascript ( like the tooling for java for ex ) but that doesnt mean there is nothing out there.
I use Intellij and I have noticed that I dont do any mistakes likes missing commas, accidental global declarations etc because my IDE ( intellij ) tells me about them. It infact corrects me when I make any such mistakes. The real problem is with people still using simple text editors to write javascript code because they dont think there is any advantage of using a full fledged IDE which does anything , because they think that there is nothing out there which actually helps.
The numerous flaws with JavaScript (the programming language) are well-known and well-documented. A few search engine searches should bring up ample information.
As for its "greatest flaw", I think that may be the JavaScript community, and the general attitudes within it.
There is, unfortunately, a very high degree of ignorance within the JavaScript community. There are far too many JavaScript programmers who only know JavaScript, or an equally-horrid language like PHP. Having such a limited world view, they don't realize how inherently bad their tools are, and they don't realize how much better they could be.
This ignorance has many side-effects. One big one is that we see a near-complete lack of improvement of the language itself. Any changes that have happened never really address any of the serious flaws with the language.
Another side-effect is that we see JavaScript used in ways that it shouldn't be used, in places that it shouldn't be used. Large browser-based applications and server-side applications (of any size) are two good examples. Asm.js is another. Emscripten is yet another.
There are various other issues with the community, their attitude, and their ignorance, too. We could go on for a very long time about this.
The JavaScript community ends up earning a lot of animosity, if not outright scorn, from those developers who have experience with many programming languages, and who have spent years, if not decades, developing production-grade software in a much more sensible, proper manner.
I don't think that anyone would really care if JavaScript users used it solely as a hobby. But the moment they try to use it professionally, for real-world software systems, they'd better be prepared to defend themselves and their technological choices. They can't bring their amateurish programming language and ignorance to the table and not expect to be treated harshly.
You haven't outlined any points here about the language. I don't want Google to tell me what other people think its flaws are, I was asking you what in your experience are its flaws. Looking at your past comments on HN, you seem to leave comments like this a lot.
I guess I'm looking for lists like this:
C/C++
1. The preprocessor allows for horrid misuses with a broken "macro" system that doesn't deserve the name compared to Lisp's.
2. The preprocessor #include system makes compilation slower and more complicated. So much so, in fact, that Google invented a language, in part, to get around it.
3. Dynamically linked libraries are a joke that have no real use in production software.
4. The language syntax is complex enough that creating good parsers for it is extremely hard leading to bad error messages in most compilers.
Why do you think that the flaws that I've personally experienced with JavaScript differ from those that others have experienced and already documented? The flaws are there regardless of who is using JavaScript.
I'll list some of the most obvious and serious ones for you, since you seem incapable of finding this basic information on your own:
- Its type system is horribly broken.
- Its scoping is horribly broken.
- Its comparison operators do not behave sensibly.
- Its prototype-based OO system is impractical, and quite poor compared to other prototype-based languages.
- Its lack of class-based OO leads to awful hacks using its awful prototype-based OO functionality.
- Its lack of support for proper modules and namespacing makes large-scale software development tedious.
- The fact that something as obviously-dumb as semicolon insertion is even conceived of and supported in the first place.
- It's so rife with other bad language features that one of the most widely-respected books about it, Crockford's "JavaScript: The Good Parts", is all about not using large parts of the language.
- Its standard library is extremely limited, and what does exist works quite poorly.
- Its tooling (editors, debuggers, profilers, etc.) is lacking in many respects, and is often entangled within web browsers.
- Its performance is lacking.
- Its community is generally inexperienced and incompetent, and produce a lot of very bad code.
- There's little evidence that things will improve in the future.
While other languages have flaws, none (aside from maybe PHP) have as many utterly stupid, unnecessary and unjustifiable flaws as JavaScript does. And at least these other languages make some real effort to eliminate such flaws, as well. We just don't see that from the JavaScritp community.
Nonsense. There's a huge, and very obvious, difference in the overall level of experience, ignorance and competence within the various programming language communities.
The JavaScript, PHP and Ruby communities have an abundance of ignorance, often due to a severe lack of experience. These are the most-hyped languages, and the ones that new developers often flock to. It's quite obvious why so many bad decisions (like using these languages in the first place, or using NoSQL databases) and so much bad code comes out of these communities; their members often just don't know any better, and often aren't willing to learn.
This is much less of an issue within the communities that attract experienced and competent developers. We're talking about C, C++, Python, Haskell, Erlang, Scala, and even Java and C#. Thanks to the wider and deeper experience that the developers in these communities tend to have, we see far fewer blatantly obvious mistakes being made. That's not to say they don't happen; they do. But the quality of the software that is produced is generally much better than what we see produced by the JavaScript, PHP and Ruby crowd.
It's easy to pretend that these very real differences don't exist, but the reality is that they do.
The opinions of one who writes "Javascript 'developers'" are probably not worth knowing. Javascript has stupid scoping rules, and some other obvious flaws, but it's not flawed as in unusable, and it's certainly not flawed as in "'developers'".
The problem with your argument is that those who know programming languages other than JavaScript end up seeing its flaws extremely clearly. Such people won't willingly subject themselves to something that is so inherently broken, especially given that they're aware of the alternatives. Many would feel quite ashamed to associate themselves with it in any professional manner.
Some of us want to get things done rather than sit in an ivory tower being pompous. The notion that a person is not a developer simply because they expanded their knowledgebase to include a language you dislike is asinine.
Plenty of people who know multiple languages use Javascript every day. Of their own free will. Because they want to.
What is it about JS that you find so broken that you have such animosity?
I for one know C, Perl, PHP (not just Wordpress either) and even Coldfusion. I'm currently learning Python because I want to.
And I chose to work in Javascript as my main language because I want to. I have no real issues with scoping, am comfortable with the fact it has no 'class', have a good handle on the fact that everything (including functions) is an object.
It is flawed? Yes. But then again there isn't a single language in existence that isn't.
is the "developers" dig really necessary? MongoDB is fine-- at least until you start seeing significant scale, and even then, it's going to run into the same issues as everything else would if you hit it too hard, too often.
Just because the query language is JSON-esq and has a javascript shell, it's therefore "Javascript" and a target of derision and scorn?
I'm not sure that Rust is really a good example. While promising, the language itself and its standard library are still immature and subject to a huge amount of disruptive change on an ongoing basis.
I've had some experimental code I wrote in Rust become essentially unusable after only a few months due to significant language and standard library changes. I sure hope that somebody wouldn't spend time on a PostgreSQL library for it until the language itself becomes more stable. They'd be wasting a lot of time and effort if they did try to write such a library now.