Reading code I perceive as "lousy" and sometimes stepping through it with a debugger has often been a great learning experience for me. Sometimes I even realize that I'm wrong, and "lousy" design decisions were actually chosen to solve some tricky problem. More often it was just written in a hurry, or written before more modern libraries were available, but reading it still helps me improve my brain's "pattern-matching engine" for next time I see something similar.