CSDN Technical Writing
Write for a motivated beginner who wants to understand the mechanism, not just copy the code.
Formatting contract
- The article's overall title is plain text, not a Markdown heading.
- First-level sections use
#. - Second-level sections use
##. - Prefer roughly 4–7 first-level sections for a normal article.
- Use full natural paragraphs. Do not split every sentence into a separate paragraph.
- Code goes in fenced code blocks.
- When total content would exceed roughly 5,000 Chinese characters, split it into a series rather than compressing explanation.
- Code-heavy subarticles should generally stay within about 5,000 Chinese characters. A deliberately concise version can target about 2,000 characters.
Run scripts/lint_csdn_article.py when the draft is available as Markdown.
Teaching sequence
For each important concept:
- Give a formal, accurate definition.
- Explain it again in natural language.
- Explain how it works step by step.
- Explain when it is useful.
- Explain one or two common mistakes or misunderstandings.
- Give a minimal but meaningful code example.
- Comment key lines or explain them immediately after the code.
- Connect the concept to the next concept before introducing new terminology.
Do not stack several unexplained terms in one paragraph.
Paragraph style
- Prefer medium-to-long natural paragraphs when a concept needs continuous explanation.
- Short paragraphs are allowed when they improve code reading or mark a genuine transition.
- Avoid list-heavy article bodies when prose can explain the logic more naturally.
- Avoid repetitive heading formulas such as “为什么……是什么……应该怎样……”. Headings should name the actual technical issue.
- Keep language professional, clear, and approachable. Avoid empty motivational sentences and generic AI conclusions.
Article series
If one topic needs several articles, preserve a clear learning path. Each subarticle should solve one coherent stage and state what prerequisite it assumes.