Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
3. My boss was the original author. I'll obviously have to tread lightly so as to not offend.

A few things come to mind:

  1. Were you hired to be a perl programmer?
  2. Is your skill level with perl expected to exceed that of your boss?
  3. Does your boss still actively contribute/write/maintain any company perl code?
  4. Is your boss going to be paying for your time to update/fix this code?

If your boss is still actively writing production perl code under these conditions, he puts the company at risk, depending on the nature of the code. If he does not write or maintain any company perl code, he could have written this at a time when -w -T and strict were not stressed as much as they are now.

Good programming practices are important, but spaghetti code is never excusable.

One approach you may want to try, which will allow you to do the rewrite, and at the same time not offend your boss, is to try to convert the code into a module/package-based piece of code, using proper OO concepts (this assumes of course, that the existing code is monolithic, and not modular). This will allow you to do the rewrite, and hide the inadequacies of your boss' code in more maintainable code.

Another approach is to go through it and "update" the code to work better with "current" perl and industry standards around usability and security. A rudimentary 'audit' of the code could be performed, to show where it would fail under certain conditions. Put it under load, fire different variables/inputs at it, etc. and see where it breaks down.

One thing I've always learned.. I improve my code and myself when people are critical of me. If everyone were to compliment my code, I'd never have the incentive to improve it. If everyone were to pick my code to death and find problems with it, I know exactly where I need to improve.

Perhaps the direct approach with your boss might also prove fruitful. He may respect your forwardness and experience, and allow you to fix it. Maybe you can teach him why those "missing" items are important to use, and how each piece of "broken" code could be improved to be faster/more-secure and so on.

In reply to Re: So I'm in a bit of a quandary by hacker
in thread So I'm in a bit of a quandary by vek

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    LanX ♪..♫ Fiesta, fiesta mexicana ... ♪..♫
    [mandarin]: LanX aren't you a bit late to the party?

    How do I use this? | Other CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (8)
    As of 2018-06-18 17:41 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (110 votes). Check out past polls.