1 Mar 2009 01:06
Re: Re: Great video on Craftmanship and ethics by Robert Martin
Adam Sroka <adam.sroka <at> gmail.com>
2009-03-01 00:06:05 GMT
2009-03-01 00:06:05 GMT
On Sat, Feb 28, 2009 at 2:30 PM, David Carlton <carlton <at> bactrian.org> wrote: > On Fri, 27 Feb 2009 21:02:09 -0800, Adam Sroka <adam.sroka <at> gmail.com> said: > >> P.S. moving forward is almost always better than moving backward. > > For what it's worth, that's not my experience. If I'm having a hard > time getting to a green bar, it usually means that I made a stupid > mistake (e.g. incorrectly implemented a core refactoring), or took a > surprisingly inefficient path towards my goal and have learned > something over the course of that path. In both situations, rolling > back works well for me. > FWIW, I did say "almost always."(Continue reading)The same day that I wrote that I had a situation where I did rollback. My pair had goaded me into making a useful change. However, I was distracted and I made the change without writing a test first. It broke a few tests. I forged ahead for a couple minutes trying to get things back into working order, but quickly realized my mistake. So, I rolled back to the last subversion check-in, wrote a test for the new thing that we wanted to add, and got all the tests to pass. Then we switched pairs and moved on to something else. OTOH, I have also been in situations where I realized that something was wrong even when the tests were passing. In that situation I wouldn't rollback. IMO, it makes more sense to go ahead and write a test for the newly discovered thing and see if I can get it to pass. I assumed that this was the situation Kent was describing based on his first description. Although, his last email makes it sound more akin
The same day that I wrote that I had a situation where I did rollback.
My pair had goaded me into making a useful change. However, I was
distracted and I made the change without writing a test first. It
broke a few tests. I forged ahead for a couple minutes trying to get
things back into working order, but quickly realized my mistake. So, I
rolled back to the last subversion check-in, wrote a test for the new
thing that we wanted to add, and got all the tests to pass. Then we
switched pairs and moved on to something else.
OTOH, I have also been in situations where I realized that something
was wrong even when the tests were passing. In that situation I
wouldn't rollback. IMO, it makes more sense to go ahead and write a
test for the newly discovered thing and see if I can get it to pass. I
assumed that this was the situation Kent was describing based on his
first description. Although, his last email makes it sound more akin
RSS Feed