Jul 17 (edited) • Tutorials
Reminder: Refactor your code
Inspired by the post by , I wanted to give everyone a reminder to regularly refactor your code
Over time, AI gets your code to be a mess. So you should regularly ask it to clean it up
Instead of asking AI to "refactor the code", ask it to:
  • Eliminate dead code: “Delete unused imports, variables, and functions; point out any test files that still call them.”
  • Kill duplication: “Detect code blocks duplicated ⩾ 3 times across modules; create a shared utility and update call sites.”
  • Improve architecture: "Identify features or sections of the app that could be extracted to a separate module."
You can also use these to target a specific part of the application
Note: the list is not exhaustive! Let me know if you want to know more about this
5
11 comments
Toivo Mattila
3
Reminder: Refactor your code
Vibe Coders
skool.com/vibe-coders
Master Vibe Coding in our supportive developer community. Learn AI-assisted coding with fellow coders, from beginners to experts. Level up together!🚀
Leaderboard (30-day)
Powered by