3 ms·
So, at my old job, we had 'TDD', but we weren't particularly good about it. Maybe it's because Python's testing frameworks aren't as worked out as Ruby, maybe i
by quaunaut 13y ago
So, at my old job, we had 'TDD', but we weren't particularly good about it. Maybe it's because Python's testing frameworks aren't as worked out as Ruby, maybe it was because we were lazy. I genuinely don't know, I wasn't trying hard at the philosophy.
But when we finally got to work at my new job, our lead made TDD a requirement. Every time. Red. Green. Refactor. I still screw it up sometimes(as he'll attest), but God, it's like a relevation.
Probably the nicest part, is simply being able to just know every time that you don't need to be scared of a bad git merge. Scared of hunting down a bug that was made 3 weeks ago but no one noticed till now. Scared of deploys.
All of that is mindless for us. Pull down master, merge it in, run the tests, be happy. Pull Request, code review, merge to master, let Travis-CI handle the deploy.
It helps keep code more simple, makes the API more useful, and to me, I don't know that I can go back. The moment you're past week 2 or 3 of building with it, it's invaluable.
- joeblau 13y agoWhat were you using for python tests. I used nose on a project[1] and it seemed to do everything I needed. Your second sentiment is the exact same thing that happened to me. I got that revelation moment where I'm like "holy crap" we made changes and merged everything and it's actually working. Which, sadly, wasn't the case before we went into the TDD model. I mean even if the test cases were added after the code was written, I still noticed a lot faster development cycle and a lot fewer bugs on the projects that were using TDD. [1] - https://github.com/joeblau/sample-url-shortner https://github.com/joeblau/sample-url-shortner
- quaunaut 13y agoI honestly don't remember. I was so green at the time, guh.