‘Architect first, then engineer.’
This is the biggest lesson, I’ve learned over the years. If you spend time understanding how things hang together, the engineering comes naturally. If you do it the other way, you build Rube Goldberg machines. I’ve built my share of those, so I now spend time up front architecting, or refactor as soon as I find a better architecture.