Pedagogy: add 'writing your own module' notebook under 06_python_advanced/
- Dominant language
- Jupyter Notebook
- Stars
- 12
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
## Goal
NMISP's later chapters reuse helpers from `utils/` (e.g. `nb_file_util.py`, `symbol_converter.py`) and from per-chapter helpers like `60_linear_algebra_2/matshow.py`. But the introduction chapters never teach learners to *write their own* module — only to import existing libraries. Students reading those helpers see them as opaque infrastructure rather than as code they could write themselves.
## Scope
Create `06_python_advanced/20_writing_modules.ipynb` covering:
- A function written in a notebook cell — fine for one-off, awkward to reuse
- Move the function into a sibling `.py` file (e.g. `my_bisection.py`)
- `import my_bisection` and call from a separate notebook
- `if __name__ == \"__main__\":` guard
- Brief note on package directories with `__init__.py` (one cell, no deep dive)
- Connection back: \"this is how `utils/` and `60_linear_algebra_2/matshow.py` work\"
Concrete example: refactor a small bisection root-finder out of an inline cell into a reusable module, then call it from two different cells.
## Why
- Students currently can't read the existing `utils/` helpers as something they could have written.
- Required prerequisite for assigning any multi-notebook project.
- Sets up the scheduled-agent loop's natural unit of work — one helper module per task.
## Acceptance
- [ ] Notebook executes end-to-end.
- [ ] Companion `.py` file lives in the same folder; `import` works in Colab too.
- [ ] At least one exercise: write a small reusable utility (e.g. \"compute mean and stddev\") as a module.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the existing helpers in utils/nb_file_util.py and utils/symbol_converter.py, plus 60_linear_algebra_2/matshow.py, to match the project's teaching style. Create 06_python_advanced/20_writing_modules.ipynb and its sibling my_bisection.py, then execute the notebook end-to-end and verify the imports work in Colab and the reusable-utility exercise is included.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- content, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100