3 ms·
Don't push a commit with a new feature without tests and documentation. Even for your personal projects. I started doing this a couple of years ago and it's ha
by simonw 7y ago
Don't push a commit with a new feature without tests and documentation. Even for your personal projects.
I started doing this a couple of years ago and it's hard to overstate the positive impact this has had on my macro productivity. I can come back to a project I haven't touched in six months and instantly start productively making improvements.
Tests and documentation really are for future you.
- quicklime 7y ago+1, good tests are by far the biggest long-term productivity win, in my experience worth much more than any other tooling or process improvement. Unfortunately I've gone in the opposite direction as you. I recently moved from a company that had a good automated test culture, to one that has a culture of manually testing things, often in production. Everyone, even the senior engineers who've been around for a long time, regularly lands changes that cause prod incidents. There's actually quite a good canary/rollback system in place to deal with this, so a lot of people think everything's fine. But they don't quite realize how much more efficient things are if you can just make a change and run a test suite, and quickly have confidence that you didn't break things.
- simonw 7y agoWorking for Eventbrite really helped we with this. I was there for over five years and got to see the transition from ad-hoc testing and an often broken master to every commit passing the test suite for most teams. It got to the point where I could drop in on a project by a team in another country that I'd never encountered before, read their README, checkout their code, run the tests, make a change and submit a pull request. The big thing for me in the past couple of years has been applying the same discipline to my own personal projects and finding that even there my overall productivity improved rather than being held back by the extra work invested in testing and documentation.
- kanyethegreat 7y agoAbsolutely! I've come to the same realization. Just haven't figured out my effective documentation rules. Difficult to experiment with what works when the feedback loop is on the same magnitude of how long it takes you to forget (eg. 6 months). Best proxy I can come up with is "how can I communicate this to someone who has no context? What would they want to know?"