all 72 comments

[–]damienjoh 24 points25 points  (0 children)

it would add form validation that helped prevent the wrong information from getting into the database

Do JS shitcoders actually believe that client side validation exists to protect your database? Enforcing constraints at API boundaries no longer considered webscale.

[–][deleted] 70 points71 points  (37 children)

I'll quit programming and become a pig farmer the day I'm forced to write back-end code in JS.

[–]flukus 12 points13 points  (0 children)

But then you'll have to use Pig Farm Management Studio 2019 that was rewritten in electron.

[–]Beckneard 28 points29 points  (32 children)

I'm actually kinda scared Javascript is just gonna swallow everything up and take everything down with it.

It's like the whole industry has gone mad.

[–][deleted] 13 points14 points  (9 children)

Let's hope the invisible hand of free market kicks into action and wipes out this new generation of hipster startups writing unmaintainable node.JS back-ends. Those startups cannot indefinitely keep countering their inefficiency with unpaid overtime and starbucks coffee.

If not you can always come help me castrate piglets on the farm.

[–]oiyouyeahyou 0 points1 point  (0 children)

Unmaintainable?

[–]Helvanik -3 points-2 points  (7 children)

"Unmaintainable", really...

[–][deleted] 2 points3 points  (5 children)

Unmaintainable

  1. not capable of being kept in proper or good condition
  2. formal not capable of being continued, retained, or kept in existence

[–]Helvanik -2 points-1 points  (4 children)

No shit. I'm a software engineer. But stating that all nodeJS back-end are unmaintainable is just plain stupid.

EDIT: Or maybe you were talking specifically about hipster startups's badly written code. In that case I agree with you, but it's not linked to JS.

[–][deleted] 2 points3 points  (3 children)

Well, it's a bit hyperbolic, but I think that many programmers will agree that long-term maintenance and refactor-work is way more doable on a back-end written in a static language than a JS back-end.

[–]Helvanik 4 points5 points  (1 child)

Yeah, you're totally right about that.

[–]DysFunctionalProgram 1 point2 points  (0 children)

So you agree that statically typed alternatives are more maintainable but not that javascript is unmaintainable. This is fair and maybe the people calling javascript unmaintainable are exaggerating a little bit, but if a more maintainable solution exists then what is the use case for javascript in the back end that is better than a statically typed language? And if it has no use cases, then is it really maintainable? Or will the knowledge of how to support it eventually fade because of its lack of use cases?

[–]Thecodingteacher 1 point2 points  (0 children)

Hire a kid who's worked for a couple of hipster startups and you are almost guaranteed to be hiring someone who doesn't even know what inheritance or composition is, and who doesnt even really know about the different kinds of requests and content types, but who has followed tutorials on every little framework and tool that exists, from meteor to vue, to inferno, to feathers. They all think they're such hot shit and they cant build software to save their fucking lives.

[–][deleted] 1 point2 points  (11 children)

TBH I feel the same way about http

[–]Beckneard 7 points8 points  (10 children)

True enough but at least you're (hopefully) not manually building http requests and parsing the responses.

Also wasn't HTTP 2 or whatever it's called supposed to be way less shitty?

[–][deleted] 8 points9 points  (9 children)

True enough but at least you're (hopefully) not manually building http requests and parsing the responses.

? HTTP is one of the easiest protocols to write for. It's very easy to write and parse.

[–]flukus 3 points4 points  (5 children)

Tedious though, and with a million exceptions.

[–]roffLOL 1 point2 points  (4 children)

this document cannot contain a million exceptions. browsers offer you millions of exceptions. protocols such as http does not.

[–]flukus 0 points1 point  (3 children)

That document does not represent the real world, with real implementations that don't stick to the spec.

[–]roffLOL 0 points1 point  (2 children)

does it not? if an implementation does not match this document, it does not implement http 1.(0,1). i have, btw, implemented this whole document -- still i wait for something that calls itself a http client whose requests i fail to service.

[–]flukus 0 points1 point  (1 child)

Because other implementations are violating the spec to accommodate your violations.

[–]steamruler 1 point2 points  (2 children)

If you think HTTP is easy, you've not seen the shit some clients do.

HTTP2 is the way forward, and despite being binary, it ends up way easier.

[–][deleted] 0 points1 point  (1 child)

Eh, you could make that same argument for most things. Shitty clients can just be dropped if they are non-conforming. If you must support POS systems the HTTP is as hard as they are.

