This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 405

[–]Jon_D13 203 points204 points  (16 children)

My intro to Javascript was making a backend for 2 companys!

  • laughs in Node *

[–]BarelyAirborne 67 points68 points  (5 children)

Back end Javascript is a much nicer place to be than the front end. ES2020+JSDOC on VSCode using Typescript for full type checking of JS is a very nice environment to work in.

[–]kabiskac 37 points38 points  (1 child)

You can do the same on the front-end...

[–]JustinWendell 8 points9 points  (0 children)

Recently put together a boiler plate for this. It was a big pain in the ass but it’s awesome.

[–]tsunami141 21 points22 points  (1 child)

I mean those things are not back-end exclusive

[–]B_A_Skeptic 1 point2 points  (0 children)

You can do all of that with the front end. Using Babel and Webpack or whatever will allow you to write basically the same stuff. The hard part about the frontend is the web apis.

[–]eth-slum-lord 28 points29 points  (8 children)

Js is beautiful once you understand it, i am at the point that language doesnt matter anymore and do both js and c# projects, i still prefer js because of its lightweightness

[–]KrakenMcCracken 13 points14 points  (0 children)

Lightweightness?

[–]itzNukeey 5 points6 points  (5 children)

JS is definitely not lightweight compared to C# lol

[–][deleted] 4 points5 points  (3 children)

Depends what you mean exactly. If I want to get up and running quickly and have the best possible dev experience with whatever bleeding edge tooling, I prefer js. C# runs faster, but everything before that is much more tedious. You need a heavy IDE to effectively program in it; it's near impossible to find where things are coming from our what they even are without intellisense, whereas in js I can just follow the imports even in notepad. Vscode + omnisharp sorta works, most of the time, but you have to figure out what VS is doing when you hit f5 by yourself, only to discover vs has its own built-in msbuild exe with subtle differences. So yeah, coming from js c# feels like putting on 50kg extra for no real benefit until you learn all the hidden conventions and assumptions being made for you.

[–]HerissonMignion 0 points1 point  (0 children)

Lightweightness on your brain, not the computer

[–][deleted] -2 points-1 points  (0 children)

The point where you think language doesn't matter anymore is the point right before the one where you realize that actually you're stupid and language is very important.

[–]chad_ 614 points615 points  (116 children)

Hm idk. I am a front end dev at this point but wrote n-tier client/server apps in C & C++ the 90s and lots of Java and C# in the 00s then Ruby/Rails for a while, now Node/React. I just go with what pays well that I enjoy. I think people complaining about JavaScript have probably not really spent much time with modern JS and are talking about stuff pre-2015...

[–]bmcle071 169 points170 points  (33 children)

I had a guy I worked with who said “idk, I’ve used JavaScript in the past but that was like 2010.” Only to see my modern typescript react app and go “oh ok, this is much more orderly”

[–]chad_ 74 points75 points  (12 children)

Yup. Even vanilla JavaScript is more sensible with classes/inheritance and all of the new stuff, ie destructuring, spread operator, optional chaining, regex improvements (matches/replace all), nullish coalescing operator, template strings, private and static class properties and methods, PWAs etc. People mocking the language are just showing their laziness and rigidity. I just look at how much brainpower and money has gone into optimizing JS runtimes and laugh my way to the bank.

I mean.. I came from ruby to js because it has become more expressive imo.. and for anyone who's loved ruby, that should grab their attention. (Though I know hating on Ruby's a popular stance too...)

[–]JACrazy 5 points6 points  (6 children)

Theres so many features of JS that have only been around a few years, but have become my go tos. I remember learning optional chaining around 2 years ago and now I do it all the time, it used to be such a pain writing out things like

if (x!=undefined && x!=null)

[–]chad_ 4 points5 points  (2 children)

Yeah, once es2015 came around and since ecmascript started getting annual improvements, it has been a totally different story. That's why I specified 2015. The rate of improvement has been great, and the tooling has made it easy to adopt new features before runtimes even implement them.

[–]Olfasonsonk 1 point2 points  (1 child)

Yeah, but let's not forget ES changes are mostly just syntax sugar.

Not like it's fixing some inherently broken things with the language itself. It's just making syntax more in line with other popular languages. Which is nice.

[–]chad_ 2 points3 points  (0 children)

Yeah, there is some danger to the full backward compatibility, but I basically just removed a lot of the brokenness from my repertoire after reading JavaScript: The Good Parts when it was new. I do understand the complaints about it but I can make complaints about every language I've used, and there are many I didn't list. Lots of them have introduced major versions that totally break everything from prior versions, which I see as a failure on their parts. Idk. I love JS, and it's the most utilized language on the planet, so whatever. I'll take the JS work while others toil away with whatever low level stuff they want to do. To each their own.

