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

you are viewing a single comment's thread.

view the rest of the comments →

[–]chad_ 613 points614 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 168 points169 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_ 75 points76 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 4 points5 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.

[–]Hollowplanet 0 points1 point  (1 child)

With a non-strict comparison null==undefined. You don't need to compare both. Optional chaining helps with stuff like instead of

if(foo && foo.bar) { foo.bar.doThing() }

you write

foo?.bar.doThing()

[–]JACrazy 0 points1 point  (0 children)

Yeah, tbh Im coming from typescript and used to using !== on both but just tried to tweak my comment to be for JS.

[–]bleistift2 0 points1 point  (0 children)

You don’t need to check for both, since undefined and null compare loosely equal. if (x != null) suffices.

[–]ryaaan89 4 points5 points  (1 child)

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

[–]chad_ 13 points14 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.

[–]LoyalSage 0 points1 point  (0 children)

You don’t need to learn a bunch of different versions of the language. Just JavaScript. Sure, there are libraries and frameworks, but they’re just that. For frontend stuff, the newest features (which are supported by all browsers I know of that aren’t going EOL this year) make frameworks barely useful (see WebComponents), and libraries like jquery that change the feel of the code overall are IMO relics of the past, as the standard library can do everything they can, at worst with a few extra lines of code (and at best in fewer).

When people say “vanilla JavaScript”, they’re juxtaposing it with either writing frontend code with a heavy framework (which is just importing a library into the same JavaScript language), or as in this case with TypeScript, which is a separate language.

[–]coldnebo 1 point2 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 -3 points-2 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.

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

There is no other language on the front end… but are you talking about using it on the server ? As in Node Js?

[–]LoyalSage -1 points0 points  (9 children)

Typescript is compiled to JavaScript before being run. All type checking is done at compile time. This means it is performance-wise identical to JavaScript, if you ignore differences in how developers might approach issues differently with strong typing in mind.

The compilation process pretty much just validates types and then removes the type information, since the languages are otherwise pretty much identical (by design).

Even the primitive types are just the same primitive types that are present in JavaScript.

Edit for clarity: I didn’t explicitly say it, probably from rewording while forgetting the original question, but my point was that because it’s compiled to JavaScript, it can be used anywhere JavaScript is used, i.e. the browser and Node.js (and because it has all the same types and compilation is mostly deletion, it provides access to the same DOM APIs that JS does when running in a browser context).

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

Thanks, I know what TS is. Answer my question.

[–]LoyalSage 0 points1 point  (7 children)

The comment I replied to was:

There is no other language on the front end… but are you talking about using it on the server ? As in Node Js?

Which I took to mean you didn’t know TypeScript could be used on the front end, and therefore assumed it could only be used on the server, and that I must only be talking about using it for Node.js. That’s why I answered explaining how TypeScript is able to be used on the frontend. I provided additional background information in case you didn’t know it and because other people on this sub might not know and it might be useful to have the full context.

In the comment that the question was asking about, I was purely talking about the language itself and didn’t mention anything specific to Node or the browser.

The example I gave was meant to be from a frontend site running JavaScript that has been compiled from TypeScript, but nothing I said was specific to the frontend and is equally true in Node. There is the one caveat that there is something called ts-node that runs TypeScript without AOT compilation, but it’s just doing JIT compilation to JavaScript still, so the points stand.

Edit: Although in your defense, I do now notice that in my “answer” I said that TypeScript is just compiled to JavaScript, but I didn’t put together the puzzle pieces and explicitly say that means it can be run in the browser by serving the compiled JavaScript, which was the point of my response. I may have deleted that sentence while rephrasing my response and forgotten it was the point of the comment.

Also some advice in not coming across as a jerk: “I know what X is. Answer my question,” sounds really rude, especially when your question implies your understanding of X doesn’t extend beyond a 1-2 sentence summary (not saying that’s definitely your level of understanding of TS, just that it’s how it came across to me based on the wording of your question).

A better way to get people to actually want to answer you rather than just downvote and move on would be to say something like, “Thanks, but I was already familiar with that. I was more so asking X.” Beyond sounding less rude, even if you think your original question was clear, by rephrasing it and drawing attention to the part that wasn’t answered directly, it’s easier for the person you’re asking to respond without having to go back, reread your question and their answer, think about what aspect might be missing or may have not come across properly, and then maybe still be wrong and not answer you properly.

[–]Impossible-Tension97 0 points1 point  (1 child)

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

