Experiments in Vibe Coding
There has been a lot of discussion on LinkedIn about vibe coding. Vibe coding is using an Large Language Model (LLM) to generate and adjust code, in order to deploy much faster.
For the first experiment, I am creating a Discord bot that uses the Ollama LLM on the backend for conversations in the Discord application.
The Stating Point and Setup
I am starting with a discord bot <-> Ollama integration because I already know Python and have Ollama up and Running already.
Three Hours versus Three Weeks
The baseline for time -to-release is about 3 weeks. A few years ago, I created a discord bot for stock trading a manually. I was learning Python at the time, so that involved a lot of learning, reading, and copy/pasta/tweaking of code.
Yesterday, it took me about 3 hours to vibe-code this bot, add it to my test server in Discord and do a basic "conversational" test. Not all of the bot functionality is in place yet, but the general level of functionality in it's current state is about where the trading bot was when finished.
The Bot Creation Process So Far
First, I asked Cursor to create in Python a discord bot that uses Ollama on the backend. That worked well out of the box. I added my Discord token as an environment variable, started the bot, and saw the bot come to "life" in the test Discord server. It was there but unresponsive. I asked Cursor to update the code to make that part work and it rewrote the functions and it almost worked.
At this point, I got variable typing errors when running the bot due the type of "message" in discord. I asked cursor to a solution to this problem, but Cursor wasn't able to automagically update the code. I made the change manually and the bot could chat. YAY!
The next step was to ask Cursor to create a docker compose setup for this bit. That worked very well out of the box.
Recommended by LinkedIn
The last thing I did so far was to ask Cursor to create a README for the bot. It read all of the code in the directory and created quite a nice README. No need for specialized shell scripts any more. another YAY!
The Repository / Going Forward
I created a repository on Github to share the code from some of my vibe experimentation. Stay tuned for periodic updates!
There are still some more tweaks to get all of the bot's functionality working. I will post updates as I progress.
Tentative Opinion of Vibe Coding
After just this one little experiment with vibe-coding, I can see it as a potential accelerator for experienced developers, SREs, and other areas of expertise. This method can also be used along with textbooks and other resources on the Internet to learn to code as well.
Using an LLM to generate a full production-ready application is still, in my opinion, a long way off. By production ready, I mean:
That is great Bill. I'm now getting into LLM and AI. I want to also learn python and all its flavors. Any suggestions old CoStar buddy?