A developer so retarded

time to read 2 min | 294 words

I just run into this post, that talks about a presentation about mocking, and included this statement (about using Rhino Mocks):

I once heard a story about a developer so retarded that he and his team spent a good amount of time trying to debug a mock only to find out that he forgot about ReplayAll()*.  Who hires guys like that anyway?

That developer, it would be me, and it can happens quite often. And I wrote the tool, so I should know what I am doing when I am using it.

Stuff happens, it is easy to forget a line of code and waste some time as a consequences. The most common sentence from me when I am developing is "Oh, man, I am so stupid that I did that".

To give an example that would be a bit easier to grok, what is wrong with this code:

using(TransactionScope scope = new TransactionScope())
   Appointment[] appointments = SpanOnCalendar(appointmentSepc, DateTime.Today, DateTime.Today.AddDays(7));
   foreach(Appointment appointment in appointments)