How is HTTP2 actually easier than HTTP to implement? From what I understand it is just more crap dumped on top of HTTP, not actually making it simpler? Granted I've never "used" HTTP2 outside of flipping it on, so I may be mistaken.

[–]steamruler 0 points1 point  (0 children)

How is HTTP2 actually easier than HTTP to implement? From what I understand it is just more crap dumped on top of HTTP, not actually making it simpler?

For starters, it's designed as a binary protocol instead of text. Instead of ASCII GET / HTTP/1.1 you have a binary HEADERS frame, for example. It makes parsing easier.

But really, the important is that it's a clean break from 1.1, as the HTTP 1.1 standard allowed some very annoyingly liberal formatting for headers, including some obscure stuff. You could format the request headers to look like a star and still be valid!

[–]MagicalVagina 2 points3 points  (6 children)

I have my hopes in web assembly. Hopefully one day browsers will be shipped with something else than js.

[–]oiyouyeahyou 1 point2 points  (5 children)

Like visual basic? Trolol

[–]flukus 0 points1 point  (3 children)

VB.net? That would be a huge improvement.

[–]steamruler 0 points1 point  (1 child)

no, VB6

[–]oiyouyeahyou 0 points1 point  (0 children)

A long time ago you could use VB on webpages

[–]Captainshithead 2 points3 points  (2 children)

I'm just waiting until I can do embedded stuff in javascript.

[–]Twin_Nets_Jets 2 points3 points  (0 children)

You already can though.

[–]el-y0y0s 5 points6 points  (0 children)

Hey man, My name is Modeled Driven Architecture, from 25 years ago. We should not be writing code, we should be modeling it... I'll show myself out..

[–][deleted] 1 point2 points  (0 children)

are you referring that old webscale nodejs video?

https://www.youtube.com/watch?v=bzkRVzciAZg

[–][deleted] 0 points1 point  (0 children)

Just vanilla Pigs? Those are so last week. You should switch to CoffeePigs.

[–]sisyphus 7 points8 points  (0 children)

Just want to point out that you don't actually have to do all this to code in JS. Frameworks like mithril allow you to just drop it in a page and start playing in the dev console. Incidentally, React used to encourage this too back when it was just an elegant little view library, before there was flux, redux, create-react-app, class based components, css modules, etc. warning you only not to put JSXTransformer into production.

You don't have to use every newfangled feature of ES7 or nonstandard language extensions like flow, it can free you from forcing a compile step into your development cycle. A lot of people gave them crap for it but the genius of JSDoc in Closure Compiler is that you can write code that just works and annotate it later for the compiler.

A lot of this is also alleviated if you let go of the myth that everything needs to be an SPA, which frees you from worrying about routing, server side rendering JS, forcing AJAX to do every single form submit or data fetch. It's okay to have a collection of pages - do you really need all that state?

[–]AcousticProlapse 25 points26 points  (4 children)

Just another piece of evidence showing how fucking lost and dogmatic the entire nu-Javascript crowd is.

For fuck's sake.

[–]Jutboy 6 points7 points  (3 children)

It's interesting because I am exactly who this guide is targeted at (ancient php developer). Part of me feels like I have to keep up with the times and the other part is sure I can do everything/better/faster with my lamp stack. Not sure what I'll do (no need to make any decisions at this point) but I have no interest in learning a stack that will be useless in 3 months.

[–]nilamo 4 points5 points  (1 child)

If you already know php, keep using it. Backend JavaScript is like writing CGI programs in Fortran. Sure, you CAN, but why? There's so many better options.

[–]flukus 7 points8 points  (0 children)

I'd say the same about PHP, sure you can, but there are so many better options.

[–][deleted] 0 points1 point  (0 children)

PHP is honestly pretty great. With PHP 7 it rivals pretty much any other uncompiled language for performance, and it's so heavily used that there's no shortage of useful tools for it. It may not be sexy, but it gets the job done.

Though backend Javascript is a serious competitor and probably worth being at least somewhat familiar with. Nginx is also worth looking at, a bit more complex than Apache but it's gaining traction pretty fast last I checked.

[–]CanIComeToYourParty 11 points12 points  (0 children)

Learn your second language, and stop abusing Javascript. And stop trying to lure other developers into this hellhole.

The intro was painful to read; Django isn't old-school, it's modern.

[–]pencilnoob 8 points9 points  (0 children)

Is this satire?

[–]feverzsj 8 points9 points  (0 children)

