8 points

How many people who post JS BAD memes could provide a single example of why it’s bad without looking it up?

permalink
report
reply
0 points

Security concerns.

permalink
report
parent
reply
5 points

I use it regularly (web dev). A lot of complaints and mockery stems from using it badly. None of the programming languages that are regularly the butt of everyone’s jokes force you to use them badly, they just allow you to. If you follow good practices, you’ll be just fine.

permalink
report
parent
reply
5 points

Many of the programming languages that are regularly the butt of everyone’s jokes don’t just allow you to use them badly, they make it easy to do so, sometimes easier than using them well.
This is not a good thing. A good language should

  • be well suited to the task at hand
  • be easy to use correctly
  • be hard to use incorrectly

The reality is that the average software developer barely knows best practices, much less how to apply them effectively.
This fact, combined with languages that make it easy to shoot yourself in the foot leads to lots of bad code in the wild.

Tangentially related rant

We should attack this problem from both directions: improve developers but also improve languages.
Sometimes that means replacing them with new languages that are designed on top of years of knowledge that we didn’t have when these old languages were being designed.

There seems to be a certain cynicism (especially from some more senior developers) about new languages.
I’ve heard stuff like: every other day a new programming language is invented, it’s all just a fad, they add nothing new, all the existing languages could already do all the things the new ones can, etc.
To me this misses the point. New languages have the advantage of years of knowledge accrued in the industry along with general technological advancements, allowing them to be safer, more ergonomic, and more efficient.
Sure, we can also improve existing languages (and should, and do) but often times for one reason or another (backwards compatibility, implementation effort, the wider technological ecosystem, dogma, politics, etc.) old quirks and deficiencies stay.

Even for experienced developers who know how to use their language of choice well, there can be unnecessary cognitive burden caused by poor language design. The more your language helps you automatically avoid mistakes, the more you can focus on actually developing software.

We should embrace new languages when they lead to more good code and less bad code.

permalink
report
parent
reply
5 points
  • be easy to use correctly
  • be hard to use incorrectly

C++ has entered the chat

permalink
report
parent
reply
13 points

It was made in 10 days, its type system is a mess, its syntactic shit, and there are just better replacements out there that will never see the light of day due to how big its already gotten

permalink
report
parent
reply
0 points

Well, use typescript. There’s no excuse to use pure JS nowadays. It doesn’t solve everything, but it for sure solves 95%+ of JS issues.

Or use WebAssembly, I think it’s usable nowadays?

permalink
report
parent
reply
4 points
*
Deleted by creator
permalink
report
parent
reply
2 points

Coming from other languages I find the async by default thing annoying but I fully understand it’s necessary for web sites to render in real time.

permalink
report
parent
reply
5 points
*
<span>Please enable JavaScript to use this app</span>
document.getElementById("noscript").style.display = 'none';document.getElementById("noscript-info-with-bold-text").style.fontWeight = 'bold';document.getElementById("status__content__text").textContent="JS ecosystem is all hack upon hack upon hack upon hack. We love hacks, but don't want to relay on them to access my bank or watch a movie. Just send me a webpage, not a soup of obfuscated, impossible to edit scripts that assemble god sake app. That's the reason we can't have new browser engines anymore, try to disable one wrong thing and whole app breaks. Browsers are made as interactive documents viewers, not disposable operating systems.";
permalink
report
parent
reply
3 points
*
Deleted by creator
permalink
report
parent
reply
2 points
permalink
report
parent
reply
1 point
*
Deleted by creator
permalink
report
parent
reply
Deleted by creator
permalink
report
parent
reply
4 points
*

The meme was not about bad or good… It’s about Colors (CSS = Barbie), and Complexity (JS = Oppenheimer)

permalink
report
parent
reply
1 point

Quite a few

permalink
report
parent
reply
2 points
Deleted by creator
permalink
report
parent
reply
39 points

Problem: Oppenheimer, unlike JavaScript, was actually competent.

permalink
report
reply
9 points

Wait, I’m CSS?

I don’t get it.

permalink
report
reply
6 points

CSS is coloring and styling in programming, Ma’am… It fits to describe the Barbie movie because of its vibrant colors

JS is about logic and calculations… More like science in Oppenheimer

permalink
report
parent
reply
5 points

But I’m not cascading though…

Not normally, anyways. 💖

permalink
report
parent
reply
2 points

Ah, so that’s not Peaky Blinders.

permalink
report
parent
reply
4 points

I’ll have you know that CSS is Turing complete

permalink
report
parent
reply
4 points
*
Deleted by creator
permalink
report
parent
reply
9 points
*
Deleted by creator
permalink
report
reply
30 points
*
Deleted by creator
permalink
report
parent
reply
0 points

ITs NoT StRoNgLy TyPeD aNd Is ThErEfOrE gArBaGe

permalink
report
parent
reply
0 points

Give me one advantage of language that isn’t strongly typed

permalink
report
parent
reply
7 points

The real question is since when CSS is good?

permalink
report
parent
reply
10 points

👏

permalink
report
parent
reply
24 points

CSS is used to create the design, basically the look (colors, layout and so on), but no substance.
JavaScript is used to implement code and logic.

HTML + JavaScript would typically (since you’re supposed to use CSS to create colors and design) look very dull, thus the black-and-white Oppenheimer.

permalink
report
parent
reply
0 points

document.querySelector('.whatever').style.color = "red";

Don’t recommend, though.

permalink
report
parent
reply
2 points

Sure, but setting the .style attribute could really be argued as using CSS, just with a different interface. W3Schools refers to this as “inline CSS”.

permalink
report
parent
reply
16 points

What

permalink
report
reply
2 points
*
Deleted by creator
permalink
report
parent
reply
1 point
*

JS is Touring complete. You can write anything in it, including SkyNet or whatever else you can think of that will destroy the world.

permalink
report
parent
reply
2 points

I want my world destroyed fast, thank you very much. Do you want them to stop mid-murder to prolong your pain because they’ve ran out of RAM?

Say no to JS Skynet, embrace C++ Skynet!

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 6.9K

    Monthly active users

  • 1.5K

    Posts

  • 35K

    Comments