โ AI App Building (No-Code & Low-Code)
Day 3 of 14
Cursor and Windsurf โ AI-Assisted Coding
The Right Mental Model for AI Coding Assistants
Cursor and Windsurf (and GitHub Copilot, Codeium, etc.) are powerful amplifiers of your existing capability. They're not replacements for understanding the code you're shipping. The worst outcomes from AI coding tools happen when developers accept generated code without reading and understanding it โ the code looks plausible, tests pass, then a production bug reveals a fundamental flaw that would have been obvious to any reader.
Cursor's agent mode (using Claude Sonnet or Opus as the underlying model) can generate, refactor, and debug code across multiple files. The most effective workflow: (1) write a clear specification of what you want in natural language, (2) let Cursor generate, (3) read every line of generated code, (4) run tests, (5) accept. Never accept code you haven't read. Use the diff view to see exactly what changed.
Cursor context: Cursor indexes your codebase and provides relevant context to the model automatically. This is powerful but has limits โ very large codebases lose context fidelity. Use .cursorignore to exclude irrelevant files (build artifacts, vendor directories, generated files) and keep the context focused on your actual source code.
The Workflows Where AI Coding Assistants Shine
High-leverage use cases for AI coding assistants: (1) Boilerplate and scaffolding โ generating the repetitive structure of new files, API routes, component shells. This is where they save the most time with the least risk. (2) Writing tests โ generating unit and integration test cases from function signatures is reliable and fast. (3) Debugging with context โ pasting an error message and the relevant code and asking 'what's wrong here' is often faster than Stack Overflow. (4) Refactoring โ asking to refactor a specific function for readability or to extract a utility works well for contained changes.
Lower-leverage or riskier use cases: complex architectural decisions, security-sensitive code (authentication, cryptography, data access), database migrations with data transformation, and anything involving race conditions or concurrency. These require careful human review regardless of AI generation.
For Darkice Interactive's Swift/iOS codebase: Cursor with Swift support is excellent for generating SwiftUI views from design specs, writing SwiftData queries, and generating unit tests for business logic. It's less reliable for AppKit nuances, complex async/await patterns, and Apple-specific APIs that have changed recently (the training cutoff may not include the latest SDK changes).
โก Today's Action
Pick one function in your current codebase that has no unit tests. Use Cursor to generate comprehensive test cases for it. Review each test โ does it cover the edge cases you'd care about? Add any missing ones manually. This is a low-risk way to develop intuition for where AI coding assistance is reliable.
๐ก Pro Tip
Use Cursor's Chat sidebar with @Codebase to ask questions about your own code without leaving the editor. 'Where is the bathroom assessment data model defined?' or 'Show me all the places we handle authentication' โ this is faster than grep for architectural questions.