Will Du Chene writes:
 > Hi List.
 > 
 > A while ago, the company that I work for brought in a couple of consultants
 > to write the application that we currently use. Well, they left and I was
 > charged with maintaining, expanding upon and refining the code which they
 > wrote. Unfortunately, I have been having quite a time of it. The code that
 > they wrote does not seem to follow any real standards that I know of. 
 > 
 > Well, to make a long story short, I took the code to my management and
 > explained my position. They, in turn, would like to get a second opinion. I
 > explained that I could post it here, and ask for the input of my peers.
 > Could I receive some feedback on this? Could this code snippet that I have
 > attached here be graded from A to F?

Not impressed. I would tend towards an F, but, if you are using it, and
it does what is required, I suppose some allowance should be made for
that. But not much.

Some obvious problems:

- would I be right in assuming that there is no 'use strict' in the
  code (or even 'use warnings' or -w)

- although it checks the return from open it doesn't report what the
  error was

- the use of 'goto' indicates lack of design

I would not like to maintain such code,. I think you flatter them by
calling them consultants. I wish you luck.

 > 
 > On a side note, does anyone know of some really good / defined standards
 > which can be applied when writing scripts?

'perldoc perlstyle' is a good place to start.

 > 
 > I welcome ANY and ALL feedback, questions, comments - bad or good.

I can't imagine any good comments.

[ Code snipped ]

-- 
Brian Raven
The court finds everyone to be in contempt (including himself :-), and
orders everyone sentenced to five years hard labor.  (Working on Perl,
of course.)
             -- Larry Wall in <[EMAIL PROTECTED]>
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl

Reply via email to