The best codebases are designed not just for what you need to do right now, but for easy extension to what you might want to do in the future. Hard part is minimizing the complexity paid today in exchange for the future optionality. Best way to learn—get it wrong a few times.