5 ms·
Python is a programming language. Node.js is not. What you meant to say is that you switched from Python (presumably running on top of a Real Web Server) to j
by sneak 15y ago
Python is a programming language. Node.js is not. What you meant to say is that you switched from Python (presumably running on top of a Real Web Server) to javascript running on Node.
The argument could be made that they are both interpreters, but please, get it right - you are writing javascript, which is a pretty shitty language in which to develop apps these days. The only reason we use it is because it has near-universal browser support - and then only for UIs.
Also, not to parrot, but it's true - node is cancer. It's for fad chasers who have no idea how real servers manage to serve volume.
Fortunately, most people inexperienced enough to choose node are inexperienced enough to never need to scale, so it'll work out okay for them - for implementation-specific values of 'okay'. :)
- karterk 15y ago> you are writing javascript, which is a pretty shitty language in which to develop apps these days. Woah. I do both Python and JS, and guess what - there are a fair number of people who hate Python's significant whitespace. And to them, it's also a "hacky" language (with all kinds of __foo__ stuff). So, shitty-ness is in the eyes of the beholder. > It's for fad chasers who have no idea how real servers manage to serve volume. There are real world apps like Trello, which is on Node, and are scaling well. Get your facts right, or stop trolling.
- hello_moto 15y agoI'm not going to argue too much between JS and Python. But whitespace as debate topic over corner cases in JS language? really? And also Trello is just launched and suddenly it scales off miles away? really?
- jQueryIsAwesome 15y agoThe have pagerank 6 and they "just launch"? ... that is weird.
- hello_moto 15y agoThey launched mid September 2011. 3 months and they are what people considered web-scale? Pagerank 6 == webscale? Those facts are weird...
- malandrew 15y agoYup, shitty-ness is in the eye of the beholder. I wish that every time a discussion of syntax came up, we'd be as quick to make reference to Wadler's law as we are to make reference to Godwin, when Nazi's are brought into the picture. http://www.haskell.org/haskellwiki/Wadlers_Law http://www.haskell.org/haskellwiki/Wadlers_Law Arguing syntax is more often then not pretty absurd, unless you are arguing how the syntax actually changes semantics (like with S-expressions and overloaded parens).
- StavrosK 15y agoWhat __foo__ stuff?
- bmelton 15y agoI'm not the author, but I believe the classic example is: if __name__ == "__main__":
- epidemian 15y agoOr methods like __init__, __str__, __cmp__, etc. I know they are part of Python's protocols, which are basically a form of the template method pattern, and that they do make sense. But to some people they feel hackish; they woud prefer to have "normal" name methods for these protocols instead.
- mixmastamyk 15y agoIf they were normal they'd eat up your namespace.
- epidemian 15y agoYes. But, it that a bad thing? For example, I think if you'd have to explain how to change the string representation of some kind of object, saying "just define the 'str' method and then call it, like 'something.str()'" is simpler than "define a '__str__' method -- don't worry about all the underscores -- but then don't call it directly; instead of that, use the global 'str' function". I don't know if that extra indirection (i.e. calling 'str', which, in turn, calls '__str__'; or 'next', that calls '__next__' in Python 3) adds more value than the simplicity of not having that extra indirection in the first place.
- Tobu 15y agoIf it used normal names, Python couldn't evolve new methods for its protocols with language support. It would need some kind of annotation saying “yes I really mean to get this method called by the language and didn't just happen to use the same name by coincidence”.
- sneak 15y agoI think it's amusing that when I claim that javascript is a shitty language, instead of trying to claim that javascript isn't shitty, you point out the shittier attributes of the language I was comparing it to. Regardless of whether you like python or not, javascript pretty much sucks. Coffeescript helps a bit, but if you aren't running in browser, why hobble yourself like that?
- MatthewPhillips 15y agoYou expected a nuanced refutation when you yourself offered nothing of substance?
- cm127 15y agoThe "Javascript is a shitty language" argument is getting old. I feel like you're only admitting that you're too lazy to learn how to program with a prototype-based language. You even suggest Coffeescript which is big on making Javascript like an OOP language when it's really not. As far as a reason why you might "hobble" yourself is because Javascript is great at asynchronous design. You should try checking it out for real instead of jumping on the opinion bandwagon.
- rdtsc 15y ago> argument is getting old. How does the age of the argument impact its validity. > you're only admitting that you're too lazy to learn how to program with a prototype-based language. If you don't like Erlang you are just admitting you are too lazy to learn the actor model. See I'll just call you "lazy" it will validate my argument. > because Javascript is great at asynchronous design. Not disagreeing with you here, but it would help if you'd actually mention why. You said something about it being a prototype based language. Is that why you think it is great at asynchronous design?
- jashkenas 15y agoOh man oh man. > You even suggest Coffeescript which is big on making > Javascript like an OOP language when it's really not. JavaScript is deeply object-oriented.
- rdtsc 15y ago> fair number of people who hate Python's significant whitespace if that is their only reason to claim JS is a better language, i wouldn't bother listening to their opinion too much.
- jalanco 15y agoWow. What are you so frightened of? It's obvious from your post that you have invested a great deal of time in python and you are terrified that Node is going to take away your livelihood. That is not going to happen. Python is here to stay, just as Javascript is. Both will continue to be improved over time, but there is no reason to freak out and lash out at other people. Relax. And I'd like to see the results of your study where you have proven that "most people inexperienced enough to choose node are inexperienced enough to never need to scale". You should publish such a bombshell study. But in truth, your fear is causing you to make nasty attacks and, well, just make shit up. Come on, just admit it, Sneak.
- adolfojp 15y ago"It's obvious from your post that you have invested a great deal of time in python and you are terrified that Node is going to take away your livelihood." No it's not. You're just making one hell of an assumption.
- jalanco 15y agoYou're right of course. I should have said "apparent" not "obvious".
- sneak 15y agoWere it that Python was my livelihood my life would be a lot simpler. Instead, my livelihood comes from unfucking bad decisions like "hey, let's use PHP!" or "hey, let's rewrite the whole thing in javascript and use node!" or "MongoDB seems great, let's switch from MySQL!" It's not fear of new, it's fear of broken. I encourage you to use whatever shiny stack-of-the-month you enjoy, as it basically amounts to my competitive advantage over people like that. I'll be over here using Apache and nginx and MySQL and python and perl and other languages that don't make me write abominations like '==!', same way I have forever. Best of luck to you.
- dtf 15y ago>>> a = 100; b = 100; print (a is b) True >>> a = 1000; b = 1000; print (a is b) True >>> a = 1000 >>> b = 1000 >>> print (a is b) False Python has its quirks too. Most people learn them and get over it.
- davidw 15y ago> It's for fad chasers who have no idea how real servers manage to serve volume. I think that pquerna has some pretty good ideas about how "real servers" work, but leaving that be, you could actually explain what's wrong with the system, rather than attack the people. Having some Erlang experience myself, I can find plenty not to like about node.js. However, the Erlang guys have fired round after round into their own feet to the point where even if it's inferior, node.js has probably already surpassed Erlang for many server tasks.
- therockhead 15y agoWould you mind explaining "the Erlang guys have fired round after round into their own feet"?
- davidw 15y agoThey had, years ago, a clearly superior platform for event-driven programming (none of these weird callbacks). They have more or less failed to capitalize on it in terms of getting mainstream traction. Here's some of what I think is wrong with Erlang: http://journal.dedasys.com/2007/09/22/erlang http://journal.dedasys.com/2007/09/22/erlang Several years ago, it was getting some "early hype noises", but sort of sputtered and bounced and never got off the runway.
- simonw 15y ago"It's for fad chasers who have no idea how real servers manage to serve volume" If you look at who's building serious systems with Node.js, that statement doesn't hold up. CloudKick / the Rackspace monitoring team are hardly amateurs - neither are Joyent, LinkedIn, eBay or Yahoo.
- FraaJad 15y agoYes. Those teams have sharp people who can probably write good software using COBOL if they had to. Also see facebook and PHP. Just because Facebook uses PHP, it doesn't mean that PHP is a good language.
- scorpion032 15y agoFacebook didn't choose PHP. They continued to use it, as there was a lot of legacy to port if they wanted to. These people actively measured (using a spreadsheet at that) the various parameters of a programming language and settled the one that fits their requirements.
- FraaJad 15y agoExactly! Facebook continues to develop in PHP because throwing out your existing system and replacing it with new code base (and a new language!) is almost always fraught with risks. That spreadsheet is not "science" even though it has numbers in it. I can put higher numbers for Python and arrive at a different answer. I completely agree with this comment: http://news.ycombinator.com/item?id=3366883 http://news.ycombinator.com/item?id=3366883 elsewhere in the thread.
- rhizome 15y agoThe Second-System Effect: http://en.wikipedia.org/wiki/Second-system_effect http://en.wikipedia.org/wiki/Second-system_effect