09 — How to Ask and Get Help

The single highest-leverage skill in this whole roadmap is asking a well-formed question. A good question gets a senior-engineer answer in an hour. A bad question gets ignored, mocked, or — worst — gets a plausible-sounding wrong answer that costs you a day of debugging. This file is the discipline.

The MCVE — Minimal, Complete, Verifiable Example

Every question you post must include an MCVE. The rules (from stackoverflow.com/help/minimal-reproducible-example, still the canonical statement):

  • Minimal: strip everything not related to the bug. A 30-line file, not 300.

  • Complete: someone should be able to copy-paste and compile immediately. Include all #includes, all main(), all the input data or a way to generate it.

  • Verifiable: you actually ran it and confirmed it reproduces the problem.

  • Reproducible: state the compiler + version + flags. gcc 15.2, -std=c17 -Wall -Wextra -O2 -g -fsanitize=address.

Save these as a template in your notes. Every help request re-uses this scaffolding.

The full question template

### What I'm trying to do
[one sentence goal — not "make this work" but "reverse a linked list in place"]

### What I expected
[specific expected output]

### What actually happened
[literal output, or the exact error message]

### The MCVE
```c
[your minimal code here]

Compile & run

$ gcc -std=c17 -Wall -Wextra -O2 -g -fsanitize=address foo.c -o foo
$ ./foo
[paste the output]

What I’ve already tried

  • Ran under -fsanitize=address: [what it said]

  • Ran under valgrind: [what it said]

  • Stepped through in gdb; the value of x at line 42 was [N], but I expected [M].

  • Searched cppreference for strncpy; docs say [X], my usage looks like [Y].

Environment

  • OS: macOS 15.3 / Ubuntu 26.04

  • Compiler: gcc 15.2.0

  • Standard: -std=c17


Post this on r/C_Programming or TCCPP Discord and you will get real help. Post "my code doesn't work help pls" and you will get silence.

## Show your gdb session

If the bug is a segfault or wrong value, include a gdb transcript:

$ gdb –args ./foo input.txt (gdb) run Program received signal SIGSEGV, Segmentation fault. 0x000055555555518a in reverse (head=0x0) at foo.c:23 23 node->next = prev; (gdb) print node $1 = (struct node *) 0x0 (gdb) bt #0 reverse (head=0x0) at foo.c:23 #1 0x0000… in main () at foo.c:42


This says "I've done my homework." It also 80% of the time surfaces the bug in the act of writing the transcript.

## Debugging checklist before you post

Run through this before hitting Post:

1. Compile with `-Wall -Wextra -Wpedantic -Werror`. Fix every warning.
2. Compile with `-fsanitize=address,undefined`. Run again. Fix every issue.
3. Read your code aloud. Rubber-duck it.
4. Search Google `site:reddit.com/r/C_Programming <error message>` and `site:stackoverflow.com <error message>`.
5. Check the man page for every function you're using — literally re-read it.
6. `git diff` since the last known-working commit. What changed?
7. Ask a friend to look at it for 3 minutes.

If after all seven you still can't figure it out, *now* you post.

## When to switch from community to paid mentor

Community help is best for:
- Specific bugs
- "Is this idiomatic?" reviews
- Standards-lawyer questions

Community help is *not* good for:
- Multi-month project mentorship
- Career navigation
- "Am I ready to study for X company?"

For those, you want a 1:1 mentor. Options in mid-2026:
- **MentorCruise / Codementor** — paid, mixed quality; study the mentor before committing.
- **Ask a senior at Zoho** — free, high-quality, aligned with your career. Do this first.
- **Reach out to a blogger you respect** (Wellons, Sanglard, etc.) with a specific short question — respect their time; do not ask for ongoing mentorship. Sometimes they respond; usually they don't; that's fine.

## The specific way to *not* get flamed on r/C_Programming

- Do not post "which is better, C or C++?" — closed instantly.
- Do not post "which IDE / editor / OS should I use?" — search the wiki.
- Do not post "roast my code" without specific questions.
- Do not post ChatGPT-generated code and ask why it doesn't work. The mods will spot it and lock the thread.
- Do post: "I'm trying to X, wrote Y, got Z, tried A/B/C, stuck. MCVE below."

## What most people get wrong about asking for help

They think asking is a sign of weakness. The opposite: *asking well* is a sign of maturity. A senior engineer who has spent 8 hours stuck and writes a clean, well-scoped question earns respect. A junior who tries to hide the fact that they're stuck for three weeks loses it. Ask early. Ask well. Move on faster.

*Return to [README.md](./README.md) · Next: [../11_tools_setup/README.md](../11_tools_setup/README.md)*