AI Hyperopia
AI is on a roll, it has surpassed the very best humans at games: chess, go, poker. It can author news stories on sports, business, and politics. Given a short text prompt it can even render a scene with realism and artistic merit. Some have even warned that if we are not careful, AI will replace us all, making the world better for humanity by eliminating us.
But in at least one domain, software development, AI shows a skewed vision. AI has set its sights upon problems it is most unsuited to solve, while overlooking simpler opportunities to improve the lives of working software engineers. AI is farsighted, but not in a good way.
AI hyperopia is the preference for creating flawed solutions to problems beyond the capability of today’s AI, while ignoring the common everyday problems that existing AI could solve.
AI is Automation
AI, artificial intelligence, has an aura of grandeur, a mystique that hides the reality. AI is software designed to solve a problem while minimizing the amount of input from a human being. AI is software based automation. That we imbue any automated process with intention, emotion, and intelligence, is a defect of our human software. None of these things are present in an algorithm any more so than in a thermostat. Stripped of its personality, AI is simply automation.
Software offers the potential for automating virtually any task and the software engineer is a master of abstraction. Software’s malleability and the software engineer’s inclination lead them to seek ever more general solutions to an ever broadening class of problems. It is not surprising that this results in over-reach. Why solve many individual problems if an engineer can construct a single solution to the problem of solving problems.
But the engineer’s gaze has exceeded their grasp. In seeking to solve the problem of solving problems the engineer attempts to solve the unsolvable while leaving the solvable unsolved. The engineer suffers from AI hyperopia.
An Example
VSCode is a popular IDE (the working environment of a software engineer). One of the most useful features of VSCode is Intellisense. As the engineer is typing, intellisense provides suggestions to complete what is being typed. It is a valuable feature, informing and documenting the context in which the engineer is working (Figure 1).
Fig 1. Intellisense suggests completions with documentation.
Recently (2022), GitHub released CoPilot, an enhanced form of intellisense, billing it “Your AI pair programmer”. Using CoPilot the engineer can merely type their intent, and CoPilot emits the necessary code in its entirety. The software engineer then needs only to check the resulting code for accuracy and perhaps tweak it to achieve their specific purpose (Figure 2).
Fig 2. CoPilot suggests completions of entire code blocks.
However, after some use by the software development community, cracks began to appear in the CoPilot facade as demonstrated by this recent HN discussion. The code that CoPilot emitted is often wrong, sometimes in obvious ways, sometimes in subtle ways. It can be almost but not quite what the engineer wants, requiring adaptation bordering on total revision. CoPilot changes the kind of work the engineer has to do, from authoring to editing, but the amount of work is not reduced.
That CoPilot incompletely lives up to its lofty goals should come as no surprise, CoPilot is a product of AI hyperopia. It is an attempt to solve the general problem of software development while pre-CoPilot Intellisense has a number of more basic problems addressable with the tools of AI.
For one, using Intellisense is like having an impatient observer present while playing solitaire, ever ready with suggestions and even willing to reach into the game and make a move on your behalf. That is, Intellisense can be an intrusive bore that slows rather than accelerates the writing of code.
For example, the Intellisense prompt steals the focus of the caret, it repurposes the arrow keys away from the main text into the context of choosing the completion. This interruption throws off the refined typing skills of engineers. An Intellisense AI that detected when an arrow key press was an intended interaction with Intellisense and when it was a continuation of the normal typing flow could smooth out these awkward discontinuities.
Another example, evident in Figure 1 above. Intellisense will provide many possible completions among its suggestions. It has no filter. The list of completions can number in the dozens. Reweighting these potential choices with the most likely given the current context and showing only the most likely is a solvable AI problem.
Instead CoPilot attempts to solve the most general problem, have the engineer state their intent and let the AI produce the code. This is ambitious, but not realizable with today’s technology. It leaves unaddressed the solvable problems of making Intellisense less intrusive and more accurate, making it better with judicious application of existing algorithms.
Automation is Interface Design
One may argue that the simpler problems described above are mere user-interface, that AI solves a problem of a different kind, that of synthesizing creativity. But this ignores two important facts, one, AI is automation and automation is about simplifying the human computer interface. And two, currently we don’t have algorithms for creativity, at best we have ok imitation in some narrow cases.
AI provides powerful tools for modeling and automated decision making. Supervised learning models in which example data is generalized into efficient prediction and classification machines is a well developed area of mathematics and computer science. Statistical techniques that balance these models with uncertainty in order to guide action are also highly advanced. These tools can be used to improve virtually any human — computer interaction.
The prescription for AI hyperopia is simply to resist the temptation to generalize beyond the capability of the toolset. Product managers and engineers should focus on the solvable problems and recognize that real creativity lies in identifying a realizable solution to a specific problem.