this post was submitted on 21 Apr 2024
9 points (100.0% liked)

Programmer Humor

32119 readers
597 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
top 10 comments
sorted by: hot top controversial new old
[–] udon@lemmy.world 3 points 5 months ago
  1. it's easy to make fun of
  2. it makes every other programming language look better in comparison
[–] Tenkard@lemmy.ml 3 points 5 months ago
  1. You can call it "Java" to enrage other programmers
  2. You can compare numbers against strings without wasting time converting them
[–] SGG@lemmy.world 1 points 5 months ago
  1. It runs in browsers
  2. If you hate your co-workers, then they will also feel your pain.
[–] sirico@feddit.uk 1 points 5 months ago

It leads to typescript

You get surprises from npm

[–] yogthos@lemmy.ml 1 points 5 months ago

The part that always gets me is when people choose Js for the backend. Like I get that it's the default thing that works on the frontend, so there's some rationale why you might not want to transpile to it from another language. On the backend though, there are so many far better option, why would you willingly go with Js, especially given that you're now forced to do all your IO async.

[–] gaael@lemmy.world 1 points 5 months ago (1 children)

You'll find an npm package to help you count up to 2.

(I recently learned - maybe here - that the is-even package has over 170k weekly downloads)

[–] Drusenija@lemmy.world 1 points 5 months ago

What's even wilder is if you look at the code of that package, all it does is include the is-odd package and then return !is-odd. And the is-odd package isn't much better, it does some basic checks on the input and then returns n % 2 === 1.

[–] MsFlammkuchen@lemmy.blahaj.zone 1 points 5 months ago* (last edited 5 months ago)
  1. It's not PHP.
  2. I don't know. I didn't think I'd get this far.
[–] Fargeol@lemmy.ml 0 points 5 months ago* (last edited 5 months ago) (1 children)

1 - Easiest way to run a script in your browser
2 - Always finds its way if inputs are bad
Nan - undefined

[–] space@lemmy.dbzer0.com 1 points 5 months ago

Easiest? More like... The only way.