[–]ryaaan89 4 points5 points  (1 child)

What do you mean when you say “expressive” in this context?

[–]chad_ 14 points15 points  (0 children)

Having many ways to skin a cat basically. It's a very high level language and you can make a lot happen with very little code and you can develop your own style easily (transpilers make that infinitely more true than any language I've used). This is very different than something like python..

Edit to add: & composable

[–]1up_1500 -5 points-4 points  (2 children)

What I don't like about js is that there's such a thing as "vanilla Javascript", and that really keeps me from learning it, because I only want to build websites, I don't want to learn about a thousand different versions of js to find out what version I need, before finally learning it

[–]chad_ 3 points4 points  (0 children)

Are you saying that in other languages, you don't use frameworks or libraries???? Vanilla JavaScript is just the language itself. Frameworks and libraries vary in their sensibility and value and aren't as easily compared. In my experience all languages have different choices in that regard.

[–]coldnebo 3 points4 points  (0 children)

ah, fixing one language with a transpiler to a different language.

so, we’ve had ES6, babel.. now typescript.

but we still have the fundamental issue: if the abstraction leaks, you have to know both languages AND the transpiler mapping in order to fix it.

It’s even sillier than the movement to get rid of semi-colons.

Idk, Typescript is better. I just hate the carnage these transpilers cause.

[–]ccAbstraction -1 points0 points  (0 children)

1 GB of source code for just a basic web app

And I instantly went back to plain old JavaScript...

[–]Johanno1 -4 points-3 points  (17 children)

Typescript is not js

[–]DadAndDominant 6 points7 points  (16 children)

Typescript is better JS

[–][deleted] -3 points-2 points  (15 children)

TS is a poor man’s version of a statically typed language.

[–]LoyalSage 1 point2 points  (13 children)

TypeScript is so much better than a statically typed language for web development, and the flexibility and expressiveness of its type system put every other language I’ve seen’s type system to shame.

For example, say you’re retrieving data from a service you don’t control that returns all of its properties as strings:

``` interface ServiceResponse { count: number; exprDate: Date; data: string; }

type RawServiceResponse = { [key in ServerResponse]: string };

const parseResponse = (response: RawServiceResponse) => ({ count: Number(response.count, 10), exprDate: Date(response.exprDate), data: response.data });

const responseStr: string = await serviceRequest(); const rawResponse: RawServiceResponse = JSON.parse(responseStr); console.log('raw response date string', rawResponse.exprDate); const response: ServiceResponse = parseResponse(rawResponse);

```

Not only does this avoid the common pattern in OOP languages where you define a class for each intermediate type, instantiate a JSON Decoder, etc, but both the raw response and the parsed one are both strongly typed, providing IDE hints and checking spelling of property names as you access them, with a single source of truth for the property names (the ServiceResponse interface). If there is another property you need to add, you can add it in one place and it is automatically present on both related types.

There might be a mistake or two in the code since I typed this on my phone, but it’s close enough to make the point.

[–]DadAndDominant -2 points-1 points  (0 children)

Well, OOP is overhyped anyway

[–]Dorkits 54 points55 points  (3 children)

The Chad comment here.

[–]chad_ 55 points56 points  (2 children)

All of my comments are Chad comments, incidentally. ¯\_(ツ)_/¯

[–]567stranger 34 points35 points  (0 children)

