Proper AI Coding Assistant Usage
AI Coding Assistants
Something I've been fascinated by for a few months now it trying to figure out how to best use these AI Coding assistants. Obviously this technology is new and will not have years of "expert" advice on it, but I haven't seen a lot of discussion around this. It seems to vary widely from person to person. And if you search on YouTube you get a lot of influencers trying to "one shot" their Software Development which seems to miss the point.
Some questions or observations:
- Does it change based on level of engineering (intern, entry level, senior, principal, etc?)
- Does it change based upon the work being done? Prototype or proof of concepts vs bug fix vs production system.
- Does it change based upon the type of activity?
- Planning
- Coding features
- Writing tests
- Troubleshooting
- Writing documentation
- Does it make you faster?
- Does it make you a better engineer?
Early Experiences
Early on when I was toying with the assistants, there was a lot of excitement. It felt like a new age of technology was starting (like when first discovering "the internet"). I thought and still think that AI assistants, at least in terms of being used by Software Developers, can have many useful roles.
- Assistant: Writing boilerplate code. Sumarizing code.
- Mentor: Explaining code or concepts. This is great because you can highlight exactly what you want explained, and it can have context around what you are asking to give you a great answer right there!
- Coworker: I've had some success asking it to take a first pass at something while I am building and manually testing something else. Or I will have it write most or all of the code in a language or on a feature that I don't want to use up bandwidth on for myself.
I do feel like the biggest advice I can give on being successful is to be a good engineer in general. Break things down into steps, be specific, and review and test often. I think for me this makes the process seem more like working together and using the assistant like a very nice tool instead of it doing all the work and me handing in someone elses homework as my own.
The best part about this stuff is, the AI can help you do all of those steps too! Perhaps the biggest thing I enjoy right now is that it has removed the friction of getting a project or story started! It will help me put together a plan that we can review, it will help me set up the project with really solid scaffolding so I can get some inertia going quickly!
Finding the Right Balance
So early on it was exciting and it felt like I was getting a lot done and working with the tool. But lately I've starting running into this feeling like I finally stepped over the line. This is the feeling I get when I am sitting there asking the assistant to do something, then waiting 2-5 minutes for it finish, testing it out quickly, and then asking it to fix something or having it do all the troubleshooting when I probably could have looked at the 2 or 3 files it was editing and found the problem on my own in a few minutes. At this point it feels like I am more of a project manager in a standup meeting or a less experienced engineer copying and pasting things from stack overflow without understanding what is going on. And it feels wrong. It feels like this is where the skill atrophy would come in and the longer it goes on the easier it would be to say "Why are we paying you again? We could just ask the AI the same things!"
So I think I need to take a few steps back before that and remember:
Guidelines I Follow
- Being the orchestrator is great! Getting a lot of things going with high quality quickly feels good (but ALWAYS review the code, ask questions, and ask about alternatives especially in regards to clarity, performance, and security).
- NEVER CHECK IN OR SUBMIT CODE that isn't up to the standards you would submit when doing 100% on your own.
- You should know roughly what the assistant will generate or anticipate it, because it is a time saving tool for things you are already good at. If not, and it is not throwaway code then you probably should find some time to switch back and forth between having the assistant help you along and coding on your own to learn and keep up your skills!
- Codings assistants are GREAT for helping with things you may not have loved doing in the past - such as writing unit tests, writing or update documentation, or setting up scripts to make your dev process smoother. But remember to always review! And ask questions!
Final Thoughts
Anyways, that is where my thoughts are now. But much like the ambiguity over the years on coding style and standards in University and various jobs (which certainly has led to imposter syndrome all over the place) it is hard to tell if this is "the best" practice or what others think!
Note: AI was used to help format this post and break up my wall of text into readable sections, but all content is 100% my own rambling text typed out by hand.