[Zope3-dev] Re: [Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/SmtpService/Views - __init__.py:1.1 configure.zcml:1.1

Guido van Rossum guido@python.org
Sun, 27 Oct 2002 18:04:21 -0500


[Florent G]
> > Speaking of SMTP, I'm not too happy about the implementation just
> > checked in. It's not very clean, there are no docstrings, it won't
> > support Unicode strings and encode them as needed, it doesn't use
> > string methods as Kapil noticed, it doesn't use isinstance, the
> > interface is ISMTPService whereas the module is SmtpService, there
> > are no unit tests, even $Id: doesn't have a closing $...
> >
> > Ok, ok, I'm whining and not writing that code, but still it had to
> > be said.

[Steve A]
> The main problem is that there are no unit tests.
> 
> If there were unit tests, another developer could come in and fix the 
> other problems.
> 
> As it is, a developer cannot do that because they won't know whether 
> they have broken anything while trying to fix problems.

All true (I suppose, I haven't looked at the code).  But please note
that it's easy enough to find out who wrote it (or at least who
checked it in :-).  While I think it's good to emphasize that you're
calling it bad code and you're not accusing someone of being a bad
coder (or worse, a bad person), at the same time I prefer that
criticism (preferably constructive) of code is addressed to the
author.  Credit where credit is due, etc.  This despite the XP adage
of "nobody owns code".  Nobody may own code, but individuals write
code, and I think that it's a good idea to get to know each other as
individuals.  We all have different strengths and weaknesses.

--Guido van Rossum (home page: http://www.python.org/~guido/)