The Handoff



  • I've mentioned that I resigned and am about to move on from BigWTF Inc which was taken over by MuchBiggerWTF Inc. You'd think that I'd no longer be exposed to any real WTFs at this point, but you'd be wrong.

    Even though I've throroughly handed off my work to one of my peers on MY pre-takeover team, my boss instructs me to hand off my work to one of his guys from HIS pre-takeover team. Ok, no problem. I make an appointment and get the following:

    Oh, our boss doesn't want ME to do it; get someone else
    The boss mentioned you, specifically by name
    But I'm busy
    I'm leaving; tick tock
    Ok, next week
    
    The following week:
    In an hour
    In 2 hours
    Tomorrow
    Tomorrow
    Tomorrow
    
    Um, I'm gone in 2 days and this is fairly involved; it's now or never
    Ok, I'll be there in ten minutes
    
    30 minutes later:
    I'll be over in an hour
    
    An hour later:
    I'll be over tomorrow
    

    Mind you, there were absolutely no emergencies, meetings too important to skip or anything else going on to justify this.

    Finally, he comes over as I come back from a long lunch. I start to walk him through stuff and he realizes that while his team still uses Subversion, our team uses Clearcase, and it takes 3 days to get the SAs to set up access. Oops.

    I start walking him through architecture and code on my system so he can see what's going on. After a half hour he stops me. What's this?

    // Summarized:
    
    public interface SomeInterface<T> {
      public T getSomeVar();
    }
    
    public class SomeClass<T> implements SomeInterface<T> { 
      private T someVar; 
    
      public T getSomeVar() {
        return someVar;
      }
    }
    
    public MyClass1 extends SomeClass<int>     { ... }
    public MyClass2 extends SomeClass<String> { ... }
    

    I explain the concept of Java templates. Oh, I'm only working on Java 1.5. Guess what (moron), 1.5 supports templates. Why do you have classes wrapping TIBCO EMS JMS queues? Because we do additional processing before writing messages to the queue and rather than duplicate the code everywhere, we put it all in one place; it's called encapsulation. I get a confused look.

    It turns out that this guy only knows how to write straight-line procedural C-like Java code; no concept of Collections, Lists or Maps; just arrays. No polymorphism or virtual functions. No subclassing. No interfaces. His system is just a handlful of 5000 line classes that do everything with a bunch of public static variables tying everything together.

    I can't wait until he tries to follow the code that does synchronization on wait/notify from one thread to another.



  • @snoofle said:

    It turns out that this guy only knows how to write straight-line procedural C-like Java code; no concept of Collections, Lists or Maps; just arrays. No polymorphism or virtual functions. No subclassing. No interfaces. His system is just a handlful of 5000 line classes that do everything with a bunch of public static variables tying everything together.

     

    We have some Java code like that.   I love it to death.



  • @tster said:

    @snoofle said:

    It turns out that this guy only knows how to write straight-line procedural C-like Java code; no concept of Collections, Lists or Maps; just arrays. No polymorphism or virtual functions. No subclassing. No interfaces. His system is just a handlful of 5000 line classes that do everything with a bunch of public static variables tying everything together.

     

    We have some Java code like that.   I love it to death.

     

    Do you smuther it with love... with a pillow, till it stops twitching and then sit curled up in a corner rolling back and forth thinking about how to dispose of the dead code?



  • @snoofle said:

    You'd think that I'd no longer be exposed to any real WTFs at this point

    No, no I wouldn't.



  • @snoofle said:

    His system is just a handlful of 5000 line classes that do everything with a bunch of public static variables tying everything together.
    I took over some C++ code that was basically like that.  It had several 3000 line switch statements.  Stuff like that has been mostly refactored, and even some of the logic has been moved out of the God Class and into the places where it belongs.  It's a friend of nearly all other classes, and happily uses all of their privates.

    Eventually, the original author tried to get into the spirit of things, and in a second application very similar to the first, the God Class was actually subclassed.  I've never figured out why, since there's only one way it would ever be instantiated.  I suspect he felt the file was getting too big or something, and splitting it up would make things easier to work with.



  • @astonerbum said:

    Do you smuther it with love... with a pillow, till it stops twitching and then sit curled up in a corner rolling back and forth thinking about how to dispose of the dead code?
     

    That gets old quickly. You know, after the third time or so.

    Right, guys?



  •  My coworker once was assigned a simple task of writing a class that would search a database to find all records satisfying a given condition and return their contents. Nothing fancy, a "field begins with ASDF".

    His solution: query the database from the button click method, get 10 first results, then initialize a class with an array of these, return an array.

    He was actually surprised he had to write a class just for that. Everything was done anyway in the method, wasn't it.

     

    Some people just don't get it.



  • @snoofle said:

    It turns out that this guy only knows how to write straight-line procedural C-like Java code; no concept of Collections, Lists or Maps; just arrays. No polymorphism or virtual functions. No subclassing. No interfaces. His system is just a handlful of 5000 line classes that do everything with a bunch of public static variables tying everything together.

     

    When I arrived at my current job some 3 years ago, this is what most of the code looked like; this person you're talking about could have been the guy I replaced.

    As an example, we had a little web app that displayed a monthly calendar of events. The events were created and managed in two other applications; this calendar just pulled the data from each for the month and stuck each event on the appropriate day(s) with a link to the appropriate other application. My predecessor seemed determined not to write any traditional Java classes at all. The data for each event was passed around as an array of Strings, always referred to as s_data[] (and yes, the Hungarian notation was all-pervasive in the application). This array was laid out thus:

    s_data[0] == the title of the event

    s_data[1] == the start date ( mm/dd/yy )

    s_data[2] == the end date

    s_data[3] == the URL (which is absolute if the event is from one source, relative if it's from the other)

    s_data[4] == "***" if the event should be shown on any Saturdays or Sundays between the start and end dates. If not, then "" if the event is from one source, or null if it's from the other. My predecessor did not seem to understand the distinction between an empty String and the null value in Java.

    None of this was documented anywhere.



  •  So technically, the boss sent it out not for peer reviewing, but to learn java. Might explain why he didn't want to come :D



  • @snoofle said:

    It turns out that this guy only knows how to write straight-line procedural C-like Java code; no concept of Collections, Lists or Maps; just arrays. No polymorphism or virtual functions. No subclassing. No interfaces.
    F*ck me...

    I get this crap a lot especially since I mainly work on PHP, a language that will gladly let you write the most god-awful code imaginable. I'm currently trying to get a new hire to write professional code. Endless procedural programming, copy-pasting, inventing the wheel, abusing existing code, you name it, he does it...



  • @snoofle said:

    I explain the concept of Java templates. Oh, I'm only working on Java 1.5. Guess what (moron), 1.5 supports templates.

    No, it has Generics.  Similar, but not quite the same. 

    @snoofle said:

    It turns out that this guy only knows how to write straight-line
    procedural C-like Java code; no concept of Collections, Lists or Maps;
    just arrays. No polymorphism or virtual functions. No subclassing. No
    interfaces. His system is just a handlful of 5000 line classes that do
    everything with a bunch of public static variables tying everything
    together.

    This seems to be a popular thing among dumbasses out there that don't understand Java, or at least OO.  My first job out of college was to maintain a Java app written by a guy they all thought was great.  The first thing that I noticed about his code was a 4000+ line file called ConstantsAndGlobals.java!!!  FFS, having such a file is bad enough, but 4,000 lines of them?  


     



  •  Look on the positive side Snoofle.  At least he's trying to work with you.

     

    (Now)



  • @DOA said:

    @snoofle said:

    It turns out that this guy only knows how to write straight-line procedural C-like Java code; no concept of Collections, Lists or Maps; just arrays. No polymorphism or virtual functions. No subclassing. No interfaces.
    F*ck me...

    I get this crap a lot especially since I mainly work on PHP, a language that will gladly let you write the most god-awful code imaginable. I'm currently trying to get a new hire to write professional code. Endless procedural programming, copy-pasting, inventing the wheel, abusing existing code, you name it, he does it...

    When are you going to fire him?  Or are you just keeping him around as a sacrifice to Morbius?  I can be there middle of next week.  I have my own robes and implements of torture.



  • @morbiuswilters said:

    When are you going to fire him?
    Fire him? You think he'd be doing this crap if I had any authority over him? 

    In this company we use cronyism to hire and democracy to work. That way anyone that happened to have a drink with the boss and can write a "hello world" program can make major design decisions on mission critical software that we'll be depending on for years to come.

    Incidentally anyone interested in company stock, email me.



  • @DOA said:

    Incidentally anyone interested in company stock, email me.

     

    For purchase or borrowing?  I'm up for the second one.



  • @amischiefr said:

    @snoofle said:

    I explain the concept of Java templates. Oh, I'm only working on Java 1.5. Guess what (moron), 1.5 supports templates.

    No, it has Generics.  Similar, but not quite the same. 

    Yeah, I know, technically it's a parameterized type which is directly under the guise of generics, but if this guy can't understand the word "template", there's no way he's going to understand any of that other jargon. Still, thanks for keeping me honest ;)

     



  • @morbiuswilters said:

    When are you going to fire him?  Or are you just keeping him around as a sacrifice to Morbius?  I can be there middle of next week.  I have my own robes and implements of torture.

    I would happily pay to see that; please post time and location!

    Or at least offer the video for a modest fee!

     



  • @morbiuswilters said:

    I have my own robes and implements of torture.
    On a related note, all of morb's Craigslist postings end with this very same sentence.  No wonder nobody ever shows any interest in buying his old treadmill.



  • @bstorer said:

    On a related note, all of morb's Craigslist postings end with this very same sentence.
     

    +1 witty



  • @DOA said:

    Incidentally anyone interested in company stock, email me.
     

    Wow, you make your own stock?


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.