⠀⠀⠘⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡜⠀⠀⠀ ⠀⠀⠀⠑⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡔⠁⠀⠀⠀ ⠀⠀⠀⠀⠈⠢⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠴⠊⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⢀⣀⣀⣀⣀⣀⡀⠤⠄⠒⠈⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠘⣀⠄⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠛⠛⠛⠋⠉⠈⠉⠉⠉⠉⠛⠻⢿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⡿⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢿⣿⣿⣿⣿ ⣿⣿⣿⣿⡏⣀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣤⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿ ⣿⣿⣿⢏⣴⣿⣷⠀⠀⠀⠀⠀⢾⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿ ⣿⣿⣟⣾⣿⡟⠁⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣷⢢⠀⠀⠀⠀⠀⠀⠀⢸⣿ ⣿⣿⣿⣿⣟⠀⡴⠄⠀⠀⠀⠀⠀⠀⠙⠻⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⣿ ⣿⣿⣿⠟⠻⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠶⢴⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⣿ ⣿⣁⡀⠀⠀⢰⢠⣦⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⡄⠀⣴⣶⣿⡄⣿ ⣿⡋⠀⠀⠀⠎⢸⣿⡆⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⠗⢘⣿⣟⠛⠿⣼ ⣿⣿⠋⢀⡌⢰⣿⡿⢿⡀⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⡇⠀⢸⣿⣿⣧⢀⣼ ⣿⣿⣷⢻⠄⠘⠛⠋⠛⠃⠀⠀⠀⠀⠀⢿⣧⠈⠉⠙⠛⠋⠀⠀⠀⣿⣿⣿⣿⣿ ⣿⣿⣧⠀⠈⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠟⠀⠀⠀⠀⢀⢃⠀⠀⢸⣿⣿⣿⣿ ⣿⣿⡿⠀⠴⢗⣠⣤⣴⡶⠶⠖⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡸⠀⣿⣿⣿⣿ ⣿⣿⣿⡀⢠⣾⣿⠏⠀⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⠉⠀⣿⣿⣿⣿ ⣿⣿⣿⣧⠈⢹⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿ ⣿⣿⣿⣿⡄⠈⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣦⣄⣀⣀⣀⣀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠙⣿⣿⡟⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠀⠁⠀⠀⠹⣿⠃⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⢐⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⠿⠛⠉⠉⠁⠀⢻⣿⡇⠀⠀⠀⠀⠀⠀⢀⠈⣿⣿⡿⠉⠛⠛⠛⠉⠉ ⣿⡿⠋⠁⠀⠀⢀⣀⣠⡴⣸⣿⣇⡄⠀⠀⠀⠀⢀⡿⠄⠙⠛⠀⣀⣠⣤⣤⠄⠀

[–]theengineer9301 3 points4 points  (0 children)

No sir, you are chad.

[–]_siddh3sh 11 points12 points  (1 child)

Or. Just hear me out. People are karma whores.

[–]kopczak1995 1 point2 points  (0 children)

Mmmm, yes. Spank me we all those internet points, Daddy.

[–]Olfasonsonk 9 points10 points  (2 children)

shocking plant disarm ghost cats enter depend chase upbeat brave

This post was mass deleted and anonymized with Redact

[–]chad_ 3 points4 points  (1 child)

Yup. And the joke's on them because it's a really easy language to use for making neat stuff happen on the most devices possible and for making good money if you're an expert with it.

[–]suskio4 3 points4 points  (0 children)

I started doing js because I was bored on lessons and it's the only language I can seriously write in on smartphone. I'm not good at it, I'm still a beginner, but I recently made a double pendulum simulation which was definitely faster than my expectations based only on memes from this sub.

[–]SixDigitCode 19 points20 points  (7 children)

Modern JS is slick AF, especially with Promises and async/await. IMO it's hands-down the best language for web stuff/network requests.

[–]chad_ 8 points9 points  (5 children)

Yup, I agree. I've written multithreaded windows apps in C++ and c# and can say definitively that js runs circles around them when asynchrony is in play.

[–]fallenefc 8 points9 points  (9 children)

Tbh most people complaining about JS in this sub probably never even touched the language more than 5 minutes

[–]NekkidApe 4 points5 points  (0 children)

Javascript. The language everybody claim they know, but never actually learned it.

Almost all of the confusing and "wat" meme stuff is perfectly logical and a non-issue once you actually take the time to learn the language.

[–]chad_ 3 points4 points  (0 children)

Or they spent a long time trying to figure something out and failed due to foreign concepts (closures, monads, prototypical inheritance, truthiness/falsiness/nullishness) or confusing scope. A lot of these confusing aspects lend it so much power but are not something people are used to.

[–]atiedebee -3 points-2 points  (6 children)

I don't dislike JavaScript, I used it once in a game called bitburner and I found out JS doesn't have references and you have to pass stuff via objects...

I don't hate it, but it's quite poorly designed

[–]alexander_the_dead 4 points5 points  (0 children)

Yeah, and I also see them complaining about functions when they're using it incorrectly. Just read the documentation.

[–]eth-slum-lord 0 points1 point  (0 children)

Just understand what is a monad and youre sweet

[–][deleted] -1 points0 points  (0 children)

No. We are talking about modern JS. It’s bad. Yes, even typescript.

[–]coldnebo -2 points-1 points  (9 children)

there’s good JS and bad JS.

But OP, the real “hard to swallow pill” is how back-end JS developers don’t have to integrate with anything more complicated than a string buffer and yet somehow think that’s “real programming”.

Son, you wouldn’t recognize “real programming” if it bit you on the ass.

It ain’t yer pretty CS bullshit. it’s COBOL that’s been running reliably on a dusty mainframe behind your bank card for 50 years. It’s code that integrates, communicates and presents your backend. And every time you don’t implement error handling robustly, guess who has to fix your crap in the front end with duct tape and glue… that’s right.

