Have your code handed to you [raving involved]



  • Today, I came across a little WTF, and was asked to fix it.  The real problem was that I wrote it, almost a year ago.  This entire rant session is mostly because I'm kinda irate about it, for reasons I'll reveal shortly, and am letting off a bit of steam.

    Here's the story.  I wrote a new interface to a legacy system last year.  It's a webservice-like interface to a heavy-duty and hard-to-access backend.  The library is pretty simple, but I considered it vaguely elegant for my first C# project [Hey, I'm proud of it.  Read on].  I based it directly strongly off my perl design.

    It stores a bunch of metadata about the functions inside a database. When you create an instance of the main class, you tell it the type of transaction needed, and it loads the metadata for that transaction.  [This is a simplification, but it's close]. This metadata contains the variables and the format for the transaction [typically XML], the length, type and formatting of the variables [converting if needed], the tag name, the connection interface needed [MQ as a module, the default was HTTP post].  Finally, it called any transformation functions defined for each variable, loaded via reflection. [Admittedly, I never got this working as well as I did in perl with its mastery of variable arguments.]

    The system was designed for flexibility.  I discarded it and went with the perl version instead, which has been in production for a year, but gave the application to another guy for a reference...

    Today, I get an email from another department.  It's a programmer, asking a few questions about the implementation details of the original program, "I'm trying to connect and can't" stuff.  The reason I was being asked was that I had written a similar program, and the guy who writes the 'real' version was out. I walk over to take a look at his code.

    Erm.  Well, oddly enough, it looks familiar.  The design is visibly mine, even some mistakes I made when I wrote the original.  It was converted to VB.NET, and a large portion of the metadata was hard-coded in.  Some of the converted parts were... rewritten in a distinct classic ASP style.  It was still visibly the program I threw out a year ago, down to a set of strings I had hardcoded to set an initialization mode and some of my comments.  This irritated me some, mostly because they disabled a lot of the validation, transforms, and the module loader.  I explained his bug [he wasn't validating a return code...], and walked back to my office.  I asked, in an offhanded manner, where he got the code.  I leave the answer to your own imagination.

    On the way, I found out that that code was used for two other IT projects in the last year... and the guy who used it has had two promotions for those two projects.  I'm keeping my mouth shut at work; this person has more authority than I do, and it's also not really worrying.

    Is this type of thing common?  Am I wrong to be irritated about the whole deal?  I mean, I wasn't doing anything with the code, and it obviously needed some work before it could be used by their team.  Still, it irks me both that someone else took full credit for it, and probably moreso that they threw away large portions of the working design, and replaced it with something that looks to be significantly buggier.



  • That's rant-worthy. 

    I don't think the coworker did anything wrong, exactly, but it was pretty scummy.  If you know there's a bug in your code, you should start filing bugs against his code. 

    -cw



  • The hell it's nothing to worry about.

    It's your code and a some schmuck copied it poorly and got promoted off it.

    That's bad.



  • He copied it and made it do something useful (in fact, two things useful) after the OP apparently discarded it as worthless.  He should have given credit where due (assuming he did know who wrote it originally but gave them no credit at all), but there's no fundamental problem with him using/retasking the code for his own purposes.

     

    I must say, though, it sounded rather too enterprisy for my liking.

     



  • @DrPizza said:

    He copied it and made it do something useful (in fact, two things useful) after the OP apparently discarded it as worthless.  He should have given credit where due (assuming he did know who wrote it originally but gave them no credit at all), but there's no fundamental problem with him using/retasking the code for his own purposes.

     I must say, though, it sounded rather too enterprisy for my liking.


    It's not so much that he copied my code, actually.  I don't mind people finding my stuff useful, though I would have appreciated the credit.  I'm still in a junior developer position.

    It's more that he copied it poorly, and fairly obviously without understanding how or why it worked [or he would have left in the error checking and the data transformations] that leaves a foul taste in my mouth. As a supporting addendum, I'd heard reports of bad data in the recieving end of that application, which causes problems in anything else that connects to that app.

    And knowing that group, I'll probably end inheiriting or at least supporting those applications.

    As for Enterprisy, I still don't understand what the buzzword is supposed to mean.  Don't really care, it's just another thing to put on a bullshit bingo board.  If you meant that it sounds like overdesign, I will admit that I do tend to favor flexability over simplicity internal to a library [and, admittedly, I overdesign], but I try to keep interfaces simple and well-documented.


  • Maybe you should talk to your supervisor about this.  you can approach him as if your concerned about the various bugs you know to exist in the code.  If you want to feel better about the situation just look at some old paychecks and realized that they purchased the rights to the code you wrote.


Log in to reply