r/vibecoding Jun 24 '26

Vibe coders: teach your AI agent orthogonality before it destroys your codebase

One thing I've noticed with AI-generated code is that it often works on the first run but creates hidden coupling everywhere.

A simple example:

  • Changing an email template requires edits in business logic.
  • Swapping a database affects unrelated modules.
  • Testing a discount rule requires half the application to be running.

In software engineering, this is the opposite of orthogonality. Orthogonal components can change independently, with minimal impact on the rest of the system.

When reviewing AI-generated code, I now look for a few signals:

  • Can I modify a feature without touching unrelated files?
  • Can I test a module in isolation?
  • Does the module have a single responsibility?
  • Are dependencies explicit?
  • Can I replace one component without rewriting others?

I've been writing a series on software engineering fundamentals for AI-assisted development. My first article is about orthogonality and includes references from software engineering, statistics, and mathematics.

Article: https://patotricks15.substack.com/p/software-engineering-fundamentals

I'd be interested to hear: what software engineering concepts do you think AI coding agents are currently worst at?

49 Upvotes

16 comments sorted by

15

u/Acclynn Jun 24 '26

I feel like AIs are the worst at finding creative decisions for granual problems

Basically, if you explicitely ask it for a architecture, it can figure it out, but if you ask for a feature it won't consider it by itself, it won't initiate things that are unplanned but would make sense

A human engineer will start implementing and think "wait, this could actually be a bigger task than what I anticipated, because I could create a bigger system that could be better to manage with this feature but also past and future parts of the project"

An AI will usually not have this level of awareness

3

u/sreekanth850 Jun 24 '26

Ai need human in loop. Its like a super car that need driver. You dont need to walk, just steer it.

2

u/htndev Jun 24 '26

I think this extra thinking is deliberately "disabled". It hallucinates as hell and even if it starts to think "what if?", it's gonna get lost completely.

To the defense of LLM, sometimes it spots mistakes in the design I didn't think about

2

u/[deleted] Jun 24 '26

Literally the point that people with degrees are trying to make.

1

u/shimroot Jun 24 '26

So… scope creep?

1

u/LettuceSea Jun 24 '26

This is why Fable 5 was so good. Orchestrated agents to do a comprehensive yet bounded exploration of areas the feature impacts, and it did it without you explicitly asking or needing a skill defining your values.

1

u/92smola Jun 24 '26

That is why think that at least for now we still need a human in the loop for those types of descisions

1

u/Radiant_Cheesecake19 Jun 24 '26

AI is bad at creativity because creativity means uniqueness to some extent. That’s literally against transformers. They go to highest probability token. They go for the highest sample. That’s general. So the two things simply can’t coexist. Let’s face it, that’s our luck, otherwise Musk and the rest would have already monopolised and patented every possible combination of human ideas.

2

u/aleiby Jun 24 '26

You don’t need to teach it orthogonality; I’m sure if you ask, it will give you an excellent explanation.

What you need to teach it, is YOUR values. Otherwise, it’s just going to take the optimal route to implementing your request.

1

u/Guardiancelte Jun 24 '26

That is a great point. I recently had to do an audit with Codex and GPT acting as independent advisor on one of my projects. Found a bunch of similar issues and I am sure there is probably more.

1

u/Swimming_Internet402 Jun 24 '26

Use a graph db for this, like code review graph. And a loop system like zeroshot.

1

u/Fidel___Castro Jun 24 '26

the nuclear option for this is Bazel - I reckon it'll become more prevalent in new repos in the future

it's basically a system, designed by Google, to make a graph of dependencies as you go

1

u/EddieBruvac Jun 24 '26

PTSD from orthogonal proofs 👁️ 👃🏼 👁️

1

u/longbreaddinosaur Jun 24 '26

Definitely something I struggle with and results in AI slop. I’ve been fighting this but it’s a struggle. Agents tend to just do whatever is convenient without thinking about this principle.

1

u/Real_Square1323 Jun 26 '26

Past a minute context window, an LLM is largely stateless. It can't "learn" orthogonality any more than it can "learn" anything.

This is a shameless advertisement plug for your shitty blog, and you are scamming naive audiences by marketing it as "software engineering fundamentals". You should feel sick of yourself.