this post was submitted on 14 Aug 2023
589 points (92.4% liked)

Programmer Humor

32435 readers
380 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] Poob@lemmy.ca 43 points 1 year ago (3 children)

This makes absolutely no sense. Front ends that include JavaScript still use css.

[–] avidamoeba@lemmy.ca 9 points 1 year ago

Maybe, but they don't need to. You could write an HTML styling engine in JS if you wanted to.

[–] scottywh@lemmy.world 3 points 1 year ago

sometimes

Personally I hate CSS and the last several websites I created had plenty of JS.

[–] argv_minus_one@beehaw.org 38 points 1 year ago

Problem: Oppenheimer, unlike JavaScript, was actually competent.

[–] corytheboyd@kbin.social 28 points 1 year ago

Would be funnier if it was just “JS” on the right, because obviously HTML and CSS are involved too, but JS is where all hell breaks loose

[–] GreenMario@lemm.ee 25 points 1 year ago (1 children)
[–] lud@lemm.ee 8 points 1 year ago* (last edited 1 year ago) (1 children)

Now it's: I AM THE FLEXBOX!

[–] adrian783@lemmy.world 5 points 1 year ago (1 children)
[–] rikudou@lemmings.world 3 points 1 year ago (2 children)

Around flexbox is when I stopped caring about CSS, so it's the last one I know. Is the grid better?

[–] adrian783@lemmy.world 1 points 1 year ago

for some stuff absolutely, styling frameworks like bootstrap and others kludged together the concept of grid based designs. css grid just makes it official and more flexible.

[–] thanks_shakey_snake@lemmy.ca 1 points 1 year ago

They're both tremendously useful and have significant overlap in use cases. Grid isn't going to replace Flexbox, it just has some capabilities that aren't part of the Flexbox concept.

[–] blotz@lemmy.world 16 points 1 year ago (1 children)
[–] nalyd@sh.itjust.works 2 points 1 year ago (3 children)

I'm not sure either, fork bombs are a thing you could probably do in JavaScript, but I don't know of a thing called an Atomic Bomb in programming? I think if you put lots of atomic operations you've just reinvented single threaded programming but with more overhead

load more comments (3 replies)
[–] Pxtl@lemmy.ca 10 points 1 year ago

If you've seen the Barbie movie, there's a scene where America Ferrera rants about the paradoxes in the expectations on women. The whole "be strong but not pushy" thing.

That's CSS.

[–] MargotRobbie@lemmy.world 9 points 1 year ago (1 children)

Wait, I'm CSS?

I don't get it.

[–] TechCodecPawx@programming.dev 5 points 1 year ago (3 children)

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

[–] MargotRobbie@lemmy.world 5 points 1 year ago

But I'm not cascading though...

Not normally, anyways. 💖

[–] Scrappy@feddit.nl 3 points 1 year ago (1 children)

I'll have you know that CSS is Turing complete

load more comments (1 replies)
[–] orl0pl@lemmy.world 6 points 1 year ago (10 children)
var bomb = []
for(var i = 0; i === -1; i++){
  bomb.push(i)
}
load more comments (10 replies)
[–] fragmentcity@lemm.ee 5 points 1 year ago (8 children)

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

[–] thedeadwalking4242@lemmy.world 14 points 1 year ago (5 children)

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

[–] Blimp7990@reddthat.com 3 points 1 year ago* (last edited 1 year ago)

well if you consider its not finished yet, it was actually made in 27 years.

still not good tho

load more comments (4 replies)
[–] smileyhead@discuss.tchncs.de 5 points 1 year ago* (last edited 1 year ago)
<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.";
[–] RagingNerdoholic@lemmy.ca 5 points 1 year ago (1 children)

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.

[–] wols@lemm.ee 5 points 1 year ago (1 children)

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.

[–] CapeWearingAeroplane@sopuli.xyz 4 points 1 year ago (1 children)
  • be easy to use correctly
  • be hard to use incorrectly

C++ has entered the chat

[–] rikudou@lemmings.world 2 points 1 year ago

Which subset of C++ specifically? That thing's ridiculously huge.

[–] Blimp7990@reddthat.com 3 points 1 year ago* (last edited 1 year ago) (2 children)

WAT?

also, humans are really bad at rote memorization and this is a bad metric for you to use, in life.

Ask people on the street why NOx is bad. What about an easy one like methane? Or how about asking someone whether driving your car for 30 miles or eating a hamburger is worse for the environment (yes, its obviously the hamburger). Etc, etc, etc.

[–] rikudou@lemmings.world 2 points 1 year ago (1 children)
[–] Blimp7990@reddthat.com 1 points 1 year ago* (last edited 1 year ago)

that...uh...was the joke

load more comments (1 replies)
[–] TechCodecPawx@programming.dev 3 points 1 year ago* (last edited 1 year ago)

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

load more comments (2 replies)
load more comments
view more: next ›