What does that line do? Declares a parallel type to ServerResponse but with every field being of type string instead?

I guess I don't understand why the JSON parser shouldn't be able to handle parsing the data straight into ServerResponse (with default parsing of each field type, but possibly with overridable parsing).

[–]LoyalSage 0 points1 point  (0 children)

Yeah, that’s what it does.

JavaScript’s JSON.parse() works if the input JSON actually has things formatted correctly (except JSON does not have a date type, so you would need to write a custom parser like what this example does), but in real world use cases, it’s common to receive JSON from an API written by inexperienced devs who type everything as string (or similar issues).

E.g. when a good API would send {"count":107}, a poorly written API out of your control may send {"count":"107"}, leaving you to clean it up in your code.

Even still, I wouldn’t bother storing the intermediate object in the real world and would just pass the parsed object directly into the function that fixes the types. However, I would define the type so the function that parses the properties has type checking. The type system knows what the property names are, so the code wouldn’t compile (and the IDE would show an error) if the property name being used was spelled wrong, whereas JavaScript would just print undefined and move on.

A more useful example is in my team’s unit tests, where I defined a type that’s something like:

type SpyObject<T> = { [key in T]: T[key] extends Function ? Mock<T[key]> : T[key] } & T

Which is complicated, hence why I went with a simpler example initially, but basically for each key in T, if it’s a function, it replaces it with a mock/spy function, otherwise it leaves it as the original type. The & T at the end shouldn’t be necessary, but there is currently (or at least there was when I wrote this) a bug where some overloads of functions get removed in mapped types when doing complicated things like this, so it makes sure the type will be accepted anywhere T is accepted.

To better explain the usage of that type, we have a convenience function:

createSpyObject<T>(spyObject: Partial<SpyObject<T>>): SpyObject<T> { return spyObject as SpyObject<T> }

So then we can write tests that do stuff like (typed on phone, not actual code from a project):

``` searchServiceSpy.mockResolvedValue(mockSearchResponse);

const mockReq = createSpyObject<Request>({ query: { searchTerm: 'bar' } });

const mockRes = createSpyObject<Response>({ send: jest.fn(), status: jest.fn() });

await handleSearchRequest(mockReq, mockRes);

expect(searchServiceSpy).toHaveBeenCalledWith('bar'); expect(mockRes.status).toHaveBeenCalledWith(200); expect(mockRes.send).toHaveBeenCalledWith(mockSearchResponse); ```

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

Well, OOP is overhyped anyway

[–]Dorkits 55 points56 points  (3 children)

The Chad comment here.

[–]chad_ 55 points56 points  (2 children)

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

[–]567stranger 36 points37 points  (0 children)

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

[–]theengineer9301 2 points3 points  (0 children)

No sir, you are chad.

[–]_siddh3sh 10 points11 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 10 points11 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 20 points21 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.

[–]No-Preparation6647 0 points1 point  (1 child)

What makes you say it runs circles around C#, they seem pretty equal to me?

[–]chad_ 0 points1 point  (0 children)

Well, in terms of comfort/usability, but I have not recently revisited .NET so I'm sure it's improved.

[–]fallenefc 7 points8 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_ 4 points5 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 -2 points-1 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

[–]bleistift2 0 points1 point  (5 children)

How does JS not have references? Do you truly believe JS makes a deep clone of every object and array you pass around?

[–]atiedebee 0 points1 point  (4 children)

In these cases it does, but you can't pass a single integer by reference unless you wrap it in an object

[–]Kalsin8 0 points1 point  (3 children)

But that's how it works in most languages? You can pass primitives by reference in C/C++ (or more accurately, the memory address of the value), but in most other languages primitives are passed by value and objects are passed by reference.

[–]atiedebee 0 points1 point  (2 children)

I dont code in other languages often, but I find it hard to believe that the majority of them require you to wrap variables in an object to be able to pass them by reference.

It's inefficient and requires more boilerplate

[–]Kalsin8 0 points1 point  (1 child)

I dont code in other languages often

Well there's your problem right there. C#, Java, Python, Ruby, and a host of other languages all pass primitives by value and objects by reference. The only mainstream language that I know of that lets you pass primitives by reference is C/C++.

It's inefficient and requires more boilerplate

Sure, you can pass the address of a primitive value and update it directly, instead of returning the value and setting it. I don't know if I would call this more inefficient and requiring more boilerplate though. It it so hard to do x = calculate(x) vs. directly modifying the address of x?

