How I code with AI right now

The creator shares how they have evolved their coding workflow by deeply integrating AI tools like Cursor for project planning, execution, code reviews, and version control, emphasizing careful prompt engineering, testing, and iterative refinement to maximize productivity and code quality. They advocate treating AI-generated code as disposable while focusing on maintaining clear plans and communication, ultimately enhancing both engineering efficiency and collaboration.

In this video, the creator reflects on how their use of AI for coding has evolved significantly since their initial excitement about GitHub Copilot in 2023. They continue to use Cursor as their primary AI coding assistant but have fundamentally changed their workflows to integrate AI more effectively into planning, execution, code reviews, and version control with Git. The creator emphasizes that this video is intended for experienced software engineers looking to boost productivity with AI tools, not for beginners learning to code. They also disclose their investments in some AI companies but clarify that the video is an honest showcase of their engineering workflow rather than a paid promotion.

The creator begins by demonstrating how they start new projects using AI, emphasizing the importance of initializing projects manually to maintain control over the environment. They showcase a project idea involving multiple AI models where one generates an essay, another reviews it, and the first revises the essay based on feedback. They use Cursor’s agent mode for planning and managing the project, highlighting the benefits of work trees in Git to handle parallel branches and experiments efficiently. This setup allows them to run different AI models simultaneously on separate branches, facilitating comparison and learning.

Throughout the development process, the creator stresses the importance of reading and refining AI-generated plans before implementation. They show how they provide detailed context and instructions to the AI, including specifying type safety and file output formats. They also discuss the challenges of string formatting in AI-generated code and how they iteratively improve prompts and plans to get better results. The creator demonstrates running the project, switching models, and comparing outputs, ultimately choosing the version that balances speed, cost, and quality best.

The video also covers the use of AI tools for code reviews, mentioning platforms like Grapile and Code Rabbit. The creator appreciates having AI review pull requests to catch subtle bugs or inconsistencies before merging. They share examples of how AI helped identify issues in their code and how they use editor integrations and agent modes to fix type errors and improve code quality. The creator highlights the value of writing tests and verification harnesses to provide AI models with feedback loops, which significantly improves the reliability and correctness of AI-generated code.

Finally, the creator reflects on the broader lessons learned from integrating AI into their coding workflow. They advocate for treating AI-generated code as cheap and disposable, focusing on maintaining and refining the plan rather than the code itself. They emphasize the importance of clear communication, writing good prompts, and providing context and tests to help AI models succeed. The creator encourages developers to experiment with AI tools at their own pace, noting that mastering these workflows can also improve human communication skills and teamwork. Overall, they express enthusiasm for the productivity gains and renewed enjoyment AI has brought to their engineering work.