My Odyssey into AI experiments continues, welcome to a new episode this week π
The theme of this week is:
Let AI write as much as possible, manual code should rarely become necessary, or you are doing something wrong π
Let's see how did I get here π
Recap of the past episodes
I have been going left/right, up/down, all the way on one side and then the other with AI.
Like this, more or less:
I went the extremes: projects with all AI, projects with some manual clean ups, projects mostly manual with AI suggestions.
In any case, one fact is certain:
AI write and reads code faster that you ever will ππΌββοΈ
And in fact, most times, with the right prompt and bounds, AI writes even better than you would (it has more context after all, reading all that code).
Quality In, Quality Out
All the way to today, with another hypothesis and another experiment:
If AI can read and write faster, if it has the right sources to reference, it can copy/adapt them and come up with something that works, no matter how hard the task π€
I picked a bounded task for this: ECS (Entity Component System).
If you've been following the newsletter for a while, this has been a recurring topic a while ago (here) π
The experiment went as follows:
- Bevy is a Rust game engine that implements an interesting ECS model
- Effect (v4) has great internal TypeScript library code
Two great sources to "copy", in two adjacent domains.
Let's see how AI ports the core of Bevy in an Effect-inspired TypeScript library πͺ
AI joins your team, but you are the coach
I had 3 powerful players in my team:
- Fast AI
- Concepts and ideas from Bevy
- Structure and type safety of Effect
Alone, those will not work well. You, the expert developer, are the coach that puts together a winning team ποΈ
I cloned both the Bevy and Effect repository locally, and started prompting AI for the porting.
I have enough familiarity with the internals of effect and the concepts of Bevy and ECS to understand the domain, and have a strong debate with AI π€
And, well, it went really well π
Don't prompt less, prompt better
My new main takeaway from this:
AI writes fast, and it can write well.
You job is to ensure AI has all it needs to write well π
You should do whatever you can to increase your confidence in AI-authored code.
In this week experiment, the AI had a clear goal (by inspecting how Bevy does it) and a clear example of great implementation (Effect internals).
My "expertise" on top then helped to define bounded tasks and steer important product/API decisions. As well as making sure strict roadblocks are in place, and correct (testing).
You are the manager of AI: make sure it has everything it needs to do great work π«‘
Same statement as last week: you still need engineering expertise to use coding AI
The magic is in the details, and you steering AI in the right direction, and keeping it on track ππΌββοΈ
See you next π