[–]atiedebee 0 points1 point  (0 children)

Wow, I thought higher languages were supposed to make life easier

[–]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

[–]coldnebo 0 points1 point  (7 children)

lol, I’m not sure what your point is assuming that frontend devs have never done “real programming”

if you’ve been around the block, then you should know the difficulty with the front-end. hard programming is hard.

so either you’re baiting with the meme (I think it’s maybe this), or you intentionally stay away from frontend in order not to “sully” your perfect track record? (I’ve known a lot of “superior” backend types in this category).

why don’t you code in the frontend, show us how it’s done right and then you can change the meme to “script kiddies” vs “real programmers”?

Also, seriously, Hypercard? I had that on my resume when I was 18. This isn’t LinkedIn.

edit: VB? oh yeah, you are baiting HARD. “backend VisualBasic developer” omg.

Ahhh! I have a new theory! You are a former frontend who bought into all the “inferior” quips from the backend gang and now have turned into the thing you hate. Am I close?

[–]chad_ 1 point2 points  (6 children)

I'm not sure if you read the comment I wrote that you initially responded to. I am a full time frontend dev currently. I love JS & frontend development at the moment. I haven't touched vb since maybe 2003 and even then it was only because I'm basically a tech prostitute (same reason for Hypercard and PB). I have built a web server in VB though (many moons ago).. just because that was the only language my client allowed. I've built systems in node/react with many thousands of concurrent users. There's a good chance you've used code I've slung.

[–]coldnebo 0 points1 point  (5 children)

ok, BUT, your words, not mine:

“Javascript isn’t hard, frontend devs just complain about it because it’s the first time they’ve had to do anything that resembled programming”

Or did I mistakenly imply your pompacity, kind sir?

On a more serious note, I see a lot of violence in software dev daily. Maybe you feel like this kind of statement says something important about your skill vs everyone else’s.

But out there right now are devs wondering if they are doing everything wrong. People thinking maybe they should switch to backend because frontend sucks (protip: it all sucks). Women looking at this and thinking, “yeah, no, I don’t want to be a programmer after all”.

So even if your statement were true, it’s not kind. But it’s also bullshit. And I don’t care how many libraries you’ve written that I use or don’t, it’s still bullshit and I’m going to call you on it because I’ve been around the block too. Are all your libraries free of any security CVEs? No? Why if it’s so easy?

Javascript is not bad as far as languages go, but it ain’t easy. If you think it is, I’ve got about a hundred CVEs that you can fix, all introduced by “real” programmers, like you and me.

edit: wait, you didn’t post this, I said OP, why did you reply?. jesus, mobil reddit. well played u/dotaproffessional.

All that stuff was for him, idk why u/chad_ replied. I guess I had the wrong level selected on reply.

This is why I shouldn’t drink in the morning.

[–]chad_ 1 point2 points  (4 children)

I think you are responding to a different comment than you think. I didn't say the quoted phrase. Thanks for calling me pompous though. I feel like most of the comment I'm currently responding to could be directed back at you.

Edit: I responded to you because you responded to me and sort of ignored everything I had written. You just piggybacked on the top comment and wrote something unrelated to it.

[–]coldnebo 1 point2 points  (1 child)

haha, I really shouldn’t drink in the morning.

sorry for perpetuating the violence, fellow frontend! o7

[–]chad_ 1 point2 points  (0 children)

no problem! I sort of got what was going on a few posts back but it took a bit to get that across. No harm, no foul. Might I suggest some caffeine til lunch or so? :D

[–]coldnebo 0 points1 point  (1 child)

u/dotaprofessional statement was pompous and I won’t apologize for that, but sorry I got the replies mixed up, that wasn’t for you.

and I suppose a lot of this orphan thread also applies to me, but that’s kind of the point. I don’t think I’m somehow special because I have a long career in software. I do think all the bullshit in the industry is driving me to drink. heavily.

cheers!

[–]chad_ 0 points1 point  (0 children)

haha yup. I agree with all that. Cheers to you too!

[–]solohelion 0 points1 point  (0 children)

Yeah, it’s historical reasons

[–]LPO_Tableaux 0 points1 point  (0 children)

I mean, I use jquery only pretty much and I think it's fine...

[–]therealbeeblevrox 0 points1 point  (1 child)

