An AI Coding experiment and the 10 things I learned
With the enormous popularity of AI, there’s no denying it is everywhere—whether I’m looking, reading, watching, or listening. I decided to run an experiment to test AI’s ability to write code. The article that follows is divided into three parts and a conclusion.
Part One: I’ll explain my experiment, including what my application is and which AI engines I used to help create the code.
Part Two: I’ll provide some basic information about the AI engines I worked with.
Part Three: I’ll share the ten key things I learned.
Conclusion: Finally, in the conclusion, I’ll share my overall thoughts.
PART ONE: My Application
My test application addresses a specific need I have. I read a lot of business books, mostly as eBooks, and I frequently highlight passages that I want to remember. However, simply highlighting text doesn’t commit it to memory, and I rarely go back to review my highlights—so that doesn’t help either. I came across a very useful service that aggregates your highlights and emails them to you, one per day, as a memory aid. It’s an elegant and well-designed app—better than what I’ve created. However, with two kids still to put through college, I couldn’t justify even its minimal cost.
If you know me, you know I love Python. I also love Django, a Python-based framework for creating web applications (Instagram is perhaps the most famous Django app). My app serves a dual purpose: providing some simple static web pages and performing two complex functions.
The first function is processing files uploaded by users. The paid app connects to your Kindle account through an API and automatically retrieves your highlights. My app, on the other hand, requires users to manually download their highlights from their Kindle reader as an HTML file, and then upload the file through a web page. My code parses the HTML file to extract the highlight data, which is then stored in the app’s SQL database.
The second function is a daily email system. Each day, the app iterates through its users and emails each one a random highlight from their stored data.
PART TWO - About the AI Engines I Tested
My AI Test Subjects Included: ChatGPT, Gemini, CoPilot with GITLens, and Claude.? Here is a high-level comparison of the AI engines I tested.
Foundational models and training are the backbone of AI engines. Understanding their architecture, training, and design philosophy is key to evaluating their strengths, weaknesses, and suitability for various applications. When comparing AI systems, the foundational model provides a lens to understand how they work, what they excel at, and where they might fall short.
领英推荐
PART THREE: The 11 Things I Learned from Using AI to Help Write Code for My Application
My Conclusions
I was frankly amazed by the complexity of the problems AI could solve and the speed at which it did so. One notable example was when I had an issue with my hosted server. While using ChatGPT, it identified that I was using DigitalOcean simply from the features I described in my prompt.
That said, there were times when I knew enough about Django to recognize that some of the information AI provided was incorrect. These instances reminded me that AI still has a way to go before it can fully replace programmers.
While I didn’t make a conscious decision to favor one AI tool over another, I noticed that by the end of my project, I was almost exclusively using ChatGPT and CoPilot integrated with Visual Studio Code. CoPilot was my go-to when I needed to provide extensive context for a prompt. Django, by design, organizes code across multiple files, and sharing this data was much easier with CoPilot’s seamless integration in VS Code.
I also found that different AI tools excelled at different tasks. For instance:
Of all the tools, ChatGPT was the clear standout. Its interface felt warm and user-friendly, and its answers were consistently accurate and insightful. It even excelled in creative tasks. For example, when I asked it to make my base.html template more elegant and inviting, it exceeded my expectations. My main challenge with ChatGPT was providing sufficient context for complex prompts. In some cases, I found myself pasting nearly 1,000 lines of code to ensure it understood my needs. My app can be found here: https://134.209.220.170/home/
Final Thoughts
My experiment showed that AI can drastically increase the speed at which a hobbyist like me can produce code. However, this often comes at the cost of fully understanding the code being generated. While AI is a powerful assistant, it’s not yet ready to replace programmers. There were times when even I, an intermediate-level programmer, could see that the solutions AI suggested wouldn’t work.
That said, the future potential is undeniable. AI has already transformed how I approach coding projects, and I can only imagine how much more capable it will become. Someday, it might be able to fully replace programmers—but for now, it remains an incredible tool for accelerating development and enhancing productivity.
Senior Vice President WSP USA
1 个月Great article. I learned a lot.