> I don’t think I’ve heard of elegant code leading to discovery on its own.
Every software design pattern came from elegant code. People wrote code, summarize code, learnt from code, and taught code. That's discovery