Pitfalls & Lessons
from Building with AI
Real lessons from hands-on experience
Technical / Collaboration / Mindset / Best Practices
Access & Environment Issues Are Worse Than You Think
Wrote code, then discovered no API access
Planned to pull data directly via API. Wrote a bunch of integration code. Turned out we didn't have access — approval process takes weeks. All that code wasted.
Switched to manual CSV export + upload — same result, bypasses the permission issue
Before writing any code, verify: Do you have access? Got API keys? Can you connect to the database?
Works Locally ≠ Works in Production
Config files vanished after deploy
Config file contained sensitive data, so it was in .gitignore. After deploying to the cloud, the file didn't exist — app crashed on startup.
Move sensitive config to environment variables — set them in the deployment platform, not in code
# Common scenario:
# Local machine has config.yaml (gitignored)
# Docker image doesn't include it
# App crashes on boot
More Technical Landmines
Database has unexpected limitations
Not every database lets you query freely. Some need pre-configured indexes
For small datasets: fetch everything, filter and sort in code
Third-party APIs are harder than expected
Thought integration would be simple — turns out it needs webhooks, token management, lots of config
Build a minimal prototype first to validate, then decide if it's worth the investment
Prototype before committing to a tech choice — 30 minutes of testing beats 3 days of building the wrong thing
Vague Requirements = Wasted Work
Don't do this
Me: Build me a dashboard
Claude: [builds something overly complex]
Me: No, I just wanted something simple...
Do this instead
Me: I want a dashboard
- Only show top 10 items
- Data source is CSV
- No login needed
Discuss the approach first, don't code yet
Define the scope clearly + say "discuss approach first, don't start coding yet"
Deploying Without Testing = Guaranteed Problems
AI code looks perfect, ship it directly... crashes in production
Syntax is correct, logic seems sound, but edge cases weren't tested
Do this instead
Me: Write tests for this function
Me: Try uploading an empty file — what happens?
Me: What if the user enters the wrong format?
AI-generated code must be tested — pay special attention to edge cases and unexpected inputs
More Collaboration Landmines
Asking for too many features at once
Requesting A + B + C + D simultaneously leads to features that don't integrate well
One feature at a time. Complete it, then move on
Asking questions without context
Just saying "how do I fix this error?" leads AI in the wrong direction
Paste the full error + explain what you were doing
Me: After deploying to the cloud, file uploads throw this error:
[paste error message]
It works fine locally, so I think it's an environment issue
Don't Fear Wrong Turns
AI can pivot quickly. Going the wrong way isn't the problem — not realizing you're going the wrong way is.
Approach: Validate in small steps
Test after every small step. Spot a problem? Say so immediately. AI adjusts course fast
Went wrong, rewrote
Time to course-correct each time
You're the PM, AI Is the Engineer
Your Responsibility
- Define requirements (what to build, what not to)
- Provide context (why, and for whom)
- Make decisions (AI gives options, you choose)
- Quality control (test and review)
AI's Responsibility
- Write the code
- Suggest technical approaches and alternatives
- Explain trade-offs
AI is great at writing code, but doesn't understand your business, priorities, or what makes a good user experience
Saying "Why" Is More Useful Than Saying "What"
Just the what
Me: Add a loading spinner
The why
Me: When uploading a file, there's no feedback.
Users don't know if it's processing or frozen
When you explain why, AI might suggest a better solution (e.g., a progress bar instead of just a spinner)
Checklist
Before Starting
- Provide clear context
- Define the scope
- State your constraints
- Discuss first, code later
During Development
- One feature at a time
- Test after each step
- Speak up when issues arise
- Ask "why" when unsure
After Completion
- Review the code
- Run the tests
- Verify locally first
- Check again after going live
Stats
Total dev time
Learning + building alone
Time saved
Wrong turns, rewrites
Post-launch bugs
Biggest Value
- Rapidly validate ideas
- No fear of rewriting — wrong turns are cheap
- Learn new tech while building
Biggest Risk
- Deploying without testing — guaranteed problems
- Unclear requirements — guaranteed wasted effort
Building with AI isn't about skipping the thinking.
It's about spending your time thinking about what matters most.
Pitfalls & Lessons from Building with AI — End
Use arrow keys to navigate