# xiaolai/the-craft-of-selfteaching architecture

> Architecture diagram of the GitHub repository xiaolai/the-craft-of-selfteaching, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/xiaolai/the-craft-of-selfteaching
- Repository: https://github.com/xiaolai/the-craft-of-selfteaching

## Overview

This repository is a Chinese-language book about learning to teach yourself, using Python as its practical learning path. A reader starts with the rationale and preparation, studies Python concepts, practices writing and refining code, then moves into advanced topics and broader self-directed learning. The README establishes the chapter order and describes a parallel Markdown edition; the graph groups chapters into that learning progression rather than implying software-runtime calls. Source sampling was limited, so the map reflects documented content, not execution behavior.

Main entry points: [`01.preface.ipynb`](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/01.preface.ipynb) (Preface), [`02.proof-of-work.ipynb`](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/02.proof-of-work.ipynb) (Proof of reading), [`Part.1.A.better.teachyourself.ipynb`](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.A.better.teachyourself.ipynb) (Learning to self-teach), [`Part.1.B.why.start.from.learning.coding.ipynb`](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.B.why.start.from.learning.coding.ipynb) (Coding as entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_approach["Self-teaching approach"]
  node_preface["Preface<br/>[01.preface.ipynb]"]
  node_proof["Proof of reading"]
  node_selfteach["Learning to self-teach"]
  node_coding["Coding as entry"]
  node_reading["Learning by reading"]
  node_preparation["Preparation"]
end

subgraph group_foundations["Python foundations"]
  node_python_entry["Python entry"]
  node_python_basics["Core Python"]
  node_python_control["Control and functions"]
  node_python_data["Strings and containers"]
  node_python_files["Files and references"]
end

subgraph group_practice["Practice and craft"]
  node_practice["Deliberate practice"]
  node_functions["Writing functions"]
  node_function_tools["Function tools"]
  node_modules_testing["Modules and testing"]
end

subgraph group_advanced["Advanced learning"]
  node_classes["Classes and objects"]
  node_language_tools["Language tools"]
  node_decomposition["Breaking problems down"]
end

subgraph group_continuation["Next steps"]
  node_social_learning["Social self-teaching"]
  node_focus["Focus and communication"]
  node_next["What comes next<br/>[S.whats-next.ipynb]"]
end

node_reader(("Reader"))
node_markdown_edition["Markdown edition<br/>[README.md]"]

node_reader -->|"begins reading"| node_preface
node_preface -->|"continues to"| node_proof
node_proof -->|"continues to"| node_selfteach
node_selfteach -->|"continues to"| node_coding
node_coding -->|"continues to"| node_reading
node_reading -->|"continues to"| node_preparation
node_preparation -->|"continues to"| node_python_entry
node_python_entry -->|"continues to"| node_python_basics
node_python_basics -->|"continues to"| node_python_control
node_python_control -->|"continues to"| node_python_data
node_python_data -->|"continues to"| node_python_files
node_python_files -->|"continues to"| node_practice
node_practice -->|"continues to"| node_functions
node_functions -->|"continues to"| node_function_tools
node_function_tools -->|"continues to"| node_modules_testing
node_modules_testing -->|"continues to"| node_classes
node_classes -->|"continues to"| node_language_tools
node_language_tools -->|"continues to"| node_decomposition
node_decomposition -->|"continues to"| node_social_learning
node_social_learning -->|"continues to"| node_focus
node_focus -->|"continues to"| node_next
node_reader -.->|"reads edition"| node_markdown_edition

click node_preface "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/01.preface.ipynb"
click node_proof "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/02.proof-of-work.ipynb"
click node_selfteach "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.A.better.teachyourself.ipynb"
click node_coding "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.B.why.start.from.learning.coding.ipynb"
click node_reading "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.C.must.learn.sth.only.by.reading.ipynb"
click node_preparation "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.D.preparation.for.reading.ipynb"
click node_python_entry "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.E.1.entrance.ipynb"
click node_python_basics "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.E.2.values-and-their-operators.ipynb"
click node_python_control "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.E.3.controlflow.ipynb"
click node_python_data "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.E.5.strings.ipynb"
click node_python_files "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.E.7.files.ipynb"
click node_functions "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.2.C.why-start-from-writing-functions.ipynb"
click node_function_tools "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.2.D.1-args.ipynb"
click node_modules_testing "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.2.D.6-modules.ipynb"
click node_classes "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.3.B.1.classes-1.ipynb"
click node_language_tools "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.3.B.3.decorator-iterator-generator.ipynb"
click node_decomposition "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.3.C.breaking-good-and-bad.ipynb"
click node_social_learning "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.3.F.social-selfteaching.ipynb"
click node_focus "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.3.H.prevent-focus-drifting.ipynb"
click node_next "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/S.whats-next.ipynb"
click node_markdown_edition "https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/markdown/README.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_preface,node_proof,node_selfteach,node_coding,node_reading,node_preparation toneBlue
class node_python_entry,node_python_basics,node_python_control,node_python_data,node_python_files toneAmber
class node_practice,node_functions,node_function_tools,node_modules_testing toneMint
class node_classes,node_language_tools,node_decomposition toneRose
class node_social_learning,node_focus,node_next,node_reader toneIndigo
class node_markdown_edition toneTeal
```

## Components

### Self-teaching approach

- [Preface](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/01.preface.ipynb): `01.preface.ipynb`
- [Proof of reading](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/02.proof-of-work.ipynb): `02.proof-of-work.ipynb`
- [Learning to self-teach](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.A.better.teachyourself.ipynb): `Part.1.A.better.teachyourself.ipynb`
- [Coding as entry](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.B.why.start.from.learning.coding.ipynb): `Part.1.B.why.start.from.learning.coding.ipynb`
- [Learning by reading](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.C.must.learn.sth.only.by.reading.ipynb): `Part.1.C.must.learn.sth.only.by.reading.ipynb`
- [Preparation](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.D.preparation.for.reading.ipynb): `Part.1.D.preparation.for.reading.ipynb`

### Python foundations

- [Python entry](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.E.1.entrance.ipynb): `Part.1.E.1.entrance.ipynb`
- [Core Python](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.E.2.values-and-their-operators.ipynb): `Part.1.E.2.values-and-their-operators.ipynb`
- [Control and functions](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.E.3.controlflow.ipynb): `Part.1.E.3.controlflow.ipynb`
- [Strings and containers](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.E.5.strings.ipynb): `Part.1.E.5.strings.ipynb`
- [Files and references](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.1.E.7.files.ipynb): `Part.1.E.7.files.ipynb`

### Practice and craft

- **Deliberate practice**
- [Writing functions](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.2.C.why-start-from-writing-functions.ipynb): `Part.2.C.why-start-from-writing-functions.ipynb`
- [Function tools](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.2.D.1-args.ipynb): `Part.2.D.1-args.ipynb`
- [Modules and testing](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.2.D.6-modules.ipynb): `Part.2.D.6-modules.ipynb`

### Advanced learning

- [Classes and objects](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.3.B.1.classes-1.ipynb): `Part.3.B.1.classes-1.ipynb`
- [Language tools](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.3.B.3.decorator-iterator-generator.ipynb): `Part.3.B.3.decorator-iterator-generator.ipynb`
- [Breaking problems down](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.3.C.breaking-good-and-bad.ipynb): `Part.3.C.breaking-good-and-bad.ipynb`

### Next steps

- [Social self-teaching](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.3.F.social-selfteaching.ipynb): `Part.3.F.social-selfteaching.ipynb`
- [Focus and communication](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/Part.3.H.prevent-focus-drifting.ipynb): `Part.3.H.prevent-focus-drifting.ipynb`
- [What comes next](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/S.whats-next.ipynb): `S.whats-next.ipynb`

### Other components

- **Reader**
- [Markdown edition](https://github.com/xiaolai/the-craft-of-selfteaching/blob/master/markdown/README.md): `markdown/README.md`

## Connections

- Reader → Preface: begins reading
- Preface → Proof of reading: continues to
- Proof of reading → Learning to self-teach: continues to
- Learning to self-teach → Coding as entry: continues to
- Coding as entry → Learning by reading: continues to
- Learning by reading → Preparation: continues to
- Preparation → Python entry: continues to
- Python entry → Core Python: continues to
- Core Python → Control and functions: continues to
- Control and functions → Strings and containers: continues to
- Strings and containers → Files and references: continues to
- Files and references → Deliberate practice: continues to
- Deliberate practice → Writing functions: continues to
- Writing functions → Function tools: continues to
- Function tools → Modules and testing: continues to
- Modules and testing → Classes and objects: continues to
- Classes and objects → Language tools: continues to
- Language tools → Breaking problems down: continues to
- Breaking problems down → Social self-teaching: continues to
- Social self-teaching → Focus and communication: continues to
- Focus and communication → What comes next: continues to
- Reader → Markdown edition: reads edition
