AI Code Generation Leads to Fragile Codebases
A software engineer laid off from Meta in May has claimed that the widespread adoption of AI coding tools is leading to fragile codebases in software projects. According to the report, the engineer suspects that one reason for his layoff was that he was less resistant to adopting AI/LLMs as coding tools than some of his peers. He notes that in his last few months, he generated at least 90% of his code using AI, but these tools did not increase his coding speed as much as expected.
The engineer observed that code pushed by peers who heavily relied on AI was brittle and contained subtle issues that would lead to long-term tech debt. For instance, he saw one of the best programmers on his team try to merge code that used JavaScript events for mouseover CSS effects instead of the :hover selector, which he says is an unscalable approach.
Now employed at another large tech company, the engineer says he has fully switched to generating 100% of his code using AI because that is the expectation today. However, the article notes that many people are becoming aware that this isn't a sustainable way to develop a large-scale SaaS product. AI tends to solve problems within its context window well, but it is oblivious to long-term issues.
According to the report, there are four main ways AI usage results in a fragile codebase: AI writes simplistic automated tests that don't cover important scenarios; it produces overly complex code; humans don't understand the AI-generated code; and AI moves too quickly for human developers to maintain a high quality bar, leading to accumulated tech debt.