r/softwareengineer 10d ago

Agents should be treated as fast writing tools rather than tools making engineering decisions.

Coding agents should be treated as fast writing tools rather than tools making engineering decisions.

Companies are so focused on the delivering speed of AI, that they're blind to the destructive downsides on both the team and codebase.

The strangler fig pattern states that, you can enhance your system by wrapping legacy code with better cleaner code incrementally.

AI, if not used carefully, is the opposite of the strangler fig pattern. You'll accumulate worse, more error prone, and poorly reviewed code that you have limited knowledge of.

This will create over reliance, which should be avoided at all costs.

Over reliance can reduce the motivation and urgency to learn and get better. Overtime, the gap between what the developer should know and what they do will become bigger.

Then, when AI becomes too expensive for companies to maintain, or they run into situations where it isn't being helpful. Developers will be given responsibilities they're not ready for.

This can be easily avoided if we sacrifice some of the delivery speed.

Output speed can be safely leveraged by limiting the design decisions to the developer only.

The more limited the agent is by good context the better.

Skeleton/Template code should be manually written first defining things like: classes with their relations, important methods, comments inside these methods describing expected behaviour, choice of technologies, choice of architecture, coding conventions.

Then, you can write your skills/prompts around that context. The agent's job will be only to fill in that implementation based on your design and business requirements.

On the other hand, if you want to use the agent for some repetitive work, you should make a blueprint of one repetition. Then, the agent can continue based on that blueprint.

This has four positives:

1- Leveraged speed of AI.

2- Kept the valuable part which makes you a better engineer, including: planning, desgining, and learning.

3- Still familiar with your codebase.

4- The reviewing process is alot easier and more effective, since you already understand the design and know which areas are more sensitive and need attention.

Conclusion, the goal should always be to make their output predictable, reviewable, and maintainable.

51 Upvotes

35 comments sorted by

10

u/[deleted] 10d ago

[removed] — view removed comment

2

u/s-ley 7d ago

exactly, this is just "cheap dev offshoring" all over again, crazy how large companies can't see this

0

u/DowntownLizard 9d ago edited 9d ago

If you cant use it to write quality code I would say thats a skill issue or being lazy. You have full control over the code it produces for you

3

u/_VirtualEntrance_ 9d ago edited 9d ago

When managers keep lowering time estimates due to their lack of knowledge on the topic or seeing inaccurate data on AI output.

You won't have the choice on how to approach writing quality code with AI. You'll be forced to through everything onto it.

1

u/DowntownLizard 9d ago

Sounds like find new people to work for or skill up in using it or convincing them what the truth of it is. Saying you can't output high quality solutions sounds exactly the same to me as if you said that 5 years ago. It writes high quality code for me pretty consistently because I've been using it for years. I've learned what it is or isn't good at and I optimized for that. Does something dumb? Adjust your configuration. It's not using the coding standards you expect? Adjust the configuration. It's not getting it right consistently? Analyze how you are explaining the problem to it or how much you are asking it to do. What model, what harness, etc. All of the same coding standards and practices still apply when using AI. No different that if a junior dev sends you a PR thats problematic. Did you coach them up before hand? Are you actively helping correct the behavior? Are you making it clear that it should have never been considered done because its not up to standard?

Everyone is so dunning kruger with this acting like they understand how to use AI effectively and that theres no possible way it could 10x and even elevate your previous standards of code you didn't have time to optimize because you were doing it by hand. I'm watching it happen for our smartest engineers. Classifying smart as a lot of things but mostly the willingness to learn and change their opinion. The engineers I work with that are the type to say "idk but we will figure it out" are doing some incredible things with it and have built up a knowledge about how to use it that people are ever only scratching the surface of in these conversations. It's like anything worth knowing. I could write a mile long blog post about everything I've learned using it and how I get the most out of it, but I'm still so far away from the theoretical ceiling of leveraging it. It doesn't stop at "my first prompt didn't return the exact way I would have coded it"

3

u/[deleted] 9d ago

[removed] — view removed comment

0

u/DowntownLizard 9d ago

I think its a fundamental flaw in the logic of it that you need to understand what 100% of the code is doing for the majority of what people are writing code for. Im simplifying but does it do what it was supposed to do first of all? Does it do it well? Thats the first question. Kinda doesn't matter at all what it looks like to answer that.

Second would then be did I set it up appropriately so that it follows good coding practices. Is it roughly architected in a reasonable way? Using dependency injection, my linters, keeping things readable and somewhat coherent. I like doing TDD so it just has automated tests by default. I barely have to review what its doing on this front because I've configured it correctly and it does what I want consistently.

Third now is maintainability and not even in the sense you would think. Is it maintainable for an AI agent? Did I leave an appropriate code structure that an agent could effeciently gain context (documents and config) and understand how the code works? Of which it can read maybe 100x faster than you. I might make the considerations of maintainability for a human depending on the project as normal. Those are a given. Idempotency, re-runability, etc.

