The root of the problem is that your definition of "better" and his are very far apart. As far as he's concerned, he's at the top of his game: he's got job security and he does what he likes. What's to improve? He doesn't really care that his programs are messy and hard to maintain: he'll go in and fix it when it's necessary, right? Unless he really doesn't like spending time fixing bugs, he'll see no reason to change his style. (He lacks laziness, impatience, and hubris. ;-)

If you are going to try the carrot, find out what kind of carrots he likes. If he's turned on by tinkering, give him a box of his own to develop new ideas on ("Say Joe, what about this Zope thing? Bring it up and see if it's any good.") But make it absolutely clear that any and all production problems take precedence. That way he has a reason to write robust code.

Sadly, I've been in this situation a few times, and the only good solution I've found that worked was to bring in another person to train on the old system. That at least reduced my risk exposure, and allowed me to move the person into a position of less responsibility. (Although it sounds like you've got the additional problem in that he's an FOB: friend of boss. ;-) But it doesn't sound like that's an option for you.

I don't envy you. It's a tough problem.


In reply to Re: (OT) Motivating the Unmotivated Programmer by VSarkiss
in thread (OT) Motivating the Unmotivated Programmer by Ovid

Title:
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, details, 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, summary, 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.