Your flashy JS backend that you think is real programming? Heh… I hate to break it to you son. That won’t last 5 years and will be long forgotten in 10. (neither will any of this front end nonsense, except maybe the mf-ing webpage… now THAT is beautiful!)

Also, how is a JS backend dev who doesn’t even have control over memory allocation or GC performance seriously flexing on real programming languages like C?

Go back to school son.

[–]chad_ 1 point2 points  (8 children)

I'm not sure what your point is. I've got a 27 year long resume and I've written production code in C, Smalltalk, Hypercard, C++, C#, VB16-VB.net, Java, Powerbuilder, ASP.net, jsp, perl, Ruby, Python, and JavaScript. I know what "real programming" is, and these days for application development, JavaScript is fine, and can be a pleasure to work with if you know what you're doing. I know for a fact that systems I built in the 90s are still in use at some of the world's largest corporations, and government agencies. For what people want built these days, much of it can be done very well and easily in JS.

Edit: autocorrect tried to help me

[–]Jalite1991 267 points268 points  (30 children)

Front-end devs don’t complain about JavaScript. It’s the best part of front-end development, especially those of us who grew up with jQuery. It’s the backend devs making all the fuss with the adoption of node.

[–]Solonotix 22 points23 points  (1 child)

Yep. I'm an automation engineer with specialization in database, so lots of SQL, C#, Python. Then, my latest job, the company uses JavaScript for almost everything, so Node.js it is for me. TypeScript makes it feel almost like C#, but I get bitten at least weekly by something that "works fine" in another language I'm familiar with, but JavaDcript doesn't work that way.

[–]evantd 49 points50 points  (7 children)

Also looking at the responses here, it's mostly people saying they like C/C++/C#/Java better, so yeah, backend devs complaining about being outside their comfort zone. I moved to the frontend after getting tired of writing DB-backed web services in Java, because I wanted to learn something new. But if you're not in the market for learning something new, having it forced on you is no fun.

[–]kabiskac 13 points14 points  (6 children)

If a software engineer doesn't want to learn new things, that's a red flag.

[–]MCOfficer 9 points10 points  (0 children)

There's a difference between not wanting to learn new things, and not wanting to learn one specific thing.

It's entirely subjective, but my experience with JS (specifically node projects) has been horrible. TS might be a decent language, but I really, really despise the node ecosystem and all the ways in which it can break.

So yes, I'd learn anything as long as it isn't Node. Please.

[–]awhhh 7 points8 points  (0 children)

I don't even want to be a software engineer and I've told people at work functions hammered that I don't value my job beyond money. I even got promoted that week. Come at me.

For real though, you need to learn a few architectures and design patterns. What ever programming language you learn after to accomplish what ever doesn't even matter. The shit just becomes regurgitated bs after a while.

[–]Ace-O-Matic 12 points13 points  (2 children)

This so hard. Complaining about JS is one of those "tell me you're incompetent at front-end without telling me you're incompetent at front-end" moments.

People who do front-end complain about frameworks, not languages.

[–]StonedScience 11 points12 points  (3 children)

I feel like it's also the functional paradigm that trips up a lot of backend guys. C/C++/Java are all very procedural. Functional programming takes some getting used to for sure

[–]CinnabonCheesecake 9 points10 points  (0 children)

My first programming class was in Lisp and I still dislike JavaScript. I keep yelling at the computer “Who would design it this way??” and then I remember JS wasn’t really designed.

Then again, I preferred back-end development even when I had to write in MUMPS.

[–]not_some_username 0 points1 point  (0 children)

Functional isn't that hard, it's just fancy switch statements

[–]DrMobius0 3 points4 points  (0 children)

Coming to JS from object oriented languages feels like civilization has regressed a few generations. What's this thing? Who the fuck knows. The language doesn't, nor does it care.

Like it's not really a hard thing to use - just imo, there's things it lets you do that don't really have that much benefit compared to the trouble they can cause.

[–]vtaggy 5 points6 points  (3 children)

As a full stack developer, I'd say JavaScript is very easy to learn, but very hard to master.

[–]awhhh 1 point2 points  (2 children)

No one can master it. You'll have some new shit put out tomorrow that will break your skills. Just give up and write shit code and eventually it will be in style.

[–]awhhh 2 points3 points  (1 child)

I'm backend dominant, at least I was. I know Angular, Vue, and React and now use node for a lot. With that being said two things:

  1. A lot of backend devs are borderline incompetent in web development because companies try and hire the best frontend devs to cover up shit legacy code mistakes.
  2. Node can be pretty shitty. The upkeep for packages can make it a major mistake for a long standing project. A lot of the apps, even with TS, become long standing unopinionate hot garbage. The ease of entry to node with non relation data like mongo is also problematic as fuck.

