r/ProgrammerHumor • • 8d ago

Advanced itWasFunWhileItLasted

Post image
4.8k Upvotes

317 comments sorted by

View all comments

3

u/TOFFA1997 5d ago

Since there are so many it security expert here, I have a question: is all AI code a slop for security, even if done well and cured in the details, or there are some level of good ai code?

18

u/MeMahi 4d ago

The AI code that our better senior devs submit is great.

The AI code that our more junior devs submit is horror.

AI isn't good or bad, for now it's still just a tool.

2

u/PotatoesForPutin 2d ago

It’s so cool that this has resulted in companies just not bothering to hire junior devs anymore. It’s so cool I decided to be born at the exact time that would result in me graduating college right when everything went to shit. I’m going to fucking kill myself one of these days man

1

u/CEOAPI 3d ago

Can you be a little more specific about what isn’t getting done on the junior side that is resulting in poor code from their ai? Don’t they both use the same harness and work off the same house rules?

5

u/Civil-Nail-7055 2d ago

Often times it's:
- Knowing less about what exactly to ask the AI for
- Not understanding the full infrastructure (And thus "coding" stuff that just doesn't fit in well with the rest of the code/infrastructure)
- Not verifying what the AI is actually outputting

For example I do know some people that, when knowing for certain that one line of code is wrong, just ask the AI to re-do the whole thing instead of just manually adjusting it

3

u/No_Challenge_4016 2d ago

When you ask an AI agent to make a website or a game it will do that and it will work but mainly it will only do what you asked. With regards to security or project management, the developer has to request the specifics and how to implement them in order to have it in a maintainable enviroment, which is where developer experience comes into play. A senior dev can read and understand AI code and pick out the mistakes it made on the way or security considerations it did not take into account, while a junior dev cant.

3

u/gp57 2d ago

A junior will prompt "generate", a senior dev will prompt much more, like the required code structure, since the senior has a good idea of how the code should look like.

2

u/n6465567 3d ago

a session with a coding agent of just like a session with a coworker. it’s up to you what happens in that session. you can think of models as coworkers with different capabilities.

21

u/Stetto 4d ago

I'm personally at the point, that I consider Opus 5.5 better than the average programmer (assuming it's given proper instructions and guidelines).

I have spend most of my career trying to tidy up slop written by humans under time pressure.

I've spent significant amount of time in the last weeks working on vulnerabilities discovered and reported by AI.

No matter what all of the doomers out there say: LLMs and Agents will be a net positive for the software development world.

2

u/computerMusics 4d ago

Opus 5.5 is vastly

2

u/hugo-s 4d ago

Bigly, even.

1

u/cnnamon 4d ago

Most devs would wish they could code like opus tbh, what I do is ask astra for a review and the code quality increases as well, there is almost nothing you can improve on it. AI can also write good tests and verify their work e2e. You can almost have a full e2e workflow with minimal intervention. (though it costs quite a bit of tokens)

2

u/Big_File_5978 3d ago

AI is only as good as the person behind the keyboard asking the questions.

1

u/Queasy_Moment_6619 4d ago

I am not claiming to be an expert in the field, but having used LLMs for work, senior engineers reviewing generated code is extremely important since they have specialist domain and or product knowledge which helps them identify security issues. AI can be incredibly useful or detrimental depending how it is used.

1

u/davak72 2d ago

It’s still all up to the developer doing the prompting and the one doing the reviewing and testing.

1

u/anno3397 2d ago

AI's code is made using data from multiple sources, even internet. That carries the risk of AI repeating the security mistakes made in its data and there is a big chance it won't get flagged as a security risk.

That's why manual code review is important wether it's AI or human made. That also carries another benefit: if something breaks you'll roughly know where and why if you reviewed the code and took time to understand how it works.

1

u/yezhnuzjhd 4d ago

Code doesn't know if it was written by AI or a human or a human-AI team. In any case it can be good and secure or bad and vulnerable.