this post was submitted on 08 Sep 2025
725 points (99.3% liked)

Programmer Humor

26197 readers
1334 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
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] saltesc@lemmy.world 15 points 15 hours ago* (last edited 15 hours ago) (1 children)

Friend's colleague needed Excel to, "return the month where the majority of days in the week fall into". Had Copilot do it and sent it to my friend, apparently impressed by making such a robust looking formula.

The formula:

collapsed inline media

My friend's solution a minute later:

collapsed inline media

I can see it could be slimmed even less, but I assume the table is large so LET is doing performance stuff.

[โ€“] BilboBargains@lemmy.world 8 points 6 hours ago

If you ask copilot to return a directory tree using MATLAB script it writes a function using a for loop and about 20 lines of code. Meanwhile the documentation defines this task as

dir("*")