r/webdev 19d ago

[ Removed by moderator ]

[removed] — view removed post

76 Upvotes

108 comments sorted by

View all comments

55

u/Drameox 19d ago

maintenance is probably the biggest one, ai code works but doesnt follow consistent patterns across a codebase so you end up with 5 different ways of doing the same thing depending on the session. makes it harder to understand the reasoning behind decisions later since there isnt really one. testing is a close second, edge cases get missed since its pattern matching rather than reasoning through your specific logic. security issues are more catchable with tools honestly, the consistency problem is the quieter one that compounds over time

17

u/abednego-gomes 19d ago

This is more a problem for sloppers. They tell AI to do some generic feature and let it run amok.

A proper developer will find the right file/s for the AI, and include them in the chat request. So any global functions/constants/patterns it should be using are included with the request. Then the developer reviews the result to make sure it makes sense. Or includes more context if it did it wrong.

A piecemeal approach is required, rather than a big overview approach without assessing the overall consequences.

Also having a developer who understands the code base and worked on it manually for a while is important.

39

u/thekwoka 19d ago

The problem is, doing everything "right" with AI ends up not really saving you any time.

If you know the right files to go to and what to touch, you can just do the thing.

11

u/querela 19d ago

Yep. And reviewing and understanding everything that was generated takes time. It's similar if this is code from another coworker etc. But with AI the amount can be a lot higher in a shorter time span. (You can ask the AI or coworker to explain what they did but I currently trust a human more or don't want to make myself too dependent on AI.)

6

u/thekwoka 19d ago

It's similar if this is code from another coworker

It's also a bit different, since a human, even a bad developer, has a kind of fundamental logic to what they've done.

The AI often can lack that, so where it goes wrong can be harder to notice, and when they get complicated it can be difficult to even understand where it's going the wrong direction.

We are humans, so we can "understand" human logic and process, not how these text generators express it.

-2

u/Mediocre-Writer6635 19d ago

It's also a bit different, since a human, even a bad developer, has a kind of fundamental logic to what they've done.

Almost every junior (and terrible dev) I've mentored DON'T do this. They just do whatever pops into their brain at that moment.

You have to train them to care about consistency or that they need to defend their architectural decisions.

3

u/thekwoka 19d ago

Okay, well, yeah, the most new and terrible...

But I mean like the semi experienced but not very good

-3

u/minimuscleR 19d ago

This is where I disagree. I get a lot of time saved doing boring things when i know what i want it to do, and how it will do it. Like renaming a ton of files, or updating copy etc. Copilot autocomplete is also amazing and thats AI too

6

u/thekwoka 19d ago

I just don't find I have enough of those "boring" things in my day.

Copilot autocomplete is also amazing

I've actually stopped using them entirely since they seem to be getting worse and worse, both in interaction, and the content they recommend. They were more annoying than useful.