[Israel.pm] Horrible Code

David Baird davidlbaird at gmail.com
Tue Oct 24 14:49:08 PDT 2006

I actually know the person who wrote the code, when it was written,
and under what conditions. The original code was written years ago,
even before the now popular Perl in Israel group started, and the only
worthwhile books on Perl were the Camel, Llama, and Cookbook.

The software engineer really didn't know a lot about Perl, but was
writing C++ classes for years, and is very good at it. The requirement
was to get a Perl interface to an already designed system. C++
programmers don't think of modules as more than header files, we
"experts" know better. The code was a mix of quickly thrown together
modules and auto-generated SWIG modules for a CORBA interface.

It gets worse, the same generated modules were used as a basis for a
new XML-RPC interface, while needing to maintain compatibility with
thousands of scripts based on the SWIG modules. I'm pretty sure that
the tie stuff is left over from SWIG and because it wasn't understood,
it wasn't deleted. The result is another quick and dirty trial and
error effort to get the interface done and no "expert" available to do
it right (why even ask around!) Can you imagine how much effort was
put into preparing all those 100 repeated functions because of not
knowing about AUTOLOAD?

Such is the nature of Perl development and many companies. So laugh
about it, but get used to it. There is a lot of Perl code like it
around. For more on this most common coding practice, read The Big
Ball of Mud http://www.laputan.org/mud

More information about the Perl mailing list