this post was submitted on 12 Nov 2025
414 points (96.4% liked)

Programmer Humor

28119 readers
715 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 45 comments
sorted by: hot top controversial new old
[–] bleistift2@sopuli.xyz 125 points 1 month ago* (last edited 1 month ago) (4 children)
  1. Rename every file from *.js to *.ts
  2. Set the compiler options
    {
      "checkJs": false,
      "allowJs": true,
      "noEmitOnError": false, // so the compiler compiles code it can’t prove right yet. Reset this after you’re done migrating
    }
    
  3. Install type packages for dependencies that don’t bring type information out of the box, for instance
    npm i -D @types/d3
    
  4. Add // @ts-nocheck to the beginning of every file.
  5. Go through your project file by file, remove the comment from (4) and add types until the errors are gone. And probably fix some errors along the way.

Abbreviated from “TypeScript Cookbook” by Stefan Baumgartner.

[–] towerful@programming.dev 43 points 1 month ago

I was gonna say "salt bae some any wherever there are squiggles".
Your way seems more... Methodical

[–] panda_abyss@lemmy.ca 28 points 1 month ago (2 children)

Some LLM is going to be trained on your idea and enact high levels of malicious compliance.

[–] bleistift2@sopuli.xyz 27 points 1 month ago

Not my idea. I literally cited the source.

[–] TachyonTele@piefed.social 7 points 1 month ago

It's a war of attrition.

[–] deadbeef79000@lemmy.nz 18 points 1 month ago

Just stop at 4.

Ta da! It's typescript.

[–] SiblingNoah@lemmy.world 6 points 1 month ago

The good content is sometimes in the comments.

[–] RichardDegenne@lemmy.zip 55 points 1 month ago (3 children)

"Make no mistakes" gives big "do not hallucinate" energy.

[–] Devjavu@lemmy.dbzer0.com 10 points 1 month ago

"Generate an image with no dog in it."

[–] JohnEdwa@sopuli.xyz 7 points 1 month ago* (last edited 1 month ago) (1 children)

It's possible it reduces the probability of things like wrongly answered stack overflow questions from being used, so it might actually work a bit.

Kinda like how with image generation, you get vastly better results by adding a negative prompt such as "low quality, jpeg artifacts, extra fingers, bad hands" etc, because the dataset from boorus actually do include a bunch of those tags and using them steers the generation to do thing that don't have features that match them.

[–] genfood@feddit.org 2 points 1 month ago (1 children)

But this remarks seem to increase the quality of LLM outputs.

[–] JcbAzPx@lemmy.world 15 points 1 month ago (1 children)

seem to

The most relevant words in that sentence.

[–] genfood@feddit.org 5 points 1 month ago

I guess that’s suiting to nearly everything AI related 😅

[–] trxxruraxvr@lemmy.world 47 points 1 month ago* (last edited 1 month ago) (1 children)

This is my colleague and I will have to clean up the crap, because he doesn't understand what's in his own commits.

[–] abbadon420@sh.itjust.works 60 points 1 month ago (1 children)

Fire him. I'm a teacher and I've got some wonderfull and talented students that can't find a job because companies are affraid to hire juniors because of idiots like him.

[–] trxxruraxvr@lemmy.world 12 points 1 month ago

I'm not his manager. He is a good designer though, so I'm fine as long as he stays with his css and photoshop.

[–] jubilationtcornpone@sh.itjust.works 30 points 1 month ago (1 children)

All the function parameter and returns types are going to be "any".

[–] vithigar@lemmy.ca 12 points 1 month ago

Hey. There could also be some Record<string, any>.

[–] technocrit@lemmy.dbzer0.com 15 points 1 month ago* (last edited 1 month ago)

Why not PHP or Rust? Make that "AI" work...

[–] Devjavu@lemmy.dbzer0.com 12 points 1 month ago

All lowecase with no dot at the end. Chefs kiss.

[–] dejected_warp_core@lemmy.world 7 points 1 month ago* (last edited 1 month ago)

make no mistakes

