The company I work for has a small development team of five developers and our opinions on this matter vary widely from one colleague to another. We often have debates/discussions around software best practices, and its seems to me through this we usually end up somewhere in the middle. The product we work on is a SaaS and has been in production now for 5 years so parts of the code are in rougher shape then others. We try and schedule in time to allow us to do semi-major refactorings every few months and over the past year and a half I've really started to notice the code quality improve.
What are the communities thoughts and/or experiences on implementing software best practices in small to medium sized companies. What worked? What didn't work?