[Twisted-web] web2 log patch

glyph at divmod.com glyph at divmod.com
Fri Jan 20 16:24:36 MST 2006

On Fri, 20 Jan 2006 22:42:44 +0100, Ralf Schmitt <ralf at brainbot.com> wrote:
>glyph at divmod.com schrieb:
>>You remember that 'epsilon' thing you objected to?  That is effectively 
>>Divmod doing exactly this.  It's a great idea.  Please do it!

>This is only a great idea since patches tend to rot in the bugtracker.

Most Divmod team members are on the core development team for Twisted, and we *only* put patches in Epsilon which have *already* been applied to Twisted.  I've said this at least twice in this thread already.

It's a good idea because there is *work* associated with releasing Twisted, work which neither you nor certain other posters seem willing to do.

> I've added a patch for sending new style classes via pb at the end of 2003.

... with no unit tests

>10 months later this has been assigned, in march 2005 db3l asks why this 
>patch hasn't been applied (he's using it successfully).

... with no unit tests

>In April things start to fly: tests are being written,

Here's the causality:

"In April, unit tests are written, and things start to fly."

I won't promise that all patches in the tracker will be applied immediately, even with appropriate tests - after all, review takes some work too, and as I keep repeating, we are short on manpower - but they certainly rot less in the tracker than they would if they were just some random mailing list post.  That bug report provided a hub for quite a bit of discussion, patches, etc, whereas the same thing as a mailing list thread might have been resurrected 5 or 6 times with no actual work being done.

More importantly, if the peanut gallery ever decides to start going through the tracker and fixing things rather than trolling the various lists, the presence of your bug report there will give them some meat to work on.  The last thing a contributor who is strapped for time wants to do is come to a project and read every message in the last 6 years of archives in reverse-date order, looking for something to work on.

>However, my test program still doesn't work.

You almost certainly would have had a better experience if you had submitted it in the form of a unit test.

Trial currently has a feature which allows you to return a Deferred from a unit test.  The code you submitted could have been several lines *shorter* and been in the correct format; the deferred created by callRemote effectively terminates the test.  Even if this code was submitted before Trial added that feature, there are tests for PB which hit the network that you could have cribbed from.

>So, maybe you should check your "formalities" that speed up the development 
>process. I guess they aren't working that good.


Here's the interesting part, though: I claim that once you're comfortable with TDD and you've applied it to a large amount of code, your development speed will actually be faster than it would be without TDD. So not only you get all the other benefits, but things will go faster and more smoothly. How's that possible?

All you are looking at is the speed to apply your one patch - Twisted's overall development speed includes the time taken to fix the bugs introduced by such patches.  It may not contain any - but, without tests, how do we know?

>It doesn't make sense for everyone to manage their own patched twisted, 
>fixing the same bugs...

You're right about that.  Like Divmod, anyone maintaining a local fork because they depend on bugfixes should submit those bugfixes, with tests, to the Twisted project **first**.

Finally, this policy isn't going to change.  For every minor inconvenience it has caused you, it has saved Twisted contributors days or weeks of work.  Whining about it just convinces me that people who don't write tests are whiners who produce buggy code, and who should therefore be ignored.  Is this the image you are trying to project?

More information about the Twisted-web mailing list