Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Should I tell them something is wrong?

by defyance (Curate)
on Sep 19, 2002 at 23:06 UTC ( [id://199336]=perlmeditation: print w/replies, xml ) Need Help??

When I found out it was wrong of me to find out?

I know this sounds odd, but listen before you say I'm a poor employee..

Its like this, one of other Tech Support guys came in, talking about, and showing off, a quick script he threw together on the fly for a function that was needed pretty badly. I just overheard about it in passing, so my curiosity got the best of me. I executed the command and checked it out. I soon forgot about it and walked away from my desk leaving it running. Later on, my boss came told the rest of us not to mess with the code that Other Tech Support Guy wrote, as he said it was very "breakable". I was kinda insulted, but at the same time, I figured it was for a good reason. I eventually made my way back to my desk, where I had left the script running. So really quick, I decided to check the memory footprint. I was appalled that it was using almost as much memory as the top command!

I almost instantly killed the pid and scrambled to find the code to no avail (due to access restrictions).


So my question is:

  • Do I write a more efficient version, and hand it to the original author (could be considered rude)
  • Toss up the fact that it was using gobs of memory, and hope he takes well (could also be considered rude)
  • Or do I go to my boss and lay it out on the line, even though it will look like I disobeyd a direct order, although it was prior to her telling me not to mess with it..

    What Would You Do?

    -- Can't never could do anything, so give me and inch, I'll make it a mile.

  • Replies are listed 'Best First'.
    Re: Should I tell them something is wrong?
    by BrowserUk (Patriarch) on Sep 19, 2002 at 23:22 UTC

      Imagine the situation was reversed. It was your script and he had the 'illicite' knowledge. What would you like him to do?

      Personally, I'd prefer that he came to me, told me the sequence of events and the conclusion about the memory footprint.

      Whether I would offer help with fixing it would depend on his reaction to being told. Unfortunately, these things often depend on personal rather professional releationships.


      Cor! Like yer ring! ... HALO dammit! ... 'Ave it yer way! Hal-lo, Mister la-de-da. ... Like yer ring!
          Personally, I'd prefer that he came to me, told me the sequence of events and the conclusion about the memory footprint.

        Concur.

        You don't need to be a dick about it, just mention that you were interested in the guy's script, that it seemed to be taking a while, and maybe you could get together and see about making it a bit faster? If you play up your interest in the other guy's script, he shouldn't be terribly insulted that you're suggesting an improvement (especially if, as it sounds, it was a quick hack to fix a common problem in as little time as possible).

        On the other hand, if you're more interested in keeping out of trouble with your boss (not a criticism; I think we've all had jobs where we're mostly interested in keeping our heads down and out of trouble, and waiting for daylight to get the fsck out of there), you might be better off talking to your supervisor, mentioning that you were playing with the code before he came by, and suggesting that you and the other support guy collaborate on a re-write (helps if you have an idea of what kinds of changes to make before hand, to limit the "don't change that code, it's not worth the time" factor).

        --
        F o x t r o t U n i f o r m
        Found a typo in this node? /msg me
        The hell with paco, vote for Erudil!

    Re: Should I tell them something is wrong?
    by jepri (Parson) on Sep 19, 2002 at 23:55 UTC
      Just going on what you said, I'd keep my head down. Why?

      • The code doesn't appear to directly inconvenience you.
      • It will still appear that you disobeyed orders, regardless of your explanation.
      • You're going to tread on someone's toes regardless - if he really wanted help, he would have asked for it

      Your motives are great, but wait around until your boss says 'we really need to improve that script', then volunteer.

      ____________________
      Jeremy
      I didn't believe in evil until I dated it.

    Re: Should I tell them something is wrong?
    by dws (Chancellor) on Sep 19, 2002 at 23:23 UTC
      Toss up the fact that it was using gobs of memory, and hope he takes well (could also be considered rude)

      There are tactful ways of letting someone know that there might be a problem with their script. A simple statement of fact, delivered neutrally, should suffice. "I ran the script and noticed that it used a lot of memory", rather than "I ran your script and noticed that it used a lot of memory."

      If you're feeling charitable (and confident that your boss wouldn't object), you can add "I have some experience with tracking down memory leaks in Perl. Would you like me to take a look?". If no, drop the issue and move on.

    Re: Should I tell them something is wrong?
    by Marza (Vicar) on Sep 19, 2002 at 23:38 UTC

      I think your bosses comment has told you what to do.

      In a perfect world the correct thing to do would be to correct or show what needs to be done.

      However, since your boss said "don't touch it because it breaks easily" kind of tells you that even though you did the right thing, you will probably get in trouble.

      But this is an outsiders opinion. You know your boss better then we do. If he would want it fixed, you can show how you can better it and eliminate a chunk of the breakable parts, etc., he might go for it.

      Otherwise, if he worships the other guy you could get in trouble.

      Just my .02

        Hey...off topic a bit, but has anyone noticed that the boss is a "she"? I think it's an interesting thing that everyone mentioning gender so far has defaulted to male.

        Not a big deal, just interesting.

          No he is not. As was read:

          Later on, my boss came told the rest of us not to mess with the code that Other Tech Support Guy wrote, as he said it was very "breakable".

          Besides English class told me that if you don't know the gender the default is he ;-)

    Re: Should I tell them something is wrong?
    by Preceptor (Deacon) on Sep 20, 2002 at 08:49 UTC
      My opinion would be to leave it. The best possible result would be you looking like an interfering smart-arse.
      I know 'icky' code is something that causes a dedicated perl hacker pain. But at the end of the day, it's someone elses bodge job. If it's 'good enough' then that's fine.
      About the only situation where this changes, IMHO is security. (Eg, a 'setuid' program with a unchecked buffer overflow or similar).
      In general, the only damaged 'stupid' code does, is to be inefficient. Or perhaps does something unintended when the _owner_ runs it.
      In which case, it's their 'baby' to fix.
      IMO if someone comes to me and tells me that one of my admin scripts is inefficient, my first thought would be to ask what they are doing messing with admin scripts.
      (Not that they are inefficient, it's just an example ;p))
      --
      It's not pessimism if there is a worse option, it's not paranoia when they are and it's not cynicism when you're right.

    Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Node Status?
    node history
    Node Type: perlmeditation [id://199336]
    Approved by Nemp
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (6)
    As of 2024-04-23 12:55 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found