r/ProgrammerHumor • • Oct 09 '26

Meme promptEngineering

Post image
513 Upvotes

31 comments sorted by

166

u/Caraes_Naur Oct 09 '26

Prompt engineering is when an engineer delivers on time.

24

u/Cualkiera67 Oct 09 '26

it's very Agile

7

u/kulonos Oct 09 '26

The real joke is in the comments!

100

u/Lysol3435 Oct 09 '26

You need to be more direct about what you actually want. That’s why I always specify “don’t make me cry in front of everyone at the next meeting again”

67

u/howarewestillhere Oct 09 '26

900 option switch case in a single file
“Reduce cyclomatic complexity.”

900 class files.
“No, not like that.”

9

u/aberroco Oct 09 '26

> 900 class files

901. 900 with exactly one `if`, and one with `for` loop.

1

u/quagzlor Oct 10 '26

How would you even reduce that, that's just 1 level

1

u/nein_va Oct 15 '26

Fucking belly laugh and that never happens when I read reddit

1

u/howarewestillhere Oct 15 '26

Best part is that was a real conversation between me and a senior. The entire page was 900+ options to generate a form. It was only used as a manual check when the automated process went wrong.

I was newly brought on and asked about this monstrosity when my complexity scan came back.

It was pretty much, “Wow, that’s impressive. Any thoughts on a refactor?” “Well, I could make it hundreds of class files.” “OMG no, don’t do that.” And we all laughed about it.

I just ignored that file in my complexity scans from then on.

12

u/chazzeromus Oct 09 '26

I remember the actual visual studio had a tool that to analyze your code and it was the first time I saw the term cyclomatic complexity

6

u/visualdescript Oct 09 '26

Sonarqube can do it too

1

u/goatanuss Oct 10 '26

And every linter and most static analysis tools

2

u/grifan526 Oct 09 '26

I use that every time I refactor old code. I then stare at the difference for longer then I will admit

2

u/Wonderful-Habit-139 Oct 10 '26

You will then admit what?

11

u/Sindeep Oct 09 '26

Meanwhile my MD "KISS"

10

u/bonanochip Oct 09 '26

I say damn it

5

u/DogmaticParadigm87 Oct 09 '26

Both prompts end the same way: one 400 line function called handleEverything().

3

u/AkaMagicEye Oct 09 '26

I'm a fan of "try harder"

3

u/SaltMaker23 Oct 09 '26

This is how I end all of my prompts, the thing rapidly engineer 10 wrapper functions for basic stuffs otherwise.

3

u/PilotGuy701 Oct 10 '26

I wrote an MCP server to calculate and make cyclomatic complexity a 0 token, deterministic calculation for the LLM to access.

Then made sure all of my engineers had it installed to prevent slop.

We really aren’t the same.

2

u/Beginning-Pool-8151 Oct 12 '26

If it is not sarcasm, I am really interested to know how to make that

3

u/PilotGuy701 Oct 12 '26

It was not sarcasm.

I started with an existing VS Code extension that performed the complexity calculations for Typescript through another package that parsed the code into an AST.

From there it was just a matter of making sure the grading code was separated enough from the layer that talked to Code Lens.

Then I created a new “client” layer that handled the MCP requests and responses.

Four hours of work, no AI used.

1

u/Beginning-Pool-8151 Oct 12 '26

Is it closed source work? This type of implementation will actually help our team to improve work ( and reduce useless claude token consumption) if its closed source that's fine. I can dig into this idea. Thanks ☺️

2

u/PilotGuy701 Oct 12 '26

I wouldn’t say it was “closed source”, but it was for work… and they wouldn’t give me permissions to push the code back up.

The good news is that I don’t work for that company any more.

Give me a few days.

2

u/PilotGuy701 Oct 23 '26

The first part it to install this extension so you can see the complexity.

https://github.com/kisstkondoros/codemetrics

1

u/PilotGuy701 Oct 23 '26

And here is an open source MCP to prevent TS slop....

https://github.com/JohnMarzulli/TsComplexityMcp

1

u/Beginning-Pool-8151 Oct 12 '26

Is it something u really made?

2

u/tiajuanat Oct 09 '26

Bruh, just put that in your CI

0

u/StephenRoylance Oct 14 '26

cyclomatic complexity is kinda garbage though.

imagine some code where you transform one object, like an API return, with a bunch of optional fields, into another. In python, you wrap it in a try, and if any don't exist, the code either fails, or recovered or whatever, but cyclomatic complexity ignores the entire logic chain, because there's no conditional.

now in rust, where each field needs a match arm that accepts the possibility of missing data, and cyclomatic complexity tells you the code is way more complex because it has all these conditionals.

but really, its the same, and the try/except in python is burying a bunch of complexity in the failure cases that rust is dealing with at compile time.

-1

u/alderthorn Oct 09 '26

I prompt to spin up an independent reviewer on my plan with a list of what to look for (ever growing) to then list the issues in the plan. Another agent to tackle those and then 1 more review to check if the updates caused any new issues.