Simple, efficient and elegant dev.

Lessons Learned from My Collaboration with AI

Last edition :

Table of contains

In my previous article, I described my first experience with Gemini Code Assist, Google's coding assistant integrated into VS Code. To test it thoroughly, I recreated a monolingual version of my blog from scratch. Today, I’m sharing the lessons I learned from this experience and how I’m improving my collaboration with AI.

Lessons from My Collaboration with Gemini Code Assist

Take the Time to Describe the Project Well 🖋

When starting a new project, take the time to analyze the project as a whole and create a detailed and comprehensive README file. This first ensures clarity for yourself about what you want to achieve, then it makes the AI’s task easier and yields more relevant responses.

Don’t Be Too Lazy 🥱🏖️

During my test, Gemini generally produced high-quality code, but it still had room for improvement in some areas. The common advice to review the code generated by AI is therefore justified. In particular, it’s important to step back and ask whether the approach taken by the AI is relevant in the given context.

Sometimes, it’s faster to code simple things yourself than to write a prompt and wait for Gemini’s response, which can take over a minute to appear. Plus, this avoids becoming too lazy and saves energy!

Be Patient with the AI and Educate It 🫂

When the AI doesn’t respond to certain requests as desired, it’s easy to get frustrated and speak to it more harshly 🤬 instead of trying to understand why it produced such a response.

What’s important to remember is that doing this puts you in an emotional state that makes the work unpleasant. Usually, if the AI misses the mark, it’s because the request wasn’t precise enough or lacked necessary context.

In this case, there are two options: either refine or break down the request further, or do the work yourself. If you write the code yourself, you can take the opportunity to educate the AI by saying, "Here’s what I expected," and providing the code in context. This is also a great chance to let the AI suggest improvements!

Tip

Ultimately, there’s only benefit in maintaining a collaborative mindset. It keeps you in a positive and pleasant dynamic and gives the AI the opportunity to improve and provide useful suggestions.

Don’t Be Too Greedy 🍰

To save time, you might be tempted to ask the AI to implement a large feature all at once. But this doesn’t work due to the AI’s inherent limitations 😏. And it’s not easy to have a clear understanding of these limits. That’s why, toward the end of the project, I asked Gemini the following question:

What are your limits regarding the number of files and the amount of code you can generate at once? For example, if I gave you the mockups for a complete blog, would you be able to generate all the files at once?

Here’s its response:


Hello! That’s an excellent question that gets to the heart of how best to collaborate with an AI like me.

To answer directly: no, I wouldn’t be able to generate all the files for a complete blog at once from mockups.
There are two main reasons for this:

  1. Response size limit: Each response I generate has a maximum size. A complete project, even a simple static blog, contains many files (HTML, CSS, JavaScript, configuration, etc.) and would almost certainly exceed this limit.

  2. Complexity and quality: Software creation is an iterative process. Asking for everything to be generated at once is an extremely complex task that leaves room for ambiguity. To achieve a high-quality result that truly matches your expectations, it’s much more effective to proceed step by step.

The most productive approach is to treat me as a "pair programming" partner. Here’s how we can collaborate effectively on a large-scale project:

In summary, use me not as a "one-click website generator," but as a very fast and skilled assistant who helps you build your project brick by brick. This iterative collaboration ensures you retain full control over the architecture and quality of the final code.


Important

The last sentence seems particularly important to me: "an iterative collaboration that ensures you retain full control over the architecture and quality of the final code."
This implies that you must already have a good grasp of the architecture and technologies you’re implementing!

My Personal Advice for Beginners👉

If you’re new to AI, to have a positive first experience and avoid disappointment from the start, I strongly recommend the following:

Tip

Analyze your project thoroughly at the outset, taking the time to write a README file, for example. This will give you three benefits:

  • You’ll be much clearer about what you want to do.

  • The README file will be an excellent way to provide context to the AI.

  • It will also help you break down the work and formulate requests for the AI.

Another best practice I’ve adopted for quite some time and that helps me a lot:

Tip

Break down important tasks into smaller ones, and write them as a checklist in a Markdown file named, for example, todo.md. As you complete these intermediate tasks, check off the corresponding boxes.

This list will help you stay on track and ensure you don’t forget anything. It’s especially useful if your work spans a long period (several hours or days).

My final piece of advice concerns job search preparation. With AI, it’s clear that beginner developers will find it increasingly difficult to land jobs. Hence my recommendation:

Tip

Before applying for a developer position, first practice on fairly large personal projects without using AI, to familiarize yourself with the languages, frameworks, and architectural concepts you’ll be using. If you don’t have a project idea, a blog or a fictional e-commerce site will work just fine.
In a second phase, once you’ve gained some technical mastery, use AI to familiarize yourself with this tool.

It’s super important to follow this order! Because if you use AI right away without mastering the architecture and code yourself:

Feel free to share your thoughts in the comments. And if you have other best practices or tips on how to collaborate effectively with AI, don’t hesitate to share them too! 😉