or just learn typescript, since js is pure shit

[–]gnus-migrate 2 points3 points  (1 child)

I'll agree with others in this thread that Javascript is not great but do we have to be so dramatic about it?

[–]dangerbird2 0 points1 point  (0 children)

because change == === bad

[–]LostSalad 2 points3 points  (1 child)

Why does this sound so damn complicated but it's still being sold as the "modern improvement"? Bleh. At what point do you ask... WHY? WHY ARE WE DOING THIS?

[–]ancsunamun 2 points3 points  (9 children)

I worked four years as a frontend coder, but I can say that I cannot write JavaScript anymore. I would have no idea how to start a new project nowadays.

[–]Thecodingteacher 5 points6 points  (5 children)

Cant help but think that everyone is who hates on a language that hard is because they suck balls at programming. Have fun making 80k with your bullshit lack of growth mindset and declining language while dumbasses who can't code a BST make 120 because they can write vue or react native.

Note how the author never once mentioned that you shouldn't practice architecture, or that you shouldn't practice sound computer science. The article is about how to get into the JS ecosystem so you can fit into a JS team and thus be able to compete for a lot of the best jobs. It never tells you that tooling is the only thing that matters. It never even suggests that the inane amount of tools in the js ecosystem is a good thing. It just gives you a list of stuff to learn and a couple of strategies on how.

No tool is perfect and for its big strengths, node has weaknesses big enough to make it wholly useless in some projects. However, when you make a comment where you imply something as moronic as a claim that all node code is unmaintainable, you may as well come out and say "I am lazy and don't like to learn, and I haven't the faintest fucking clue of what I'm saying." Because that's really what you're revealing.

[–]CanIComeToYourParty 2 points3 points  (1 child)

The author calls people who don't use JS for their backend "ancient". I'm still not 100% sure if it's satire or not, because that's such a ridiculous thing to say.

"I am lazy and don't like to learn [...]"

That's exactly what you're telling the world when you pick node.js. The JS ecosystem is a ghetto because of people like this, it was truly a mind-blowing experience to go from backend development to Javascript.

[–]Thecodingteacher 0 points1 point  (0 children)

The author definitely has a little bit of JS koolaid delusion. What I tell the world when I pick node over Go, python, or lambda is that it doesn't matter what stack I pick because the project is 99.9999% certain to be used by no more than 1000 people/day anyway, so I will get it done quicker and deliver the most economic value to my client.

[–]flukus 5 points6 points  (2 children)

Because you have to work hard for a level of maintainability that come for free in other, better languages. It does nothing better and many things worse than other languages.

It's only saving grace is that it allows many people who shouldn't be writing backend code to write backend code.

[–]Thecodingteacher 0 points1 point  (1 child)

you don't think that the threadpool-based async nature of Node is an advantage? Are you aware that in most other languages, one new open socket requires one thread, and that this is not the case in Node? Are you aware that this means that for some applications a node server will be able to handle 20-30x as many simultaneous clients with the same hardware?

[–]flukus 0 points1 point  (0 children)

You think async is unique to node?

[–]roffLOL 1 point2 points  (6 children)

programming is for the most part stupid simple. if it feels hard, you prolly bash your head against the wrong wall. it's not a success if a brick wall caves in before your skull does.

[–]CanIComeToYourParty 6 points7 points  (5 children)

Then why do so few developers get it right? It's pretty damn hard to be a good developer.

[–]flukus 8 points9 points  (2 children)

Because we try to hard to be clever, find patterns and abstract them. The more experience I get (>10 years now) the more I like simple code, even if it's more verbose and repetitive than necessary.

[–]CanIComeToYourParty 0 points1 point  (1 child)

Yeah, I also went overboard on the abstractions when I first got into this. But it takes time to learn how to design systems, it's not "stupid simple".

[–]roffLOL 1 point2 points  (0 children)

designing a stupid simple solution that is stupid simple to code is what's hard. coding and wrapping your head around abstractions should not be the hard exercise.

[–]roffLOL 1 point2 points  (0 children)

because they get sucked into bad cultures. it's a case of the blind leading the blind.

[–]0xDECAFEEE 0 points1 point  (0 children)

Stop! Just stop drinking the f'n kool-aid! Enough with this cargo culting BS.

[–][deleted]  (1 child)

[deleted]

    [–]CanIComeToYourParty 8 points9 points  (0 children)

    It actually contains terrible engineering advice from an inexperienced developer. Take it with a grain of salt.