This works for programming as well. I’ve spent countless hours reimplementing things or cloning things just to learn how they work. Sometimes mine is better than the original, sometimes it’s not. But regardless, I learn a lot along the way and occasionally get to teach something as well. It’s a great way to learn new languages, new concepts, new systems.