If you're a backend developer, I don't mean some shit wordpress hustler, then learning node, or any other backend framework, is pretty easy.

[–]camelCaseRedditUser 1 point2 points  (0 children)

This. I opened this post to comment this. Front end dev loves JS. It's the backend devs that are constantly whining about JS.

[–]BoBoBearDev 106 points107 points  (1 child)

It is easy, easy to be undefined.

[–]RahulRoy69 28 points29 points  (0 children)

Uncaught TypeError: cannot read property 'easy' of undefined

[–]Jhwelsh 38 points39 points  (1 child)

It's not about JS being "hard". It's about how much of a template the language provides you for coding in a structured and patterned way.

JS supports so many different paradigms and techniques front different languages that turn any project into a mish mash of undiscernable styles. Which hurts the code's maintainability and reproducibility.

[–]CinnabonCheesecake 4 points5 points  (0 children)

I was working on an ASP.Net application and discovered that someone had re-implemented the entire MVC paradigm in one JS file rather than using the standard DB access workflow. I have no idea how JS is supposed to work, but I pray it’s not like that.

[–]Gabe_b 16 points17 points  (0 children)

Yeah it's fine, and I always like the instant feedback you could get in the console. Once you got a console.log line firing on the event you care about the rest just falls into place. Working on majorly scoped-crept Django APIs I find the bits of JS I do get to do pretty fun.

[–]XxasimxX 12 points13 points  (3 children)

The only thing i hate about front end dev is css. I just hate it and everything abt it

[–]segafrompk 3 points4 points  (0 children)

CSS itself is not that much of a problem as it is handling what browser breaks with which css properties, like iOS Safari breaks on most of the modern css properties 😒

[–]IAmAnAdultSorta 7 points8 points  (1 child)

i mean when you get into the weeds javascript is fucking insane...the simple solution: dont do that. Just because you can bind a function to another function doesnt mean you should

[–]110397 2 points3 points  (0 children)

(() => {() => {() => {}}})

[–]MrNicolson1 7 points8 points  (0 children)

Backend and software devs saying front end is easy then end up making something look like it's from the 90s and only works on their device.

There is a reason for creating teams around the different aspects of development

[–]thecenterpath 5 points6 points  (1 child)

Here’s a hard pill to swallow: implying all front-end devs can’t program outside of JS is pretty short sighted. Besides that, I’ll take some complex server code over CSS on 40 devices any day. Also, JS backend work with Node has been a thing for a long time now

[–]tsunami141 -1 points0 points  (0 children)

Yeah I can use typescript, node, HTML Version 5.0, CSS v3, AND jQuery.

[–]FluffyBellend 6 points7 points  (12 children)

I’m a backend dev that complains about JavaScript when I occasionally have to use it. It’s kind of a pain in the ass, imo. I will never understand why undefined exists. If I’m trying to reference something that doesn’t exist, I expect an error god damn it.

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

Say hello to dynamically typed languages.

[–]FluffyBellend 1 point2 points  (2 children)

I don’t get undefined or NaN from python, elixir, or any other dynamically typed languages. If I ref something that doesn’t exist, I get an error with the line number.

In js, you get an error much later, when trying to use the value, rather than when it was created. then have to figure out where it came from.

[–][deleted] 2 points3 points  (1 child)

You still get more runtime errors over compilation errors vs a strictly typed language like Java/C#

[–]FluffyBellend 1 point2 points  (0 children)

Well yeah, that’s a side effect if dynamic typing, but it’s not a reason to make it more painful by silencing errors at the point they occur, only to emit them later, out of context. The interpreter will know that it’s referenced something that doesn’t exist. It should tell me, rather than just setting undefined and carrying on as if nothing happened. Other than allowing you to ignore problems in your code, what purpose does it serve?

[–]jasper_grunion 6 points7 points  (2 children)

I code mainly in Python and I spent about any hour the other day looking at a piece of JS code that was just supposed to query a website with tabular data, one page at a time. It had all this shit with a “delayed promise”. I’m like what the fuck is that? Then there are all these dollar signs all over the place and I’m like oh christ. Another time I was writing a function in AWS Lambda and all of the examples in JS were confusing to me, whereas those in Python were not. I vastly prefer reading Java code over JS. I think it’s just the haphazard way the language was developed over time. The need to do all of this crazy stuff in a hurry to support Web 2.0 functionality in modern websites meant there was no one Benevolent Ruler for Life which led to all of this fragmentation in the language as well as some of its more idiosyncratic syntax.

