โ“If AI generates code that worksโ€ฆ why do we care what that code looks like?

Originally published on LinkedIn

โ“๐—œ๐—ณ ๐—”๐—œ ๐—ด๐—ฒ๐—ป๐—ฒ๐—ฟ๐—ฎ๐˜๐—ฒ๐˜€ ๐—ฐ๐—ผ๐—ฑ๐—ฒ ๐˜๐—ต๐—ฎ๐˜ ๐˜„๐—ผ๐—ฟ๐—ธ๐˜€โ€ฆ ๐˜„๐—ต๐˜† ๐—ฑ๐—ผ ๐˜„๐—ฒ ๐—ฐ๐—ฎ๐—ฟ๐—ฒ ๐˜„๐—ต๐—ฎ๐˜ ๐˜๐—ต๐—ฎ๐˜ ๐—ฐ๐—ผ๐—ฑ๐—ฒ ๐—น๐—ผ๐—ผ๐—ธ๐˜€ ๐—น๐—ถ๐—ธ๐—ฒ?

Letโ€™s start with defining ๐—ด๐—ผ๐—ผ๐—ฑ ๐—ฐ๐—ผ๐—ฑ๐—ฒ, or really what we should aim for, "good enough" code.

โœ… Meets the functional requirements

โœ… Meets the non-functional requirements (scalability, security, performance, resilience)

โœ… Aligns to a coherent architecture

โœ… Is testable, and proven by tests

โœ… Is extensible so weโ€™re not rewriting it in X months

These are your engineering goals and acceptance criteria, not code.

๐Ÿ”Ž ๐—ก๐—ผ๐˜„ ๐˜๐—ต๐—ฒ ๐˜‚๐—ป๐—ฐ๐—ผ๐—บ๐—ณ๐—ผ๐—ฟ๐˜๐—ฎ๐—ฏ๐—น๐—ฒ ๐—พ๐˜‚๐—ฒ๐˜€๐˜๐—ถ๐—ผ๐—ป: If AI produces code that satisfies all of thatโ€ฆ why do you care what it looks like? Why do you even need to look at it?

Are these really objections to throw?

โŒ Itโ€™s not how Iโ€™d structure it.

โŒ I wouldnโ€™t name it that.

โŒ It doesnโ€™t use the pattern I prefer.

โŒ Itโ€™s not elegant.

Those are stylistic objections. Stylistic is subjective.

If a system demonstrably:

โœ… Handles the load

โœ… Survives failure

โœ… Meets the security model

โœ… Evolves without collapse

โœ… Passes comprehensive tests

โ€ฆwhat exactly is missing?

Because hereโ€™s what I keep hearing:

โ˜ ๏ธ โ€œAI canโ€™t really code.โ€

โ˜ ๏ธ โ€œIt just produces boilerplate.โ€

โ˜ ๏ธ โ€œI can write better code.โ€

โ˜ ๏ธ โ€œI spend more time fixing AI code.โ€

Maybe you can write nicer looking code. But thatโ€™s not the goal.

If you can define how it could be improved why didn't you ask for the code from AI that way? That's a missed requirement not an AI implementation issue unless merely stylistic.

The goal is to produce the simplest solution, as quickly as possible, that satisfies the defined requirements.

Thatโ€™s what engineers are paid for.

โŒ Not to showcase taste.

โŒ Not to demonstrate stylistic preference.

โŒ Not to optimise for elegance.

โŒ Not to rewrite code just to be how they like it.

Engineers are paid to deliver systems that work, securely, scalable, reliably, within constraints defined by the business they operate in.

Engineering skill isnโ€™t becoming less important. Itโ€™s moving upstream.

โ„น๏ธ Defining clear constraints โ„น๏ธ Designing robust architectures โ„น๏ธ Specifying non-functional requirements precisely โ„น๏ธ Designing verification strategies โ„น๏ธ Setting guardrails that enforce quality

AI can generate the implementation that satisfies those constraints if engineers can define them.

๐Ÿง  ๐—ฆ๐—ผ ๐—ต๐—ฒ๐—ฟ๐—ฒโ€™๐˜€ ๐˜๐—ต๐—ฒ ๐—ฟ๐—ฒ๐—ฎ๐—น ๐—พ๐˜‚๐—ฒ๐˜€๐˜๐—ถ๐—ผ๐—ป: If it works, scales, is secure, and is provably correct..

Why does the aesthetics of the code matter? Why do you even need to look at it?

And if your answer is, โ€œBecause I can write it betterโ€

Better for the business? Or better for you? What makes your code better if it does the same thing?

#SoftwareEngineering #AI #Architecture #EngineeringLeadership #TechStrategy