An experiment to build a single-use app with the help of Copilot.
Idea
I listened to a podcast that discussed the idea that AI would soon make single-use software viable.
Single-use or disposable software refers to applications designed to meet specific, often short-term, business or personal needs. These solutions are typically developed quickly to address immediate requirements and discarded or replaced once their purpose is fulfilled.
Guzzle is a hands-on experiment to determine how close today’s AI tools can come to delivering on this concept.
Description
Overview
I wanted to track my protein intake for a week to ensure I consumed around 160 grams per day. While numerous tracker apps are available that maintain detailed ingredient databases, I find them too fiddly and time-consuming to use.
In my case, I was willing to accept reduced accuracy in favor of speed and ease of use.
My solution was to use GPT4 to calculate estimated protein values based on short, natural-language descriptions of my consumed foods.
My goal was to build this single-use app within 2-4 hours.
Design
The components of the app are as follows:
Front End
- A simple HTML form styled using Tailwind CSS
- Date Select, Save, and Calculate functions wired to the button click events
Database
- Airtable database
Flask Server with the following routes:
- /get – return saved food intake information for the provided date from Airtable
- /save – save food intake information for the provided date to Airtable
- /calculate – use OpenAI GPT4 API to calculate the protein total based on the natural language food intake descriptions provided
Process
I used Visual Studio and Github Copilot to develop the app.
Copilot was generally very effective in creating both front-end and server code. It was able to develop clean HTML and Javascript for the form, including using Tailwind for styling. It also did a great job stubbing out the Flask server code.
However, I did get bogged down on a couple of occasions, which increased the overall development time. One significant issue was related to date formatting. Despite numerous attempts, Copilot was unable to compare a date provided in the /get request with those stored in Airtable. Ultimately, I had to figure that out myself.
Learnings
I came close to building the app within my goal of 2-4 hours, completing it within three evenings, totaling approximately 6 hours.
My experience aligns with the general consensus among the developer community – using AI for code generation is extremely beneficial, saving a significant amount of time, particularly on simple tasks. However, in its current state, AI will hit roadblocks that require an experienced developer to resolve.
The Guzzle code is pretty clean, but then again, it is a simple app with little or no architectural complexity.
As a tool, Guzzle was perfect for my needs. Since it was so quick to record my food intake, I consistently used it for a week and was able to obtain the data I was looking for. The accuracy of the protein calculations was acceptable -within about 10-15% based on some manual calculations I did for comparison. I improved the accuracy by cheating a little – providing protein values for a few of the foods I commonly eat in the system prompt.
My key learnings from this experiment are:
- Copilot (or generative AI in general) is not quite there yet to reliably create software for non-technical users, with the possible exception of more constrained scenarios such as building logic into platforms like Salesforce. That said, with the pace of progress, AI capabilities will likely dramatically improve in the very near term.
- It is interesting to note that without Copilot I would not have considered building this app. To extrapolate, think of how much more software will be created in the future with the help of AI.
- Consuming 1 gram of protein per pound of body weight per day is very hard for vegetarians.
Do Next
- This tool accomplished what I needed, and I have no further plans to extend it.
- The concept of building a single-use app worked well, and I will consider using it again as the need arises.