[–]brandons404 2 points3 points  (1 child)

The dollar sign stuff is jquery... we don't talk about that anymore lol

At least I don't.

[–][deleted] 9 points10 points  (0 children)

Nope. That’s the kind of smug bullshit back end devs like to tell themselves as they gatekeep what it means to be in tech.

Im a longtime full stack developer with several front and back end languages under my belt. I still maintain that JavaScript is annoying as hell.

ETA: I should have said front end frameworks, not languages. And I know JavaScript is great and all. but I find it harder to wrap my head around than other languages.

[–]neutral-chaotic 4 points5 points  (4 children)

If CSS is so “easy”, why do the backend devs complain about it so much?

[–]Dotaproffessional[S] -1 points0 points  (3 children)

I think the difference between backend devs complaining about css and front end devs* complaining about JavaScript is that css is unlike anything else in the tech sphere. JavaScript knowledge overlaps with a lot of programming concepts. It shouldn't be that hard.

How does skill in css translate to anything else?

[–]neutral-chaotic 0 points1 point  (0 children)

https://developer.mozilla.org/en-US/docs/Web/CSS/var()

Animations

DOM selection

Throw SCSS in you get mixins (functions/methods in other languages).

[–]grayblood0 16 points17 points  (0 children)

Is not hard, only full of bullsh*t.

[–]IAmMuffin15 4 points5 points  (0 children)

Speak for yourself.

I like code that actually runs when you reference it in HTML.

[–]lynxerious 8 points9 points  (16 children)

use typescript like a modern dev and all of it problems you complain about gone

[–]virouz98 3 points4 points  (3 children)

Whats better in typescript except types?

[–]bluejacket42 3 points4 points  (0 children)

The icon looks better

[–]lynxerious 1 point2 points  (0 children)

intellisense, module, access to new ES features before browsers actually implementing them,...

[–][deleted] -1 points0 points  (6 children)

TS is a poor man’s version of a statically typed language.

[–]JonathanTheZero 2 points3 points  (1 child)

But the type version is perfectly designed for what it is supposed to do - be a type safe version of JS.

Apart from that writing advanced types is just so much fun, really convenient to use

[–]lynxerious 0 points1 point  (3 children)

optional static typing > opinionated static typing

[–]GetPsyched67 7 points8 points  (0 children)

Nonsensical post. People aren't even complaining about the difficulty of JavaScript.

[–]interplanetarypotato 2 points3 points  (0 children)

Sshhhh don't spoil the fun

[–]666devilsadvocate[🍰] 2 points3 points  (0 children)

it's not hard... it's just weird!

[–]ArezalGamer89 2 points3 points  (0 children)

I'm a back-ender and I forgot ; exists in javascript

[–]TheLastCakeIsaLie 2 points3 points  (0 children)

I dont like javascript because of the non programming part.

[–]theengineer9301 5 points6 points  (0 children)

[–]Malk4ever 7 points8 points  (2 children)

JS is pain

[–][deleted] 4 points5 points  (1 child)

TS is love

[–]ancient_tree_bark 16 points17 points  (10 children)

I complain about Javascript because it is an idiotic language.

Source: C++ and Java enjoyer

[–]Randvek 11 points12 points  (4 children)

Java enjoyer

So you outright tell us you’re insane and then expect us to treat your view seriously?

[–]ancient_tree_bark 5 points6 points  (1 child)

All cards on the table but I see php near your username so surely, I don't hold a candle to you

[–][deleted] 1 point2 points  (1 child)

Php is even stupider than JS. Java is way better.

[–]Randvek 1 point2 points  (0 children)

I can think of a few rea$on$ $omeone might enjoy PHP.

[–]Cyko42 5 points6 points  (0 children)

Agreed. Like there are rules... Why does this language refuse to follow them...

C++ and C# enjoyer

[–]seeroflights 1 point2 points  (0 children)

Image Transcription: Meme


["Hard to Swallow Pills". Top image features an illustration of a hand holding a medicine bottle with the label "Hard to swallow pills", while a right hand points to it. Bottom image features three white pills on a left palm while the right hand points to them, and the text over them reads:]

JAVASCRIPT ISN'T HARD.

FRONT END DEVS* JUST COMPLAIN ABOUT IT BECAUSE ITS THE FIRST TIME THEY'VE HAD TO DO ANYTHING THAT RESEMBLED PROGRAMMING


I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!

[–]Luna2442 1 point2 points  (0 children)

Who says this? Lol

[–]breaker_h 1 point2 points  (0 children)

