this post was submitted on 29 Feb 2024
363 points (95.9% liked)

Programmer Humor

27082 readers
1229 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
all 27 comments
sorted by: hot top controversial new old
[–] histic@lemmy.dbzer0.com 96 points 2 years ago (2 children)

Help! It didn't change my code at all it's just the same!

[–] InnerScientist@lemmy.world 37 points 2 years ago

Can't Improve Upon Perfection

[–] devilish666@lemmy.world 14 points 2 years ago

Congrats then...

[–] Kolanaki@yiffit.net 21 points 2 years ago (3 children)

Is that pronounced "shitty er" or "shit tier?" 🤔

[–] radix@lemm.ee 15 points 2 years ago (1 children)

"Shitty-er" to rhyme with "prettier", I would guess.

[–] loics2@lemm.ee 3 points 2 years ago

"pret tier"?

[–] geogle@lemmy.world 4 points 2 years ago
[–] ptz@dubvee.org 19 points 2 years ago* (last edited 2 years ago) (2 children)

So....basically a prettier. I've never seen them improve the readability of my code. If I want pretty code, I just write pretty code :shrug:

All the prettiers do is just 'eff up my deliberate indentations and break the editor's ability to collapse code sections.

[–] lazynooblet@lazysoci.al 29 points 2 years ago

Sounds like you're using a shittier prettier

[–] BombOmOm@lemmy.world 2 points 2 years ago* (last edited 2 years ago) (1 children)

Same. There is a logic to all code choices. Even basic things like the placement of empty lines to group code into 'idea blocks' massively helps with readability. This idea block touches x, and this next idea block touches y.

A tool can't perform perform even basic logic like that.

[–] kogasa@programming.dev 9 points 2 years ago

If you have a lot of semantic breakpoints (like the end of a concept) that don't line up with syntactic breakpoints (like the end of a method or expression body) your code probably needs to be refactored. If you don't, then automatic code formatting is probably all you need.

[–] Assman@sh.itjust.works 14 points 2 years ago (1 children)
[–] loudWaterEnjoyer@lemmy.dbzer0.com 10 points 2 years ago (1 children)
[–] CodeMonkey@programming.dev 4 points 2 years ago (1 children)

It looks like it targets JavaScript, the language that least needs it. What is the job security advantage of this tool over a minifier?

[–] learningduck@programming.dev 3 points 2 years ago

Guess, it's to make your code look hand crafted and not copied from Chat GPT or SO for some take home assignment.

[–] gandalf_der_12te@feddit.de 13 points 2 years ago (2 children)
function is_equal (x, y) {
  if (x == y)
      print("x is equal to y")
      return true;
  return false;
}
[–] KairuByte@lemmy.dbzer0.com 1 points 2 years ago* (last edited 2 years ago) (1 children)

Wouldn’t this fail to compile due to the missing semicolon, and if that is corrected only ever return true?

[–] Ziglin@lemmy.world 1 points 2 years ago (1 children)

Compile? This is JavaScript! Semicolons are optional, didn't you know?

[–] KairuByte@lemmy.dbzer0.com 1 points 2 years ago

Mmm I don’t think this could be JavaScript. Unless we are always returning true.

[–] MTK@lemmy.world 1 points 2 years ago* (last edited 2 years ago) (1 children)

function is_equal (x, y) {

if (is_equal(x,y))

  print("x is equal to y")

  return true;

return false;

}

Fixed it for you

[–] Ironfacebuster@lemmy.world 1 points 2 years ago
function is_equal (x ,y) {
    if (Math.Random() > 0.38) {
        console.log(x + " is equal to " + y)
        return true
    }
    
    return false
}
[–] asyncrosaurus@programming.dev 10 points 2 years ago

Apparently every code base I've ever worked on was run through this.

[–] sag@lemm.ee 5 points 2 years ago

It's not working It make my code look pretty not shitty 3/10

[–] HootinNHollerin@lemmy.world 2 points 2 years ago
[–] bruhduh@lemmy.world 2 points 2 years ago

Yamedekudastop