If not or if the implementation you just thought of would be >100 lines, start with the prequel article "My Advice for Programming and ML”

from https://x.com/jsuarez5341/status/1943692998975402064