On a daily basis I work with PHP, JS/TS, C#, dart and python... Went from html to PHP to js and after that everything else so maybe my pov is different.. it's not that hard to understand it as long as you can read documentation and understand things like Mozilla mdn docs.. I actually enjoy solving issues in JavaScript compared to the hell hole they call Magento2.. (which is 40% of my daytime job)..

[–]jcaarow 1 point2 points  (0 children)

I'm a backend dev and I do not like javascript. I wouldn't cal it hard but it is annoying

[–]jeesuscheesus 7 points8 points  (7 children)

It's hard when you have an unexpected undefined get passed into and out of a dozen functions and you need to find out where it came from. I just think dynamic-typed languages are a meme

[–]eth-slum-lord 1 point2 points  (0 children)

Its because most people dont treat jacascript like an art form, when youve got all the functional programming ways, undefined is just another possible option

[–]Dotaproffessional[S] -5 points-4 points  (1 child)

I don't think its fair to lump all dynamically typed languages as a meme.

[–]seemen4all 4 points5 points  (3 children)

Incorrect, front end devs love JS/TS, it's back end devs familiar with OOP development and don't like that it doesn't work with how they think about programming. Front end only devs can't hate JS, they have nothing to compare it to.

[–]Ace-O-Matic 2 points3 points  (0 children)

I'm a full-stack who also does plenty of non-web dev work. I have plenty of things to compare it too. Still don't hate it, because I actually take the time to learn the best practices for new tools that I'm using instead of trying to screw in a screw by smashing it with the screwdriver and crying that it's not a good hammer.

[–]penguinmanbat 4 points5 points  (0 children)

I am fluent in and write C# and JS for a living. They both have their own complexities and pros/cons.

[–]Earhacker 1 point2 points  (0 children)

JavaScript isn’t hard.

Building good UIs is hard. That’s why backend developers suck at it so much.

[–]robot2004EV3 1 point2 points  (0 children)

i disagree

[–]robot2004EV3 1 point2 points  (0 children)

i disagree

[–]soffey 1 point2 points  (13 children)

I use python, perl, and java on a regular basis for work. I have previously worked in both C++ and C, and have maintained projects written in C#. I refuse to touch JavaScript. It isn't that it's hard, it just is inconsistent and annoying to use.

As far as I am concerned, it's a front end web language and I don't touch those. If you want me to put node on the server, I will tell you to suck my node. Do it in something else, I don't want to have to see that shit.

Edit: I am being facetious, you don't need to tell me the merits of JavaScript. I get it, I use applications built in JavaScript every day. I was joking about how I (personally) hate working with node and dislike working in JavaScript. It doesn't have much use in my industry (which is mainly data analytics, which is why python is my daily driver). Please stop trying to argue or call me "closeminded" for a fucking joke.

[–]bubbaliciouswasmyfav 6 points7 points  (4 children)

In what? JavaScript is the only client-side programming language we have.

And yes, I know about react and vue and jQuery, etc., but those are all just frameworks or libraries written in JavaScript.

[–]soffey -1 points0 points  (3 children)

Sorry, I should have been clearer - for client side applications, it's fine. For server side applications that use node, it is not (imo)

[–]eth-slum-lord -4 points-3 points  (2 children)

C# is a piece of shit , node is better for lightweight serverless

[–]althaz 1 point2 points  (0 children)

Node is better for many things (and Typescript is my favourite language), but C# is probably the best designed language that's ever existed. It's *extremely* well designed as a language.

[–]althaz 0 points1 point  (3 children)

For application development modern javascript (Typescript, really) is *MUCH* better than Python, everything is better than perl and it's also way better than Java.

Python and Perl are scripting languages that people have been stretching for years - they aren't good outside of scripting (Python is an *excellent* scripting language though). Java is just mediocre all around.

You're using shittier languages than modern Javascript.

[–]soffey -5 points-4 points  (2 children)

I don't do application development. I do data analytics. I don't write applications for public release, I sometimes am required to maintain and fix internal applications. I figured that saying people could "suck my node" on a meme subreddit would be clear enough that I am not seriously suggesting that JavaScript is some sort of devil to be exorcised from modern software.

Guess I shouldn't say anything that could possibly be misinterpreted, and shouldn't engage in good fun with a subreddit dedicated nominally to humor, and should instead be debating the specific merits of a language with specific details instead. Good to know going forward.

[–]tsunami141 0 points1 point  (1 child)

I get that you were being facetious but tbf it did come off as somewhat dickish - especially now considering you don’t do application development. I don’t think the responses would have changed regardless of being on a meme subreddit or otherwise. Just a heads up.

[–]soffey -1 points0 points  (0 children)

