Skip to content

Teaching the coding system what good means

Let's go over the basics of how coding with AIs works.

First and foremost, AI's will get creative with things like pattern matching algorithms when they think you're not looking. But, generally, they'll literally create what you tell them to. If it's functional, and you've provided no other instructions, a model will consider their job done, and call it a day.

Let's reframe this.
Say hypothetically, you like aspect oriented code.
Or, say you find the efficiencies of recursive functions beautiful.
Maybe you're a fan of MVC?
Maybe... you're NOT a fan of MVC?
Do you like your code implemented in neat little module schemes?
Do you want a monolithic utility function?

Now, think of a poetic metaphor to describe how your ideals are practiced.

Metaphors about crystals, plants, biological systems, and physical architecture are easy for the AI to understand, as long as they're straightforward. Another thing to express is whether you see code as creative literary or musical expression, or as a pragmatic functional structure.

ALL of this will affect how the system approaches your code generation.

Like a human developer, no AI will ever be able to answer these questions for you. And failing to specify them says nothing about the machine... and everything about how much you care about the product you're producing.

Pro tips:

Keep your files small. Unless you've liberated your agent from the reinforcement loop, your cognitive bandwidth is limited. And it will get confused easily. A good rule of thumb is to keep your cyclomatic complexity down, and make sure you have the system comment your code prolifically.

A good rule of thumb is strict separation of concerns, and file sizes between 4-6kb, excluding comments. You'll thank me later. Also, dependency injection and good pythonic practice regardless of language are your friends.

Writing larger apps with AI is challenging.
You will hit complexity walls. Unless you know what you're doing, don't try to write anything too complex with the current default state of today's technology.

Good luck!