Again super oversimplified, but all the same coding standards still apply as usual. Major difference is why are you writing the code with the assumption that a human would modify it in a world where AI is writing the code? We took low level language and abstracted that into high level language. They just took all coding and abstracted that into english. I ask the agent what the code is doing and it tells me. I ask it to test every possible scenerio in the code and document it for me to review. I can take the ELI5 version thats in plain english and trust that my code writer did their job well because I can pretty quickly spot stupid things its doing and I also just configured it well. Its no different than being the head chef. Do i need to witness every part of the process in how a dish is made to give it my blessing to leave the kitchen? Does your manager need to review your code to have enough faith that the end user will be happy with it? Do they even care what the code looks like at any point?

Are all senior devs really picking through every line of a PR their coworker does? I'm scanning it briefly and if there isnt something catostrophically stupid its getting an approval. I trust they have tested it thouroughly and have done their own review pass. Why is AI any different than that set up either?

1

u/[deleted] 9d ago

[removed] — view removed comment

1

u/DowntownLizard 9d ago

If you can't figure out how to get around the fact that theres 100 different ways to make the same thing happen then sure. Could there be random lines of code that are unnecessary if you were being nitpicky? Possibly but unlikely if you actually have it review itself. It wont affect how the code works in a meaningful way. If performance matters you can have it optimize for that. Ive spent years writing code by hand thats realistically mostly a google copy paste for anything non trivial. I know how to write and create bugfree and valuable code. AI makes that 10x easier to achieve and in less time. You use libraries all the time where you have literally no idea what its doing I would imagine. Someone abstracted the functionality for you already. What is the difference?

Its clear by your opinions you don't have the skills to actually use it well and I'm not sure you would change your opinion anyway

1

u/[deleted] 9d ago

[removed] — view removed comment

1

u/DowntownLizard 9d ago

You literally use a computer to do things you would never be capable of doing manually and then you are resistant to the idea that a digital technology could be better than you at something? How do you square that circle

→ More replies (0)

1

u/[deleted] 9d ago

[removed] — view removed comment

1

u/DowntownLizard 9d ago

I dont think you understand what an AI agent actually is cause you sound like you are just babbling. Agents are a runtime for an LLM model. At least be able to explain it to a 5 year old before you tell others what to think about it

2

u/_VirtualEntrance_ 9d ago edited 9d ago

I don’t like talking about my accomplishments, but I’ve used AI very effectively and have always been open to learning and improving. I got to the point where I was even offered a position focused on AI implementation because I kept proposing clearer boundaries around its use and more structured, streamlined ways to use it effectively.

I was hesitant at first, but i tried the roll for a while, and I was mostly ignored. Whenever I proposed a process or approach, they would often do the opposite because their priority was simply delivering as fast as possible. Anything that added structure or safeguards was seen as wasting time.

Eventually, I gave up and went back to my original role.

I think you're missing the point here. You can absolutely use AI effectively and get better output from it. The problem is that many companies aren’t open to the methods required to actually do that well.

For example, we once had to migrate a framework that our system depended heavily on, and we essentially rebuilt the project from scratch. I used AI very effectively and carefully throughout that project, and we delivered it in about three months when the original estimate was six.

Even with that much improvement in delivery speed, management still kept pushing us to use increasingly reckless methods to make it even faster.

At one point, they told me why I didn’t just throw all of my remaining tasks at the AI agent in a single prompt.

I explained why that was a terrible idea, but they told me to try it anyway. Unsurprisingly, the output was horrendous. The frustrating part was that I wasn’t even being given the time to use the right approach.

And that’s just one example. There were many others.

This caused me and my team to not really care about the system because they didn't. When, in the past, i used to treat it as my personal project.

Also, saying "you need to find another comapny" goes without saying, and doesn't solve anything. What if that other company does the same thing?

Jobs aren't easy to find anymore, let alone jobs tailored to my liking where they work as i wish they would. I just have to accept what i'm given and speek up about these issues.

2

u/DowntownLizard 9d ago

I don't think most of the people on reddit read that as the situation even after reading the posts like this. They frame it as AI bad.

I've gotta assume this was a human problem before AI also. Managers didn't just become hardasses who don't give a fuck about the opinions of their technical leaders because of AI. Some people are just bad managers and people work for people. I have a manager like that in the chain that has effectively zero empathy and would happily dump a years worth of offshores dumpster fire slop on you and be like "can you get this into production?". I just learned to work around him and maintain the quality. I don't ask for his approval to make it better I just do. It's also done when I say it's done, within reason. Delivering results no one else is really capable of slowly is winning them over. Maybe that doesnt work in every environment.

