08 — AI Assist for C: The Honest Policy

You are an Applied ML engineer. You know how LLMs work. That knowledge should make you more skeptical of AI-generated C, not less. This file is the policy for the next 13 months. Follow it, and AI will accelerate you. Ignore it, and AI will convince you you’re learning while it does the learning for you.

The one rule

Translate never. Explain always.

  • Explain always: paste unfamiliar C into Claude/ChatGPT and ask “what does this do, line by line?” Ask about UB. Ask about the standard. Ask for the mental model. This is legitimate scaffolding.

  • Translate never: do not describe a problem in English and paste the generated C into your project. Not for the next 12 months. In month 13 you can re-evaluate.

The reason: your goal is to internalize C, not to ship C features. Every function you have AI write is a function you did not write, did not debug, and did not understand. Compound over 13 months and you will be an English-to-C translator, not a C engineer.

Where each tool is honest and where it lies

GitHub Copilot (inline autocomplete)

Honest at: local completions (finishing a for loop, filling in a printf format after you’ve already written 90% of the line).

Lies at:

  • size_t vs ssize_t — flips them.

  • Ownership semantics — will strdup and forget the free.

  • Standard versions — mixes C89/C99/C11 idioms in the same function.

  • Rare libc functions — confidently invents strlncpy, memfree, etc.

Policy: disable Copilot for C for the first 6 months of the roadmap. Enable for markdown/comments only. Re-evaluate at M7.

Claude (chat) / ChatGPT (chat)

Honest at:

  • Explaining a piece of code you paste.

  • Rewriting a K&R paragraph in modern prose so you can double-check your understanding.

  • Deriving latency numbers, memory layout, cache line behavior.

  • Generating test inputs (“give me 20 edge cases for a function that parses IPv4 addresses”).

  • Reading a stack trace and pointing at likely causes.

  • Rubber-ducking (“here’s my design, poke holes in it”).

Lies at:

  • Complete function generation on non-trivial C.

  • Anything involving specific glibc/musl behavior differences.

  • Portable code across compilers (will always give gcc-flavored answers).

  • Race-condition analysis (surprisingly bad).

Policy: use as tutor and rubber duck. Never paste generated code into your project unmodified. If you do use a snippet, retype it (this forces you to read it).

Cursor (AI-integrated editor)

Honest at: “explain this function in the codebase I’m reading.”

Lies at: proactive completions in C. Sometimes wonderful, often subtly wrong.

Policy: skip for the first 6 months. If you already own Cursor, disable Cmd-K generation for C files. Re-evaluate at M7.

Claude Code CLI / Codex CLI / Aider (agent-style tools)

Honest at:

  • Refactor tasks with clear tests (“add a --verbose flag to this CLI”).

  • Doc generation from working code.

  • Test scaffolding.

Lies at:

  • Anything requiring a full understanding of ownership across files.

  • Anything where the correct answer is “don’t do it that way.”

Policy: legitimate for boilerplate and refactors. Not legitimate for “write me a hash table.” You need to write your own hash table in M4-M5. That’s the whole point.

A practical daily protocol

Green (encouraged):

  • “Explain this line of my code.”

  • “Why does the compiler warn about this?”

  • “Read this gdb output and suggest what might be wrong.”

  • “Write me 30 unit-test inputs for this function.”

  • “What does the C23 standard say about _BitInt?”

Yellow (allowed, with retyping):

  • “Show me an idiomatic way to write X” — read the response, close the tab, type it yourself from memory.

  • “Review my code for bugs” — fine, but treat every suggestion as a hypothesis to verify with -fsanitize or gdb.

Red (avoid until M13):

  • “Write me the sockets code for X.”

  • “Implement the whole file.”

  • Inline autocomplete in your editor for C.

  • Copy-pasting AI output without reading it.

The self-audit question

Every Friday, ask: “In this week’s C output, how many lines did I write from my own head, and how many did I paste from an LLM?” If the answer is more than 20% LLM, you learned less this week than you think.

Where Applied ML background works against you

You will be tempted to use AI heavily because your ML instincts say “more data / more compute / bigger context wins.” For learning C, this instinct is wrong. The signal you need is your own hands compiling, failing, and debugging. An LLM can shortcut that, and the shortcut is the anti-learning path.

What most people get wrong about AI for C

They believe the pitch “AI writes code for you.” It does. But the goal of this roadmap is not to have code; it is to be someone who can write and debug code. An LLM cannot debug for you at 2 AM on a call with a customer. The pitch sentence at the top of this roadmap says: “I can debug someone else’s segfault at 2 AM without flinching.” That skill is trained by segfaulting your own code, in gdb, at 11 PM, alone. AI can be your tutor. It cannot be your reps.

The M13 re-evaluation

By month 13, if you have followed the policy, you will:

  • Read AI-generated C critically and catch its lies.

  • Use AI deliberately for boilerplate you understand.

  • Have earned the right to move faster with AI, because you know when it’s wrong.

That is the correct end-state. Delay gratification for 13 months.

Return to README.md · Next: 09_day_one_setup_script.md