Thought My Code Was Fine — Until Copilot Showed Me Otherwise


Last week, I was working on a Python project — a web scraper tool that collected AI news from different sites and sent it to my email. It worked perfectly, and I was proud of what I had built.
Then came the next step: refactoring so I could add a GUI.
I thought, “This should be easy. Just some simple adjustments.”
That’s when I decided to use GitHub Copilot in agent mode to speed things up.
And what happened next? Honestly, it humbled me.
Copilot didn’t just tweak my code — it transformed it.
It introduced decorators for data classes that removed boilerplate I had been writing manually.
It consolidated files I had scattered all over into something cleaner and more logical.
It suggested approaches I hadn’t even considered.
At first, I was frustrated. It almost felt like my work wasn’t “good enough.” But after sitting with it, I realized: this was growth in disguise.
Here are some of the lessons I walked away with:
Key Lessons Learned
Structure in a project is really important – One big file works for tiny scripts, but as soon as things scale, structure is your lifeline.
Simplicity beats endless lines of code – Cleaner, shorter, more intentional code > trying to do everything in long scripts.
AI tools can challenge your perspective – Copilot doesn’t just write code, it teaches you different patterns and mindsets.
It’s okay to feel humbled – Being corrected isn’t failure. It’s proof you’re still learning.
Refactoring is not a waste, it’s a step forward – Every “redo” plants seeds for better practices next time.
Learning never ends – Every project, every mistake, every AI suggestion is part of the journey.
At the end of the day, Copilot didn’t “beat me.” It showed me a better way of thinking. Growth often feels uncomfortable — but that’s how you know it’s real.
Subscribe to my newsletter
Read articles from Erick Njoroge directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Erick Njoroge
Erick Njoroge
Hi, I’m Erick Wainaina from Kenya. I’m a passionate learner exploring Python, Java, AI tools, and real-world tech projects. This blog is my learning journal—where I share coding insights, project lessons, and beginner-friendly tech explainers. My goal? To document my journey, inspire fellow learners, and show that consistent progress beats perfection. Let’s grow together!