CODEKING.EU — ENGINEERING NOTEBOOK

Coding with AI

The Workflow

Software construction using artificial intelligence requires a shift from manual typing to architectural oversight. Instead of writing every line, the focus moves toward defining interfaces and verifying logic. This approach relies on iterative prompting where the developer provides context, receives a draft, and then refines the implementation through targeted feedback loops.

Effective integration involves breaking complex tasks into small, verifiable units. Large prompts often lead to hallucinations or structural errors. By isolating functions and testing them individually, the developer ensures that the AI-generated code adheres to the intended design. This method prioritizes correctness over the speed of initial generation, reducing long-term technical debt.

Measuring Output

Evaluating AI performance requires more than just checking if the code runs. It involves measuring code quality, maintainability, and adherence to existing patterns. A successful implementation should look like it was written by a human developer following the project's specific style guides and architectural constraints without constant manual correction.

Metrics used in this notebook include the ratio of manual edits required per generated block and the frequency of logic errors found during unit testing. Tracking these data points helps determine which prompting strategies yield the most reliable results. This empirical approach moves away from intuition and toward a data-driven understanding of tool capabilities.

Common Pitfalls

One frequent issue is the tendency for models to suggest deprecated libraries or outdated syntax. Without strict constraints, the AI might provide solutions that work in isolation but fail within the specific environment of the project. Maintaining a clear context window with current dependency information is essential to prevent these regressions.

Another challenge is the loss of architectural coherence over long sessions. As the conversation grows, the model may forget earlier design decisions or naming conventions. Managing the context through frequent summarization or by providing explicit system instructions helps maintain a consistent codebase throughout the entire development lifecycle of the application.

Practical Application

The notes provided here are based on actual code executed in real-world scenarios. Each entry documents a specific problem, the prompt used to solve it, and the resulting code. This transparency allows other developers to see the raw results of these experiments rather than polished marketing claims or theoretical possibilities.

The goal is to build a repository of proven patterns that work for shipping software. By studying these documented failures and successes, developers can refine their own prompting techniques. Check the recent entries in the notes section to see the latest experiments with automated unit test generation.

Questions

Is this a tutorial?

No, this is a working notebook documenting actual experiments and measurements taken during software development.

Does it include code?

Yes, the notebook contains specific code snippets and the prompts used to generate them.

Rebuilt from the archive of codeking.eu. Last reviewed 2026-10-29.