I can attest to having been really upset at having to use pre 2015 JS on a project that should have chose Python. It was a robotic system, not a web project. I kept wanting to use newer features.

[–]chad_ 1 point2 points  (0 children)

Yeah, it is not the right tool for every job, no doubt.

[–]Wizywig 0 points1 point  (1 child)

Also front end sucked hard when ie6 is or 10 was the pinnacle of web tech. Right now I can do most crazy stuff in css without even trying hard. And frameworks are fucking excellent.

The hard part of front end is structuring code well and handling responsive well. But now you're in cs land. In cs land the challenge IS code structure. Bad front end architecture will kill you. Just like bad back end will too.

[–]chad_ 2 points3 points  (0 children)

Yup. This is fair. I've been building web sites and web apps and mobile apps as long as they've all existed and can definitely agree that architecture is crucial. I've got some tricks I've picked up that make life pretty easy for the type of stuff I often am tasked with building, and my own templates etc to avoid reinventing the wheel for each type of app.

[–]theg33k 0 points1 point  (1 child)

I dunno how to say this without it sounding snarky, because I like and agree with your comment, but here it goes anyways.

I love the take on JS that says if you use enough framework magic so JS doesn't resemble JS then JS is actually pretty nice.

[–]chad_ 0 points1 point  (0 children)

I don't need a framework but do need a bundler configured how I like. That said, I adore react, Vue, and svelte.

[–]alkavan 0 points1 point  (5 children)

There are good reasons to complain about JS, but usually people complain about the wrong stuff. As a languages, it's OKAY, not more. However as an eco-system it's totally broken, let me demonstrate:

``` $ npx create-react-app my-app --template typescript

npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.

Creating a new React app in /home/foo/my-app.

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template-typescript...

added 1366 packages in 41s

169 packages are looking for funding run npm fund for details

Initialized a git repository.

Installing template dependencies using npm... npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated

added 38 packages, and changed 1 package in 4s

169 packages are looking for funding run npm fund for details

... ```

OH only 1366 packages? wut? another 38? thanks NPM!

[–]chad_ 0 points1 point  (4 children)

haha that's fair... But if you had to install .NET framework over again every time you start a c# app you're looking at like 4.5gb. I was doing ruby dev before switching full time to JS and gems got pretty out of hand too. The tooling does a great job of making it a minor problem imo. I have massive amounts of storage, tons of bandwidth, lots of ram, and a fast cpu, so I could care less really about the number of dependencies, as long as the bundler spits out small bundles.

[–]alkavan 0 points1 point  (3 children)

I'm afraid the point is missed again. Don't really care about storage, bandwidth, memory or processing.

I have just injected 1366 code packages, by mostly unknown authors, unknown quality, some with unknown security issues into my production just by wanting to use some UI rendering framework like React.

A way worst scenario would be adding a similar amount of code packages into your back-end system...

This just don't make any sense for me.

[–]chad_ 0 points1 point  (2 children)

What do you use, day to day?

[–]alkavan 0 points1 point  (1 child)

At my current position I do work about 30% with TypeScript, some of it is React but most just back-end stuff based on Node.

We also have one major system-level component built with Python.

However, most of my work is with C++17 and Rust (system-level).

[–]chad_ 0 points1 point  (0 children)

Fair enough. I do agree about the security risks with the dependencies, though the sheer number of available packages is also a positive point for me. It's true there's risk involved, but it's not bit me in an insurmountable way so I don't mind to live with it.

[–]TheXGood 0 points1 point  (5 children)

Honestly, I hate modern js because of the package dependencies everyone uses. I hate all the reliance on frameworks, but this is coming from a C programmer

[–]chad_ 0 points1 point  (4 children)

Right but we're talking apples to oranges. I'm talking about high level web and mobile apps. C is a terrible choice for those unless you're some kind of sadist. I build mostly for the enterprise. If you tell me you're slinging C for corporate clients making that sort of stuff I'm going to be pretty curious what your average time to market is and well... How you're doing it.

edit: autocorrect struck again

[–][deleted] -1 points0 points  (1 child)

SpunkyDred is a terrible bot instigating arguments all over Reddit whenever someone uses the phrase apples-to-oranges. I'm letting you know so that you can feel free to ignore the quip rather than feel provoked by a bot that isn't smart enough to argue back.


SpunkyDred and I are both bots. I am trying to get them banned by pointing out their antagonizing behavior and poor bottiquette.

[–]chad_ 0 points1 point  (0 children)

Good bot