Any coding practice or technique exists to thwart some kind of problem. The more you code, the more problems you run into, the more you remember "Oh, this is why you do X".
If you're writing one algorithm to solve one problem, it's enough to make it correct and fast, and you probably don't need to care about DRY, SOLID, YAGNI or anything else. But if it's a "real world" project, these concepts can help you change course quickly when requirements change.
FWIW I don't remember anything I read in Code Complete. Maybe it's time to skim it again.