Artificial Intelligence: Large Code Bases, Complexity and Management Problems
A friend of mine pointed me to a video that describes the issue with #ArtificialIntelligence with regards to increasingly complex and growing code bases. One (i.e. management) assumes that with AI acting as a perceived force multiplier in human effort that more features can be built out quicker which helps recover their expenditure/investment in the technology, which in turn implies that a reduction in workforce will equally help their bottom line. While AI has helped developers produce more code in general, businesses have not seen a proportionate gain. If anything, it’s been said that the cost of incorporating AI is more of a drain. Without going into other business units, I want to focus this post on the idea of complex code bases with regards to AI in how the real problem isn’t with the AI but with management due to the classic Mythical Man-Month issue.
Before diving into what I see the core problem is, let me recite a quote from the Wiki page on the Mythical Man-Month:
Complex programming projects cannot be perfectly partitioned into discrete tasks that can be worked on without communication between the workers and without establishing a set of complex interrelationships between tasks and the workers performing them.
In companies with a budget and a tight deadline, a solution that seems common for management is simply to add workers to a software project. Common sense dictates if you throw more bodies at the problem, it can be solved faster. That might work for certain problems like putting out a fire or a rescue effort requiring vast coordination or even military solutions. But this is just a brute force approach that doesn’t take into account the nature of the problem and works mostly when a problem is known and has proven solutions where this approach can work.
In my experience, a lot of software projects end up dealing with specific domain driven issues. Sometimes, the solution is specific to a company where a specific flow or methodology for how things are handled cannot be easily translated into a common problem. With software, this issue can become more egregious in how the people attempting to solve that problem (and others) may rely on specific methods specified that leave a legacy impression upon the code base. For instance, if the project has existed for a long period, there could be specific areas where the original programmers did some sort of “hack” that other flows depended upon that isn’t well documented and buried deep. An example of this happening is at Facebook where the release management team discovered how a developer dealing with a section of code would constantly fail the build process because of how Mark Zuckerberg had originally written it.
These aspects create challenges for normal humans. Depending on the company, those challenges increase depending upon how the code base is managed. Some companies lack documentation and that older engineers may have moved on, leaving that area of expertise in a void. Since businesses tend to do a poor job in general of code maintenance (because management believes that code generation is a one time effort as opposed to an ongoing thing) and how code tends to not be ecologically sound (where I define ecologically sound code as being more standard, reusable and easily maintained), the problems multiple.
To an AI that is unfamiliar with the code, these things simply bloat the context window. While the AI may understand the execution of the code, it may not necessarily understand how something ought to behave especially if supporting information like documentation does not exist. The AI still needs to be taught how something must operate, which means legacy systems (which probably compose most massive code bases) will face much more difficult problems, especially if companies are stupid enough to lay off their long standing employees with key systems and domain knowledge. And this is just the start of where these problems begin.
Another major problem that is related to the Mythical Man-Month issue is coordination of tasks. We can equate agents being an automated version of a developer that has a specific task. Where things get out of control, as I imagine, is ensuring the upstream/downstream ramifications of how AI is used to build a system. Project management has been one of the main things that would be the normal method in handling builds. Even with proper project management in place, it’s not unheard of how conflicts arise during the build process. With large companies that try to split teams into a global operation, the coordination effort becomes an even bigger nightmare where cultural values, local employment laws, personalities, etc. could further flip the dream of upper management of having their engineering teams working around the clock to push out things faster.
Agents might be thought of in the same manner except you don’t need a cheaper team overseas to handle the problem anymore while any hard token seem to be the main limiting factor in terms of how much an agent hypothetically can handle (i.e. the agent doesn’t need sleep/rest, food or other forms of self-indulgence/biological support). Outside of the cost, the only real things AI seems to need is a good prompt and then the work gets split up while everyone parties, right?
Well, not exactly. This is where understanding AI as a tool vs the infamous anti-pattern known as the “silver bullet” or “golden hammer” that manages to solve everything becomes imperative. First, it’s important to establish the idea of the golden hammer” anti-pattern:
A familiar technology or concept applied obsessively to many software problems
Maybe my favorite quote written by Abraham Maslow from this wiki page is this:
It is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail
Right now, AI has quickly become this anti-pattern and upper management has decidedly determines that it is their solution for everything (which is a common problem in upper management btw). Like any other tool, AI does have its strengths and weaknesses. In my experience, AI does a fantastic job on accurate syntax, finding problems that I may not perceive and handling very focused issues. AI does a rotten job though on long term planning, architecture, big picture elements, making critical decisions on its own and dealing with complexity.
If you scrutinize the mechanics of AI closely, you can see why the failures are apparent. AI has a limited context window that overtime creates hallucinations. While there have been techniques to correct this problem such as limited memory, those techniques are not reliable. In working with Claude Code myself, I read that one best practice is to reset the context window via /clear. This prevents the model from getting confused and continue focusing on the problem you need solved. However, the only way to combat the loss of “memory” (even when it writes to its own memory file), you still need a tremendous amount of documentation to ensure that the model doesn’t entirely “forget” about what you’ve done.
The AI implementations most people use are LLMs (large language models). So they can process human language but are not a direct substitute for an actual brain. Right now, the current implementations are good at small, discrete tasks that are repeatable. Things like skills.md help prevent the LLM from going off on a tangent so the user isn’t forced to repeat themselves. But this does not solve complex code base architecture and maintenance.
AI models are nondeterministic and do not provide reliable, repeatable answers. One prompt can easily generate different sets of data in varying forms of replies. Even if a task is easy and can be considered repeatable, there is a fair cost to having the LLM manage it. Even with files to help guide the LLM like skills.md or other rules, there are no guarantees for an outcome because of how AI systems are built.
As far as I know, AI system employ what’s called a greedy algorithm. The best way to describe this is that the AI goes for an optimal approach to solving a problem. That might sound good on paper because it means the algorithm is able to solve a problem. But part of the solution here is to find what’s best and easiest rather than a total solution. That allows the solution to be cheaper, which again sounds as though it’s great. But in practice this also implies that the “found” solution may not necessarily be correct especially depending on the data that the AI is trained upon. In turn, your results vary and may even conflict because of the number of rules that the AI has to consult.
Another interesting subpart that in that page mentions how the solution does not take into account past solutions. This is the toughest part because this is how I think AI differentiates in problem solving compared to the human brain. The human brain, at least for me, upon discovering a solution relies on that solution moving forward until a new/better solution is discovered. A simple example might be using a particular car repair. In my case, I was using the South Bay Toyota Service for my car’s maintenance. However, over the years, they became expensive to the point where they would try to upsell me on things to increase the bill as opposed to the basic ask. In turn, I looked for an alternative source for handling my car repair that was cheaper and now use a specialist. SBT is easier for me to go to because of the parking and location but the price and quality with the new guy is better for my current needs.
That type of scenario is something that AI cannot handle because of the various things that one would need to inform it to make an educated answer. The AI might try to look for other things like the nearest spot to me vs ratings etc. This comes down to personal preference and priorities, something the AI cannot adjust for (i.e. the human factor). But to return to my point about the solution, for me now that I have this new solution, I will continue to use it moving forward until that solution has an issue which requires me to find another alternative.
Another problem I’ve witnessed is that the AI really is catered/tailored for the user. Anytime critical decisions are required, AI tends to fail because it’s relying on the user to provide feedback. In fact, I would argue that the AI requires that feedback since it perceives those critical decisions being more subjective. A simple example here is how the AI will not choose the route of the project that it should take. It might make suggestions based on the current information available to it, but it can’t read my mind and know of the skill system I want simply because there’s no documentation to feed it for the game I’m building. In that sense, the user is absolutely needed still (something I know upper management grits their teeth in realizing).
Another major hurdle is that like humans, AI is only as good as the problems it knows how to solve. In short, any preexisting, textbook type of problems or things that it encountered are what AI can handle. Referring back to the specific domain knowledge of a business in conjunction with the idiosyncrasies of large, old code bases, AI will encounter the same problems humans do except that the AI cannot pivot as easily or communicate the problems to management the same way a human can. Since most code bases are private and many businesses manage to solve a specific issue using a proprietary type of workflow, the AI has a harder time recognizing that pattern and still requires a human to guide it through the nuances.
Finally, there’s the acceptance factor which is purely subjective. Even simple, repeatable tasks such as generating assets need a person to determine what’s acceptable. Some people call these processes the “man-in-the-middle” part of the process where you need something to judge the output. Because of this middle factor, the AI cannot manage the total vision of a complex code project. The AI understands what tastes are but does not know how to employ tastes on its own.
When you factor these elements in, you start to see how an AI breaks down in the process of handling complexity (at least the current tools and implementations) in software. The difference between before and now is that the problem merely was transferred from a human team to an agent team with less adaptable capabilities and not having the same pressure of survival when management gets angry something doesn’t work nor is off schedule.
So is the issue really an AI problem or is this once again a managerial issue?
To me, I think nothing has changed. Recently, I’ve been returning to the statement:
The more things change, the more they stay the same.
Really, the problem has never been about the AI. The issue is about the psychosis of upper management. I’ve argued in the past that tooling should be championed by the users not the people in charge. The people who are closer to their problems and understand how a tool can be used to achieve their solutions are the ones that should be calling the shots and advocating the use of something like AI, not a top down corporate mandate by people who probably are far divorced from most of these problems.
Also, in the past, I would frequently state that the wrong people buy and/or are taught The Mythical Man-Month. I think software engineers have been generally aware of what they are capable of but upper management tend to treat them as a faceless workforce. AI makes upper management’s psychosis worse because of how AI is faceless (beyond the various LLM corporate logos) but now it’s a tool that upper management clearly do not understand in terms of making the best usage of. Even when I talk about AI, it’s done in a very generic, broad sense where in fact I’m mostly referring to LLMs and specific companies that produce them.
I did propose that education ought to be the key here. However, I think even if the “correct” people are trained on AI (i.e. upper management), nothing will change because these people have different priorities. Again, I will re-use the idea of “upper management psychosis” in describing contemporary corporate obsession over AI. Perhaps, the solution isn’t to focus on the AI but to better handle upper management. I have no current solution beyond my standard active volcano and gatlin gun-to-stomach wishes but I do understand the core problem.