LOL. I know it's for a laugh, but you may as well add "pretty please" to that prompt.

Edit: I wonder if it just hallucinates more convincingly, instead?

[–] stupidcasey@lemmy.world 6 points 1 month ago

Got it, eye wheel mak know miss steak!

[–] sp3ctr4l@lemmy.dbzer0.com 6 points 1 month ago* (last edited 1 month ago) (1 children)

You know, I tend to at least ask them if they could, or if they would be able to do some code task.

Of course, I'm running a local LLM, because I'm not a monster.

Anyway, would you kindly check this codebase for any local/global var declaration or scope conflicts?

Reminds me of** INTERCAL**, were your program got rejected if you used to many please and/or not enough.

[–] shalafi@lemmy.world 4 points 1 month ago (3 children)

Somebody clue me in on Typescript. I'm somewhat familiar with scripting, PowerShell guy here.

[–] Feyd@programming.dev 13 points 1 month ago (1 children)

Is JavaScript plus static type checking and a few other syntax enhancements. It is much easier to maintain software with static type checking. The typescript compiler outputs JavaScript

[–] sobchak@programming.dev -4 points 1 month ago

It is much easier to maintain software with static type checking.

Debatable

[–] mercano@lemmy.world 8 points 1 month ago (1 children)

It’s a superset of JavaScript. The big add is static typing, reducing the chance of runtime type errors. It compiles to vanilla JavaScript for distribution. Other new features include enums, interfaces, and generics for more type safety.

[–] humorlessrepost@lemmy.world 2 points 1 month ago (2 children)

Genuine question: is it really a superset if it’s not still valid javascript? Isn’t it more of an abstraction layer on top of javascript?

[–] mercano@lemmy.world 3 points 1 month ago

Superset means all valid JavaScript is also valid Typescript. (At least, so long as you don’t have compiler setting on that requires all variables to have a type declared.)

[–] CookieOfFortune@lemmy.world 1 points 1 month ago

In practice people don’t use Typescript as a superset since they have stricter compiler settings, which would make valid JavaScript fail to compile.

[–] AugustWest@lemmy.world 6 points 1 month ago* (last edited 1 month ago) (1 children)

It’s basically just a programming language based on and inclusive of JavaScript, but with extra features.

[–] embed_me@programming.dev 1 points 1 month ago

Javascript but types ( I haven't used it)

[–] Devjavu@lemmy.dbzer0.com 0 points 1 month ago

All lowercase with no dit at the end. Chefs kiss.

[–] ConstantVariable@programming.dev -1 points 1 month ago (3 children)

Laugh all you want, I once made something like that work. Not with one prompt of course. More like two days of prompting, but still... I'm sure if I was doing it by hand it would take me a week of work at least

[–] apotheotic@beehaw.org 11 points 1 month ago

And no less than a small city's water usage consumed in the process!

[–] cassandrafatigue@lemmy.dbzer0.com 4 points 1 month ago (1 children)

Was it a basic-bitch database on the most normal hardware and software frameworks with no weird compatibility requirements?

[–] NikkiDimes@lemmy.world 2 points 1 month ago (1 children)
[–] cassandrafatigue@lemmy.dbzer0.com 4 points 1 month ago (1 children)

To keep track of your basic bitches, yes. Keep up.

[–] NikkiDimes@lemmy.world 1 points 1 month ago (1 children)

Weird that you had to port the language of your uhm...database repository? But whatever it takes to keep track of your basic bitches! 🫡

[–] cassandrafatigue@lemmy.dbzer0.com 2 points 1 month ago (1 children)

There are lots of them. Like, billions, and I'm tracking a lot, so ut has to work across multiple drives and potentially devices, sometimes across time zones, with dynamic real time inputs that need to be sanitized, and regular reports to different people who need different formats.

[–] NikkiDimes@lemmy.world 1 points 1 month ago

I can't tell where the bit ends and the Dunning-Kruger begins

[–] Deestan@lemmy.world 2 points 1 month ago

Pretty sure you could do no worse than AI with an hour of search-replace regex.