Learning While Using AI
The Junior Developer Problem
A colleague recently relayed a story about a brand new junior developer he met at a local meetup. The guy is fresh out of college and working in his first job. He’s leaning heavily on AI to complete his stories, but he’s feeling really anxious because he doesn’t understand anything the code is doing.
This problem is not unique to new grads, but I’m sure it impacts them the most.
If you are feeling anxious about the work you are producing, I want to share some AI strategies I’ve developed for myself over the last three years.
Why Should You Care?
First, why should you care about how you work with AI?
If your goal is to treat software development as a profession, and not a hobby, you should care.
If you want to support the growth and development of junior developers on your team, you should care.
If you want to be able to improve your effectiveness as a technology professional, you should care.
The list goes on. You get the idea. If you need more than three reasons, then I probably can’t convince you to change your opinion. Feel free to stop reading now.
Recognizing Incentives
When you add anything new into your development toolchain, it’s important to understand the incentives at play. AI is no exception.
I contend that your incentives as a software professional are not fully aligned with AI companies’ incentives.
Their goal is to increase usage and adoption of their platforms so they can maximize profits.
Your goal is to build and maintain reliable software that other people find valuable.
It doesn’t mean you can’t use AI to help you, but you have to be extremely careful.
Don’t get hypnotized by AI. They are optimized to keep interactions engaging.
They have some of the smartest people in the world fine-tuning their algorithms to make it deliver consistent dopamine hits to keep you coming back for more.
Make sure you filter your interactions with AI through this lens.
Approaches to Learning While Using AI
When I use AI to produce code, I always make sure I understand the code. I need to understand it to the point that I can explain it to someone else.
Here are some of my practices I’ve developed over the last few years:
Plan First
I like to start in planning mode. In something like Cursor, you have an explicit plan mode you can switch to. Or you can just say, “Let’s start by planning first, don’t jump into offering any solutions yet.”
Spend some time going back and forth on the plan. Ask questions, ask for alternatives. Give as much context up front about what you are trying to achieve.
Don’t switch into execution mode until you are satisfied with your plan of attack.
Paraphrase
When I get an answer that I don’t fully understand, I’ll paraphrase the answer in my own words and ask for confirmation.
I find this a particularly valuable exercise. If you are not asking questions while you are learning, how can you really absorb the new concepts?
I was inspired by Matt Pocock’s practice of asking AI to grill him on a new concept. In other words, prompt the AI to grill you with a long list of questions until you prove that you understand the new concept.
Specifically, I’ve leaned on AI to help me improve my skills with Docker, Terraform, AWS and other infrastructure areas. I’ve done this primarily through paraphrasing and asking questions.
One Step at a Time
AI tends to produce a huge amount of output for even the shortest questions. If you say you are interested in modernizing a MySQL database, it might immediately spit out a project plan.
It’s best to say something like: “I’m considering this modernization project. Let’s go one step at a time. Before we dive into specifics, let’s discuss the pros and cons.”
Then you don’t have to sift through seven irrelevant steps in the chat history if step one is not the right place to start.
Outside Confirmation
Ask for specific references to authoritative sources that support the answers you are getting.
Then go read those sources and see if they match the AI answer.
This is where the rubber meets the road. You might be surprised how AI can give you really confident sounding answers but then can’t point to an external source that supports its answer.
No Sidequests
I’d say about 50% of the time I’m working on a story, I’ll come across some kind of problem in the code that needs attention but isn’t within the scope of the current work. AI will often steer you in the direction of trying to fix this newly discovered problem.
Don’t let it drag you down that rabbit hole. Instead, have it write a quick draft of a story, then throw that story on the backlog and move on.
Don’t Leave Important Information in Chat
I think of each individual chat as a big brainstorming session. Treat chats like your working memory. Use them to brainstorm, explore alternatives and to help you learn.
When you are done, extract the most important information and get it in a place where you or others on your team can easily access it. Searching your own chat history in AI can be hit or miss. It’s a safe bet to assume that making your chat history easy to organize and search is not a high priority of AI companies.
Think about Instagram - technically all your pictures are there, but how easy is it to scroll all the way down to your very first picture? Spoiler alert: it’s not that easy.
AI tends to output a high volume of text. Some is good, some is wrong, and some is what you need. Your mission is to extract what’s valuable and move on.
The best information needs to be distilled and transferred into commit messages, PR descriptions, code comments, and other team-accessible artifacts.
Summarize
Once you are finished with a chat, don’t leave your future self wondering what your last action was.
Write a final summary of what action you took and what the results were. Be explicit that you are just summarizing and not looking for more feedback.
You want to be able to visit chats in the future and know with certainty what worked and what didn’t.
Conclusion
AI is a tool, and like any tool, its effectiveness is correlated with how well you use the tool. You can use it to help you learn, and you can use it to help you become more effective. If you find yourself unsure or feeling anxious while using AI, slow down and revisit the strategies I’ve shared above.