One thing I've noticed as I've got more experienced was that when I started out, a PM or senior engineer would give me a task to do.
I achieved the outcome, mostly with bad to average code that slowly improved over time.
When I finally understood the domain to make bigger scoped decisions, I started doing design docs beforehand and my code continued to improve greatly.
Now when assigning out work to more junior engineers I find myself giving them a high-level design doc, with some detail missing, they deliver higher quality work than I did at that stage, and they also seem to upskill faster.
This however depends on me making the right decisions at this stage, which is not always the case, so not fool-proof but an overall software quality improvement has definitely occured.
I achieved the outcome, mostly with bad to average code that slowly improved over time.
When I finally understood the domain to make bigger scoped decisions, I started doing design docs beforehand and my code continued to improve greatly.
Now when assigning out work to more junior engineers I find myself giving them a high-level design doc, with some detail missing, they deliver higher quality work than I did at that stage, and they also seem to upskill faster.
This however depends on me making the right decisions at this stage, which is not always the case, so not fool-proof but an overall software quality improvement has definitely occured.