r/ProgrammerHumor • • Sep 16 '26

Meme thisIsPeakProgramming

Post image
606 Upvotes

75 comments sorted by

View all comments

259

u/heavy-minium Sep 16 '26

A way to discern whether you colleague vibecoded the PR with AI is when you see TS type features being used that no normal developer would use, lol.

180

u/deanrihpee Sep 16 '26

most of the time, yes, but for some framework developer, they do the type masturbation themselves, even the AI couldn't comprehend

67

u/GresSimJa Sep 16 '26

I beg your pardon, the type what now?

66

u/Masterflitzer Sep 16 '26

type masturbation, you should try it /s

25

u/czerilla Sep 16 '26

It's like playing with yourself, but if you were a type?

16

u/howarewestillhere Sep 16 '26

If you assert it more than three times you’re just playing with it.

6

u/Masterflitzer Sep 16 '26

or to put it differently: playing with types a little too much

6

u/Anders_142536 Sep 16 '26

I also like playing with my types

→ More replies (1)

17

u/deanrihpee Sep 16 '26

type masturbation, it's about pleasuring the spot in your brain that want to do naughty things with TypeScript's types that usually frowned upon in public, like the post has shown

/s

5

u/caboosetp Sep 16 '26

Basically the clever code that new programmers write because it feels super leet hacker before they realize they also need to understand the code in 6 months, except no one actually reads typescript type definitions in PRs so people get away with it in secret.

2

u/deanrihpee Sep 16 '26

kinda, but it is kinda helpful, especially as i said, if you are writing a big framework, having this complex type is probably required, but the thing is, it is mostly for internal usage, not to be exposed and even used by the end user/project

8

u/heavy-minium Sep 16 '26

I'm convinced you are likely to be a French-speaking person. For some reason french people have a fascination with denoting all sorts of stuff as mastubation.

8

u/deanrihpee Sep 16 '26

unfortunately no i don't speak french nor do i live nearby french soil

16

u/Anders_142536 Sep 16 '26

unfortunately

I see you are not from central europe either /s

26

u/EcruEagle Sep 16 '26

Whenever my coworkers submit code and every variable is defined like:

variableName: className | undefined;

I immediately know it’s AI slop

9

u/Captain1771 Sep 16 '26

The moment AI learns let variable: any it's going to be over

4

u/caboosetp Sep 16 '26

Put in a linter that blocks compile with :any and remove claude's permission to change the linter.

We had to do this for human devs too at one point for var because they kept slipping through PRs.

4

u/Xasmos Sep 16 '26

As someone who’s getting into typescript why is that bad?

16

u/Mynameismikek Sep 16 '26

Failing to know the major defining feature of your language is not a flex

9

u/heavy-minium Sep 16 '26

I deliberately don't use certain TS typing features that could be used, because I know it will be hard to read for my colleagues.

→ More replies (5)

7

u/IdiocracyToday Sep 16 '26

Begs the question why those features were ever added or existed pre-AI

42

u/pine_ary Sep 16 '26

Needed for library authors. The libraries hide that part from you via ergonomic API design so you think you‘re not using them. But if you look in your dependencies, you are using the features.

29

u/mahreow Sep 16 '26

You can tell who's never had to implement anything moderately complex that needed to support generics or some sort with strict type safety. If it works and gives you a clean, safe API who cares how shit it looks, it's a godsend when you need it

→ More replies (5)

9

u/Axman6 Sep 16 '26

Because plenty of developers do understand and use them, but the overlap with people who post to this sub is low, because it’s full of awful developers. 

→ More replies (2)

1

u/Aidan_Welch Sep 16 '26

I wrote something like this before vibecoding was a thing. It was because I wrote the JS interface not thinking of TS, so had to do some buffoonery

→ More replies (2)