Currently Available: Need a skilled Software Developer for your next project?
Categories
LLM

Pick Your Fights: A Pragmatic Approach to Coding with AI

Parents learn to "pick their fights," understanding that not every small disagreement warrants a battle. This wisdom translates remarkably well to the realm of AI-assisted coding.

The Pragmatic Approach

Experience with AI coding assistants teaches us that adapting non-critical aspects of our codebase to match AI preferences often proves more productive. This isn't a compromise on quality or best practices - it represents an optimization of the collaboration between human and machine.

The key lies in identifying which differences truly matter. Structural choices that affect code quality, maintainability, or team productivity demand persistence. These areas justify the effort of repeatedly correcting the AI or maintaining detailed prompt rules.

But many differences are superficial. The location of a component in the file hierarchy rarely impacts functionality. In such cases, adapting to the AI's preferences can eliminate friction and speed up development. The time saved by not fighting these battles compounds with each interaction.

The Core Principle

In parenting, the concept helps maintain a balanced relationship and focuses energy on truly important issues. The same logic applies to working with AI coding assistants. These tools come with their own quirks and peculiarities - patterns of behavior that might not perfectly align with our preferences or existing practices.

Real-World Example

Consider this common scenario: AI models often hold fixed assumptions about component file structures. They'll consistently reference a component at /Components/PrimaryButton.vue when your actual path might be /Components/Buttons/PrimaryButton.vue. You can correct this behavior, but the AI tends to revert to its default assumption, especially during longer conversations or when handling complex contexts.

This situation presents two paths:

  1. Maintain a prompt rules file that you apply in every interaction
  2. Adapt your project structure to match the AI's assumptions

Building an AI-Friendly Codebase

Think of AI preferences as another set of constraints in the development process. Just like we optimize code for various factors, we can optimize for AI collaboration. The process begins with observation - noting how the AI structures code and where these patterns differ from our preferences.

The critical step comes next: evaluating the importance of each difference. This evaluation should focus on concrete impacts rather than personal preferences. Does the difference affect maintainability? Will it confuse team members? Does it create technical debt?

Strategic Decision Making

The most effective AI collaboration doesn't stem from perfect alignment with our preferences. It emerges from a pragmatic balance between adaptation and assertion. The goal isn't to make the AI conform to every aspect of our style - it's to create a productive partnership that enhances our development process.

The Long Game

This strategic approach to AI collaboration yields compound benefits. By reserving our attention for meaningful differences, we:

  • Maintain higher productivity through reduced friction
  • Focus our energy on architectural decisions that genuinely matter
  • Create faster feedback loops between human and machine
  • Reduce cognitive load in day-to-day development
What I'm building

Delegate tasks. Get software.

Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.

Take a look at vroni.com

Subscribe to my newsletter

Get new posts when I publish them.

I respect your privacy. Unsubscribe at any time.

Leave a Reply

Your email address will not be published. Required fields are marked *