• Top
  • New

Readonly vs Disabled made me realize I'm too dependent on my AI code editor

by Lopsii on 2/8/2025, 10:53:08 AM with 0 comments
I develop software and systems using legacy programming languages—Fortran and PHP (no offense). Please don’t hit me up; I’m not looking for a job.

I was building a form and needed to prevent users from entering a value for "copay." Simple enough, right?

<input type="text" name="copay" id = "copay" class="form-control" value="<?= set_value('copay',$child['copay']);?>" disabled />

It worked perfectly for preventing edits. But when I submitted the form, the copay value didn’t get saved to the database. I turned to my AI code editor for help. After multiple prompts and failed attempts, it couldn’t find the problem let alone give me an answer that worked. Frustrated, I hacked together a workaround by storing it from another form. Incredibly terrible practice.

Fast forward a month, and I ran into the exact same issue on another form. This time, instead of asking my AI code editor, I decided to Google it. Someone on Stack Overflow had the exact same problem, and it was answered.

I took me a month to realize that "readonly" was what I wanted not "disabled". I was so upset with myself. I'm talking immense rage plus the i'm a terrible engineer thought.

Now, I’ve stopped paying for my AI code editor and only use the free version. I’ve also stopped letting it autocomplete my code.

AI code editors are great, but don’t over-rely on them.