[Gllug] Perl Question - Spam Filter for NMS Form Mail

Daniel P. Berrange dan at berrange.com
Fri Feb 13 11:39:31 UTC 2009


On Fri, Feb 13, 2009 at 11:15:56AM -0000, James Laver wrote:
> On Fri, February 13, 2009 11:08 am, Daniel P. Berrange wrote:
> >
> > I like to class Python, as 'The VisualBasic' of the Linux world. Great
> > for writing toys, not great for serious work;-P I seriously regret writing
> > virt-manager in python now. It allowed me to get something pretty working
> > very quickly, but it has been a long term maintainence disaster of
> > horrific
> > proportions.
> 
> I'm not really sure where you're coming from.
> 
> Python code tends to be quite maintainable if done reasonably well. In
> fact the things I dislike about python are the lack of CPAN and the way
> people will ignore your indentation choice, use tabs instead of your
> mandated 4 spaces and thus make the python interpreter bork on your
> script.
> 
> But maintainability, that's not a complaint I've ever heard of python.

It is not unique to python - any dynamic scripting language has this
issue.  The lack of a compilation phase means the vast majority of your
errors  will only appear at runtime. To address this problem you need to
have seriously good testing capabilities. In comparison to Perl, the
testing frameworks in Python are pitiful. The 'distutils' build system
doesn't even provide a 'test' target, which rather sums it up for me.
The rate of regressions caused by basic syntax errors in particular
is what really makes me consider it unmaintainable. Python is no better
than Perl in this respect. Indeed I'd even argue its worse, because I've
had a number of patches contributed that mistakenly changed indentation
of chunks of code, totally changing the semantics.

I really like the rapid development benefits oflanguages like   Perl or
Python, but especially for GUI apps which are hard to do automated testing
for, I wouldn't use either again for any non-trivial GUI app. Unfortuantely
the alternatives are things like C, C++ or Java[1], each with their own
limitations, but on balance I'd use any of them for GUI apps over Python
or Perl

Daniel

[1] Yes, Richard will shortly mention OCaml :-)
-- 
|: http://berrange.com/     -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://freshmeat.net/~danielpb/    -o-   http://gtk-vnc.sourceforge.net :|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20090213/720f3c33/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list