I've cut my fair share of corners to ship a product on time. Every time I somehow decide that cutting a corner is justified, I leave some comments in the code explaining why I decided to cut corners and how I think it should actually be done. I usually put something similar in the commit message.
As the company I worked for scaled from three guys to 50+ people, these comments have helped newcomers to the code base tremendously. Whenever someone encounters some not-so-great implementation, they know why and there are some pointers on how to make it better. It's been especially helpful to students/juniors we've hired that would maybe not even have figured out that the solution is sub-optimal.
It also prevents future me from coming back to some code and starting to harbor passive aggressive feelings towards past me.
As the company I worked for scaled from three guys to 50+ people, these comments have helped newcomers to the code base tremendously. Whenever someone encounters some not-so-great implementation, they know why and there are some pointers on how to make it better. It's been especially helpful to students/juniors we've hired that would maybe not even have figured out that the solution is sub-optimal.
It also prevents future me from coming back to some code and starting to harbor passive aggressive feelings towards past me.