Slashdot Mirror


Ask Slashdot: Have You Migrated To Node.js?

A developer maintaining his company's "half-assed LAMP / WordPress stack pipeline for web and web application development" is considering something more scalable that could eventually be migrated into the cloud. Qbertino asks Slashdot: Have you moved from LAMP (PHP) to Node.js for custom product development and if so, what's your advice? What downsides of JS on the server and in Node.js have a real-world effect? Is callback hell really a thing? And what is the state of free and open-source Node products...? Is there any trend inside the Node.js camp on building a platform and CMS product that competes with the PHP camp whilst maintaining a sane architecture, or is it all just a ball of hype with a huge mess of its own growing in the background, Rails-style?
Condensing Qbertino's original submission: he wants to be able to quickly deliver "pretty, working, and half-way reliable products that make us money" -- and to build a durable pipeline. So leave your educated opinions in the comments. What did you experience moving to Node.js?

341 comments

  1. Yes callback hell is a thing by Anonymous Coward · · Score: 1, Insightful

    It keeps me up at night with stress. I hate node.js and everything it stands for. It wasn't always like this though.

    1. Re:Yes callback hell is a thing by Anonymous Coward · · Score: 2, Insightful

      I looked at node.js because we needed something for an embedded linux project. reading up on it I saw the callback idiom and thought why would anyone want to do that to themselves?

    2. Re: Yes callback hell is a thing by Anonymous Coward · · Score: 1

      Why are you still stuck in callback hell in the era of promises? We do some pretty fancy stuff, and don't get caught in callback hell because we use promises. Callback hell was more a pre-promise situation.

    3. Re: Yes callback hell is a thing by Junta · · Score: 1

      The call to have horribly nested callbacks is mitigated to some degree, but it's still ugly compared to approaches in other languages. It's still a callback driven paradigm, just allowing a somewhat less painful way to manage complex scenarios.

      It's a lot like the other improvements in Javascript, significantly crippled by being worked to fit into the existing language.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    4. Re: Yes callback hell is a thing by Anonymous Coward · · Score: 0

      Try using es6 and generators... its surprisingly similar to PHP code, especially when looked at from a React PHP point of view.

    5. Re: Yes callback hell is a thing by Junta · · Score: 2

      I don't know if aspiring to PHP levels of maintainability/readability is a high ambition. Also, when the question is 'should I migrate from php', a sentiment that suggests 'about as good as php' doesn't seem to be a ringing endorsement.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    6. Re:Yes callback hell is a thing by Carcass666 · · Score: 1

      Promises (esp with Bluebird library) pretty much eliminate callback hell. If you have to do something sequentially, it's trivial to chain. Better yet, if you have multiple things you can concurrently, promises make it easy.

    7. Re:Yes callback hell is a thing by Anonymous Coward · · Score: 0

      bluebird++
      Also, where it makes sense, look at rambda to make even more elegant code.

    8. Re:Yes callback hell is a thing by Jeremy+Lee · · Score: 5, Interesting

      As pointed out, Promises are the primary solution to Node's "callback hell". People like to hate on the explicit value/error return separation, but that's merely a convention used by the top-level HTTP components, not actually baked into the language. It makes something explicit that is usually implicit.

      The thing is, if you language has Exceptions and try/catch then you already have an implicit equivalent of the success/fail control split, and anyone trying to properly handle exceptions caused by their exceptions finds themselves merely in the circle of hell next door.

      I've coded in node.js for a couple of years now, written some semi-big pieces of software to do real-time message passing/transaction processing stuff. It was fine. It's better than PHP, which I moved from. It's better than writing cgi-bin programs in C++, which is how I started. On of the big reasons to use node.js is it nicely integrates alternative protocols like WebSockets, RTC, AMPQ, so you can roll up a "web server plus other protocol" system that gets a lot of jobs done you just can't accomplish with PHP/Apache.

      People love to hate on Javascript because they don't like admitting the language wars are over, and Javascript won. When you can walk into a room and ask "How many people have a compiler on them _right now_." and people answer "I've got at least two!" Try that with any other language. Compilers shipped, lines written, active users... JS wins on all metrics. It's not the "best" language, but then, what is?

      A last note... node.js works especially well in 'cluster' situations, because to be honest, your average node.js process isn't terribly reliable. Individual node.js programs will crash on a weekly basis, thanks to funny net errors. In a cluster that doesn't matter, and in fact you WANT your 'nodes' to fail-fast rather than hang waiting for a deadlock. 'forever' restarts the errant script in seconds, but in those seconds your load-balancer should be handing the task off to another node. It's a paradox that to get a reliable cluster, you want your individual parts to be quite twitchy and explody., which node.js is.

      --
      Jeremy Lee | Orinoco
    9. Re:Yes callback hell is a thing by Jeremy+Lee · · Score: 3, Interesting

      Because when you need to get the page built and back to the user in 10ms, you control path through the program must be explicit and direct, both for the normal control flow, and the error path

      And because the alternative to single-threading is multi-threading, and that sounds like a great abstraction until you realize how much time is lost acquiring and releasing locks, and performing context switches. And you see your code complexity balloon because you have to deal with all the cross-thread synchronization. And it's hard to test.

      The alternative to single-threading is a system which can interrupt the current page build with the _next_ page build (multithreading!) and that almost always makes things worse.

      Node.js responds to server overload by rejecting page requests because it's busy - something the outer load balancer can deal with in milliseconds. (You have a load balancer, right?) Multithreaded programs respond to overloads by slowing down, running out of stack space and crashing. If you're running a real-world web app with thousands of users, one of those is worse.

      --
      Jeremy Lee | Orinoco
    10. Re: Yes callback hell is a thing by ZeroWaiteState · · Score: 1

      The fact that lazy evaluation and monads are an add-on library and not a core part of the language syntax means we are in promise hell.

    11. Re:Yes callback hell is a thing by Anonymous Coward · · Score: 1

      Thread pools instead of a thread to serve each customer. Reject if too many customers -- this can also be easily done with threads. It can be even set up to be changabe or dynamic throughout the system execution.
      Multiversion Concurrency Model instead of explicit locks.
      No need for the fucking total assinine garbage that is node.js. The "js" in that name stands for "just shit".

    12. Re: Yes callback hell is a thing by dave420 · · Score: 1

      He didn't say "about as good as php" though.

    13. Re:Yes callback hell is a thing by Anonymous Coward · · Score: 0

      Ya missed the embedded linux bit. What I see is if your margins are razor thin, but you have an assload of users, then you can afford to use node.js. If you're my company with margins good margin, but just a couple million a year revenue stream, node.js is the wrong tool. Esecially for an embedded platform. You want a tool that optimizes developer cost not server time.

    14. Re:Yes callback hell is a thing by erikkemperman · · Score: 4, Interesting

      It's a paradox that to get a reliable cluster, you want your individual parts to be quite twitchy and explody., which node.js is.

      I think I get what you're saying, but somehow I don't expect this argument to convert any nonbelievers :-)

      My personal favourite JS verdict is from Verity Stob, over at The Register,

      CON: The most dysfunctional functional language. On top of all its well-known flaws that disrupt ordinary primitive programming, it lacks many allegedly must-have functional gewgaws. Its variables are mutable, its type holes are indubitable, its 'eagerness' unsuitable, its modules are inscrutable, tail recursion disputable, scoping inexcusable, and I'll stop there, with 'refutable' (to name but one) still in the bank, just because you were kind enough to beg me.

      PRO: It's what you'll end up using.

      Source: Learn you Func Prog on five minute quick!

      --
      Gosh, thanks. That must be why the other ships call me Meatfucker -- GCU Grey Area (Eccentric)
    15. Re: Yes callback hell is a thing by Anonymous Coward · · Score: 0

      Elixir and Phoenix is the correct answer

    16. Re:Yes callback hell is a thing by leptons · · Score: 1

      "Callback hell" is a problem with the developer, not the language. If you've created a mess, then you should probably find a way to fix it that doesn't keep you up at night.

    17. Re:Yes callback hell is a thing by Jahta · · Score: 2

      I've coded in node.js for a couple of years now, written some semi-big pieces of software to do real-time message passing/transaction processing stuff. It was fine. It's better than PHP, which I moved from. It's better than writing cgi-bin programs in C++, which is how I started. On of the big reasons to use node.js is it nicely integrates alternative protocols like WebSockets, RTC, AMPQ, so you can roll up a "web server plus other protocol" system that gets a lot of jobs done you just can't accomplish with PHP/Apache.

      Well that's not really a big selling point. In the last couple of years I've worked on Java and Python projects that used WebSockets, RTC, AMQP, NoSQL databases, etc. Not only are these protocols well supported but in both cases you get a much richer and more robust platform to work on.

      People love to hate on Javascript because they don't like admitting the language wars are over, and Javascript won. When you can walk into a room and ask "How many people have a compiler on them _right now_." and people answer "I've got at least two!" Try that with any other language. Compilers shipped, lines written, active users... JS wins on all metrics. It's not the "best" language, but then, what is?

      And this is frankly misleading. Yes there's lots of Javascript code around, bit it's primarily on the client side. One of the biggest issues I've seen with node.js is the number of people who have only ever coded Javascript UIs, but who think that with node.js they can put "Server-side developer" on their CVs. It doesn't work that way. Backend development is an entirely different proposition.

    18. Re:Yes callback hell is a thing by Anonymous Coward · · Score: 0

      Welcome to user level threads: All the advantages of node.js without the drawbacks. Invented back in the day we still cared about clock cycles.

    19. Re:Yes callback hell is a thing by joboss · · Score: 1

      That's just functional language snobbery.

    20. Re:Yes callback hell is a thing by erikkemperman · · Score: 1

      Actually I think she's mocking just that. Perhaps my quote here loses context in that sense, I recommend reading the whole thing. It's kind of funny.

      --
      Gosh, thanks. That must be why the other ships call me Meatfucker -- GCU Grey Area (Eccentric)
    21. Re:Yes callback hell is a thing by Anonymous Coward · · Score: 0

      Fuck me, every time I see a post from someone telling us how awesome some shit technology like PHP or Node.js is they end up demonstrating why they're not fit to make any such judgement in the first place.

      If you're spending that much time acquiring and releasing locks and context switching then you're doing things so very wrong, in fact it shows you don't even understand the basic architecture of a web server that must deal with high performance web applications. You should not be context switching frequently enough for it to be a problem, you should only be doing so when it makes sense - i.e. because the current task is performing an IO bound application, and so the CPU executing that thread would be better off executing CPU bound code for another task whilst it waits for the IO operation to complete, whether that's a network call to a database or webservice, or whether it's loading something from disk or writing to disk.

      You don't just create threads left, right and fucking centre, you create a sane amount relative to the amount of actual physical processing units you have, and you assign them from thread pools. If you're locking a lot then you've designed your application really, really badly because multiple threads shouldn't be fighting over resources on the heap and so forth. Most data in a web application shared between threads is in fact read only, so there's a question of why the fuck you're even locking at all if there's no actual need.

      And even then it's not even simply a question of just single, or just multi-threaded, if you're serving lots of tiny bits of static content where processing time is near non-existent (because you're not processing any dynamic content) then you can just have a single thread quite comfortably handling requests and letting IOCP deal with the IO aspects. In contrast if you have a lot of long-running processes that are IO bound for each request then you'll probably want lots more threads. The amount of threads you need, how you assign them, and how you use them really almost entirely depends on your application. You can't simply blanket state that multi-threading is somehow bad because it's essential to squeeze maximum performance out of some server applications.

      You can't simply excuse node.js' failings by throwing a load balancer into the mix because you'd fucking do that with a multi-threaded server that was being overloaded too.

      The simple fact is that node.js pidgeonholes you into one single request processing model that most definitely isn't a good model for all, or even most websites. The fact is that if you use a more professional technology like C++ or WCF/.NET, or Java in which most large scale sites that really actually handle heavy loads are built then you don't get forced down one route as per node.js - you get to set things up in the way that best matches your needs, and in doing so you get more performance out of a server than you would with node.js BEFORE you need to start throwing load balancers into the mix to scale out. I'll answer your question, like for like, without a load balancer, a slow response is better than a rejected response. Like for like, with load balancer, handling more load per server in a well designed multi-threaded environment is better than handling less load per server and expecting your load balancer to wait for your shitty node.js server to wait for a rejection before it tries another server, hence slowing down the response time to the user.

      Congratulations, you're another of the thousands of corpses of failed developers that's proven they know not what the fuck they're on about and that's why they use node.js/PHP etc. in the first place.

      Please just get the fuck out of the market, and leave it to the professionals before you build anymore sites that make it into the 9 O'Clock news for keeling over under load because you don't understand concepts like multi-threading and have decided that it's better if things just outright break as with node.js instead.

      You literally have no idea what the fuck you're talking about, you're basically just come here to tell us that you use node.js because multi-threading with professional tools is too difficult for you. That's the entire summary of your post in one short sentence.

    22. Re:Yes callback hell is a thing by Anonymous Coward · · Score: 1

      "Node.js responds to server overload by rejecting page requests because it's busy - something the outer load balancer can deal with in milliseconds. (You have a load balancer, right?) Multithreaded programs respond to overloads by slowing down, running out of stack space and crashing. If you're running a real-world web app with thousands of users, one of those is worse."

      If you have a load balanced environment and your multi-threaded programs are slowing down and crashing, but your node server rejecting requests adding time to the response time whilst the load balancer tries to find a server willing to respond is somehow better then you're doing it very, very, wrong.

      Your load balancer shouldn't have to wait until requests are being rejected before it starts distributing load, and your multi-threaded servers should equally see the load distributed before they start slowing down.

      Beyond that I'm not sure what you mean when you say multi-threaded programs respond to overloads by slowing down and crashing, that's such a broad sweeping statement to make that it doesn't really make any kind of sense. Which programs exactly, on what hardware, on what OS, and what technology? The reason node programs don't do that is because it's interpreted (well, JIT compiled now really) and so can protect itself from you, but what you're really talking about here is managed vs. unmanaged code - yes, badly written unmanaged code can do all the things you state (but well written unmanaged code wont). Managed code typically wont do those things anymore than they would in node. For what it's worth though It's perfectly possible to make a node application crash with a stack overflow too, but it's got fuck all to do with threading - set up some kind of deep or infinite recursion and I'm sure you'll see what I mean.

      I'm not sure why you were modded to +5 because to make such sweeping statements about multi-threading shows a profound lack of knowledge on the topic. If anything your up-modding is frankly a sad reflection to the level of technical illiteracy that's not widespread on Slashdot. Other languages can do all the things node.js can do for what it's worth, there's nothing magical or unique about node.js and what it does - node is really just a convenient wrapper around the hard stuff.

    23. Re:Yes callback hell is a thing by Anonymous Coward · · Score: 0

      "People love to hate on Javascript because they don't like admitting the language wars are over, and Javascript won."

      Bwahahahahaha, good one!

      Let's just pretend that just about every single OS, webserver, web browser, office application, banking system, large scale e-commerce system, high load website isn't built with technologies like C, C++, and Java shall we just so you can keep jerking off to node?

      The only place Javascript is dominant is for client side web scripting because there never was any real serious alternative (VBScript was the closest and was even more awful). If you think Javascript is remotely relevant for anything beyond that then you're so clueless as a developer as to be completely fucking useless. Node.js is an irrelevance outside client side web development and node.js has not and will not change that because it's shit and inflexible.

    24. Re:Yes callback hell is a thing by HalWasRight · · Score: 1

      MOD UP PLEASE!

      --
      "This mission is too important to allow you to jeopardize it." -- HAL
    25. Re:Yes callback hell is a thing by GodelEscherBlecch · · Score: 1

      Poorly designed programs respond to overloads by slowing down, running out of stack space and crashing.

      FTFY

  2. Have you migrated to qbasic? by Anonymous Coward · · Score: 4, Insightful

    Fuck no, it's a toy language that's being stretched way beyond its intent. JS has become the absolute bane of the internet, which now requires 2ghz machines to render ~~responsive~~ web pages, and the language has no place whatsoever on servers.

    1. Re:Have you migrated to qbasic? by ShanghaiBill · · Score: 4, Funny

      JS has become the absolute bane of the internet

      JavaScript is a horrible language, as you can see. But PHP is also a horrible language. If you are writing a lot of JS for the client side, then node.js has the advantage that you only need to learn one horrible language.

    2. Re:Have you migrated to qbasic? by WarJolt · · Score: 1

      My experience with Node.js is that database migrations are a pain compared to Rails. Use the best language for the domain you're working in. Server side and client side design patterns are different.

    3. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      Yeah, I don't think I want a front end developer touching the server.

    4. Re:Have you migrated to qbasic? by MightyMartian · · Score: 1

      The difference is that I can use many languages on the back end to develop web apps. I'm stuck with Javascript, a really really shitty shitty language, for anything that runs on the browser. But like many shitty pieces of technology, it gained adoption and thus continues, each iteration just as fucking terrible as the last.

      Yes, I know there are alternatives, but at the end of the day they still compile down to javascript.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    5. Re: Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      Besides, who would want to be beholden to the whims of goggles js implementation for a browser on the server side.

    6. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      True. Both languages are more or less write only languages. However, PHP API functions are a total mess. I am not sure if this makes even Node.js better then PHP. Anyway, both technologies allow us to have a lot to do in the next 20 years when all the interwoven cluster fuck is no longer able to accommodate feature changes.

    7. Re:Have you migrated to qbasic? by dgatwood · · Score: 5, Informative

      See, I don't get all the hate towards JavaScript. From what I've seen, it's a perfectly usable language except for the lack of true classes, and even that flaw can be fairly easily worked around if you're a C programmer who did OO back before it was cool (function pointers).

      What makes client-side JavaScript a nightmare is not the language, but rather the DOM, which is kind of a pain in any language. The biggest difference is that in other languages, most developers never have to deal with the DOM....

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    8. Re:Have you migrated to qbasic? by inode_buddha · · Score: 0

      Ya know, we used to do all the same stuff we do today back in the 90's with straight html and maybe CSS. And yes it was easily do-able to have secure forms, video, chat, etc. I even saw people doing bash scripting on the server side, and it worked just fine. Makes you wonder how fast it would be on modern hardware. You could have built FB with the technology available back then, and it probably would have been faster/cleaner/better.

      --
      C|N>K
    9. Re: Have you migrated to qbasic? by ZeroWaiteState · · Score: 3, Insightful

      They don't like Node because it runs in a single thread and basically forces you to use async IO or risk blocking the thread which is serving incoming requests. On most frameworks you can just to kick the user request to a background thread and do your IO synchronously there. Problem is, thread per user doesn't scale for fairly high connection counts when you are IO bound (which most web apps are). However, doing async programming is hard, because the flow of control is inverted and doesn't really follow the flow of code on the page and because callbacks become hairy when you have to chain several async operations together (what happens if a call never returns, returns with exception, etc). How do you compose the results of several async operations when the results may come in our of order? JS, as a language, doesn't provide you the tools to compose those things easily. There are third party libraries which try to fix that, such as async.js, bluebird and promises API, or Rx. You have to use futures/observables/promises to compose async tasks or things get out of hand in a hurry.

    10. Re: Have you migrated to qbasic? by Billly+Gates · · Score: 1
    11. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 1

      Yeah - this is why TypeScript etc. came into existence. You write in TypeScript that has minor little things like TYPE CHECKING and other stuff real languages have, and compiles to vanilla JavaScript.

    12. Re:Have you migrated to qbasic? by DuckDodgers · · Score: 1

      They compile down to Javascript, but ideally that shouldn't matter any more than the fact that C++ compiles down to intermediate language in most compilers. As long as the top level language does what you want, the intermediate steps between it and CPU microcode should be irrelevant.

      I think the killer feature of Node.js is that you have the same code on client and server, which makes the mental overhead for a 'full stack developer' smaller. But now Dart, Typescript, Clojure/script, Scala, and many other languages can offer the same reduced mental overhead but with a more consistent language.

    13. Re: Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      http://www.crockford.com/javascript/javascript.html

    14. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 1

      No you could not do the same stuff we do today back in the 90s. There was no AJAX, it was basically all just POST/GET requests that caused the whole page to reload. Video wasn't much of a thing since everyone was on dial-up internet. Video streaming wasn't even introduced into flash until 2002. The beginning of chat on websites was done in constantly refreshing frames, applets or in flash. Applets were introduced with HTML 3.2 in 1997 and frames and stylesheets weren't ever official until HTML 4.0 in 1998. CSS was barely even adopted in the 90s, it had minimal support so web developers couldn't rely on using it. It wasn't until 2000 where browser support picked up so developers could start to use it.

      Maybe you played with HTML a little bit, but from your statements it is 100% clear you're not a web developer and have zero experience web developing in the 90s. Don't make BS statements that you just pull out of your arse, only makes you look look a fool.

    15. Re:Have you migrated to qbasic? by KingMotley · · Score: 1

      Yes, we've migrated, but it doesn't run on the server. It's used to run gulp which precompiles our LESS files to CSS, minifies the CSS and JS, makes bundles out of them, and optimizes our images. I wouldn't actually run the thing on a server, but it's great as a development build chain.

    16. Re:Have you migrated to qbasic? by Lumpy · · Score: 2

      It would need to if web designers would stop making webpages into flashy bling bling crap. Honestly the moment a webpage uses node,js someone should hit the webmaster with a sack of doorknobs.

      If your website takes more than 4 seconds to load on a 5mbps internet connection, then it's designed by a freaking noob that should not be allowed near a webserver.

      --
      Do not look at laser with remaining good eye.
    17. Re: Have you migrated to qbasic? by Dracos · · Score: 4, Informative

      No.

      We don't like Node because Javascript is eccentric (read: benignly insane) in too many ways. If there was an alternative, that would be adopted in a heartbeat. Something with sensible types and type casting at least, preferably with a better, non-prototype object model.

    18. Re:Have you migrated to qbasic? by tomhath · · Score: 2, Insightful

      People who only know one language (usually Java, or sometimes Ruby) see every other language as a threat to their livelihood. They hate Javascript, SQL, Python, PHP - everything except the only one they know. The fact is, software development languages and techniques are constantly changing; even if you don't have a need for a new language you should learn it, if for no other reason than to expand how you think.

    19. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      Fuck no, it's a toy language that's being stretched way beyond its intent. JS has become the absolute bane of the internet, which now requires 2ghz machines to render ~~responsive~~ web pages, and the language has no place whatsoever on servers.

      Kinda fed up of this kinda shitty comment, you aren't a web developer you obviously don't like any of the tech... If you really think JS is a toy language and that's the reason why web pages are slow then your in for a whole lot more pain in the future. The fact is ads and people writing shit code make your browser slow not JS, soon there will be web assembly and you will see how little that solves the problem. web !== OS, this is the true root of peoples dislike.

    20. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      This. I know QBASIC and MASM and hate everything else.

    21. Re:Have you migrated to qbasic? by jon3k · · Score: 1

      Or, alternatively, maybe javascript really isn't a great language for a number of reasons? Like, the insane equality tables. NaN literally doesn't equal NaN. Just google the truth table and behold the wonder.

      What else? Two words: global variables. If you've done any javascript, you know what I mean. Or have you ever tried to do any arithmetic in javascript?

    22. Re:Have you migrated to qbasic? by mattventura · · Score: 1

      It just has the bad parts of various paradigms, yet none of the good parts. For example, some "bad" things throw an exception, whereas others just cough up an "undefined".

    23. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      I see this among Ruby/Rails folks the most, usually veiled as arrogant elitism.

    24. Re: Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      Let's not forget the iframes with the noscrollbars that helped spur the rich internet application TLA.
      On a separate note, Douglas Crockford has a coherent plan to replace the stack with QT and json, just so you don't get issues with dependency injection.

    25. Re: Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      You mean like clisp? Which satisfies every bullet point in your criteria list.
      You can even use the weblocks framework which uses continuations to manage state.
      Clisp + MOP/CLOS makes for an extremely flexible foundation to build any sort of object-paradigm you want.
      Plus, it's *really* fast.

      Oh, and v8 is also one of the fastest, most advanced compilers in existence now thanks to the millions of $ poured into it by Google.
      Async IO is very scalable--dunno why people are so afraid to use it. Plus, it avoids the disaster that threading usually turns into.

    26. Re: Have you migrated to qbasic? by Pseudonym · · Score: 2

      You jest, but Erlang actually delivers what node.js promises (pun intended).

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    27. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      Funny bit had beer with some friends of mine last week, one of them mentioned rexx and another piped up and mentioned that he sat in on some JavaScript standards meetings where Mike Cowlishaw[1] argued that JavaScript needed a decimal type not float.

      [1] Creator of REXX.

    28. Re: Have you migrated to qbasic? by TimMD909 · · Score: 1

      I use Grunt constantly with is basically the same deal. We use it to kick off LESS compilation and JavaScript uglfication. It also handles our QUnit and visual regression tests. Lastly, it does the automated releases.

    29. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      No you could not do the same stuff we do today back in the 90s. There was no AJAX, it was basically all just POST/GET requests

      Hey, ignorant fucknuts. A little thing called XMLHttpRequest was released in the 90's. Educate yourself sometime.

    30. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      This and the fact everyone should know that Node.js is just the latest fad in a long line of programming fads.

    31. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      Au contraire, I hate Javascript because I know it and, knowing it, I'm sometimes forced to use it.

      It doesn't really expand the way you think, though, because it doesn't contain any original ideas.

    32. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      Just because you make a arrogant statement, doesn't make it true.

      The 90s are a collective of the years, 90 through 99. One year out of 10 doesn't count as "the 90s".

      The first release of XMLHttpRequest wasn't until IE5 in 1999 and it wasn't supported by Mozilla until 2002 and Safari/Opera after that.

      One browser supporting it for one year where no one used it other than Microsoft themselves for their own outlook webapp doesn't count for:

      "we used to do all the same stuff we do today back in the 90's with straight html and maybe CSS."

      Perhaps you should educate yourself and learn when to shut your, and I quote "ignorant F%#@nut" mouth.

    33. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      You're taking your airsoft into combat son.

    34. Re:Have you migrated to qbasic? by TheRaven64 · · Score: 5, Informative
      JavaScript has some nice features. It's a pure OO language, it has a simple prototype-based model with differential inheritance, but it also has a lot of ugly corner cases:
      • 'Semicolon insertion' - the semicolon is optional anywhere that the parser can determine that one should be needed. This means that some things are either code blocks or object literals depending on how you line wrap your code.
      • The only integer type is an IEEE double-precision floating point number. You can't represent a 64-bit integer without using a bignum library. Compare this with something like Smalltalk (an ancestor of JavaScript, with Self as the direct parent), where integers are either SmallInt or BigInt objects and are transparently promoted when they are no longer small enough to be hidden inside a pointer.
      • Javascript has operators that work on objects, but no operator overloading. object + string, string + number, number + array are all well-defined in JavaScript. They won't throw type exceptions, but they will produce really unexpected results.
      • The semantics of 'new' and 'this' binding are really weird. Any JavaScript function (which is actually a closure) can be either called directly or as an argument to the new operator. In the first case, the hidden 'this' parameter is the closure object. In the latter case, the 'this' argument is a new object whose prototype is set to a field in the function object. There are a few other subtleties.
      • JavaScript is a pure imperative language. The execution model is that code is run as soon as it is read, which makes quick startup difficult. V8 cheats and just does brace matching when it encounters a function and lazily parses the function when it's first called, but other languages that have a more explicit declarative structure get this for free and have cleaner entry points (there's no equivalent of 'main()' in JavaScript).

      That said, it's not significantly worse or better than most other mainstream programming languages.

      --
      I am TheRaven on Soylent News
    35. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      Yes, js is one of the reasons why webpages are slow. And I know I am in for a lot more pain in the future, You are as well. It's called getting older.
      I browse without ads. I block them at hosts level, and I use anti-tracking, and ad-blocking software. And I can tell You: it's not ads -- it's js. I would turn js off if I could, but unfortunately a great deal of things just now require js.

    36. Re:Have you migrated to qbasic? by joboss · · Score: 2

      node.js is great for integration of multiple realtime sources of data and for some solid net linked applications. However to replace the LAMP stack for something as simple as blogs, standard webpages, etc is a bad use of node. Node is not a toy language but people do use it for things that it is not really suited to or inappropriately. It can be a lot faster than LAMP but takes much more effort for it to scale. Generally speaking, if your webpage is an application and has realtime connectivity, heavy datasync, etc, you might want node.js. If your webpage is part of a traditional website you probably want to stick with LAMP.

    37. Re: Have you migrated to qbasic? by K.+S.+Kyosuke · · Score: 1

      Does Common Lisp really have what could be labeled as sensible types? Recently I've been been leaning towards deductive systems, and novel models of computation, but even though I'm quite certain that CLOS+MOP are light-years ahead of anything else that can be currently used to structure hand-written code, making smart automated or semi-automated code processing systems to push us even further (algebraic simplifiers/optimizers, deductive/exploratory compilers and optimizers etc.) appears to be difficult in Common Lisp. (Even straight Scheme might need modifications for that, but there could be some tremendous benefits coming out of it.)

      --
      Ezekiel 23:20
    38. Re:Have you migrated to qbasic? by K.+S.+Kyosuke · · Score: 1

      Like, the insane equality tables. NaN literally doesn't equal NaN.

      Are you sure you grasped the concepts of floating point correctly? If all you know about two values is that neither of them is a number, you have no way of deciding whether they're equal/identical values or not.

      --
      Ezekiel 23:20
    39. Re:Have you migrated to qbasic? by dave420 · · Score: 2

      How can NaN === NaN? Their only commonality is that they are both not a number. Zebras and Oranges are also not numbers - should they be equal to each other?

    40. Re:Have you migrated to qbasic? by K.+S.+Kyosuke · · Score: 1

      What Javascript really needs is Scheme-like generic arithmetics. Hell, originally, "Mocha"/"LiveScript" was supposed to be Scheme in the first place. Look where marketing people got us.

      --
      Ezekiel 23:20
    41. Re: Have you migrated to qbasic? by terjeber · · Score: 1

      So, develop in Typescrip, pure ES6 or something similar. Works fine with Node.

    42. Re: Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      No,its the Java script.
      Browse with noscript on fire fox and watch things load much faster. Adblock doesn't provide the same boost . I want info not shitty rollover ads and surveys and crap.

    43. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      NaN is *supposed* to not be equal to itself.

      See here:

      https://en.wikipedia.org/wiki/NaN

      or here:

      https://en.wikipedia.org/wiki/IEEE_754-1985

      "Comparison operations. Besides the more obvious results, IEEE 754 defines that ... x != NaN for any x (including NaN)."

    44. Re: Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      your confusing javascript code with javascript the language... like i said webasembly is coming next and that will just outline how little the language is to blame for bloat... because bloated ready to compile web assembly will just be faster slow code.

    45. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      Yeah, I don't think I want a front end developer touching the server.

      With JavaScript and NodeJS the front-end developer and back-end developer can use the same programming language but this does not imply the same person does both tasks although it is possible. You sound like a mindless idiot.

    46. Re: Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      It amazes me that more people don't use fibers for this. Maybe they're not cool these days, but they exist on every platform and allow you to do your async I/O in a single thread or distributed across worker threads while retaining your simple straight-line code flow, at the cost of a stack (which can often be a single page). Fiber transition doesn't involve the kernel at all, so it's insanely fast. I've written a library for Windows which does this, and early tests show it's as fast as you would expect - a fiber switch is about as expensive as an L2 cache miss.

      Node.js has the worst-case solution for this. It's basically using the async browser hacks people were already used to, in a production server environment. Promises are better, but they still basically suck. Fibers, and later threads, were *designed* for this purpose, they're completely language-agnostic, and they can be retrofitted into existing systems.

    47. Re: Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      http://www.crockford.com/javascript/javascript.html

      Thank you for the URL.

    48. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      Only stubborn programmers hate JavaScript due to prototyping. The biggest reasons it sucks is all the special cases and the ease you can shoot yourself and never notice. A programming language shouldn't have =, ==, and === as operators that do similar things and can almost always be swapped out with each other without causing a noticeable error. You can also program any JavaScript program without using any letters or numbers, only special characters like brackets and braces. That's just wrong. The language wasn't designed to do that, but the side effects of its operators allow you to do it. It's a fucked up language.

    49. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 1

      Or have you ever tried to do any arithmetic in javascript?

      Concerning the arithmetic, it's because FP arithmetic is done in base 2, which makes numbers such as 0.2 not-dyadic (the equivalent of decimal in base 2); therefore there are rounding errors. In Python 3:

      Python 3.5.1 (default, Mar 3 2016, 09:29:07)
      [GCC 5.3.0] on linux
      Type "help", "copyright", "credits" or "license" for more information.
      >>> 0.2+0.4
      0.6000000000000001

    50. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      You know that C, Java, Python, Lua, etc, all have that same behavior with arithmetic, right?

    51. Re: Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      The perk of PHP is that it's extremely cheap to host for low traffic sites, which is most of the Internet. Other languages boot up and preload all sorts of stuff. You can fill a hard drive with PHP code and it will all run with 512mb of ram.

    52. Re:Have you migrated to qbasic? by leptons · · Score: 1

      You aren't familiar enough with JS to make this statement. JS is fast enough to do audio and video processing in real time. The fact that your web experience is slow is not the fault of Javascript the language, but likely the implementation of it by someone not experienced or not interested in their job, perhaps someone like you.

    53. Re: Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      They don't like Node because it runs in a single thread

      Nope; Node is multithreaded. You just don't notice because you're used to languages which are single-threaded unless you put extra effort into handling multiple threads.

      and basically forces you to use async IO or risk blocking the thread which is serving incoming requests.

      Synchronous IO blocks threads by design. Blocking threads is the defining feature of synchronous IO - that's true everywhere and has nothing to do with Node. If you want to use synchronous IO and don't want to block a particular thread (that's not a risk; it's a guarantee) then just put it in a different thread. It's not like you're stuck with just one thread for everything.

      On most frameworks you can just to kick the user request to a background thread and do your IO synchronously there.

      Yup, that's standard practice in Node if you ever have any need to synchronous stuff for some reason.

      Problem is, thread per user doesn't scale for fairly high connection counts when you are IO bound (which most web apps are).

      Asynchronous IO, on the other hand, scales excellently when you are IO bound. Also, "thread per user" is not the case with Node.

      However, doing async programming is hard

      Often you want to do async programming but it's not worth the effort. A big part of the design of Node is to make it easy (without forcing it on you).

      because the flow of control is inverted and doesn't really follow the flow of code on the page and because callbacks become hairy when you have to chain several async operations together (what happens if a call never returns, returns with exception, etc).

      What people tend to love about Node is how well it handles such things

      How do you compose the results of several async operations when the results may come in our of order?

      Promises - a Javascript language feature

      JS, as a language, doesn't provide you the tools to compose those things easily.

      But, as a platform, Node provides the tools to handle those things very easily.

    54. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      *cough* ...spoken like some ignorant fucknuts whose generation invented everything.

      Not.

      Its pretty obvious to those of us who were actually there at the time, there was plenty of interactive sites and *gasp* even streaming music videos in 1998!!!! ... And not a bit of JS in sight.... ya arrogant fucknutz. And nope, it wasn't that hard to write either... web monkeys are *not* developers, get over yourselves.

      And somehow, shit *still* loaded and rendered about a zillion times faster, even when CPU's were rated in mHz and RAM in megabytes....

    55. Re:Have you migrated to qbasic? by SQLGuru · · Score: 1

      If you're writing a lot of JavaScript to make your page responsive, you're doing it wrong. Your responsiveness should be handled by CSS and Media Queries. You might have a little bit of JavaScript to manage a few things, but the bulk of it should be done with styles.

    56. Re: Have you migrated to qbasic? by SQLGuru · · Score: 1

      TypeScript adds a little of the rigor of a "real" language on top of JavaScript.......still not perfect, but at least better. And since it transpiles into JavaScript, you don't lose any browser compatibility. It's also easy to "convert" your code since you can mix old and new as you work through the migration.

    57. Re:Have you migrated to qbasic? by omnichad · · Score: 1

      And nobody even tried using XMLHttpRequest for anything non-XML until a while later (because who wants to parse XML client-side?). It never made sense that it was a generic caller, but had XML in the name, which is one thing that scared off a lot of would-be early adopters. It still didn't matter too much until it was supported outside of IE.

    58. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      Like, the insane equality tables.

      I've done so for several languages, and Javascript has one of the most sensible. I personally wouldn't have treated numeric strings as numbers, but it's a practical decision, especially considering that they also have strict equality.

      NaN literally doesn't equal NaN.

      Good. NaN == NaN would be terrible. Glad to see that js got it right.

      Two words: global variables. If you've done any javascript, you know what I mean.

      Two words: strict mode. I'd much have preferred it to work that way be default, but c'est la vie

      Or have you ever tried to do any arithmetic in javascript?

      That number is equal to 0.6 at 64-bit precision. Why blame the language for giving the correct answer? If anything, blame the debugging tool for choosing to render the number in a way that you don't like.

    59. Re:Have you migrated to qbasic? by aix+tom · · Score: 1

      Thank god I use a sane language then. Even when it's "not cool" anymore. ;-P

      $ perl
      print 0.2 + 0.4
      ^D
      0.6

    60. Re:Have you migrated to qbasic? by joboss · · Score: 1

      Strings are also unicode by default which sucks on backend. There's a few gotches like that going from a client to backend language.

    61. Re:Have you migrated to qbasic? by Wraithlyn · · Score: 1

      Design isn't created in a vacuum.

      Most of the "crap" you see on webpages is stuff demanded by idiot project stakeholders (ie, the people paying for the work).

      "But it's the designer's job to educate the client blah blah..." I hear you saying. Sure it is. Let me join you in fantasy land where the client always heeds that education and advice. :P

      You can lead a client to water but you can't make them drink.

      TL;DR it's more complicated than "web designers suck".

      --
      "Mind, as manifested by the capacity to make choices, is to some extent present in every electron." -Freeman Dyson
    62. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      Tell me how you magically streamed these videos in 1998 when browsers didn't have codecs for videos and flash didn't support video streaming until 2002.

    63. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      Start at 1:27 for Javascript: https://www.destroyallsoftware.com/talks/wat

    64. Re:Have you migrated to qbasic? by K.+S.+Kyosuke · · Score: 1

      "Sane?" Who are you kidding?

      $ perl
      print ((0.2 + 0.4)-0.6)
      ^D
      1.11022302462516e-16

      --
      Ezekiel 23:20
    65. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      "JavaScript has some nice features. It's a pure OO language, it has a simple prototype-based model with differential inheritance"

      I disagree, I'd argue this is exactly what makes Javascript bad - it doesn't know what it is. It's not really truly OO, because you can't encapsulate and inherit at the same time, thus it's object oriented model is completely broken. Many Javascript apologists try to excuse this by saying "But it's prototypal OO!" - it doesn't matter, OO, is OO, if it can't achieve the goals of OO through allowing data hiding and inheritance at the same time then it's not truly OO - it's a half arsed broken implementation.

      In other ways, Javascript tries to pursue a more functional model in that it supports and makes use of first class functions and lambdas, but then it doesn't support immutable types so it fails at that as well.

      Javascript does what it does okay, because it's been butchered into doing so. But make no mistake, Javascript is the kid born with some serious birth defects - we have to love it because it's the only kid that can do client side web development for some reason, but it's retarded and broken nonetheless.

      It can't be excused as not being worse than most other mainstream programming languages because it is - sure it's no worse than languages like PHP, or Visual Basic, but it is far, far worse than Java, C#, F#, C, C++ and so on and so forth. The fact there are other bad languages doesn't excuse the fact that Javascript is terrible, and it shouldn't be allowed to mask the fact that where there's a choice - i.e. server side development, there are far far better choices out there.

    66. Re: Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      http://www.typescriptlang.org/

    67. Re:Have you migrated to qbasic? by Anonymous Coward · · Score: 0

      Not the OP, but I used some weird-ass multi-part streaming option for Netscape and a semi-functional Java applet I wrote for IE/whatever Microsoft's run the internet on your tv was called (WebTV I think?)/AOL's rebranded IE/etc. And then figured out how to get the same effect using Javascript without the massive suck that was Java applets for sane browsers.

    68. Re: Have you migrated to qbasic? by buchanmilne · · Score: 1

      Tell me how you magically streamed these videos in 1998 when browsers didn't have codecs for videos and flash didn't support video streaming until 2002.

      RealPlayer

  3. It's not that bad, just don't write PHP with JS. by Anonymous Coward · · Score: 5, Informative

    I come from a strong C++/Java background and was drug into the Node/JS world kicking and screaming. It's still not my platform of choice but at least I don't despise it anymore. A few things:

    1. Don't try to write PHP (or C++/Java/etc) with Javascript. You see a lot of people try to force Javascript into their way of programming and that's where a lot of the callback hell comes from. It's an event driven environment, just repeat that over and over.

    2. Take the time to familiarize yourself with ES6/Promises/Rx before you start. Promises vs. Rx is almost a religious discussion but when you get down to it, both do the job. This helps a lot with callback hell.

    3. After you've chanted it's an event driven environment often enough, start chanting everything is a stream.

    3. Use eslint religiously. This will find a lot of the mistakes new programmers make, especially ones coming from other languages.

  4. Absolutely not, and never will by sciengin · · Score: 2

    The only upside of Javascript is that it is available everywhere. (and kinda functionaly-sh)
    Everything else about that language is horrible.
    I barely tolerate it inside the browser, most of the time thanks to NoScript, not even that.
    So why the hell should I start putting this nonsense on servers?
    On servers I typically use C++ if I can, Java is the clients demands it, Haskell if I feel playful (Yesod is really great), Common Lisp if I feel like experimenting (Hunchentoot is interesting), Python if I feel lazy and just want to get the job done fast.

    I was aware that the state of Javascript development is pitiful, but the recent incident where the pulling of a simple String-padding library crashed hundreds of other projects outdid even my worst fears.

    1. Re:Absolutely not, and never will by AchilleTalon · · Score: 1

      In the browser, you will have to get used to it, because it is part of the HTML5 standard.

      --
      Achille Talon
      Hop!
    2. Re:Absolutely not, and never will by Anonymous Coward · · Score: 2, Informative

      Use a transpiler then.

      Write in a better language then compile to JavaScript / ECMAScript.

      ECMAScript is probably one of the worlds WORST languages out there.

      How about Coffee Script or TypeScript then transpile to JavaScript for deploying?

    3. Re:Absolutely not, and never will by Anonymous Coward · · Score: 0

      there's an HTML standard?!?

    4. Re:Absolutely not, and never will by Anonymous Coward · · Score: 0

      Yes, HTML5.

    5. Re:Absolutely not, and never will by Anonymous Coward · · Score: 0

      The last version of HTML is 4.01. HTML5 has no space between "HTML" and "5" to indicate that it is something else altogether.

    6. Re: Absolutely not, and never will by chispito · · Score: 1

      I was aware that the state of Javascript development is pitiful, but the recent incident where the pulling of a simple String-padding library crashed hundreds of other projects outdid even my worst fears.

      That really had little to do with JavaScript as a language and more to do with NPM, the package manager for NodeJS. I get that you'd love to hold that against JavaScript. I just think you'll have to find another reason.

      --
      The Daddy casts sleep on the Baby. The Baby resists!
    7. Re:Absolutely not, and never will by edxwelch · · Score: 2

      Interesting blog about node.js here:
      http://geekforbrains.com/post/...
      some quotes:
      "All this to say that it feels like the Node ecosystem is constantly moving. Not in a good way. New tools that âoetrumpâ old tools seem to come out daily. Theres always a new shiny thing to replace the other. Youâ(TM)ll be surprised on how easily this happens to you and the community seems to encourage it. You use Grunt!? Everyone uses Gulp!? Wait no, use native NPM scripts!

      Packages that consist of trivial code no more than 10 lines of code are downloaded in the thousands every day from NPM. Seriously!? You need a dependancy for array type checking? "

    8. Re: Absolutely not, and never will by Anonymous Coward · · Score: 0

      "The state of JavaScript development" describes the whole ecosystem, not just the language itself.

    9. Re:Absolutely not, and never will by Anonymous Coward · · Score: 0

      ah, now it all makes sense

    10. Re: Absolutely not, and never will by dave420 · · Score: 1

      And one can use JavaScript without using NPM. Your comment reeks of goalpost-shifting.

    11. Re:Absolutely not, and never will by Anonymous Coward · · Score: 0

      No thanks! NoScript disables Javascript in HTML5.

  5. Re:It's not that bad, just don't write PHP with JS by Anonymous Coward · · Score: 0

    Ditto to the Promises stuff to relieve from callback hell otherwise you'll be spending mucho time with the async module & getting that to work nicely.

  6. What you really want to know is by Anonymous Coward · · Score: 0

    If I've been to paradise, but have never been to me.

  7. Uh... by K.+S.+Kyosuke · · Score: 1

    ...no.

    But I never migrated to lhe LAMP disaster either.

    --
    Ezekiel 23:20
    1. Re:Uh... by wbr1 · · Score: 5, Funny

      Yep, still running a Gopher server on AIX. The way god intended. Been looking at PERL 2, but me thinks it is the tower of Babel.

      --
      Silence is a state of mime.
    2. Re:Uh... by Anonymous Coward · · Score: 0

      LAMP was a BRIGHT idea at the time.

    3. Re:Uh... by FormOfActionBanana · · Score: 1

      I'm think he's using Tomcat...

      --
      Take off every 'sig' !!
    4. Re:Uh... by KiloByte · · Score: 1

      LAMP is not a disaster if you choose a good P. There at least two decent mainstream choices (although users of either will cast aspersions on the other). Although, upgrading the M to P won't hurt, either.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    5. Re:Uh... by K.+S.+Kyosuke · · Score: 1

      If "P" were "PostgreSQL", that would indeed be the case. The "A" part seems largely redundant these days, though. Between reverse caching proxies and modern HTML5 features, I'm not sure why I'd bother with it. It seems that at least Go people ditched it completely already.

      --
      Ezekiel 23:20
    6. Re:Uh... by Anonymous Coward · · Score: 0

      The server to listen for and process http requests is redundant? ok...

    7. Re:Uh... by SeriousTube · · Score: 2

      You really should upgrade to perl 4. Perl 5 has a lot of nice ideas but comes with a lot of nonsense where they tried to make it object oriented and modular which you don't need, so stay away from that.

    8. Re:Uh... by K.+S.+Kyosuke · · Score: 1

      A separate one? Probably yes. There doesn't appear to be a shortage of decent HTTP server libraries that you can embed these days.

      --
      Ezekiel 23:20
    9. Re:Uh... by tigersha · · Score: 1

      I have never used LAMP in my life either, and I am not using Tomat. Switched from Java/EE to Rails and have always used Postgres, not MySQL.

      So I went from LAJP to LNRP. No LAMP.

      Also did some Clojure and now some Elixir. PHP? Programmed one little job in 2 days, and will never do so again, FFS.

      --
      The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
  8. I don't evev know what it is by Hognoxious · · Score: 5, Funny

    Nope. Can't be arsed. Even if I could, by the time I learn it it'll be obsolete & replaced by something with a retarded name like Cunt%% or something.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    1. Re:I don't evev know what it is by StormReaver · · Score: 1

      ...by the time I learn it it'll be obsolete & replaced by something with a retarded name like Cunt%% or something.

      Jim Jeffries, is that you?

    2. Re:I don't evev know what it is by Hognoxious · · Score: 1

      You mean Jim Jefferies?

      I hadn't heard of him before, but apart from him being Australian and slightly less handsome we're like fucking twins.

      The way he talks and goes off on tangents is very similar. Two beers and we'd be finishing each other's sentences.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  9. Much respect by twistedcubic · · Score: 5, Funny

    "...pretty, working, and half-way reliable products that make us money..."

    Now that's a honest business person!

    1. Re:Much respect by msauve · · Score: 1

      How is that honest?

      "[W]orking, and half-way reliable" are mutually exclusive.

      --
      "National Security is the chief cause of national insecurity." - Celine's First Law
    2. Re:Much respect by Anonymous Coward · · Score: 1

      I think he meant honest in the sense speaking honestly about his intentions, and not having honest intentions.

    3. Re:Much respect by Anonymous Coward · · Score: 0

      Au contraire, millions of people do work on Microsoft Windows every day and it isn't even 1/3 reliable.

    4. Re:Much respect by Qbertino · · Score: 1

      "...pretty, working, and half-way reliable products that make us money..."
      Now that's a honest business person!

      LOL!
      Nice one. :-)

      Truth be told, as I wrote in my original long post, I work in an agency of 30 with colleagues who know squat about IT and won't learn the difference between a client and a server.

      But they do like nice and shiny things to click on and as marketing/communication consultants are *very* good at selling them for obscene amounts of money. Also, appart from most agencies I've encountered, the entire company is 100% asshole-free which is a rare thing. 50% women contributes to that. ... Bottom line: I enjoy working here and I doubt I'd be building avantgarde web stacks any sooner and with more professionality in some smelly devshop full of socially inept jerks - which I have worked with in the past too - rather than in our brand new and shiny 90% hippster-compliant agency office with cute and sociable ladies on the crew and all around.

      If the people I do the "dev guy" for rake in bucketloads of cash by selling "change management intranets" to corporations which, on the online end, are basically pimped out stock-themed WP installations accompanied by insane amounts of marketing bullshit-bingo and "involvement workshops" I'll be the last to complain.

      I work part time, call *all* the web-technology and development decisions around here and get to fiddle with all the nice and shiny stuff I'm interested in all day.

      Why do you think I'm asking about the feasibility of a move from LAMP to Node?
      Because it's actually in my power to make such a strategic call, and like most, I've rarely had such an occasion.
      That's why I'm educating myself on this topic. I want to do this responsibly and my experience has me being very meticulous about this pondering and the decision process.

      But nice whitte joke anyhow. :-)

      --
      We suffer more in our imagination than in reality. - Seneca
  10. The real question by JustAnotherOldGuy · · Score: 5, Insightful

    The real question is why, and what would be gained from doing so?

    This would be a major project, is the return really going to be worth the investment of time and energy?

    I think there is often a desire, rational or not, among programmers to want to redo things and make them "clean" (whatever that means) and more efficient. It's a laudable notion, but it's often outweighed by the amount of work required to re-code everything from scratch. I've rarely found it to be worth the time and effort, frankly.

    My guess is that he'd be better off optimizing some of the choke points, or perhaps implementing one of the many existing development platforms. That may require some modification, but it would still probably be a better way to go about it. It's unlikely that his needs are so out-of-band or unusual that a standardized solution wouldn't work (again, even if it required some customization).

    Wanting "Something potentially scalable and perhaps even ready for zero-fuss migration to an entirely cloud-based platform" sounds very buzz-wordy to me, and that's a red flag in my book.

    Finally, the statement that "it's about correctly building a pipeline that won't be completely outdated in 10 years" seems to be pure wishful thinking.

    Good luck with that- I doubt ANY development environment is going to survive for ten years. That's an eternity in the world of coding and development. Tools get outdated as capabilities and needs expand and mature. Hell, I doubt I'll even be using the same text editor in 10 years, let alone an entire development environment.

    --
    Just cruising through this digital world at 33 1/3 rpm...
    1. Re: The real question by chispito · · Score: 1

      Yes but after the project fails, and he is let go, think how marketable he will be as a Full Stack Developer.

      --
      The Daddy casts sleep on the Baby. The Baby resists!
    2. Re:The real question by erktrek · · Score: 1

      Local Governments with no budgets have to make their custom software last for an insane amount of time before they can get a replacement. I know of one still running Dos & a Novell 3.1 server. Web apps seem a good way to keep things standard across a variety of aging and ancient computer systems. I do not necessarily mean that NodeJS is the answer here just that using the web (internally) seems to be a longer lasting solution then a platform dependant one (say windows app). With Node at least the govt IT people who may know javascript have a chance of parsing the backend server stuff to make changes etc long after the developer is gone. Of course the same could be said for PHP etc..

    3. Re:The real question by erktrek · · Score: 1

      arghh sorry "Novell 3.11"

    4. Re:The real question by 93+Escort+Wagon · · Score: 1

      The real question is why, and what would be gained from doing so?

      Given that they're currently on Wordpress, I'd think there's a good possibility they are already on the "reinvent the web wheel every few years" treadmill. So if I were talking to this guy, before I attempted to answer the question he asked I'd first ask another question - why did you move to Wordpress in the first place? Where you trying to address some existing problem(s), or was it just "hey Wordpress is popular right now so I'd like to learn it"? I suspect the latter; but, if the former was actually the case, did it solve the problem he was trying to solve?

      He described his current web stack as "half assed"... who's fault is that? Did he implement it?

      I really think there's a lot of important information that's missing here, not the least of which is - is there actually a significant underlying issue with how the site is being managed?

      --
      #DeleteChrome
    5. Re:The real question by LWATCDR · · Score: 1

      Or look at some other CMSs.
      Node.JS is nto a replacement for Wordpress.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    6. Re:The real question by Anonymous Coward · · Score: 0

      Agree with all of this "don't reinvent the wheel" sentiment. Maybe he's had a chunk of money thrown his way, though, and is trying to settle on an effective way to use it? If somebody else is keen, and it's their money...

      I do, however, take issue with one *very* minor point - I, sir, am still using vi!

    7. Re: The real question by undefinedreference · · Score: 1

      It's more than an eternity in the NodeJS world. Since the libraries and frameworks are under active development by a bunch of people that are happy to make backward compatibility breaking changes, it's likely that they'd be stuck on an archaic version indefinitely. That isn't making it future-proof, it's making development a constant task (as it is with any software that is in continuous use for a long time), except it will be more extensive than normal maintenance (which is 95+% of the time in the lifecycle of average software).

      The only difference between older platforms that are no longer "cool" and new ones is the age of the developers you hire: NodeJS is almost entirely people at the very beginning of their careers, while older languages are known by older and more established developers (that command higher salaries, although this gulf has been shrinking considerably in the last few years).

      People that want the latest all the time are simply afraid of grey hair and people that refuse to work 16 hour days with zero social life until they're obsolete and discarded. Most of those older developers already lived that and don't want to do it again.

      Good luck to the OP, I suppose, if they push forward with it.

    8. Re:The real question by Anonymous Coward · · Score: 0

      Good luck with that- I doubt ANY development environment is going to survive for ten years. That's an eternity in the world of coding and development. Tools get outdated as capabilities and needs expand and mature. Hell, I doubt I'll even be using the same text editor in 10 years, let alone an entire development environment.

      You got something against vi???

    9. Re:The real question by Anonymous Coward · · Score: 0

      Web apps seem a good way to keep things standard across a variety of aging and ancient computer systems.

      Web apps can't even keep things standard across modern browsers and browser versions.

    10. Re:The real question by JustAnotherOldGuy · · Score: 1

      just that using the web (internally) seems to be a longer lasting solution then a platform dependant one (say windows app).

      Agreed...although browsers may come and go and change, the underlying stuff will probably stand the test of time. There's no reason you couldn't build a web app that would (*SHOULD*) still work 5 or 10 years from now. But his idea of keeping everything the same for a decade is probably unrealistic.

      --
      Just cruising through this digital world at 33 1/3 rpm...
    11. Re:The real question by JustAnotherOldGuy · · Score: 1

      Or look at some other CMSs.
      Node.JS is nto a replacement for Wordpress.

      Yep. A modern CMS may last for quite a while, especially if they're committed to managing in house over the long haul. But it also sounds as though they have some custom dev tools that are going to be time-consuming to replace, so it might be better to fix what they can while transitioning to something that's already available rather than coding the whole thing new from the ground up.

      --
      Just cruising through this digital world at 33 1/3 rpm...
    12. Re:The real question by Dracos · · Score: 2

      And WordPress is antiquated, poorly written garbage that survives mostly because designers live for its theming ecosystem. Anyone that has actually read that heaping plate of spaghhetti code (with its big, juicy meatballs of bad practice and thick backwards compatibility sauce) knows not to touch WP.

    13. Re:The real question by Junta · · Score: 1

      I think there is often a desire, rational or not, among programmers to want to redo things and make them "clean" (whatever that means) and more efficient. It's a laudable notion,

      Also, it is all too common the programmer overestimates what the quality of the redo would look like, *especially* if they are looking at redoing someone else's code. They think 'ok, this is way more convoluted than it has to be', and then realize way too late they were wrong.

      Even more so when they think part of making it 'clean' *requires* reimplementation in another language. Now there may be valid reasons to reimplement in another language (better matching your available talent pool, better performance, you would just prefer it), but if it's just to 'make it clean', that can pretty much always be accomplished within the existing language choice.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    14. Re: The real question by Junta · · Score: 1

      It's really interesting because if you look at PyPI, you'll see a lot of this too, but not universally. Some projects exercise some degree of release management discipline and multiple supported branches and such. Others are managed like you describe, just a constant stream of whimsical updates.

      Across the industry there is a very *vocal* sentiment, particularly among newcomers, that stable branches and release management in general is for the birds. We have unit tests and continuous integration now, so why expend energy catering to the the 'old ways'. Veterans tend to be more reserved and careful and reluctant to chime in on a technology change, so the dialog is largely dominated by the enthusiastic 'change everything weekly' crowd.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    15. Re:The real question by Junta · · Score: 1

      Yeah, that stuff is ancient and annoying, lacking severely in useful features. Everyone worth their salt is using vim.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    16. Re:The real question by HornWumpus · · Score: 1

      Let me guess? Drywalled into a space with no doors?

      2 was netmare, but 3 was sweet.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    17. Re:The real question by DraconPern · · Score: 1

      Here's what is interesting... I have seen a lot of things being re-implemented in node.js, that is.. these are complete rewrite of a protocol, api, etc. but using pure js. The speed that things are getting written is really really fast. I have been looking at making the jump from C++ to node because of this. It's the most lightweight dev platform that let's you 'write once' and run anywhere. It's like.. java but better. The only issue is, node.js is really designed to be used on a cluster of machines on the server side.

    18. Re:The real question by johannesg · · Score: 0

      I think there is often a desire, rational or not, among programmers to want to redo things and make them "clean" (whatever that means)

      Do you clean your house? Or are you living in a garbage belt? In quite a few people there is a desire, rational or not, not to have piles of garbage sitting around everywhere in their daily surroundings. The same is true for programmers, whether you have the skills to recognize that garbage or not. The problem here appears to be your complete lack of understanding of source code - as demonstrated by you needing to add "whatever that means".

      Finally, the statement that "it's about correctly building a pipeline that won't be completely outdated in 10 years" seems to be pure wishful thinking.

      Good luck with that- I doubt ANY development environment is going to survive for ten years. That's an eternity in the world of coding and development. Tools get outdated as capabilities and needs expand and mature. Hell, I doubt I'll even be using the same text editor in 10 years, let alone an entire development environment.

      Funny that, I maintain a 20 year old system... Is it still running on the same development environment as 20 years ago? Of course not. It's a pretty damn clean piece of software, so it ports easily to anywhere I'd care to run it. Ooh, look, a _rational_ reason to want clean source code...

    19. Re:The real question by Anonymous Coward · · Score: 0

      "Drywalled into a space with no doors?"

      Wow, actually been there!
      We were going to upgrade our Novell server via the upgrade CD, but the server was no where to be found.
      (It was still online, just as it had always been for years, but we couldn't find the physical location of it).
      From its IP\Mac, we found which switch\network port\ethernet cable it was connected to.
      Tracing the ethernet cabling, eventually went into one wall, and that was it....
      Come to find out, that Novell server was drywalled 8months prior inside the walls.

    20. Re:The real question by tigersha · · Score: 1

      Programmers are like cleaning ladies who think it is easier to demolish the rebuild the building instead of cleaning it up.
      This works, but....

      --
      The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
    21. Re:The real question by goose-incarnated · · Score: 2

      Good luck with that- I doubt ANY development environment is going to survive for ten years.

      I've been using the same dev environment (mostly) for the last twenty years. Sure, I've updated my vimrc/emacsrc, I've copied my Xresources to newer machines and I've backed up my GNUStep directory and restored on newer machines over the years.

      My workflow has remained exactly the same - edit/make/deploy[1]/test/repeat. I don't use an IDE, my 16-virtual-screen WindowMaker desktop *is* the IDE.

      [1] Deploy means anything from "push to test-server" to "program the device's flash with new firmware".

      (Yes, I know - you meant "language-framework environment"; I just thought it might be useful to know that not all frameworks are web-frameworks)

      --
      I'm a minority race. Save your vitriol for white people.
    22. Re:The real question by JustAnotherOldGuy · · Score: 1

      Do you clean your house? Or are you living in a garbage belt?

      I clean my house, but I don't tear out the walls and replace them each time.

      -

      as demonstrated by you needing to add "whatever that means".

      "Clean code" means different things to different people, hence my comment. Now you're just being an ass and a bit of a pedant. If it didn't mean different things to different people we wouldn't be having this conversation, would we?

      -

      Funny that, I maintain a 20 year old system... Is it still running on the same development environment as 20 years ago? Of course not.

      Exactly: your development environment isn't the same as it was 20 years ago. Thank you for making my point for me, I appreciate it.

      --
      Just cruising through this digital world at 33 1/3 rpm...
    23. Re:The real question by JustAnotherOldGuy · · Score: 1

      The only issue is, node.js is really designed to be used on a cluster of machines on the server side.

      I didn't realize that...is it not suitable for use a single server setup, or is it preferred to use a cluster? I'm not familiar with it so that's why I'm asking.

      I don't think Javascript is as dreadful as many people here seem to consider it, but I would be a little leery of writing a huge application in it (although, at the same time I am quite fond of jQuery and what it can do on the client side).

      --
      Just cruising through this digital world at 33 1/3 rpm...
    24. Re:The real question by omnichad · · Score: 1

      I implemented b2 a while before Wordpress was well-known (or maybe even created) and it wasn't too bad. Wordpress bloated so fast that it was almost unrecognizable as based on b2 except for a few database tables with the same name.

    25. Re:The real question by Gondola · · Score: 1

      Raise your hand if you had a CNA before the "C" was cisco...

  11. Works fine by etinin · · Score: 1

    Haters gonna hate, but well-written JS performs better than most php software. You could argue Javascript makes it easier to develop shitty code, but if you look at java, C and any other language for that matter, most software is shit and the one to blame is the programmer, not the language.

    From shit ass slow angular websites to instant loading react ones, there just can't be a generalization. You have awesome software like Atom written in node and I bet many people would never realize it was written with Node.js.

    We also have a lot of proprietary crap (look at IBM/MS stuff) written in C and now Java which are slow as a turtle. Node by itself is a fine tool and it sure does help me build better websites.

    Just don't think a MEAN platform is gonna be the best for everything. I've often used node with PostgreSQL, for example, because it was a better combination for the job. The same applies for LAMP, it's not snake oil. Know your tools and use them wisely and you'll be fine with whatever path you pick.

    --
    "I decided I could write something better than everything out there in two weeks. And I was right." - Linus Torvalds
    1. Re:Works fine by Anonymous Coward · · Score: 0

      I like how you state that there can't be a generalization, yet that's what you do in your very first sentence.

    2. Re:Works fine by Anonymous Coward · · Score: 5, Interesting

      All truth passes through three stages. First, it is ridiculed. Second, it is violently opposed. Third, it is accepted as being self-evident.
      — Arthur Schopenhauer, German philosopher (1788 – 1860)

      I can second that it works fine. I'll go further to say it doesn't just work well, it works!!! Sadly though, it does take a better programmer to excel in JS/NodeJS.

      1) Yes, it's asynchronous and takes some getting used to. But so are real CPUs, or perhaps you didn't notice because of all the language abstraction.

      2) Yes, it's loosely typed. But try passing an actual function as a parameter in a strongly typed language. Or get a function back as a return value. Better yet, get back a runtime specialized function as a return value.

      3) Yes, it's single threaded. And what a God Send that is. You can have the net effect of threading libraries with thread/variable synchronization without any of the overhead. (If you learn how to program in an async environment. Which seems to be hard for some people.)

      4) Yes, NodeJS uses callbacks. So learn Promises. You avoid callback hell and get extra cool features, like queueing Promises. (Oh, right. Promises are hard.) :-)

      5) Forget about OO polymorphism. JS take polymorphism to a level that Java/PHP can't even dream about. What you need Java Aspects for is natively baked into JS. And it did that on day one, not seven generations later or with an addon. JS is a natural at Aspect Programming (as well as Functional Programming.) Which makes life simple to go from prototype to fully featured. Especially when you find out about "features" the week before deployment. (Hint: it's this feature that make integration testing easy.)

      6) NodeJS along with PM2, gives you the advantages of Docker Containers without the complexity or overheard or wasted disk space (or the need for tooling.) And it doesn't have to run in privledged mode. Which is only important if you think security is important. :-) You can break down your API into single endpoints (or groups of endponts) and run them seperately in their own execution context. Change, replace, update, deploy services without downtime or affecting other services on the same NodeJS instance. THIS IS Micro Services!

      7) NodeJS's module system let's you run several versions of the same package but only in the dependency tree where they're needed. Think of running several Java6 libraries in the same JVM execution context as several Java8 libraries, at the same time, with no possible conflicts. Blow your mind yet?

      I could go on, but that's not the point I'm trying to make.

      First they laughed that JS was a "toy" language. Now they're opposing it as a new platform. So when will it be seen as self-evident?

    3. Re:Works fine by Dracos · · Score: 2

      Look back on the hype cycle of MongoDB and NoSQL: it was all the rage three years ago, now it's a fountain of regret. The same will happen with Node.

    4. Re:Works fine by Pseudonym · · Score: 1

      Haters gonna hate, but well-written JS performs better than most php software.

      I doubt anyone would dispute that, but surely that's an abusrdly low bar.

      I did some node.js for a while. The more I used it, the more I realised that what I really wanted was Erlang. All of the advantages of asynchronous events, plus real concurrency, real thread isolation, real stack backtraces...

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    5. Re:Works fine by rnturn · · Score: 2

      "... now it's a fountain of regret.

      I gotta remember that one. Seems to be a apropos description of several projects at work.

      --
      CUR ALLOC 20195.....5804M
    6. Re:Works fine by brantondaveperson · · Score: 2

      Yes, it's loosely typed. But try passing an actual function as a parameter in a strongly typed language. Or get a function back as a return value. Better yet, get back a runtime specialized function as a return value.

      Yeah. I think most strongly typed languages can do that perfectly fine. C++11, for instance, does it pretty well.

    7. Re: Works fine by Anonymous Coward · · Score: 0

      If you are running all your services on the same nodejs instance, then it's logically separate. Docker with alpine and a golang based single microservice running inside it, is tiny, about 6mb total.

    8. Re:Works fine by coofercat · · Score: 2

      As a sysadmin (devops?), I don't have anything against the language per-se, but so far, I haven't been impressed with the packaging and deployment options. Maybe I'm not doing it right (quite possibly), but so far I'm not especially impressed with npm and pm2. I find they're both a bit opaque and don't feel very natural to me - I don't feel like I have proper control over them - it feels like they're doing 'clever' things on my behalf which I'd rather do myself.

      None of that is a reason to avoid node.js, but it's not a glowing endorsement for it either. Ultimately this shit has to run in production, and that means people like me have to deploy it. That means we want 'clean' and reliable, repeatable (etc) ways to get things onto boxes. It feels like the node.js world is about as ready for production as Ruby, Python etc. All possible, but none very friendly.

      Java, for all its faults is actually pretty easy - you can have multiple versions of the language, libraries and application quite easily. Perl's weirdly pretty easy too (although in truth, multiple language versions would be fairly painful). PHP is really easy, so long as you want it in Apache web server (but again, multiple versions is hard).

    9. Re:Works fine by tigersha · · Score: 1

      Agreed. Working through the Phoenix book right now.

      And add "real composability" to that list.

      --
      The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
    10. Re:Works fine by Anonymous Coward · · Score: 0

      7) NodeJS's module system let's you run several versions of the same package but only in the dependency tree where they're needed. Think of running several Java6 libraries in the same JVM execution context as several Java8 libraries, at the same time, with no possible conflicts. Blow your mind yet?

      Yeah, this isn't a plus, this is giving the integration stage of development the finger and letting everyone go off and be their own "code cowboys" and by some gigantic miracle the whole thing fits together. However, shanty towns generally are pretty successful so maybe the ability of people to cobble random things together should never be underestimated. But seriously, this being an "ok" or "good" situation is the one thing I try to hammer into new devs that IS NOT OK and is a great example of technical debt that will blow up on you. Example: that crazy left-pad function module that wrecked JS projects for a least a whole day. If you say "well it was only for like a day, that's not too bad" you have very much missed the point and this fire and forget development that NodeJS and the like are what people are, and should be, really made at. Sure, JS as a language is honestly fine enough and not really that much more shit or not shit than any other because they all have edge cases they are kinda shitty at, knowing that and how to deal with that is what makes the difference between a "real" software developer and some script kiddie that took a couple web tutorials. Sure dealing with library development is effort, but that is the point. If you want your code to be able to live on you either need to keep maintaining it relative to the libraries you need, get rid of as many libraries as possible to reduce debt (Example: Kodi), or build on a very specific version and freeze everything there (which, depending on the nature of application and library, might be totally fine). Too many new devs do not get exposed to real code maintenance and end up treating all their projects like one off scripts that no one comes back to modify or maintain and have low consequences for failure.

      If C is shooting your foot off with a shotgun, NodeJS/current JS library env is like planting a giant minefield and then spending the next few decades cleaning them up because you forgot you'd have to come back through that way.

    11. Re:Works fine by Perky_Goth · · Score: 1

      Not to mention actual, real functional languages.

    12. Re:Works fine by brantondaveperson · · Score: 1

      Haha. And here's silly old me, writing real, functional code (I assume we're talking about code that functions, not functional languages, but anyhow) in C++. I must just simply be wrong. All that pesky compile-time checking causing me to write fewer bugs and deal with fewer run-time exceptions.

      Although, to be fair, I am comparing it with Java and Python here.

    13. Re:Works fine by Perky_Goth · · Score: 1

      Yeah, not going to agree with your new comment. At all.

      But it wasn't a dig at you, it was at who you were replying to: " try passing an actual function as a parameter in a strongly typed language. Or get a function back as a return value. Better yet, get back a runtime specialized function as a return value." are perfectly normal things to do in haskell or scala, which are definitely strongly typed.

    14. Re:Works fine by brantondaveperson · · Score: 1

      Ha. Fair enough. Agreed.

  12. Node what? by rhysweatherley · · Score: 3, Insightful

    I have yet to come across a problem in my career where googling it reveals Node.js as a recommended solution. Not all of us are building web apps, and frankly the web app people should probably stop and consider whether a proper application is what they really need.

    1. Re:Node what? by Anonymous Coward · · Score: 0

      OMG. This++ so much.

    2. Re: Node what? by cyber-vandal · · Score: 2

      Web applications are popular because you can deploy them instantly to all your users and they work across multiple platforms including mobile with little tweaking. Good luck doing that with a "proper" application.

    3. Re:Node what? by Anonymous Coward · · Score: 0

      if you don't make web apps then maybe you should shut up.

    4. Re:Node what? by Anonymous Coward · · Score: 0

      Yes the answer is use, some language.. WTF kind of stupid question would result in that dumb of an answer?

    5. Re:Node what? by ZeroWaiteState · · Score: 1

      You mean you haven't heard the app-Appy guy? He must be on vacation.

    6. Re: Node what? by Anonymous Coward · · Score: 0

      You just need to pick the right combination of frameworks and programming language. Everything can be converted to everything else nowadays. Web apps give you transparent data mining, easier advertising options, and the ability to hold the software hostage over the users' head. That's really all they bring to the tables nowadays. Auto-updating applications is easy even without root access.

    7. Re: Node what? by cyber-vandal · · Score: 1

      Written many cross platform applications that work on Windows, Mac, Linux, iOS and Android have you? Which middleware did you use? How did you instantaneously, without user intervention, deploy the latest version to every user's machine?

    8. Re:Node what? by Anonymous Coward · · Score: 0

      All this talk about Node.js is pure nonsense. Everyone knows only proper apps can properly app apps. Appy apps are proper by default. Apps! -PCP (just filling in while he's on vacation)

  13. I don't get node.js hype... by Anonymous Coward · · Score: 0

    Everything runs in parallel but your code? Huh? You mean, the whole thing is parallel just because underlying c/cpp libs are multithreaded? What the fuck is the benefit of that?

    1. Re:I don't get node.js hype... by NotInHere · · Score: 1

      No, that's the fun thing about asynchronous programming: nothing runs in parallel at all. It all runs in the same thread. You can add worker threads, but JIT engines weren't designed for multiple threads, as well as browsers, so its not done.

      Maybe with languages like Rust in which you can do actual proper multithreading without stepping onto your toes (even better than in Go!) this might change, but its a long time until servo takes off, a very long time.

    2. Re:I don't get node.js hype... by Anonymous Coward · · Score: 0

      > No, that's the fun thing about asynchronous programming: nothing runs.

      Fixed That For You. The chokepoints of "asynchronous" programming are inevitable, and they can and do break projects at unexpected points that can be very difficult to test.

  14. Ruby Community / Rails is hardly "a mess" by Anonymous Coward · · Score: 0

    Rails 5.0 is about to be released. Most gems that use have a full test suite. Bundler has done away with the problems of gem dependencies long ago, come try it out again..

    1. Re:Ruby Community / Rails is hardly "a mess" by NotInHere · · Score: 1

      Ruby and javascript are both crap, because they are barely strongly typed, and you have to unit test everything in order to have *some* guarantees about your code. It might just outright crash because you wanted to call a number like a method. Or worse, it might continue execution but with unintended consequences.

      Putting js onto the client is one thing. It is sandboxed in one of the the world's best sandboxes and it can't do much harm there.

      But having it on the server, where it processes user data and decides whether somebody is admin or not? No, javascript is no language for that, nor is ruby or php. Js is maybe the best of those three, but still a real mess.

    2. Re:Ruby Community / Rails is hardly "a mess" by Anonymous Coward · · Score: 0

      I'm running into the flexibility problems of both right now. You have to run only in unicode, because using POSIX C breaks basic assumptions, but you have to spend 15 times as much work testing *every single language type in combinatorial combination*, and you've just blown your entire budget on the framework to support the nosense. Been done there, done that collected 1000 hours of consulting pay while the projects missed every single deadline and the next script kiddie released an alpha pretending to be a beta release that all the potential clients bought there.

      This is the third time. I collected paychecks and successful milestones, and this is *exactly* how I survived the dotcom. Do successful projects, do *not* tie your name to the boat anchor that the whole project becomes.

    3. Re:Ruby Community / Rails is hardly "a mess" by KermodeBear · · Score: 4, Interesting

      I've had to learn some Ruby to support automated testing written in Ruby and Cucumber.

      I hate Ruby.

      Ruby feels like someone took Perl and intentionally made it even worse.

      The syntax is awful. Pipes and hashes and at symbols everywhere. The documentation is not good. Many packages - I'm sorry, "gems," because we have to be cutesy - don't have documentation at all, not even in the source code. Typing? What's typing? Everything is an object! That's all the type you need, right? Curly braces? Pffft. Those are to passe. You need to close things with an 'end'. Methods with ? in the name? Sure, why not. It gets really fun when you're using that character as a method name and an operator.

      I can forgive the anti-curly-brace thing, but everything else about the language feels like it was developed by an 8 year old watching bad hacker movies. So much language-specific crap that does utterly nothing to enhance readability or ease of development.

      The day I never have to touch Ruby again will be a great day.

      --
      Love sees no species.
    4. Re:Ruby Community / Rails is hardly "a mess" by BlackPignouf · · Score: 2

      You need to close things with an 'end'.

      You don't need to.

      10.times{
          puts "HELLO"
      }
      10.times do
          puts "HELLO"
      end

      Both have correct Ruby syntax.

    5. Re:Ruby Community / Rails is hardly "a mess" by Anonymous Coward · · Score: 0

      Ruby feels like someone took Perl and intentionally made it even worse.

      I am buying you a beer in spirit, because I said this exact thing a few years ago.

      As for node... It's great if you write once and throw it away. Maintenance is hideous, because shit is breaking all the time because the ecosystem is young and nobody knows what the fuck they're doing.

      It's literally a scripting language with some weightier armaments thrown in. Use it for that, and you're gold. Use it for a serious project, and good luck with that.

    6. Re:Ruby Community / Rails is hardly "a mess" by Anonymous Coward · · Score: 0

      I've had to learn some Ruby to support automated testing written in Ruby and Cucumber.

      I hate Ruby.

      Ruby feels like someone took Perl and intentionally made it even worse.

      The syntax is awful. Pipes and hashes and at symbols everywhere. The documentation is not good. Many packages - I'm sorry, "gems," because we have to be cutesy - don't have documentation at all, not even in the source code. Typing? What's typing? Everything is an object! That's all the type you need, right? Curly braces? Pffft. Those are to passe. You need to close things with an 'end'. Methods with ? in the name? Sure, why not. It gets really fun when you're using that character as a method name and an operator.

      I can forgive the anti-curly-brace thing, but everything else about the language feels like it was developed by an 8 year old watching bad hacker movies. So much language-specific crap that does utterly nothing to enhance readability or ease of development.

      The day I never have to touch Ruby again will be a great day.

      curious question! how much time did you waste, coding in ruby?

    7. Re:Ruby Community / Rails is hardly "a mess" by Anonymous Coward · · Score: 0

      Now keep track of trailing commas in hashes and arrays, And good luck with that!

    8. Re:Ruby Community / Rails is hardly "a mess" by ZeroWaiteState · · Score: 1

      You forgot you can also modify constants.

    9. Re:Ruby Community / Rails is hardly "a mess" by BlackPignouf · · Score: 1

      Ruby and javascript are both crap, because they are barely strongly typed

      Don't put them in the same bin. Both are dynamically typed, but Ruby is strongly typed and JS is weakly typed.
      JS:

      a="10"
      -> "10"
      a-1
      -> 9
      a+1
      -> "101"

      Ruby:

      a="10"
      ->"10"
      a+1
      ->TypeError: no implicit conversion of Fixnum into String

    10. Re:Ruby Community / Rails is hardly "a mess" by Anonymous Coward · · Score: 0

      The syntax is awful. Pipes and hashes and at symbols everywhere.

      Pipes are used in blocks to mark block arguments.

      (1..10).inject(0) do |sum,i|
          sum += i
      end

      At symbols are used as sigils in front of a @variable to indicate that it is a class variable (i.e. its scope). You don't need any sigils for local variables (variable is enough.)

      Hashes: I'm not sure what syntax element you are talking about.

      1. # starts a comment.

      2. { 'foo' => 'bar' } is a hash too.

      3. "Variable interpolation in strings uses the #{syntax}"

      I know you know Ruby, but I'm just explaining things here to random passers-by. It sounds a bit like your experience is limited to a single framework or something though.

      I find the language more readable than Python, really. A sample of your code would be nice. One that demonstrates your syntax grievances.

    11. Re:Ruby Community / Rails is hardly "a mess" by steveb3210 · · Score: 1

      I've had to learn some Ruby to support automated testing written in Ruby and Cucumber.

      I hate Ruby.

      Ruby feels like someone took Perl and intentionally made it even worse.

      The syntax is awful. Pipes and hashes and at symbols everywhere. The documentation is not good. Many packages - I'm sorry, "gems," because we have to be cutesy - don't have documentation at all, not even in the source code. Typing? What's typing? Everything is an object! That's all the type you need, right? Curly braces? Pffft. Those are to passe. You need to close things with an 'end'. Methods with ? in the name? Sure, why not. It gets really fun when you're using that character as a method name and an operator.

      I can forgive the anti-curly-brace thing, but everything else about the language feels like it was developed by an 8 year old watching bad hacker movies. So much language-specific crap that does utterly nothing to enhance readability or ease of development.

      The day I never have to touch Ruby again will be a great day.

      Whats really wrong with having a ? in a function name? Other than C didn't do it in 1971...

      Written in another language, people often prefix boolean-return functions with is_, e.g. obj.is_deposit - to me its much more readable and clear that your "asking a question" by writing obj.deposit?

      Again, pipe is just a chracter - whats wrong with using it? They are used to denote blocks, e.g.

      0.upto(10) do |i|
          puts "i"
      end

      Also, I'd be curious to know what "language specific crap" you're referring to, theres plenty to like..

    12. Re:Ruby Community / Rails is hardly "a mess" by tigersha · · Score: 2

      Agreed. a PHP Programmer calling Ruby a mess is just deluded or plain stupid.

      --
      The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
    13. Re:Ruby Community / Rails is hardly "a mess" by tigersha · · Score: 1

      Ruby is not based on Algol/Pascal/C/Java thing. It is based on Smalltalk with a lot of LISP thrown in. That is why

      a) It is so cool
      b) Codemonkeys regard it with distaste.

        And curly brackets suck donkeyballs.

      --
      The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
    14. Re:Ruby Community / Rails is hardly "a mess" by Anonymous Coward · · Score: 0

      Would it kill you to use a proper em-dash? You carelessly used a hyphen.

      This:

      Many packages - I'm sorry, "gems," because we have to be cutesy - don't have documentation at all, Should be this:

      Many packages — I'm sorry, "gems," because we have to be cutesy — don't have documentation at all,

    15. Re:Ruby Community / Rails is hardly "a mess" by TeknoHog · · Score: 1

      Curly braces? Pffft. Those are to passe. You need to close things with an 'end'.

      Fortran uses the 'end' convention, and it was the first high-level programming language. As a more recent language for scientific computing, Julia has adopted this, and I personally prefer it to both braces and Python's syntactical indentation.

      Basically, I want to minimize the amount of punctuation (aka line noise) I see. Line breaks are a simple way of getting rid of semicolons (unless you really need to write one-liners that aren't). For blocks you need something else, and Python's way is too fragile between different programmers/editors.

      --
      Escher was the first MC and Giger invented the HR department.
  15. you have to be kidding ? by joss · · Score: 3, Informative

    I used node for a while, I should have known better, but it sure made a change. Not a good change, but definitely a change. I think this explains it pretty well: https://www.youtube.com/watch?...

    --
    http://rareformnewmedia.com/
    1. Re: you have to be kidding ? by Anonymous Coward · · Score: 0

      That video is 4 years old you fucking tool.

    2. Re: you have to be kidding ? by Anonymous Coward · · Score: 1

      And, yet... still true today.

    3. Re: you have to be kidding ? by Anonymous Coward · · Score: 0

      Perfect

  16. There are two kinds of people by RightwingNutjob · · Score: 4, Insightful

    1. Those who use real programming languages.
    2. Those who are surprised when their shit breaks because someone on the other side of the internet sneezed.

  17. The fuck is node.js? by Anonymous Coward · · Score: 0

    I'm seeing more stories about it.
    Is this something I'm supposed to just no about?
    I realize it's something to do with javascript, but what is is exactly?

    1. Re:The fuck is node.js? by Anonymous Coward · · Score: 0

      javanese people from hawaii declared war on the apache tribe and took over internet world

    2. Re: The fuck is node.js? by Anonymous Coward · · Score: 0

      Server side JavaScript. It's been a thing since 2011. It's big advantage us that it's all event based, so you can maximize a server with one process per core. Other languages make you play the guess how many threads game.

    3. Re: The fuck is node.js? by Anonymous Coward · · Score: 0

      You should know it. It is web server designed to run on cloud and apps are written in javascript. I would use it for light servers but I don't want to use javascript for large apps.

    4. Re: The fuck is node.js? by Anonymous Coward · · Score: 0

      Like Apache Tomcat in 1999.

    5. Re: The fuck is node.js? by terjeber · · Score: 1

      No

  18. There is little reason to "migrate" by DrXym · · Score: 1
    Node.js isn't a bad environment, but I can't see much reason to move from some other web hosting technology. I suppose if the computer was maxed out with concurrent processes to serve content then perhaps the event based Node.js model might be beneficial. But if not, then it's moving for moving's sake.

    Aside from its benefits, Node.js has some substantial dangers. The whole npm model of no locking by default and fuzzy matching is a security disaster in the making.

    1. Re:There is little reason to "migrate" by Anonymous Coward · · Score: 0

      How the fuck would it make ANY change!? You know what happens to a request when it wants to read from a file or db? A fucking thread is started, that's what. So there you go, in node you have "maxed out concurrent processes". Which as far as I can tell are blackbox and there's no control over how many threads there actually are. And only once the thread finishes you are back to your "event".

      I mean, at least use visual basic or something which has good event framework. Node is just crap for debugging and maintaining. Actually it only has one strong point: job security of the original programmer.

    2. Re:There is little reason to "migrate" by DrXym · · Score: 1
      Node.js is event based and heavily asynchronous. A single process can serve multiple incoming requests via handlers which in turn asynchronously run a database query and leave IO unblocked while it's happening. It might take 1s for the query to complete but the process isn't blocked while it happens and can be serving other requests in the meantime. It means it can scale concurrently with the load. It also has cluster APIs and other functionality if desired.

      Most PHP instances run as N spawned subprocesses where it can handle N concurrent requests and no more. Execution is synchronous so if each subprocess is blocking on some query then the website is too.

      So that's the benefit. But as I said I don't see it being a justification to move unless someone had scaling issues. And even if someone had scaling issues, they could always just set N to some higher number. I doubt it's a big deal for most sites.

      That doesn't mean PHP is a good language. It's awful language but migrating code to something else without a good reason is rarely a good idea in itself.

    3. Re:There is little reason to "migrate" by NotAPK · · Score: 1

      "and can be serving other requests in the meantime."

      Kind of.

      The point that everyone seems to forget is that at the end of the day the "work must be done". It doesn't necessarily matter if you do it via some fancy non-blocking IO framework, or multiple threads, the WORK MUST BE DONE.

      Please try to remember that.

      Node.js is no magic silver bullet, not by any measure!

    4. Re:There is little reason to "migrate" by DrXym · · Score: 1

      Node.js is obviously bound by the CPU and other constraints. The point is that if a database query takes a second to return the entire thread isn't blocked until the result comes back. In JS, the query goes off with a promise and the promise is executed when the result is returned. In the meantime the thread can be serving other requests, also from events and handlers. It's not a magic bullet by any means and writing asynchronous code can be painful and nasty. But to return to my original point if someone has PHP working, the fact that Node.js might be more efficient is not a good reason in itself to migrate unless scaling is a problem. And for most setups it wouldn't be.

  19. You have a problem... by Anonymous Coward · · Score: 0

    You mentioned that your company has built their offerings on Wordpress. Because of this decision you have more maintenance needed to keep things running. The problem isn't with PHP.

    Node.js has blogging packages available such as Ghost as well as numerous other packages. Callback hell is a thing and it really doesn't go away. Breakage and other issues can arise regardless.

    The problem sounds more like your company is relying on others for functionality. (plugins in wordpress - you'll be trading for packages in node) If you rolled your own you'd have less maintenance needed.

  20. No by Anonymous Coward · · Score: 0

    No. JavaScript sucks.

  21. From the original article by Anonymous Coward · · Score: 0

    "PHP is often and perhaps rightfully considered 15 years ahead of the game with stuff like Drupal, Joomla, EzPublish or WP,"

    No. It is is almost never considered ahead of any game other than a quick and dirty prototype.
    PHP *can* be done right of course, but it rarely is, as you concede in the next sentence (when you talk about the architecture).

    1. Re:From the original article by omnichad · · Score: 1

      Drupal and WP are both not examples of PHP being ahead of the game. Those are examples of bloat and inefficient code taken to an extreme.

  22. As a hoster/developer by guruevi · · Score: 1

    what's your advice?
    Don't
    What downsides of JS on the server and in Node.js have a real-world effect?
    Scalability and lack of threads (unless you do tricksy things), lack of optimization. Sure you can throw more hardware at the issue, but if all you can pay for is a 300MB RAM, 1 core on a 1.2GHz 2nd Gen. Intel Core VPS, LAMP (or rather nginx) will easily maintain 10k hits per second for dynamic pages.
    Is callback hell really a thing?
    Yes, pure OOP in general is an issue when you need any sort of state
    And what is the state of free and open-source Node products...?
    There is a 'framework' for just about any solution. If you call every CMS a 'framework', it never has to be finished/useable out of the box right?
    Is there any trend inside the Node.js camp on building a platform and CMS product that competes with the PHP camp whilst maintaining a sane architecture
    It's very hard to do it with classic programming in classic languages (like PHP or C), it's worse when everything is an object that has unreadable API's, different style, interwoven dependencies etc
    or is it all just a ball of hype with a huge mess of its own growing in the background, Rails-style?
    Isn't it always?

    PHP works well because it's easy to learn and maintain, it may be easy to make really bad mistakes but it also means it's equally flexible. How many times I haven't cursed at Ruby or even Perl for 'tainting' a variable because someone deep, deep down did something funky like save state in a text file.

    --
    Custom electronics and digital signage for your business: www.evcircuits.com
  23. "an eternity in the world of coding" by Anonymous Coward · · Score: 2, Interesting

    Code lasts a surprising amount of time compared to the mindset of the mainstream programmer. You know, the payroll stuff running on mainframes, embedded stuff running everywhere, that sort of thing. The short timespans we see on the "consumer" side, moreso on "web" and "apps" and "cloud" and other buzzwords. In fact, html5 is all about moving on from previously working stuff and "upgrading" to the latest fad. That's why it's branded a "living standard".

    Anyhow, php and mysql are rotten pieces of crap and so is wordpress, of necessity since it's built on top of crap. node.js has the same problem. So you can stuff your wildly inefficient stack "in the cloud" so you can throw resources at your room-heater software with "web-scale" wild abandon. "Oh yeah, future proofing, baby!" Well, no.

    Me, I make sure most of the html is of the old-and-working, not the "living (only in the latest nightly browsers)" kind, meaning I still stick to mostly html4 and css, and generate both on the pre-deployment server. Meaning most content is served statically, and can be pre-compressed. That scales wonderfully. The little dynamic stuff what's left after that, eh, we can deal with it. This is very old school, but I've yet to see the whippersnappers on the web-lawn manage to do better by throwing more code and more stack layers, even more stacks, requiring more resources, at the problem. It really doesn't matter what flavour they pick, as they keep on picking the suckiest, ickiest flavours. Like, oh, php, mysql, and node.js. Migrate from shit to crap? Maybe the other steaming heap of manure will stink less? Geeze, I don't know. Why don't you try and find out? I'm sure it'll be a worthwhile experience! Don't forget your complimentary family-sized bottle of turd polish.

    1. Re: "an eternity in the world of coding" by Anonymous Coward · · Score: 0

      Jesus. Die already Grandpa.

    2. Re:"an eternity in the world of coding" by Anonymous Coward · · Score: 1

      An old fuddy duddy myself, when I hear nodejs fan bois make statements like software over 10 years old is unrealistic, I just shake my head. I've got code older and still running than the kids making statements like that. Of course, we don't know what we're talking about cuz we're old, and this is the new way. Again, like it was the previous 3 or 4 times X has been done. It is amusing to watch them scramble to try and solve problems which they don't even understand they are having which have been solved several times already. You're welcome to pull up a seat on my porch as we watch the kids run into their newest problem that was solved in the 90s.

    3. Re:"an eternity in the world of coding" by DraconPern · · Score: 1

      You are forgetting that a lot of useful stuff were written in ActiveX controls and Java applets at the time of html4. I still see tons of those and still have to deploy them on new machines. I guess still like to use those too....

  24. Short answer: dont by MyDixieWrecked · · Score: 3, Interesting

    A lot of people are spewing a lot of well-founded hate at the node platform, but the comments are missing a lot of substance.

    Node is just ok. What it is amazing at is doing lots of asynchronous IO, and has some libraries that make this pretty easy (i.e.: async). When all you need to do is read files and hit APIs and write files it's great.

    Now node has a lot of shortcomings. For one, it's really not that fast when doing actual processing. If you need to do any kind of remotely complex calculations, including things like html template rendering (handlebars), data structure transformations or even like zipping/unzipping, it's slow as a dog. And since data calculations aren't IO, async operations actually start to slow you down. AND, unless you explicitly do things in an async manner, your whole node process will lock up and only that one task will execute, which can cause all kinds of latency issues with your app.

    One can argue that ruby, etc suffer from the same fate and that's why you have multiple processes running. But because of node's async nature, if you are using a web framework like express, each process will potentially be handling multiple clients. And process that's processing will cause those clients to get slower responses and any crash will kill all of those clients.

    There is also the mess that is npm, where it becomes very easy to have a 700MB dependency directory which SUCKS to deploy to multiple servers.

    That's just my experience as a node Dev for the past 18 months.

    --



    ...spike
    Ewwwwww, coconut...
    1. Re:Short answer: dont by Anonymous Coward · · Score: 0

      From what you say, it sounds like what Node is good for, you could just use Clojure instead, and be using something that sucks less in all the other areas.

    2. Re:Short answer: dont by joboss · · Score: 1

      Node is great basically because it fills a set of niches really nicely. I've been developing for a long time doing the same thing in Java, C even PHP which is a horrible language to write a sockets daemon in.
      If you have a really rich web/browser targeting application where you want fast real time communications with things like websock and integration into a lot of sources node.js is great. You can whip up things in it really fast and connect things together extremely easily. It also has the benefit of being able to share libraries between server and client.
      It does have a lot of hangups as well though. I agree lack of quality control on NPM is concerning. Writing especially large enterprise systems in JS also takes and additional amount of effort to decide how to enforce a structure and the things is, no one does the exactly the same thing. Scaling is also a problem although there are some techniques. What I find really problematic is when I make CPP native extensions for it. It might be my error but as of yet all indications are that JS is about as fast in CPP due to internals and the internal API as it is in JS and this is a pain point for optimising when some other languages run things ten times faster switching to implementing native extensions or plugins than node.js does for the same tasks. JS is still improving on the callback hell front. Generators will make things better for a little while but it's still quite convoluted. The jury is out on what to do with that. The ES6 changes are also making JS even more inconsistent and unpredictable although some of the changes there are very welcome. There are also big issues with the documentation and lack of clear explanation of event flow control that the community ignores and eschews from making a standard for. Things like updating your node code also incur a cost as you need to restart processes unless you do fancy things.
      However if you stick to the niches the node.js cover, it's way more productive than anything else.

  25. The missing ingredient - cloud by Anonymous Coward · · Score: 1

    You see fine fellows, there is a bigger actor at work here ---

    Shitty bloated web crapplications written by 3rd world fools with 50 cent degrees are paramount to the new world order and the agenda to make us all serfs and control our every move with the cloud, IoT and big dick data.

    If you write shitty software for the cloud that only means one thing --- you need more cloud!! That means more money for those that sell cloud. That means more money for those that sell hardware for those that sell cloud. This is the great silicon mindfuck!

    Just think how fucking fast a bare metal web application would be. No gawdam hypervisors, no gawdamn VMs, no gawdamn interpreted scripty bytecode intermediate phantom typed gobbly gook script kiddie nonsense. You'd need far less hardware. No fucking clouds.

    The agenda is --- sell, sell, sell.....depress wages, enslave workers, control population through education and media and monitor their every move with IoT and big data.

    Big brother's here and his pants are down. Open wide mutherfuckers....

  26. Yes and it is actually harder to maintain... by undefinedreference · · Score: 2, Informative

    There are more poorly-written libraries and more fragmentation in the Node.JS space than there is even in the PHP world. Beyond this, it's like developing on dev code. They've made major fundamental changes to Node in the last couple years that we've been using it that we have to almost completely rewrite our code every year or so to keep anywhere near current.

    I wouldn't change. It feels like a flash in the pan tech, it's just that developers are available for it and development is pretty rapid if they use decent front-end libraries.

    If I had it to do over again, we'd use front-end JS libraries with a more traditional server-side language that isn't like developing on quicksand where fundamental functionality changes require completely redesigning/developing your site code all the time.

    1. Re:Yes and it is actually harder to maintain... by Anonymous Coward · · Score: 0

      I've suspect this to be the case, how long has your project be running?

    2. Re:Yes and it is actually harder to maintain... by undefinedreference · · Score: 1

      Almost two years now. We're currently on our third major rewrite in that time.

  27. Comment removed by account_deleted · · Score: 4, Interesting

    Comment removed based on user account deletion

  28. Node.js scalable! Very funny by Anonymous Coward · · Score: 0

    node.js is just awful. Why would anyone think that is is more scalable than the LAMP stack? It is inherently single threaded, and a total resource hog. Javascript is bad on the client side. It would be inept to even consider writing production software in it, particularly anything large and heavily structured. Also, who is going to do this work? and what limitations have become a problem with the LAMP stack? Who is going to redesign your CMS using node.js, and how will you migrate the content? Why do you think node.js will solve your problems that you haven't even bothered to specify. Do you even know why younwant to do this? Not a single worthwhile technical argument. This who speil, stinks of incompetence.
    Even for client side, we only compile proper languages to javascript, these days. This lets us use sensible languages that have things like explicit declaration, sensible scoping rules, and even exotic features like an integer data type. Better to leave the technical decisions to someone who actually knows what they are doing. If you are running a web site that needs to worry about scalability issues, you should probably really be employing someone who understands these things a litle better, rather than leaving it to some inexperienced kid, who seems to have accumulated more responsibility than they should have, and has started asking joe slashdot for advice, being completely out of their depth. I know they are harsh words, but better be told now, than to go and make a mess.

    1. Re:Node.js scalable! Very funny by terjeber · · Score: 1

      node.js is just awful. Why would anyone think that is is more scalable than the LAMP stack

      This is one of those comments that are too funny. A person talking up a horrible, terrible, monstrosity of a piece of junk (PHP) as a solution to another horrible, terrible, monstrosity (in their opinion) node.js.

  29. possibly by s4m7 · · Score: 1

    Migrated probably isn't the word. But my company has done some pilot projects from scratch in Node. There are some advantages:

    • Node is usually comparable or better in terms of performance and resource efficiency
    • Node projects seem to get to a MVP state very quickly.
    • The event-driven model is a very good solution to SOME problems.

    There are some disadvantages:

    • The number of choices you have for different stack layers can be paralyzing. Example: we had to interface with an MSSQL database. 6 different libraries were evaluated, two were found to meet requirements, one was settled on. A month later a new requirement was added which meant we had to switch.
    • if you are not very careful things can go spectacularly wrong with your dependencies (see: lpad disaster)
    • callback hell is trying to trace a chain of callbacks for debugging. Promises have helped... some.

    If developing something new I tend to look for ways that node can be used first, mostly because we're still trying to work out our stable development pipeline about 9 months after it started. Unless it was required I probably wouldn't choose PHP, only because the composer chain has more or less the same pitfalls of NPM, neither PHP nor node has any typing to speak of, and PHP has its rich history of inconsistency still weighing heavily upon it. to get top-notch performance out of it, you've gotta use something like HHVM which is less forgving.

    Working with a legacy base, ask yourself: can this self-contained bit be written in node as a bridge to an eventual php-free-future? Does the event model make sense for the problem at hand? Will it incur unnecessary technical debt? If the answers are yes, yes and no... then develop that part in node. No reason to rebuild working PHP parts unless you actually need to rebuild them anyway.

    --
    This comment is fully compliant with RFC 527.
  30. Conflictng requirements by lucm · · Score: 3, Informative

    If you want to create new web applications quickly, especially ones where you rely on a REST design, node.js is fantastic. With express js you can build things with very few lines of code, and if you respect the REST spirit you won't feel like the asynchronous thing is a problem. Just find Promise-based libraries for your database layer and you'll find the whole thing very smooth. Although I find the default templating library (jade) totally unusable, which is why I usually use swig; that's something to keep in mind if you do a lot of server-side html generation (as opposed to single page apps).

    As an added bonus, with a nginx/node combo you'll get better performance than with Apache/PHP and it's even easier to configure. (Although to be honest you could use nginx/fpm to get almost the same performance). Performance matters because it's easier to scale in a cost-effective way. You can start with a smaller host (like one of those $5 virtual machines on AWS) and provision as many of them as you need.

    Unfortunately this beautiful agility comes at a cost: node is not a stable ecosystem and unless you're extremely diligent in managing your dependencies, there's no way you can expect the same code base to live for 10 years. Just like bower and other packagers, npm is great and solves a lot of problems, but it relies on houses of cards built upon houses of cards. Libraries hat depend on librairies are more nimble but at the end of the day you will be the one left with a pile of garbage once a few building blocks start to erode. And with npm it's totally normal to have core libraries built by one guy in his basement who doesn't maintain his masterpiece; you don't see it because each "npm install" does all the magic, but really it can be nerve-wracking when something goes wrong and you start digging for weird error messages caused by cross-dependencies in two underlying libraries you didn't know you were using. At least with PHP frameworks there's usually a somewhat structured community.

    I don't pretend this is highly scientific but based on my experience, here's fhe difference between the same web application written in different programming languages:

    -Asp.net takes 25% less code than j2ee
    -PHP takes 50% less code than Asp.net
    -Node takes 75% less code than PHP

    However when it comes to long term maintenance:
    -nothing comes even close to java in terms of stability. I will happily debug a war created in 2002 and figure out ways to work around old jdk issues.
    -there is zero way to debug an Asp.net web application created with an old framework; just finding an IDE that will support it without trying to upgrade it (and failing at it) would prove nightmarish. And it keeps moving forward like this.
    -I'd rather drink a tall glass of melted butter than debug something written in PHP3, especially with the bad mixes of html, includes and mysterious variables that may or may not come from another file.
    -As for node, it's probably easier to rewrtie an app created two years ago than to try and fix it.

    Maybe things will change; PHP is becoming more mature and at some point people will get fed up with the throw-away nature of node js and some stability will appear. Until then: for quick & dirty stuff node is the best, and for long term maintenance java is king. I don't see immense value in sticking with stuff like PHP, RoR or Asp.net, but to each his own.

    --
    lucm, indeed.
    1. Re:Conflictng requirements by Anonymous Coward · · Score: 0

      -Asp.net takes 25% less code than j2ee

      -PHP takes 50% less code than Asp.net

      -Node takes 75% less code than PHP

      And then the Asp.net, PHP and Node.js people have to start validating their data and use ACID transactions to get the same stability of jee and end up with 3x the amount code as the jee developer.

      I would rather write by business applications as apache modules than write node.js.

    2. Re:Conflictng requirements by lucm · · Score: 1

      There's plenty of options in any of those languages to use ACID transactions *if* that's the appropriate design for the specific needs of the application, and it doesn't bring any code overhead. As an example you can open an ADO.Net connection with the Serializable transaction isolation level to apply the ACID principles strictly (especially the I part). That's merely a property to be set.

      It is however a misconception that "stability" can only be achieved with ACID transactions. It's always a matter of requirements and purpose.

      --
      lucm, indeed.
    3. Re:Conflictng requirements by PJ6 · · Score: 1

      -nothing comes even close to java in terms of stability. I will happily debug a war created in 2002 and figure out ways to work around old jdk issues.

      It's sad that thick client gets completely ignored in the discussion.

      I have a 100KLOC+ WinForms application written in .NET that I completed in 2003. It ran on WinNT machines with 64MB RAM, and it still runs today, just as well as it did originally, on Windows 7. Nobody has ever needed to work around any "issues". It just works.

      You want stability, don't target a browser.

  31. Half-way reliable? Anything will do. by Narcocide · · Score: 1

    Seriously, if the bar is that low, then it doesn't matter what you choose. Node.js is just as suitable for making garbage websites that wow and fool and bankrupt naive clients as WordPress or any other boilerplate crap written by the type of coders who share your "money first, rapid development time second, competence never" approach to software development.

  32. And PHP has real classes versus JavaScript's by Anonymous Coward · · Score: 0

    objects.

    captcha: hooked, but the voice on the MP3 (I'm blind) pronounced it as hoped. It's annoying that I had to get help just to post.

  33. Go one step higher with Meteor by Anonymous Coward · · Score: 0

    I used to hate Javascript and avoided it where I could, then I decided to really learn it and now love it. Node.js is great, but for many solutions you might want to go one level higher and use Meteor.js (built on Node). There's a bit of a small learning curve to Meteor, but that time will save you much more time down the road in your project.

  34. Very happy with NodeJS by laird · · Score: 1

    We replatformed a legacy C# app to a modern stack including Node.JS, and are very happy. The "win" wasn't so much the Node.JS language itself as that it was part of a platform that gives us fantastic code development velocity and fluidity. The "stack" includes CircleCI and Docker, MongoDB and Mongoose, Node.JS for a thin web services layer, and Angular (JavaScript) for the user experience, all integrated into HipChat for "ChatOps". Selenium and BrowserStack for end-to-end testing.

    I'll agree that JavaScript isn't my favorite language, but the tooling around it is fantastic, making development teams very productive.

    The benefits of using Node.JS in the overall stack include:
    - Same language for the whole stack, so a single developer can implement a whole feature (story). This eliminates the coordination cost of having three different people (front-end JavaScript, server-side C#, and database SQL) having to coordinate for use cases, giving much better velocity.
    - Node/JavaScript has fantastic testing support, making it fairly easy for us to maintain 90%+ unit code coverage, and end-to-end testing of user paths. This is integrated into the CircleCI builds means that after every code commit we have a fully built, unit and end-to-end tested, and deployed (to a test environment) application.
    - npm is awesome. It's a great tool, and the community support means many things are very easy.
    - Mongoose is awesome.
    - it's very easy to run Node.JS in AWS Lambda, which makes operations easier and is absurdly cheap to run, since you only pay for the compute you actually utilize, measured in fractions of a second. We're building one project in Lambda, and if that works well we'll likely move all the Node.JS code into Lambda, and save a lot of money at AWS.
    - Yeah, event-driven programming is complex. Luckily promises make it much easier. But in return for wrapping your head around a more complex programming model, you can more scalable applications. Similar tradeoff to multi-threaded programming.

    Yes, none of this is about the Node.JS language itself.

    1. Re:Very happy with NodeJS by NotAPK · · Score: 1

      Good post, but with all due respect, using C# to achieve this was the wrong choice to start with.

      So of course moving to node.js felt wonderful!!!

  35. And regretted it? by Anonymous Coward · · Score: 0

    Uber is moving away from nodejs https://www.infoq.com/articles/podcast-matt-ranney

  36. Give up by Anonymous Coward · · Score: 0

    The good news is, if you do this, you won't be using PHP.

    The bad news is, if you do this, you'll be using Javascript.

    My advice is: move to a state where assisted suicide is legal.

  37. Haha, you pussy. by Anonymous Coward · · Score: 0

    Regards, a Perl developer.

    1. Re:Haha, you pussy. by lucm · · Score: 1

      Regards, a Perl developer.

      I've done my share of Perl years ago, including cgi web applications with mod_perl. Back in the days I was all for it, telling whoever who'd listen how slashdot and imdb were success stories of Perl on the web.

      Back then it was an okay technology, but it didn't age well and never got the kind of good frameworks that make rapid development of complex applications possible in other ecosystems. I don't know why someone would still write web applications with Perl today, unless they're unable or unwilling to keep up with more dynamic technologies. I can see someone using it for systems administration, but even there it's been outpaced by python and ruby thanks to devops tools like Ansible or Puppet.

      --
      lucm, indeed.
    2. Re:Haha, you pussy. by Anonymous Coward · · Score: 0

      never got the kind of good [web] frameworks that make rapid development of complex applications possible in other ecosystems

      Catalyst, Dancer, Mojolicious.

    3. Re:Haha, you pussy. by sydneyfong · · Score: 1

      This.

      Catalyst was there before Ruby on Rails was even a thing.

      --
      Don't quote me on this.
    4. Re:Haha, you pussy. by lucm · · Score: 1

      Really? You have created actual web applications with this thing? What kind?

      --
      lucm, indeed.
    5. Re:Haha, you pussy. by silverdirk · · Score: 1

      It won't give you asynchronous event-driven websockets or anything like that, but Catalyst is great for a fast backend, serving pages and ajax requests. The learning curve is higher than it needs to be (thus the rise of Mojo and Dancer), but it's served me well on two moderate sized projects. (one public site serving ~30,000 requests a day, and the other a closed system with ~1000 active users a day)

      --
      Mark of the Coder fades from you. You perform Opening on World of Warcraft. Warcraft crits GPA for 4. GPA dies.
  38. Slashdot quality has improved in leaps and bounds by Qbertino · · Score: 5, Interesting

    David has shortened my Ask Slashdot significantly (no hurt feelings here what-so-ever), but the effort he put into his edited post is heart-warming and his preservation of the gist of my Node.js issue is spot on.

    I've noticed that the quality of the editing work done on Slashdot ever since the newest crew took over is off the charts compared to everything before and I'd like to take the occasion to give a huge warm applause to the new crew and the work these guys are doing. You folks freakin' rock and I've never felt such pride in being a long-time slashdotter as I feel right now. I wish you a nice stream of revenue and happy times as the new herald of slashdot, you guys are off to a spectacular start in my book. BRAVO!

    I'm actually going to point out to my geek buddies who've since abandoned slashdot (Whimps! :-) ) that now if ever is the time to return. Simply seeing slashdot soar to new heights is a pleasure in itself.

    As for the discussion on my question - great input, folks.
    And, btw., needs to be said after 17 years of slashdotting: You guys rock too. Of course. Naturally.

    --
    We suffer more in our imagination than in reality. - Seneca
  39. A language is a tool, and a tool solves a problem. by Neitokun · · Score: 1

    Have Carpenters moved over to Hammer yet? Have Plumbers checked out the newest version of Wrench? Questions like this imply that you need to use one solution to every problem, which is how we end up with broken shit like Node to begin with.

  40. Javascript is going away by phantomfive · · Score: 5, Interesting

    Javascript is approaching its peak as a programming language. The thing that will kill it is WebAssembly.

    Soon, you will be able to write front-end code in any language you like, you won't need to use Javascript. And if you're not using Javascript on the front-end, there's really no reason to use it on the back end.

    --
    "First they came for the slanderers and i said nothing."
    1. Re:Javascript is going away by Sla$hPot · · Score: 0

      Soon like in 5 to 10 years?

      WebAssembly and Emscripten are really cool technologies though.
      But in no way a threat to JavaScript.

      If something will destroy JavaScript, it is the constant extensions like ES6, ES7 etc.
      It kills the concept of a beautiful and simple language, while often degrading the performance.
      Google and Microsoft should sit down together and talk this through before they start hurting the global economy
      with an overcomplicated mess of useless functionality and lifecycle events, that in the end will kill the web browser as we know it.
      Especially Microsoft should have learned their lesson with ASP.NET.
      Just keep it simple stupid!

    2. Re:Javascript is going away by phantomfive · · Score: 3, Insightful

      WebAssembly and Emscripten are really cool technologies though. But in no way a threat to JavaScript.

      The reason Javascript is popular is because in the browser, it's the only option. Once WebAssembly is widespread, that will no longer be a reason to use Javascript. That is my reasoning for explaining why Javascript will no longer be popular.

      Why do you think people will still use Javascript once they have other options?

      --
      "First they came for the slanderers and i said nothing."
    3. Re:Javascript is going away by Sla$hPot · · Score: 0

      >Why do you think people will still use Javascript once they have other options?


      JavaScript is a simple and flexible language.
      The performance is more than adequate for MVC applications.
      It might be slow compared to native applications, especially games, streaming and DSP applications.
      But that is where WebAssembly and Emscripten come in to play.
      You might just use JavaScript for handling user events and as a message broker calling various APIs with really fast WebAssembly and Emscripten code behind it.
      With the improved performance boost that WebAssembly and Emscripten offers,
      you can write open APIs that enables your frontend to render in OpenGL, Canvas as well as HTML.
      Angular2 is planned to be used as a multi platform front end technology for both hybrid and native apps.
      But then again, you can still use JavaScript as a client side language, perhaps as transpiled TypeScript or CoffeeScript or something else that you might prefer.
      Personally i don't see any problems with JavaScript.
      10 years ago there were huge problems with compatibility and stability.
      But today I can't think of a more productive language than JavaScript.
      And most browsers works very reliably with JavaScript.
      The biggest hurdle when writing large applications with JavaScript is understanding scope and dealing with callback functions.
      But that is something you can learn pretty quickly.
      And there are libraries and superset languages like TypeScript and CoffeeScript built on top of JavaScript that handles most "JavaScript issues" if not all.
      The only problem that i have with JavaScript is a lot of sad people complaining about how difficult it is to work with.

    4. Re:Javascript is going away by phantomfive · · Score: 1

      Personally i don't see any problems with JavaScript.

      None at all? You might want to look into that blindspot.
      There are things in this world that I think are just awesome, but even then there are at least some problems.

      --
      "First they came for the slanderers and i said nothing."
    5. Re:Javascript is going away by Anonymous Coward · · Score: 0

      But in no way a threat to JavaScript.

      It depends what you mean by threat. JavaScript will live on as a scripting language, which is what it is really good at. What WebAssembly will kill off is JavaScript's use as a language for application development.

    6. Re:Javascript is going away by Anonymous Coward · · Score: 0

      Why do you think people will still use Javascript once they have other options?

      It has the enumerated good parts? (ducks)

    7. Re:Javascript is going away by jasnw · · Score: 1

      Why do you think people will still use Javascript once they have other options?

      (1) Inertia, and (2) code base. COBOL, and to some extent Fortran, are still around because of the huge amount of code nearly everywhere that would be way too expensive (and in some cases impossible) to recode. You also have to retool people and dev environments if you're going to jump to the latest/greatest way to slice bread. Not a fan of JS, but I don't see it disappearing any time soon.

    8. Re:Javascript is going away by ZeroWaiteState · · Score: 1

      Answer, because JavaScript programmers are what the programmer mills are churning out. Technology choice is only loosely coupled to merits.

    9. Re:Javascript is going away by Anonymous Coward · · Score: 1

      Because their FAQ says so? https://github.com/WebAssembly/design/blob/master/FAQ.md#is-webassembly-trying-to-replace-javascript

    10. Re:Javascript is going away by Anonymous Coward · · Score: 0

      Unlike the monolithic COBOL behemoths that run the foundation of banks all over the world, Websites aren't developed over years - most websites are just plain thrown away after 3-4 years to start anew with a "fresh" layout. There complexity of the legacy JavaScript code out there is nowhere near the COBOL cruft.

    11. Re:Javascript is going away by NotAPK · · Score: 1

      "you can write open APIs that enables your frontend to render in OpenGL, Canvas as well as HTML."

      So which one do you choose? And why?

    12. Re:Javascript is going away by Sla$hPot · · Score: 0

      Business apps: HTML
      Games & Visualization: OpenGL
      Board games & Graphical design tools: Canvas

    13. Re:Javascript is going away by NotAPK · · Score: 1

      But you have now defeated the entire point of this discussion: node.js, "use the same language on the client side and server backend"!

      Please do not misunderstand me, I am well aware of the complexity that currently pervades modern in-browser "app" development.

      It just frustrates me that we are making extremely complicated programs to work around a plethora of shortfalls in the architecture and design limitations of this platform. Speak to an assembler developer from the 80s. Yes, lots of chips to choose from. A lot of work was required for performance. But the key point is that they programs **did** perform extremely well.

      Contrast that to today: gob-loads of complexity, but very very little to gain for it.

      I do not buy that the price of a "web app" or "cloud program" or the next big "2.0 thing" is exceedingly complex software.

      Am happy to debate, please enlighten me!!

    14. Re:Javascript is going away by Sla$hPot · · Score: 0

      Nodejs is not about reusing the same code on client and the server.
      Nodejs is about exployting the V8 engine on a server with special io interfaces.
      Emscripten, asmjs and Webassembly is just ways of boosting browser performance to near native performance.
      Effectively turning the browser into a virtual machine.
      Some also wanted multi threading, increased memory and emscripten on nodejs.
      Then jxcore came about, a fork of nodejs based on spidermonkey instead of V8.
      However what ever goes into V8 goes into nodejs.
      Over time nodejs will turn into a regular powerhouse
      You don't have to fork it and roll yor own.
      This will be taken care of for you as V8 evolves.
      So Nodejs can be any thing from a powerfull integration server.
      to a full-stack development tool, build server etc.
      It is just a very versatile tool that gives you a lot of options that you can chose from.
      That is why i think it is so popular.

    15. Re:Javascript is going away by NotAPK · · Score: 1

      Points well made, thanks, I'll do some research into those technologies.

      However, adding abstration does not go hand-in-hand with performance. They're almost diametrically opposite objectives.

      If indeed these frameworks can achieve incredible performance in the browser, then my experience tells me this will only happen via direct support from the browser developers. Which as you very correctly allude to, can only happen via a widely adopted framework.

      Interesting times, thanks.

  41. Re: Node.js web scalable! Very funny by Billly+Gates · · Score: 1
  42. Re-write is code for buying time until fired by Anonymous Coward · · Score: 0

    There's no reason you can't write good clean flexible code in PHP. Sure, it is a bit easier in other languages, but PHP to JS is basically a lateral move in terms of language power. Anyway, if the existing code isn't good and clean and flexible it is a people problem, not a language problem. So you need to replace people, not tech stacks.

  43. Re:It's not that bad, just don't write PHP with JS by Anonymous Coward · · Score: 0

    You have to be on drugs to consider javascript a worthwhile language for anything outside of the browser. The kicking and screaming was obviously because GP didn't take the drugs voluntarily.

  44. It's just a tool by Sla$hPot · · Score: 0

    You can use node for everything, with various degrees of success of cause.
    But what makes it stand out, together with npm, is its capability as a front-stack development tool.
    It enables architects to scaffold frontend projects in no time, with backend developers working in parallel on REST services.
    When your frontend team is done you can easily build and deploy the frontend to any web-platform or SaaS provider.
    Besides that it is useful for a lot of other tasks that you would usually program in Perl or bash scripts.

  45. Re:Node JS is the new PHP, the new PHP is actually by Anonymous Coward · · Score: 0

    PHP7 is a huge improvement over old versions

    Does it mean my webpage won't either die with no error or run fine with unhelpful warnings anymore?

  46. So much resistance to change! by ajyand · · Score: 1

    I do not know why people discourage people from experimenting change! I won't recommend changing a good, existing working base from PHP to JavaScript but I'd strongly recommend using Node.js for all future deployments. While everyone is seeing callback-hell as a limitation of JavaScript, I see it an important property of JavaScript which is a kind of early warning to you if you do not modularize your code.

    1. Re:So much resistance to change! by ajyand · · Score: 1

      Oh, I forgot to mention my experience. I've moved to JavaScript after working on C++ for over 10 years. My experience has been better than C++. While JavaScript is gaining more features from C++ in each release and Boost is moving C++ in the direction of JavaScript, I find JavaScript neat, cleaner and handy than C++.

    2. Re:So much resistance to change! by NotAPK · · Score: 1

      "While JavaScript is gaining more features from C++ in each release"

      When you want to develop stable code, this is not actually the benefit you are claiming it to be...

  47. YAM2C (Yet Another My Two Cents) by rgbe · · Score: 1

    I dove straight into Node.js to develop a platform around 3 years, I don't regret using Node.js, in fact I am glad that I used it. I essentially used the MEAN stack (MongoDB, Express, Angular and Node.js). It was great to:
    1) use JS everywhere: back-end (including the DB) and front-end.
    2) use JS: it's fun (for me) - if you use the right parts. And it performs fast enough, on par with PHP, if not faster.
    3) have an experienced community - JS and Node.js has gone through it's teething issues already.
    4) do async programming - if you do it right, you tend to keep your code more modular.

    What was painful:
    1) Learning to write JS the "right way" and how to avoid the bad and ugly parts.
    2) At the time there was no great CMS, I believe Keystone is the best at the moment, but it looks very light when compared to Wordpress.

    What you need to do if you go with Node.js:
    1) Learn JS well, learn "The Good, The Bad and The Ugly", such that you can avoid the Bad and Ugly. The good is actually awesome.
    2) Understand prototypical inheritance, it's not your classical classes, but it a powerful and memory efficient way create objects.
    3) Use a linter to write your code, like eslint, it will help you avoid the bad and ugly parts.

    I still use Node.js today, but now for the Internet of Things and my embedded device runs Node.js. JS is everywhere and it's going to remain everywhere.

    1. Re:YAM2C (Yet Another My Two Cents) by Anonymous Coward · · Score: 1

      >use js for the DB
      Nightmare fuel.

      >using node.js for an embedded device
      Thanks for that, now I will never sleep again. I hope You are proud of Yourself.

    2. Re:YAM2C (Yet Another My Two Cents) by NotAPK · · Score: 1

      "1) use JS everywhere: back-end (including the DB) and front-end."

      I understand what you are saying, and I've read a good load of posts in this forum claiming the same...

      But I must ask why??

      While the language syntax might be the same, the object model, pattern, and coding structure of what you are trying to do is **entirely different**!!!

      For this reason along I simply do not understand the benefits...

    3. Re:YAM2C (Yet Another My Two Cents) by rgbe · · Score: 1

      Good point. The reason I like to use JS everywhere is that I only need to learn one language. And it means I can learn it really well. Until I did full-stack JavaScript I had only done front-end JS and it was pretty wonky. Using Node.js means that you need to learn some of the great parts of JS well (closures, async, etc). This drastically improved my front-end JS. If you used the LAMP method for full stack development, you would need to learn Apache config (although once it's running it's okay), PHP, JavaScript and SQL, and I would not have the time to learn the subtleties of each language.

      I agree that the object model and patterns for MongoDB are different, the object mode and patterns for front-end and back-end are very similar in many cases, there is a big overlap. Things you use on all three are:
        - Callbacks
        - Closures
        - Prototypical inheritance (front-end and back-end)
        - Event emitters (front-end and back-end)
        - And many more like described here: https://www.smashingmagazine.c...

      Code re-usability is useful at times, I was able to write a library (https://github.com/psiphi75/web-remote-control) that was used on the server, on the front-end and on an embedded device and I guess around 80% of the code is shared across all three. Imagine writing and debugging that code in three different languages.

  48. Re:It's not that bad, just don't write PHP with JS by Anonymous Coward · · Score: 0

    OP. Sorry, I forgot to use enlint.

  49. Node.js: should be known as Nope.js by Anonymous Coward · · Score: 0

    Nope.

    Nope nope nope nope.

    Do not go there my friend. That way lies madness.

    Any platform whose main package manager (in this case, npm) has a many-years-old bug/design deficiency wherein it requires a minimum of 2 gigs of RAM + swap space to search the package index isn't worth your time. The developers claim that they just haven't had the time to fix this, which is ridiculous, given the role that npm plays in the Node.js ecosystem. If you can't get the basics of a platform right, why would I trust the rest of it?

    "This is definitely a real issue, and we're discussing how to fix it over on #6016. If we want to preserve offline search, we're going to need a better solution than reading a file containing all of the registry's metadata in a single object literal."

    "@duaneking there are many potential solutions to this problem, but the current implementation suffers from the fact that npm search was designed and implemented when @isaacs more or less knew all the authors writing modules. It's always been a quick and dirty approach, and it has clearly scaled past the point where the current approach is scalable. We just haven't had time to design and implement a replacement yet."

    https://github.com/npm/npm/issues/3867
    https://github.com/npm/npm/issues/6016

  50. Choose platform / language last. by MegOnWheels · · Score: 1

    Hi, Pick your platform based on the ability to get workers, manageability, vendor support, depth of libraries, actual business need and the overall toolchain.
    The platform is just the tool. Starting with the platform is like answering the question.
    "How many rooms do we actually need?" with "I have a hammer!"

  51. So much hate for JS, but I love it by davesag · · Score: 1

    I'm one of those older coders who started out with assembly language, did some BASIC, APL, Ridl, etc, before finding Java, then Javascript. I've seen enough PHP to scare me. I've written enough Ruby to be used to its quirks. I've been writing Javascript since 1997 and it's still my go-to language for when I need to get something done quickly and reliably. I've taken code that took 12 hours to run in Ruby and turned it into a simple Node script that ran in 6 minutes. Like Ruby and Java there is a real culture of testing with Javascript and Node especially, which makes the inevitable refactoring a dream. I am thinking of kicking it all up a notch however and diving into Elixir.

    I learned Coffeescript in an afternoon for a particular project (lots of Coffeescript devs) and while I do get the advantages of it, those advantages (especially with ES6) seem too slight to make me want to really deep-dive into it. I suppose I really ought to learn Swift though, as I expect it will become the new server-side hotness sooner or later.

    --
    I used to have a better sig than this, but I got tired of it
    1. Re:So much hate for JS, but I love it by NotAPK · · Score: 1

      Sure it's easy to optimise code:

      Just replace:

      do something 100 times {
            do something 100 times {
                  do something 100 times {
                        actuallyDoIt();
                  }
            }
      }

      With:

      JustDoIt1000000Times();

      Or peer deeper and:

      DontDoItAtAll(); ...amazing!!

  52. of course we have! by Anonymous Coward · · Score: 0

    ... now that it runs COBOL and FORTRAN.

    that was the only showstopper holding us back!

  53. No, since Node.js has too much ideologues in it by sethstorm · · Score: 0

    They're more concerned with far-left ideological purity than they are about the language itself.

    --
    Twitter supports and protects racists - by smearing their critics with the "Hate Speech" label.
    1. Re:No, since Node.js has too much ideologues in it by dave420 · · Score: 1

      So much self-righteous stupidity in one comment. Amazing.

    2. Re:No, since Node.js has too much ideologues in it by Anonymous Coward · · Score: 0

      This seems to be the case for a growing number of languages and frameworks.

      Thinking I'll give Urbit a go soon, since I can be sure any contributions I make on that project won't be called into question for my wrongthink.

  54. Migrated to node.js? by Anonymous Coward · · Score: 0

    Hell, I'll start porting those java/tomcat applications over to it right away.

    You might as well ask if we're migrating to cgi_lib.pl or CGI.pm.

    I hear Ruby on Rails is good also.

  55. Use Node for what it is good for by Carcass666 · · Score: 2

    Node is very good for processes that hit a database and/or file-system with "simple" manipulation. You will have to think asynchronously, and you will want to learn promises. Where it shines is when you have a lot of simple things to do during a method, and you can do those things concurrently. It's great for squeezing out every last ounce of CPU/core capacity - which can be priced at a premium if you are on "the cloud".

    For web-hosting, you can use something like Express, and implement it with clustering to scale out to your server's capacity with regard to CPUs/cores. This gets very clunky, very fast, much more so than PHP or even ASP.MVC. It seems like a solution looking for a problem. I'd avoid it.

    One of the better implementations I've seen of Node is in AWS. You can upload a Node package to their Lambda service, and trigger based upon a schedule, S3 (file) event or an inbound web call (via API gateway). It pretty much scales "auto-magically". But there are limitations. You have some utilities like Ghostscript available, but you are mostly limited to the version they have on their server images. You can include your own executables (by building them in an EC2 instance), but this increases your package size, load time, etc. If you want to use Node for a website, I'd probably limit Node's use to webservices (AJAX) for hitting the database and business logic; and drive your site's UI using a client-side engine (Angular, react, etc.). You can use it very effectively for back-end processes thumbnail generation, email notifications, etc.).

    For "quick & dirty" websites, I'd probably avoid Node, unless you are going to drink the "cloud Kool-Aid" (especially with AWS Lambda); then Node might be a fit if you are going to craft custom sites where scalability and cost management are significant considerations.

    1. Re:Use Node for what it is good for by NotAPK · · Score: 1

      As a fellow developer I would only claim to understand about half of what you're written.

      For this reason, I'd like to start a meta-discussion about why and how the complexity has grown to be this insane?

      Yes, we have code running on the server, and code running on the client. But why should this be inherently any more complex than HTTP?

      Everyone in this game is striving to solve the same problems, yet why are we all doing such a piss poor job of making things simpler?

      It really bums me out...

    2. Re:Use Node for what it is good for by Carcass666 · · Score: 1

      For better or for worse, a lot of this (esp. microservices) comes down to cost. In the "good old days" I could load a service, batch process, etc. onto a server in my data center that had the spare capacity to deal with it. Of course, in those same "good old days" I had to worry about things like fiber channel firmware, router OS updates, etc. and never, ever, had the resources to do that right. We always used equipment well past its depreciated book lifespan, and generally replaced stuff only when it broke. We very rarely got the budget to adequately address redundancy and fail-over.

      The "cloud" largely absolves us of responsibility for dealing with firmware, failed drives, etc. Yes, sometimes there are failures, but anybody being honest about uptime (especially with AWS) has to admit it generally is a lot better than the average SMB data center. The big downsides are privacy and cost. Your data lives somewhere else, with what else you have little idea, but that's a pill that more companies are learning to swallow. A lot of companies use AWS as a glorified server farm, which is the most expensive way to use the "cloud". The platform-as-a-service stuff and now micro-services (Lambda) scale much more economically. For me, it helps to look at all of this kind of like the difference between building with Duplo and regular Lego bricks - you can do far more elegant designs with the smaller bricks, and you ultimately end up with stronger builds.

  56. Great for RAD/POC and early phase startups. by Anonymous Coward · · Score: 0

    Gets something up and running, shows investors what it is they're potentially investing in, great for the first few iterations and low head-count startups (i.e. me and myself). But once you start gaining traction (users/money), time to pat yourself on the back, but migrate to something else. You can do this with ruby/rails, python, etc, as well.

    I think what we forget as non-web devs or startup "founders" is that most of us seem to crave stability and long lasting codebases. These startups? Not so much. Build, show, fund, dismantle/decay. Over and over and over again. Why spend the time doing a proper engineering job when you've got a workforce that turns every 3 months and a startup lifetime expectancy of 1-3 years?

  57. PHP is fine... by Anonymous Coward · · Score: 0

    if you just write *good code* and don't use canned, shitty, old frameworks.
    Read Evan's book on domain driven design, and code that way. You will see your projects come together quickly, and provably correct once you start using the command + domain events as your primary implementation pattern. Boundaries become clear. The correct model emerges. Dependencies and coupling melt away--making choice of toolset pluggable--then PHP or Node or Python or Java or whatever else you choose all become options that can coexist.

    tl;dr;

    Rather than hum and haw about what language to choose, first pick a good modelling approach (I recommend domain modelling)--which doesn't limit your tool choices at all but rather encourages patterns that make them easily interoperable throughout.

  58. By Neruos by Anonymous Coward · · Score: 0

    Why are we still talking about Node.js and MongoDB, oh I forgot, DevOps and the holy grail of "The Cloud".

    What... A... Joke...

  59. no by Anonymous Coward · · Score: 0

    Actually I dislike things like java Maven and Node.js . They download tons of libraries, they are slow on my network, even different versions, over and over again. I totally lost acknowledge of whether each library is really needed, or is malware.
    I like software downloaded as a zip archive, it cost my 3 minutes. but Node.js, it used 2 hours to download and fail at last, and I don't have a clue what's wrong with it.

  60. Re:Node JS is the new PHP, the new PHP is actually by Anne+Thwacks · · Score: 1

    I think you will find 200% of 0 is still 0.

    --
    Sent from my ASR33 using ASCII
  61. node.js is fine by mveloso · · Score: 1

    Node.js is neat. We have a production service running on it that handles a couple of hundred thousand messages a day sent by tens of thousands of devices. It's not much, but it's only about 700 lines of javascript. That's including comments and whitespace.

    The callback mechanism takes some getting used to. If you haven't programmed interrupt handlers or async I/O it'll be confusing, because the flow-of-control isn't really that obvious.

    Why did we choose node? Our understanding was that it's great at concurrency, and this was a small and fast project to test it out. We're using it as a stepping stone to Apache Lambda, with the goal of throwing our message infrastructure into Apache at some point.

    We didn't try to replace a LAMP stack with it. I suspect that would be a bad use for node...although given a low workload it could probably be done.

  62. With regard to the durable pipeline by ZeroWaiteState · · Score: 1

    It's worth noting that Node.js has really one build manager: NPM. For why that is relevant, see this: http://www.theregister.co.uk/2... NPM is fairly new, and is undergoing the growing pains of becoming a major code distribution platform. Part of this is finding out why it's a bad idea to allow repositories to instantly disappear, and also why its an even worse idea for the previously used namespace to be reused by a different maintainer, especially in the absence of other security measures like code signing. Putting your project under the Node umbrella means you will need to adapt as they gradually figure these things out.

    1. Re:With regard to the durable pipeline by dolmen.fr · · Score: 1

      To be fair, all repositiories of open source libraries have this kind of issues.

  63. Why should I? by aglider · · Score: 1

    Clear statements and real facts, please!

    --
    Sent as ripples into the electromagnetic field. No single photon has been harmed in the process.
  64. manager POV on node by hardcorejon · · Score: 1

    I've managed a team that spent more than one day just isolating where a bug was occurring. If you don't have expert-level developers (expensive!!), be very afraid. Every once in a while a nasty bug will pop up that takes 5-10 days to finally fix. Development on large codebases is very slow due to poor modularization/code structure from the start, which I have sadly never seen done right.

    If you have a greenfield situation, and really want to use node, make sure your first developer is top-notch, not only in coding skill but in coding structure. Hopefully it can be designed so that its tendencies are not to become a giant hairball -- but it still might anyway.

  65. nodejs is not reliable by crispytwo · · Score: 1

    Me and my team migrated away from nodejs.

    it is not easy to debug,
    the library versioning is shit via npm so 1 deployment may well be different from the next.
    finding good libraries is like ... you can't
    scaling is poor.

    what is it good for? quick prototyping and experimentation. Fantastic for that.

  66. Re:It's not that bad, just don't write PHP with JS by Anonymous Coward · · Score: 0

    I also come from a C++ background. I actually *like* JS (or at least Coffeescript). There the main pain points are automatic type conversion (which can get you into trouble quickly), the rather strange behaviour of "this" (but you can get used to it quickly), and the poor class library. Get used to either using a transpiler (like Coffeescript) or a shim to give you the behaviour you want.

    The arguments about it not being a typed language are... fair I suppose. You really do need to write unit tests, but then you should be doing that for a typed language anyway. If you want static type checking then there are a couple of transpilers that will give it to you. So I really don't see a problem.

    The build system infrastructure for Node/JS is fairly immature compared to many other platforms. It's not fantastic, but not great either. Expect to spend a considerable amount of time faffing around trying to get something that works well. Part of the problem is that there are too many choices, all of which are poorly implemented and fiddly. But you can eventually get something decent.

    As the parent said, callback-hell is a danger but that's just event driven programming.

    My real piece of advice (if this ever gets voted up into visibility) is: don't do it unless you have (or can hire) decent JS developers. This is true of any environment, but is especially true of the JS world because there are a lot of people who graduated from "cut and paste jquery" to "systems developers". That's great if you actually learn along the way, but a surprisingly large number of people get stalled half way. I suppose this is not news to PHP developers...

    TL;DR: You need to hire good people specifically for the job, but otherwise it is a decent platform to work on.

  67. Re:It's not that bad, just don't write PHP with JS by joboss · · Score: 1

    Better to wait for generators to really take off. They are showing some promise. I reached a point where I was having call back hell, looked at async, promises and decided screw that, I need some kind of new language feature to solve that. Amazingly, a year later generators came to the scene to address that which isn't too long to wait. I hate an argument with someone about promises and implemented my own promises library just to prove the point that I knew what he was talking about and that it sucked. Someone else has also gone through the same mess but unlike me could has tried everything else rather than to skip the 3 or 4 common ways to deal with callback hell until something worth actually going for arrives: http://blog.namangoel.com/deal...

  68. improve instead of reinvent by Tom · · Score: 2

    A developer maintaining his company's "half-assed LAMP / WordPress stack pipeline for web and web application development" is considering something more scalable that could eventually be migrated into the cloud

    How about replacing it by a less-assed LAMP stack? You know, the answer to a broken wheel is not to sit down and reinvent the wheel. Generally, it is faster, cheaper and smarter to simply get a proper wheel.

    I've refactored projects, both successfully and with failure. This is one area where the old estimate rule-of-thumb (take your best guess, double it, then increase the order of magnitude by one, i.e. replace hours by days, days by weeks, weeks by months, etc.) is so absolutely true. If you have a working pipeline, no matter how bad it works, you will dramatically underestimate the effort it takes to rebuild that pipeline on a different technology.

    Sometimes it is worth the effort. Typically, not. Replacing wordpress with something non-broken is probably ten times faster and easier than reinventing the whole thing.

    --
    Assorted stuff I do sometimes: Lemuria.org
  69. Whut? by Anonymous Coward · · Score: 0

    I don't know which scares me more. JavaScript in the back end or JavaScript developers.

  70. Of course not. Go is a better choice! by dolmen.fr · · Score: 1

    8 months ago, when we rebuilt the previous version of our platform that was insanely in PHP (with an insane level of intricated web services) that had poor performance, we wisely choose Go.
    Go is compiled. Go has strict type checking. Go has built-in support for writing unit tests.

    And Go's support for concurrency is far much better than node.js (which still runs on a single CPU).

  71. Yes, and for good reason by Anonymous Coward · · Score: 0

    Not your typical LAMP migration here. We're moving from a C++ business tier fronted by COM classic ASP presentation tier to Node.js.
    BUT some significant factors: no change to the C++ layer (other than replacing the COM interface with a Node.js native one (we have both a fine-grained native API and a web service API), and our ASPs were fortuitously written in JavaScript instead of VBScript. We have already protoyped the ability to run our ASPs unchanged in Node.js, providing a migration path of a significant code base off of a Microsoft platform with minimal refactoring.

    We've actually gained on the performance side compared to the ASP interpreter (benchmarks show the Node.js native interface is also faster than .NET/C#). The underlying V8 engine is pretty good in that regard.

    I do share concerns over the relatively uncoordinated pace of change in the JS ecosystem. Packages, frameworks, and the language itself are constantly changing and require frequent attention for maintenance - the MS cathedral vs the JS bazaar, but overall we are in a better position than before.

  72. Meteor! by Anonymous Coward · · Score: 0

    If you have the discipline to code properly and are not afraid to learn new concepts and patterns, absolutely go for it. And use Meteor!

  73. Re:Node JS is the new PHP, the new PHP is actually by Anonymous Coward · · Score: 0
  74. Why ask why? by Anonymous Coward · · Score: 0

    With front end development being what it is nowadays, your 'back end' that used to be 90% of your work is no longer... Stop thinking about your entire web platform as an "app" and start thinking about microservices, REST backends that just deal with auth+state+data and get your groove on. All of the fancy schtuff is happening in the browser (angular, react, etc) so contemporary web development is effectively flipped upside down from an architectural perspective.

    Sure node has some great frameworks out there (loopback is awesome for this, as is hapi and a dozen others) you should probably rethink your design and implementation, not necessarily platform. If you already stocked up on PHP talent then take advantage of the frameworks available and build your service to suit (and no more aircraft carriers delivering pizza, if you know what I mean).

    Regardless of your chosen platforms, you can find decent REST service frameworks that let you get your focus back in the browser/app/client where it should be.

    One thing I'll give Node is that it is dead simple to deploy (perhaps too simple for some!) so the tooling available is pretty good.

  75. Well... by Anonymous Coward · · Score: 0

    ...didn't go so well for us. We dumped Node.js and moved back to PHP after a lot of reliability problems with Node.js. Perhaps they're fixed now. Perhaps not. Either way that failure seems to have (unfortunately) locked us into PHP for the foreseeable future. Too bad. I'm no fan of JS, but it sure beats PHP. Sigh.

  76. Re:Node JS is the new PHP, the new PHP is actually by omnichad · · Score: 1

    You don't implement error-handling and then you blame PHP?

  77. Ruby Runtime by Tenebrousedge · · Score: 2

    There's actually not a lot in Ruby that you can't modify at runtime. You can't break variable assignment, and I don't think you can erase the concept of class inheritance, but most other components are up for grabs. It's perhaps not quite as flexible as Lisp or Smalltalk, but there's definitely no shortage of hanging rope. Metaprogramming Ruby was an enlightening look at how this can be put to practical use. Personally, I think that "monkey patching" is grounds for "developer punching", but there are a great many tools which improperly used make superlative footguns.

    --
    Those who advocate genocide deserve every protection afforded by law, and none afforded by common human decency.
  78. yes and it sucked by Anonymous Coward · · Score: 0

    we built a new product in node; I was very optimistic going into the project and looked forward to the new experience, working with node was the most painful, least pleasant software development experience I have ever had to suffer through

  79. Considering it by Anonymous Coward · · Score: 0

    I am playing with Three.js on a personal project, and in order to make the server component, I will probably use Node.js.

    I am also watching what APIs other projects use. One trend I have seen is people using npm/Webverify/Beefy chains of packages that pull the most recent code every time you reload the webpage. Not sure I can get into that. I want to make sure everything works, and only have a product I know will work each time (unless servers go down for some reason).

  80. Re:Have you even had a programming class? by TheRaven64 · · Score: 1

    Complete rubbish; object based & functional, not OO.

    Functional languages are ones that have a strong notion of a pure function (i.e. something that is side-effect free and has immutable state). JavaScript doesn't come close to representing this.

    A very good definition for the term: rubbish language.

    Name one mainstream language that doesn't have odd corner cases.

    by definition not an integer.

    Sorry, I meant the only type that you can use for representing integer data. You effectively have a 53-bit integer that silently becomes a floating point value on overflow. This is the type that you must use for all integer data, including things like loop induction variables.

    --
    I am TheRaven on Soylent News
  81. Migrating to the cloud. by Anonymous Coward · · Score: 0

    I swear to christ if anyone who is within physical reach of me utters the words, "migrate to the cloud", I'm punching them in the fucking face.

  82. Node.js for simplecart by Bobbox1980 · · Score: 1

    I can't speak for javascript's good or bad performance and usability in complex projects but I can say that Node.js and simplecart which uses Node.js is very easy and runs fine. Yeah a hacker can change a price going to Paypal with it but with only one product to sell it is easy to see if the correct price is being transmitted. A little html and boom the site can run on a Raspberry Pi and perform well.

    1. Re:Node.js for simplecart by NotAPK · · Score: 1

      While I respect the integrity of your comment, if you only have one product to sell, why is this not on a static page with a static price?

      Then it becomes trivially simply to change the price, plus, you know that every single concurrent user is seeing the exact same content. In addition, it will save on the hosting costs!!!

  83. Serverless + Babel + Es 6/7 = Profit by Anonymous Coward · · Score: 0

    JS ES5 is awful but ES6/7 is quite nice syntactically. Throw in libraries like React and you have a very pleasant client side dev experience. But asking about switching to node is already a dated question. People who already switched to node are asking if they should switch to serverless via static hosting and microservices such as (but not limited to) AWS Lambda (Python would be my language choice there).

  84. No, since Node.js has too much ideologues in it by sethstorm · · Score: 1

    (That, and people modbombing me only serves to confirm it)

    --
    Twitter supports and protects racists - by smearing their critics with the "Hate Speech" label.
  85. Nodejs version shit by Gunstick · · Score: 1

    This is so braindead. Whoever thought this out must be sick.
    I wanted to install some software to control my cromecast.
    First install: the nodejs in the repository is too old.
    oh well, just upgrade my linux, it's kinda old...
    Next install: the nodejs in the repository is too new!

    WTF? And of course the "too new" message is displayed via 500 lines of error stack dump.
    Well this is exactly how you get people to embrace and use nodejs, NOT!

    --
    Atari rules... ermm... ruled.
  86. Don't repeat yourself by tepples · · Score: 1

    Server side and client side design patterns are different.

    But sometimes you want the prevalidation logic on the client to have the same behavior as the authoritative validation logic on the server. There are two common ways to keep the logic in sync without violating Don't Repeat Yourself: either write the server in the client-side language or transpile the logic from the server-side language to the client-side language.

  87. UTF-16 sucks. Does Unicode? by tepples · · Score: 1

    Strings are also unicode by default which sucks on backend.

    What about Unicode in general necessarily "sucks on backend"? Or are you confusing Unicode with its UTF-16 binary form, which arguably does suck compared to UTF-8?

  88. 2 MB of illustrations and photos by tepples · · Score: 1

    If your website takes more than 4 seconds to load on a 5mbps internet connection, then it's designed by a freaking noob that should not be allowed near a webserver.

    Converting from bits to bytes and subtracting protocol overhead produces a limit around 2 MB, even if a site keeps its scripts under, say, 10 kB. If a single document has more than 2 MB of illustrations and photos, such as a long how-to article, how should it be sent? Should all images after the first 2 MB use "lazy loading", where an image doesn't load until the user has scrolled to it and thus can't be viewed without turning scripts on for the site or after going offline?

  89. Get passive-aggressive: review the site by tepples · · Score: 1

    I just thought of a passive-aggressive way for a design firm to fight clients that demand excessive scripted animation.

    1. Clarify to the client that some design firms also run websites offering reviews of random sites' usability. Name-drop "Web Pages That Suck", "Tab Closed Didn't Read", and "Plain Text Offenders".
    2. Remind the client that disability discrimination laws may apply. Name-drop National Federation of the Blind v. Target Corp.
    3. Provide a view of the same information with a similar look but less bling, and link to it from the main site with a wheelchair symbol (alt="Accessible version of this page"). Follow best practices for accessibility and usability on this view.
    4. To disguise this site's connection to the design firm, use a shell company and/or review other firms' sites.
    5. If a client insists on bling that harms the user experience, and particularly if the client requests removal of the accessible version, review the site and mention the harmful UX and possibility for lawsuits from an advocate for the disabled.

  90. Having to hire someone to write a transpiler by tepples · · Score: 1

    Now there may be valid reasons to reimplement in another language (better matching your available talent pool, better performance, you would just prefer it)

    Especially when the deployment platform dictates the choice of language. Examples include Xbox Live Indie Games and Windows Phone 7 requiring verifiably type-safe CIL for the .NET Compact Framework (in practice, requiring C#), or the web requiring either ECMAScript 5 or a language that transpiles to ECMAScript 5. Then "better matching your available talent pool" means "we would have to hire someone to write a transpiler to the only supported language", and "better performance" means "the alternative is writing an interpreter".

    but if it's just to 'make it clean', that can pretty much always be accomplished within the existing language choice.

    Even if "the existing language choice" is assembly language, as in the case of porting a classic video game to a modern platform? Can assembly language be made as clean as, say, Python?

    1. Re:Having to hire someone to write a transpiler by Junta · · Score: 1

      Well, I was speaking to the common use case of no porting, no using it in a new context, just wanting to make the implementation 'more clean' but otherwise maintain roughly the same behavior in the same context. I did not mean the list of example valid reasons to be comprehensive. Porting and all sorts of other valid use cases exist.

      Now one could make an argument that raw assembly by most eyes will never be as readable as a higher level language, but that's a pretty rare circumstance and there are frequently a lot more reasons to be wary of pulling the trigger on a rewrite of such a case just for cleanness sake.

      Bottom line, if you want to rewrite an existing program, it better be for more reasons than making it cleaner, 99.99% of the time.

      --
      XML is like violence. If it doesn't solve the problem, use more.
  91. When platform owners ban categories of native apps by tepples · · Score: 1

    You just need to pick the right combination of frameworks and programming language. Everything can be converted to everything else nowadays.

    Unless the web application is a workaround for a platform owner's policy that specifically forbids a set of native apps. For example, applications doing any of these things cannot be converted to a native iOS application intended for distribution to the public.

  92. No by NotAPK · · Score: 1

    No.

    Next question?

  93. perl by silverdirk · · Score: 1

    I started on Perl to maintain existing code, but have since used it extensively for everything I do these days. The greatest thing about perl is the wealth of CPAN libraries available. Recently I was asked to automate the process of logging into a mailbox, downloading the most recent message meeting various criteria, extracting a zip file attachment from it, extracting an Excel ('97 format) file from the zip file, and importing its table of data into the database used by a large webapp.

    Thanks to CPAN, I had the whole thing done in less than a day. CPAN modules are a mixed bag, but most of the important ones have decent documentation and a lot of real-world testing. They're also trivial to install. "cpanm ModuleName".

    I judge web frameworks by how *little* they try to do for me, and how easy it is to pull in other modules that serve specific purposes. The Perl ecosystem excels at this, more than any other language I've worked with.

    --
    Mark of the Coder fades from you. You perform Opening on World of Warcraft. Warcraft crits GPA for 4. GPA dies.
    1. Re:perl by lucm · · Score: 1

      Sure, I know CPAN, but you can get all that plus vastly superior performance with node js. And there's 10x more packages on npm than CPAN (according to modulecounts.com) and it's clearly the most active.

      Look at the packages:
      https://www.npmjs.com/

      It's not more difficult to install a package (npm install ModuleName) and you get all kinds of fancy tools to make development easier. You can use frameworks like express js to quickly build apps, but with just node alone it's trivial to create pretty much anything. It's javascript so there are things that suck (like dates) but overall it's pretty good, and much easier to learn than perl.

      I'm not saying you should ditch perl, but there's no compelling reason to use it unless one has invested time already in becoming a perl expert.

      --
      lucm, indeed.
    2. Re:perl by silverdirk · · Score: 1

      Well npm does seem to have caught up on module availability. Though I just checked and the excel parser is actually just a wrapper around the Python library. Also these APIs are pretty skeletal and the documentation is almost non-existent.

      Compare: (just picking the modules with high star ratings)
          http://search.cpan.org/~dougw/...
          https://www.npmjs.com/package/...

          http://search.cpan.org/~phred/...
          https://www.npmjs.com/package/...

      --
      Mark of the Coder fades from you. You perform Opening on World of Warcraft. Warcraft crits GPA for 4. GPA dies.
  94. Re:Node JS is the new PHP, the new PHP is actually by tepples · · Score: 1

    Does it mean my webpage won't either die with no error or run fine with unhelpful warnings anymore?

    If you want exception semantics instead of "error reporting", use ErrorException .

  95. PHP 7 OK, not perfect by tepples · · Score: 1

    PHP7 is a huge improvement over old versions. If you haven't looked at it, do so. PHP sucks in 2016 is mostly FUD now.

    To see how much of an improvement PHP 7 is, let's check the 7 things wrong with PHP 5 that I mentioned in this article (and previously in a Slashdot comment):

    Things such as switch use the byzantine semantics of operator == Not fixed to my knowledge. Parse errors and undefined functions are fatal PHP 7 makes them "engine exceptions" which are catchable Error instances. Inconsistent naming and argument order conventions for standard library functions Not fixed completely for back-compat reasons, but PHP 7 has started to drop some duplicate functionality. Backwards associativity for operator ?: Not fixed for back-compat reasons, but at least the new null coalesce operator ?? has its associativity on the more useful side. Letting the server operator change program semantics in annoying ways Safe mode and magic quotes were already gone in PHP 5.4. cURL would not follow redirects if open_basedir was set until September 2013. But upload_max_filesize still defaults to 2MB, which I see as unnecessarily small. Semantics breakage in minor (5.x) versions encouraging shared hosting operators to delay making new versions available to subscribers Not fixed until the majority of shared hosts offer PHP 7. Has someone run a survey about this? No keyword arguments Not fixed.