Programmers often discover solutions while explaining a problem to someone else, even to people with no programming knowledge. Describing the code, and comparing to what it actually does, exposes inconsistencies. Explaining a subject also forces the programmer to look at it from new perspectives and can provide a deeper understanding.



Every single popcorn flick from the 80s and 90s has a main character make a big plot-resolving realization while doing early act 3 exposition
If this is such a universal human experience that we wrote it into movies made for general audiences, I think that programmers are not the only ones debugging to their ducks