Skip to main content

The AI Didn’t Know the Port. I Didn’t Want to Hurt Its Feelings(Part 1)

I was excited to finally have a new side project to work on, and naturally, I wanted to vibe code. So I fired up Cursor. 
For the rest of this post, I’m going to refer to Cursor as “him”, because it genuinely felt like I was pair-programming with a very confident senior software engineer — the kind who types extremely fast and never doubts his decisions. 

The Design 

 I asked ChatGPT to create designs for: 
  • The home page
  • User dashboard 
  • Login page 
  • Forgot password page 
  • Sign-up page 

I provided the theme colors and a one-line idea for the project. 
ChatGPT’s first response was… an HTML file with all the styles embedded inside it. Not exactly what I had in mind. Since I didn’t want just code, I politely asked it to generate actual design images instead.

After a few iterations, I was able to finalize the UI and download both the HTML and styles. This was a surprisingly interesting experience for me. In the past, when I had an idea for an app, creating UX and UI was never a trivial task. 
I would need to: find and hire a product/UI designer explain the idea across multiple meetings negotiate contracts wait weeks for the first iteration request revisions wait more days for final assets.  

Using ChatGPT completely fast-forwarded this entire process. I had a clean, usable design in about one hour. 
 At the end, I genuinely felt like asking: “So… how much do I owe you?” Instead, I just said thank you and bye — the cheapest contractor I’ve ever worked with. 
At this point, since I wasn’t entirely sure how everything would unfold, I decided to start small. 

The plan: 

just create the home page. Famous last words. Developing the Program I already had a Django project scaffolded with models and a working admin panel. For the frontend, I wanted to use Next.js for the first time. I had experience with vanilla React, but I had never built anything using Next.js before. After running: 

npx create-next-app@latest 

My plan was simple: add a home page route create a Django view render the Next.js app Naturally, instead of doing this step by step, I went full cowboy mode 🤠 and asked Cursor to implement all required backend and frontend changes at once. 
 It felt like two AI agents suddenly clocked in. They asked a few questions, confidently went to work, and when they were done — pages existed! Progress! However, visiting the home page redirected me straight to the frontend dev server. 
Things were almost working, so I didn’t commit anything yet. The plan was to make it fully functional first, then commit. 
 I asked Cursor: 
 Instead of redirecting to the frontend server, can you render the HTML and include the Next.js output script? 
 He did exactly that. Unfortunately… it didn’t work. I tried several debugging attempts. Cursor happily entered what I can only describe as debug mode frenzy: added debugging logs added more debugging logs added even more debugging logs Each time, he confidently declared: 
 It’s fixed. 
 It was not fixed. In my dev environment, I had overridden the default port. Cursor didn’t notice this detail and kept trying the wrong port over and over again — while adding increasingly creative debugging code to the Django view. 

At this point, I noticed something interesting about myself. I knew exactly what the issue was. But I didn’t tell him. I thought: 
He’s a good developer. He’ll figure it out.
 He did not. Instead, he kept changing files, refactoring things that didn’t need refactoring, and adding so much debugging code that the project started to feel… endangered. Eventually, I felt like the responsible adult in the room. 
 So I politely said: 
 Why don’t we switch seats — I’ll drive for a bit. 

Comments

Popular posts from this blog

Installing MS SQL Server driver on Ubuntu Linux

Although making a connection to SQL Server can be done using unixODBC and FreeTDS, it does not work with some collations on SQL Server 2008. Recently, Microsoft released an ODBC driver for Linux that works on 64-bit systems only. Installing the driver is tricky. I begin by installing the build-essential, which is required for compiling from source. Checkinstall can be installed if you want to add the following application to the package manager. $ sudo apt-get install build-essential  Download unixODBC-2.3.0  and Microsoft ODBC dirver  and extract. $ sudo wget ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.0.tar.gz $ tar xvf unixODBC-2.3.0.tar.gz $ wget http://download.microsoft.com/download/6/A/B/6AB27E13-46AE-4CE9-AFFD-406367CADC1D/Linux6/sqlncli-11.0.1790.0.tar.gz $ tar xvf sqlncli-11.0.1790.0.tar.gz  Install the unixodbc using the following commands: $ ./configure --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-ico...

Installing pyodbc on ubuntu

Installing pyodbc is straight forward but if  getting     "error: command 'gcc' failed with exit status 1"  when installing pyodbc, make sure you have installed  requirements  as below. sudo apt-get install unixODBC-dev g++ pip install pyodbc

Monkey Patching Django Model Class

Django is shipped with some useful application, also there are lots of third party re-usable application written for Django. Sometime you need to modify or customize these applications(Models of application) to meet your software requirements. One of the usual solution is adding a Model class to have a one-to-one relationship with the third party Models. This solution has some disadvantages such as having more tables and classes which can highly adversely affect database performance, scalability and add more complexity to the software development.  I think of another solution to this problem. I used Django South along with monkey patching of third party Model classes. I added a field to Django user class. Here is a walk through over this approach. 1. Add an application: python manage.py startapplication userpatch 2. Add the following  code to add the new field to the user class from django.db import models from django.contrib.auth.models import User ...