- Posted on
- • Tips
Good coding prompt example
- Author
-
-
- User
- maintainer
- Posts by this author
- Posts by this author
-
Found on simonwillison.net
I think this is a really, really good example for an initial coding prompt:
Do a research spike to see what it would take to build a library with the same core API as SQLite-utils - in particular the insert and upsert and insert_all and upsert_all and create and update methods, and the table introspection stuff - but backed by SQLalchemy so it works for multiple database engines
Test against PostgreSQL and SQLite and duckdb
Use ~/dev/sqlite-utils for reference
Create a git repo for this and commit and early and often - use uv init to start the project - use red/green TDD and pytest, see ~/dev/django-sql-dashboard for one idea as to how the PostgreSQL tests could work
Please check also:
AI is removing the middle class of software engineering
You can't afford bad engineers anymore
There are no lossless transformations of natural-language text
It is your responsibility to make sure that the entire document is representative of your own thoughts before you share it. If a reviewer asks, “What did you mean by this line?”, it’s not acceptable to reply with “Oh sorry, AI wrote that, just ignore it.”
-
if you are a negative coefficient, expect negative gains
You Need AI That Reduces Maintenance Costs
your AI coding agent, the one you use to write code, needs to reduce your maintenance costs. Not by a little bit, either. You write code twice as quick now? Better hope you’ve halved your maintenance costs. Three times as productive? One third the maintenance costs. Otherwise, you’re screwed. You’re trading a temporary speed boost for permanent indenture.
-
Semantic anchors are well-defined terms, methodologies, and frameworks that serve as reference points when communicating with Large Language Models (LLMs). They act as shared vocabulary that triggers specific, contextually rich knowledge domains within an LLM’s training data.
Think of them as shortcuts to rich context - instead of explaining a complex methodology from scratch, you can invoke a semantic anchor and the LLM will activate its entire knowledge base about that concept.For Example, Instead of saying:
Write tests before writing code, use mocks to isolate dependencies, and design from the outside in.You can say:
Use TDD, London School approach.The LLM understands this and activates:
- Mock-heavy testing methodology
- Outside-in development approach
- Interaction-based verification
- The teachings of Steve Freeman and Nat Pryce
- Designing through collaboration tests first
The only safe way to run agents at any risk of an adversarial attack is within a sandbox
Breaking Claude Code Opus 5 and automode- Run unattended coding agents in a container, VM or OS sandbox.
- Restrict network egress. Monitor your agents.
- Do not expose home directories, SSH keys, cloud credentials,… to the agent runtime.
- Use explicit ask/deny rules around process creation and sensitive paths.
- Do not treat an Auto Mode approval as evidence that code is safe.