Ted Slocum

Absurdity, gambling, mindfulness, programming, golf, well-being, and my opinions.

Exploring an AI Development Environment: My First Project with Zed

Yesterday, I dipped my toes into the world of AI-assisted coding by completing my first project using Zed, an IDE designed to integrate AI into the development process. I’m still very much a novice with this tool, but I wanted to share some initial thoughts and questions that came up during my exploration.

Learning vs. Doing: Finding the Balance

Zed offers two main ways to interact with AI:

  1. In-line assistants: You can tell the AI to make changes directly in your file.
  2. Chatbot: You can ask the AI how to do something.

I often found myself torn between these options. It’s tempting to always say “do x” and have the AI update the file, but surely that isn’t always the right approach? I’m particularly curious about scenarios where learning might be more valuable than doing. My hunch is that in the following situations, you should opt for learning:

  • When you’re genuinely curious about how to implement something
  • When the task seems important for other parts of your code

It feels slower, and sometimes even wasteful, but I think it might be more beneficial in the long run.

The Context Puzzle

One thing that quickly became apparent is the importance of context. The more information I give the AI, the better its responses seem to be. I’m experimenting with a strategy of:

  1. Setting a comprehensive global prompt for the entire project:
Please be concise. Get to the point without any niceties. Use Vue 3, the Composition API, and the <script setup> syntax. For styling, use Tailwind CSS.

  1. Varying the amount of context I pull in to the assistant based on the scope of the question/command.

But I’m still figuring this out. When is context necessary? How much context is too much?

Styling

I generally prefer TailwindCSS over traditional CSS, but I’m wondering if CSS files might actually provide better context when asking the AI to create new stylized UI components.

Hotkeys

It feels like there are now more environment commands that you need to know than in traditional editors. You need to be able to pull snippets into the assistant, partially accept assistant suggestions, and move snippets from the chatbot into the codebase, among other tasks. I definitely need to learn some new hotkeys!

Wrapping Up

I have a feeling it’s going to take me a solid 6 months to get good at deciding when to write code and when to write prompts, and how best to do so. My first days with Zed have left me with more questions than answers, but I’m excited to continue exploring. This feels like the beginning of a significant shift in how we approach coding. I’m curious to see where it leads and how it will shape our skills as developers.