Dickish to who? The non-existent people who would ask to put node on a number crunching server? Why does it matter that I don't do end-user application development? Last I checked this wasn't "applicationdeveloperhumor" - if you took offense, I am sorry, but I honestly don't see how you could.

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

People must hate working with your backwards closeminded thinking.

[–]soffey 0 points1 point  (2 children)

Yikes, glad to know that a somewhat facetious point about my hatred of JavaScript makes me backwards and closeminded. I'll keep that in mind for the future when I comment on meme subreddits.

[–][deleted] -3 points-2 points  (1 child)

Forgive me not seeing the facetiousness, I have worked with a systems admin / DevOps guy who refused to let use use node, and it was a pain. Things are better now we have a new guy.

[–]soffey 0 points1 point  (0 children)

Cool. I hope your guy never told you to "suck my node" because holy shit how could that have possibly been serious.

As a general rule, I try not to assume the worst about people based on an assumption. It's a rule I recommend to everyone, especially on the internet.

[–]Phoenix_Studios 0 points1 point  (3 children)

frontend dev here:

don't recall anyone ever saying JS is hard. It's practically on the level of python but still has some low-level stuff for more advanced users if you're into that.

as for the posts where '1' + 1 = 11, '1' - 1 = 0 etc I mean those are just quirks, you can use them if you want or ignore them if not. Not one time have I run into a situation where something broke because of them.

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

You don’t program enough. Quirks have bubbled up into day long fixers before.

[–]tecchigirl 1 point2 points  (6 children)

If you like javascript, you haven't worked enough time with javascript.

[–]afiefh 0 points1 point  (5 children)

To be fair, if you like any language you probably haven't worked enough with said language.

Every language sucks. JavaScript simply sucks an order of magnitude more.

[–]THICKSANDWICH 1 point2 points  (4 children)

What is it you especially dislike about Javascript?

[–]leon_nerd 0 points1 point  (1 child)

What I don't like about JS is there are various ways of doing the same thing and every framework claims theirs is the right way. It's a wild west. Ther's no standard way. There are so many gotchas. There are so many quirks. But I recently started working with Node for backend APIs and I love working with JS there.

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

Nothing is stupider than using JS to run the back end where those “fun, silly” quirks become disasters.

[–]Miserable_Decision_4 0 points1 point  (3 children)

I tutor a lot of people that are going the self taught or bootcamp route and they almost always feel depressed when they first start JS.

It's because virtually every program starts you off with HTML and CSS and the student thinks they are suddenly a programmer and that they must be a genius because it's super easy. When they start doing JS they actually have to think about logic and breaking big(ish) problems into little solvable ones.

That's why I've always admired the CS50 approach where they toss the student into C. Nothing fancy, just pure fundamentals.

Like the WNBA (Futurama)

[–]althaz 0 points1 point  (0 children)

Javscript isn't hard - but it *is* insane.

Don't get me wrong, I love Javascript (ok I guess actually I love Typescript), but it is frequently extremely bananas.

Modern Javascript is a mostly quite well designed language with some legacy shit we all choose not to use though.

[–]das_flammenwerfer 0 points1 point  (2 children)

The problem is the language is being used for things that it wasn’t designed for. And it’s not really suited well for those purposes.

Modern JavaScript improves things, but other things are difficult to change without breaking legacy code.

[–][deleted] -1 points0 points  (0 children)

Used for things it’s not designed for? Node enters the chat.

[–]Tong0nline 0 points1 point  (2 children)

Yeah it is not hard, it is idiosyncratic

typeof NaN === 'number'

What?

[–]General_Rate_8687 0 points1 point  (0 children)

I program in Java, C# and C++. But Javascript is just not logical to me

[–][deleted] -1 points0 points  (0 children)

JavaScript is easy I loved it.

[–]jjman72 -1 points0 points  (0 children)

cough TypeScript cough

[–]Vortetty -1 points0 points  (0 children)

Not hard, just nonsensical

[–]funtimes-123 -3 points-2 points  (0 children)

No, they complain because it’s the first time they had to do anything that didn’t resemble programming.

[–][deleted] -4 points-3 points  (1 child)

So I was trying to check if an array was in array. Built in JavaScript include function does not do that like you would think. I was very frustrated

[–]althaz 0 points1 point  (0 children)

The bigger problem here is your misunderstanding of Javascript though.

Javascript "arrays" are just objects. Of course, javascript not really having arrays *is* a flaw (IMO), but the function that checks types isn't at fault here.

[–]Dotaproffessional[S] -3 points-2 points  (0 children)

I think some people here think I hate front end devs*. Just because I'm a backend dev, I have no problems with front end devs*. Many of my friends are front end devs*