Learning by Doing: The Human Advantage Over AI
Doing the same thing repeatedly and expecting different results is often described as a form of insanity. Humans learn from failure. LLMs don’t; unless you explicitly tell them what went wrong. Let me give a recent example; one which gave me the idea for this article. I wanted to see how well an LLM could create a web application. I used Python and Flask, since I am comfortable with both the Python language and Flask framework. This would enable me to troubleshoot and review the generated code. The result was surprisingly good, especially as I am not good at UI design and the AI agent created a clean and functional UI. However, there was one recurring problem. The AI agent had created a virtual environment for the application and installed all dependencies there. This is a best practice for Python. After making code changes that required a restart, the application failed to boot due to missing dependencies. Instead of reactivating the virtual environment, the AI agent attempted to reinstall the dependencies, ignoring the fact that they were already present. The correct solution was simply to restart the virtual environment before launching the application. The agent made this mistake repeatedly. It did not learn from the error. I have made the same mistake myself: starting a Python application only to have it fail due to missing dependencies. The difference is that I learn from it. The next time, I activate the virtual environment instead of reinstalling everything. The difference is that I have memory and can learn. AI agents don’t. They won’t correct themselves unless you tell them to. They’re like the kid who keeps eating paste until the teacher intervenes. In the example above, I had to provide explicit instructions to the AI agent: • Ensure the virtual environment is running before starting the application • Always run test cases after making a code change • When modifying code, add or update tests to ensure proper coverage • Address any warnings produced during test execution—do not ignore them In summary, AI agents do not learn through failure. It is your responsibility to recognize the problem, determine the correct behavior, and explicitly instruct the agent. AI can accelerate development, but it cannot replace a solid understanding of the languages, frameworks, and architecture involved.