Making Wrong Code Look Wrong

Martin Pool mbp at canonical.com
Wed Apr 27 02:19:04 UTC 2011


On 22 April 2011 05:03, Eric Siegerman <lists08-bzr at davor.org> wrote:
> On Thu, 2011-04-21 at 09:26 -0400, Barry Warsaw wrote:
>> Being absolutely, rock-solid
>> clear about what are bytes and what are strings is typically the most
>> difficult part of a Python 3 conversion.
>
> For a coding convention that helps with that sort of thing, see
> Joel Spolsky's "Making Wrong Code Look Wrong":
> http://www.joelonsoftware.com/articles/Wrong.html

I saw the other day a (I guess Windows-oriented) web app pass form
parameters as szFoo, as if there was really a little nul going across
the wire...

We do generally use foo_utf8 etc in Bazaar and I think it's a good
idea.  We do not use it everywhere.  Indeed I think Hungarian-type
stuff is more useful in Python today than it probably was when I read
Code Complete ~15+ years ago, because there are no compiler warnings
to help you enforce semantic checks.

Martin



More information about the bazaar mailing list