You have ruined Javascript

  • Now - I still do JS, but I'm mostly working in Erlang these days, building video streaming/encoding systems and blah blah blah


    No. Oh God. WHAT. WHAT THE FUCK.

    var car = new Car({ cylinders: 4 })

    > The freaking 'new' keyword. We had these arguments in the enteprise back-end world so many times and to see the same bullshit repeated for JS galls me right to the fucking core. This is the same old shit in what used to be my go-to escape hatch from that hideous crap.
    A functional programming fanatic doesn't like OOP patterns. Someone stop the presses.
    That said, yes angular has that huge icky thing with Java-like dependency injection. I guess that's one of the reasons behind its success. It made working in it appealing enough for backend guys looking to expand.
    I'm working with one of those right now. The guy did a decent backend job in ASP.NET MVC, but then insistend he should be doing frontend in angular.js, while the frontend guy should stick to html and css. Apparently, he was under illusion that angular is pure backend-like coding and the web part is "details".
    Well, turns out, it's still fucking web and you need to be able to add a fucking div and fix a css style without a frontend guy holding your wiener while you tinkle. Has no idea how to use router. His views are if/then replaces based on clicks. What should have been smooth drag&drop turned into a usability shitfest. Client is getting fucked, so that developer could put "angular" experience in his CV.

  • @cartman82 said:

    That said, yes angular has that huge icky thing with Java-like dependency injection.

    Icky and completely unnecessary. Use an AMD module loader and you can get the same level of customizability in re-mapping injections without writing layers and layers of batshit insane manual boilerplate. Your module imports become your injection points.

    (Ofcourse, that assumes you're not dealing with a narcissist knee-jerk reaction to hold onto your own solution when presented with something better, which is exactly what happend with AMD loaders and AngularJS in the past...)

Log in to reply

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.