Coding with AI (Cursor + auto mode) Diary #1 - Practical Notes

Alright, fellow code crafters, let's talk AI assistants – specifically, a recent dive into using Cursor's "auto mode" while tackling a bug. It's a mixed bag, much like pairing with a junior dev who'...

Coding with AI (Cursor + auto mode) Diary #1 - Practical Notes
Photo by Aerps.com / Unsplash

Alright, fellow code crafters, let's talk AI assistants – specifically, a recent dive into using Cursor's "auto mode" while tackling a bug. It's a mixed bag, much like pairing with a junior dev who's blazing fast but needs a watchful eye. The experience highlighted the strengths and weaknesses of leaning on AI for coding tasks. Think of it like this: AI can be your eagle-eyed reviewer, instantly spotting redundant lines you missed in the heat of the moment. It can even suggest elegant solutions for those pesky edge cases that always seem to slip through the cracks. And generating architecture docs with snazzy diagrams? Pure magic, I tell ya!

However, and this is a big "however," remember that AI isn't quite ready to replace the architect. In this case, the AI introduced an unintended side effect – a `setHouses()` call tucked away inside a seemingly innocent `saveHouses()` function. While the code still worked, that hidden state update could lead to unpredictable behavior and unnecessary re-renders down the line. This highlights the critical need for human oversight. You've got to maintain a clean, predictable architecture, and that still requires a human touch. So, use AI to its strengths – code reviews, documentation, and boilerplate – but always be ready to step in and guide its architectural decisions. It's about augmenting your skills, not replacing them.


📰 Original article: https://dev.to/cathylai/coding-with-ai-cursor-auto-mode-diary-1-practical-notes-hc5

This content has been curated and summarized for Code Crafts readers.