Live data from Hacker News

Mean Stack

mean.io

41–50 of 97 posts

Re: Mean Stack

#41
post #40

Earlier quoted context omitted.

The "developers" dig seems unnecessary. @cuttooth and @PommeDeTerre, since you both are pushing the "JS is a flawed language" angle, what do you find are its greatest flaws?

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'".

Maybe, but dismissing people doesn't sit right with me.

Not to get to Yoda-y, but the anger here is real and deserves some scrutiny.

Re: Mean Stack

#42
post #36
post #23

Earlier quoted context omitted.

Does "everyone you know" have recent experience running Mongo in production? Because I have, and from my perspective calling it "a joke" is borderline trolling. I'm not trying to be hostile, but you've got to understand that Mongo is most certainly not a joke, has lots of support, and is a very appealing option in a number of cases.

> very appealing option in a number of cases. What cases do you have in mind?

Rapid iteration comes to mind (as a result of its lack of schemas). It's also great if your objects are JSON documents, and as such it's particularly suited for uses such as a backend to Backbone.

Those are two areas in particular where I would first look to Mongo.

Re: Mean Stack

#43
post #36
post #23

Earlier quoted context omitted.

Does "everyone you know" have recent experience running Mongo in production? Because I have, and from my perspective calling it "a joke" is borderline trolling. I'm not trying to be hostile, but you've got to understand that Mongo is most certainly not a joke, has lots of support, and is a very appealing option in a number of cases.

> very appealing option in a number of cases. What cases do you have in mind?

Mongo sucks. I've used it in production for millions of people. I would never recommend it ever again. It's convenient, about the same way a hooker is.

Re: Mean Stack

#44
post #27

Earlier quoted context omitted.

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…

[deleted]

Re: Mean Stack

#45
post #4

Earlier quoted context omitted.

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.

The "developers" dig seems unnecessary. @cuttooth and @PommeDeTerre, since you both are pushing the "JS is a flawed language" angle, what do you find are its greatest flaws?

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...

Re: Mean Stack

#46
post #8

Earlier quoted context omitted.

I think very few javascript developers only know javascript. This some kind of late 90s C++ elitism or sarcasm?

No, I think it's just the unfortunate reality. 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 man…

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.

Re: Mean Stack

#47
post #44

Earlier quoted context omitted.

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…

[deleted]

NoSQL is a regression in a sense. Or, if you prefer, a conscious trade-off. Providing the same guarantees as traditional relational databases becomes difficult at scale, so you trade some of the features for higher scalability. For example, you can have a very highly available, distributed key-value store, but with no transactions across multiple rows, no query language, no schema, no indexing, etc.

If you think about it, the only real (and most important) advantage of NoSQL databases is that you can make them scale. If only we could make relational databases work like that, I'd happily shove all the data into a store supporting schemas, a powerful query language and ACID transactions.

Re: Mean Stack

#48
post #45

Earlier quoted context omitted.

The "developers" dig seems unnecessary. @cuttooth and @PommeDeTerre, since you both are pushing the "JS is a flawed language" angle, what do you find are its greatest flaws?

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. Clic…

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.

Re: Mean Stack

#49
post #32

Looks a lot like this node+express+mongo boilerplate: https://github.com/madhums/node-express-mongoose-demo

Thanks for sharing this. I've been getting into express lately and this boilerplate is a little leaner for the reading.

It also just informed me of the app.param api in express. I had no idea.

Re: Mean Stack

#50
post #8

Earlier quoted context omitted.

I think very few javascript developers only know javascript. This some kind of late 90s C++ elitism or sarcasm?

No, I think it's just the unfortunate reality. 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 man…

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.
Post reply on HN