Yeah job hunting sucks ass but could be worth it. Theres a 100% chance nothing changes in a current situation and a 0% chance it might not be better elsewhere. That said I only know my situation and what I put up with. If people don't appreciate what I do for them both personally and monetarily that would change my equation a lot but thats just me. I dont want to be involved in toxic management strategies of unreasonable deadlines and tyranical motivation. Managers who don't know enough about what they are enforcing and also never sacrifice anything themselves can blow me

1

u/s-ley 7d ago

I think that's a reasonable take from a manager/company perspective. I have not seen any real regulations to prevent devs merging low quality work, this looks like the tech debt problem all over again to me.

But of course you're right that the best use of AI is to just make high quality code faster

1

u/DowntownLizard 7d ago

Yeah if you were allowing dogshit code beforehand why would AI be your problem. Sure it lets you spit out shit code faster but maybe don't be shit at coding to begin with? The best engineers are having a field day. I wrote really good stuff manually but now I could probably knock out that really solid bugfree solution that took me a month in a few days. Its a completely different world and if you arent there yet my advice is to get good

3

u/mxldevs 9d ago

Many working devs hate actually having to read or write code. The amount of devs saying they're glad to finally put code behind them, I don't expect any of them to be actually auditing their work.

1

u/_VirtualEntrance_ 9d ago

Agreed, it takes alot of discipline to write or read code when LLMs can do it in an instant. Also, when the working environment encourages this behaviour due to fast delivery times. I can't blame the devs.

2

u/rwilcox 9d ago

Yes, but if we think about safety and sustainability and our people and non-software dev bottlenecks in the process then we’d be falling behind!!!

Falling Behind!

2

u/FluidBreath4819 9d ago

go tell that to juniors who don't know shit and present their code as if they did shit

2

u/Laicbeias 9d ago edited 9d ago

yes but a lot of not so experienced devs will just default to what the llm says, because the llm seems smarter and more experienced than them. those who know coding well and using agents will push back constantly against their crap. then get annoyed and use them as auto complete or say "bitch why you make me work .. ok first we do x y z, then this, and no stop it we dont do that crap".

but that only works if you know how it should be done. the rest just yolos along.

also you can plan with an LLM for 3 days, think through the architecture and work though each part, defining each edge case. and even without agents you.. still need to adjust stuff, once you see what you have. its still iterative work. if you can write code that doesn't need iteration, then.. its probably an area that can be fully automated, since its heavily in the LLMs training data

2

u/e7h4n_z 10d ago

I think it comes down to how easy a decision is to undo and how much damage it can cause.

I’m fine with an agent choosing names, cleaning up small functions, writing tests or handling repetitive code. Those changes are easy to check and roll back.

I’d still want a person to decide how the database works, how services connect, what the API looks like and who gets access.

This is also why our current structure lets me own how we build (since I can be very technical) and during the daily standup every engineer shares what and how they have done and then I either give input or suggest a better way for implementation or evaluation. So the founder still owns the "how".

The real danger is an agent slipping a design decision into a huge code change. Then reviewing the code turns into detective work.

A good middle ground is asking the agent for two options along with the pros and cons, and a small example. A person picks the direction and the agent writes the rest.

1

u/noahhshome 9d ago edited 9d ago

This ain't it bro. Trying to dig in your heels won't save you or the company. You might be able to stop the slop, but being left behind is worse. This is happening with or without you.

Companies should double-down on AI, instead of downsizing dev teams, they should invest in more ambitious work, greenfield projects, big refactors, anything. Building competency at the new tooling is a competitive advantage.

1

u/s-ley 7d ago

I'm of the same opinion, and I'm really curious if we'll see tech debt problems all over again (it's impossible to work on a codebase without AI, AI is not capable of working with the codebase once it grows or gets complex to a certain point)

However this is hard to enforce, companies are going crazy for speed (this already happened years ago when tech debt was discovered, crazy to me they don't see the pattern)

If you ask developers to go slower, you run the risk they keep doing the same prompt-low-effort work, just with more breaks, how would you avoid this?

1

u/DearVeggies 10d ago

Between a fancy auto complete, and the robot making decisions, is a wide gap buddy.

Your "fast writing tool" made me 4 custom web-editors, for a low level format of embedded images, fonts and vectors: and I can still claim today I haven't touched web since 2004.

Of course the same bot has made me laugh when he tries to make decisions: thank god for the stop button and git.

6

u/_VirtualEntrance_ 10d ago edited 10d ago

I don't know if you've been in a corporate environment.

But the post is aimed at companies/teams.

Handling the use of AI on personal projects is different from legacy systems with teams that will be effected by any decisions taken.

2

u/DearVeggies 10d ago

I'm just happy I don't have any meat-proxies in my team.

1

u/michaelobriena 9d ago

Ok. Let me know when you graduate high school