Found the culprit, the king of copy and paste



  • I'm working on an application that extracts spatial data and exports it in various formats. One issue I've faced with the application as a whole is that certain previous contributor(s) developed a nasty habit of copy-pasting code when they basically could not be bothered to do their job properly. Now, we've got a whole host of libraries that are developed in-house, one of which is already used by another export in the application has precisely the functionality I need to add another type of export. The only problem is that the class I need is marked as internal. Upon speaking with the author, he "recommends" that I "just copy and paste the code" into my solution and "make a utils .dll" because "you never know what requirements there will be, they could change any minute". So instead of opening his project and changing an internal class to public, recompiling and getting on with my job, I'm supposed to extract his code, create my own .dll, duplicate yet more code and refactor large parts of my solution to use the new .dll instead of a standardised library that's in our core SVN repository..

    I need a massive drink.

    On the plus side, I'm pretty certain that I've found the space cadet responsible for:

    1. Identical Membership and RoleProviders copy pasted in two separate web projects
    2. Three separate tables in the DB that are linked together with a 1-1 relationship
    3. Custom log4net appender initialization code copy pasted in every codebehind file of every .aspx page and .ascx usercontrol in two separate web projects
    4. A roll-your-own SOAP server and client, even though we're using .net. Complete with static hand-written wsdl file!
    5. Implementing his own paging for the ASP.net GridView that is to all intents and purposes identical to the intrinsic functionality. Also copy pasted in every page it is used in.

    I taught a class on WCF the other day. In front of 15 other developers he claimed that using SSL certificates with httpBindings didn't work in WCF, immediately after I'd shown an example of installing a certificate in IIS, adding a basicHttpBinding with transport level security and connecting to said service from a bit of unit test code, stepping through each line of code from the client call right into the service (showing the https call in the service trace viewer) and back into the asserts of the unit test, explaining each line as I went along.

    A colleague once claimed that this guy once said he doesn't use interfaces because they're "too complicated" and he can't "find the implementation".

    How do you deal with levels of retardation like this without planting bombs under chairs?



  • You have my deepest condolences.





  •  Things could be worse.  At least he:

        1. Knows about the .NET membership API rather than rolling his own, ahem, security.

        2. Realizes that data in a database can be stored in, *gasp*, multiple tables.

        3. Is aware of logging libraries rather than leaving Trace.WriteLine droppings about.

        4. Understands that web sites can be made of more than just a bunch of *.aspx files.

        5. Is capable of hooking into a .NET Web Control, rather than writing his own web widgets from scratch.

     The bar can always be lowered......

     



  • @JimLahey said:

    How do you deal with levels of retardation like this without planting bombs under chairs?
    Lightly-tranquilized dangerous wild animals left in his car near quitting time.



  • How much trouble would you get in if you just went over his head and marked the class as public?

    And yes, the bar can always go lower, much much lower :/



  •  I love cop/paste. That's how I made my kids.



  • @Sir Twist said:

    Lightly-tranquilized dangerous wild animals left in his car near quitting time.
     


  • Discourse touched me in a no-no place

    @JimLahey said:

    Three separate tables in the DB that are linked together with a 1-1
    relationship
    Not always a WTF, but given the context, I'm sure it is...



  • @Sir Twist said:

    @JimLahey said:

    How do you deal with levels of retardation like this without planting bombs under chairs?
    Lightly-tranquilized dangerous wild animals left in his car near quitting time.

    I usually just dose my enemies with LSD, kill their families while they're unconscious, then set it up so they are convinced they did it. You know, let their own conscience do the work of torturing them for me.



  • @morbiuswilters said:

    I usually just dose my enemies with LSD, kill their families while they're unconscious, then set it up so they are convinced they did it. You know, let their own conscience do the work of torturing them for me.
     

    IT WAS YOU



  • @dhromed said:

    @morbiuswilters said:

    I usually just dose my enemies with LSD, kill their families while they're unconscious, then set it up so they are convinced they did it. You know, let their own conscience do the work of torturing them for me.
     

    IT WAS YOU, DEXTER!



  • @dhromed said:

    @morbiuswilters said:

    I usually just dose my enemies with LSD, kill their families while they're unconscious, then set it up so they are convinced they did it. You know, let their own conscience do the work of torturing them for me.
     

    IT WAS YOU

    Naw, you're not an enemy. I think you actually just had a psychotic episode and killed 'em yourself. Sorry, bro.


    Of course, that's what I would say to the people I'd dosed, too, but in this case it is not a lie. Swearsies.



  • @JimLahey said:

    Three separate tables in the DB that are linked together with a 1-1 relationship

    So in the code, are those tables represented by the God Class?



  • @morbiuswilters said:

    Of course, that's what I would say to the people I'd dosed, too, but in this case it is not a lie. Swearsies.
     

    Phew, I'm good.

     

    Nice and quiet.



  • @JimLahey said:

    How do you deal with levels of retardation like this without planting bombs under chairs?
    A very strong adhesive stuck to their steering wheel and accelerator pedal? Less dangerous for you than the chair bomb, and much more ecologically responsible than the aforementioned dangerous animals (which are often critically endangered).

    Alternatively, you may consider replacing his chair by one of the redundant ones they probably have at various correctional facilities. You know, the kind that comes with a leg brace, skull cap and power cable.

     



  • @Severity One said:

    You know, the kind that comes with a leg brace, skull cap and power cable.

    What do you think caused the retardation in the first place?


Log in to reply