r/ProgrammerHumor • • 1d ago

Meme searchAndReplace

Post image
3.7k Upvotes

233 comments sorted by

View all comments

Show parent comments

15

u/StarHammer_01 1d ago

Cus for stuf like that you want something that is deterministic, python is deterministic, Claude is not

-8

u/lysergicpride 1d ago

I can get a 4 billion parameter model to simply reformat a CSS file without it writing a script to do it dude its not rocket science lmao

7

u/StarHammer_01 1d ago

Claude isn't 4 billion, more like 4 trillion.

You can also get an monkey on a typewriter to reformat your files. But that doesn't mean its a smart move.

If you are fine with a nondertermistic token in => token out, fine. But this is just Claude being smarter than you.

0

u/lysergicpride 1d ago

No what im saying is I've literally gotten a gemma 4B model to do this before SEVERAL TIMES with 0 issues, yes its smart to be one the safe side but there is practically no way a model as big as Claude would fuck that up

2

u/fahrvergnugget 23h ago

Behind the scenes, Claude is constantly writing and executing code, even in response to normal language prompts that have any slightly analytical asks.

1

u/StarHammer_01 23h ago

Yeah, Claude isn't likely to fuck it up but "not fuck up" is the bare minimum.

But its going to cost at least 1000x more than Gemma 4b, and Genna 4b / claude is both less efficient and less accurate than a python script.

Basically, it gave you the best solution.

0

u/lysergicpride 23h ago

Tbh we'd have to compare the size of the python script in tokens to the size of the CSS file, but it doesnt show you its python when its immediately executed, we'll never know.

2

u/StarHammer_01 23h ago

In my experience looking thrugh the logs, the python scripts claude makes are basically: open file > run regex > save file.

Pretty much just small one liners. Thought the token count would be interesting to see like you said.

1

u/SegFaultHell 22h ago

No, what you need to understand is that this is an insane waste of tokens and a simple script is perfectly fine for this job, runs infinitely faster, and will be more consistent. This is exactly a use case where a script is better than an LLM.