Karmic Revenge: should I screw this guy or not?



  • Our company got merged into another, bigger company. After the initial layoffs the other day, the management at the other company decided that there should be "technical interviews" by their folks, of our folks, to see who should be offered a job, and who should be tossed.

    Today was my technical interview. My counterpart is doing the interview, with two levels of management on both sides watching (so they can "get a feel for people's skills").

    The guy asks me what's the most efficient sort algorithm. I respond with quick-sort, or something similar. He asks for big-O performance. I fire back n-log(n). He asks if I can design something with consistently better performance. I think for a nanosecond before firing back: "If Knuth couldn't do better, what makes you think that I can?" He bristled and began to talk down to me.

    What I did not yet know was that this guy was known for arrogance and condescension in his company, and was not particularly well liked.

    He now works for me.

    Question: should I make his life miserable by treating him with the same disdain and disregard he showed me and others, or should I give him a clean slate?

    I will abide by the majority of the opinions of TDWTF readers who respond.

    Go!



  •  @snoofle said:

     should I screw this guy or not?

     

    I guess.. if you are into that kind of thing...



  • Be nice to everybody but him. Shit in his cereal/breakfast, etc.



  • @Thalagyrt said:

    Be nice to everybody but him. Shit in his cereal/breakfast, etc.
     

    I say kill him with kindness. Be sooooo extra sweet to him that he will constantly be waiting for the axe to fall.

    I am more of a psychological torturer...



  • I vote for clean slate, there's no point in perpetuating this.



  • I would tend not to.  Maybe just give him the most boring bits of work to do.

    As you appear to be a project manager, it would be weird to be given such a technical interview.  I'm still a developer, and  I forgot all the Big Os for all the sorts the day after I learned them in Data Structures class, and I haven't looked back.  I know what Big O means, and its importance, but I can lookup the implementation and Big O for any sort or search that I like, thanks to this wonderful thing called the porn-o-net internet.



  • @MasterPlanSoftware said:

    @Thalagyrt said:

    Be nice to everybody but him. Shit in his cereal/breakfast, etc.
     

    I say kill him with kindness. Be sooooo extra sweet to him that he will constantly be waiting for the axe to fall.

    I am more of a psychological torturer...

    Either way works really. Annoy the everliving hell out of him or make him have a nervous breakdown. Now that I think about that, the nervous breakdown would be more fun.



  • @belgariontheking said:

    Big O
     

    Wow. I think the Big O means something very different to me, than it means to you.

     

    Obligatory Office Space quote:

    "I'm thinking I might take that new chick from Logistics. If things go
    well I might be showing her my O-face. "Oh... Oh... Oh!" You know what
    I'm talkin' about. "Oh!"
    "



  • Tell him if he can't design a sort algorithm with consistently better performance than a quicksort, his next performance review will not go well. 



  • @MasterPlanSoftware said:

    Wow. I think the Big O means something very different to me, than it means to you.
    I was going mention that .... call it the Big O(orgasm) notation.



  • @belgariontheking said:

    ...As you appear to be a project manager...

    I'm really more of a techie than manager, but I have enough miles under my belt that I'm qualified for either, and in the past have done both at one time or another.


    Personally, I figure if this guy was a jerk before, he will likely continue to be a jerk, and was leaning toward just ignoring his past and letting him make an a$$ of himself. Assuming he did, I could just stomp him on his next performance/bonus review.



  • @bohica61 said:

    Tell him if he can't design a sort algorithm with consistently better performance than a quicksort, his next performance review will not go well. 

    To me, this sounds like a really good idea. What goes around should be given as much encouragement as possible to come around.



  • @snoofle said:

    The guy asks me what's the most efficient sort algorithm.

    W. T. F.

    If confronted with a question like this, I'll probably answer "it depends" or "the built-in one".



  • @bohica61 said:

    Tell him if he can't design a sort algorithm with consistently better performance than a quicksort, his next performance review will not go well. 

    Be sure you don't let him choose his own data to sort, quicksort has a crappy worst case Big-O. 



  • @Spectre said:

    If confronted with a question like this, I'll probably answer "it depends" or "the built-in one".

    It's actually a trick question. The real answer is: "I like cheese."



  • @Spectre said:

    @snoofle said:
    The guy asks me what's the most efficient sort algorithm.

    W. T. F.

    If confronted with a question like this, I'll probably answer "it depends" or "the built-in one".

     

    Duh. The fastest sort algorithm is quickestsort. Jeez. Where did you guys learn sorting??



  • @Spectre said:

    @snoofle said:
    The guy asks me what's the most efficient sort algorithm.

    W. T. F.

    If confronted with a question like this, I'll probably answer "it depends" or "the built-in one".

    I'm surprised at the disregard for algorithm analysis here.  I probably wouldn't ask this type of question in an interview because it doesn't really tell you much about the candidate, but I would probably give a problem that essentially requires the implementation of a sorting or searching algorithm.  The more the candidate knows about the internal workings of common algorithms, the better.  And yes, I have had to write my own algorithmic implementations in some cases.  I have also noticed that any time I find horribly inefficient code, the developer who wrote it is usually unfamiliar with the concept of Big-O notation.



  •  My philosophy is: Never hold a grudge. Even after a long time of problems with the other person, let it go. However if he keeps annoying you, do it back to him, but don't persist at it. If he deliberately never gets the hint then keep doing it until he does.

     

    If he is extremely arrogent start making his life miserable and when hes nice again be nice to him. Sort of like training a puppy, xept not as cute.



  • @snoofle said:

    The guy asks me what's the most efficient sort algorithm. I respond with quick-sort, or something similar. He asks for big-O performance. I fire back n-log(n). He asks if I can design something with consistently better performance. I think for a nanosecond before firing back: "If Knuth couldn't do better, what makes you think that I can?" He bristled and began to talk down to me.

    And here's the real WTFTM: quicksort is not the most efficient sort algorithm. There are sorting algorithms with O(n log n) worst-case performance, where quicksort is O(n2) worst-case. Further, radix sort is O(n).



  • @snoofle said:

    The guy asks me what's the most efficient sort algorithm. I respond with quick-sort, or something similar. He asks for big-O performance. I fire back n-log(n). He asks if I can design something with consistently better performance. I think for a nanosecond before firing back: "If Knuth couldn't do better, what makes you think that I can?" He bristled and began to talk down to me.

    You often [i]can[/i] do better than Quicksort in applications. Quicksort [i]averages[/i] n log n operations when taking that average over elements of the set of linear data structures of length n. In particular, some data can be sorted in less than n log n time, using QS. Some takes longer. If your real-world data doesn't cover that set (which has 2^n elements) completely, or even "evenly", you can do better by adapting your algorithm to force your data into the faster-than-average partition. For example: Quicksort is an unstable sort, meaning that it will interchange the positions of adjacent elements with the same value. If your dataset has lots of elements like those, a stable sort will consistently perform better.

    Knuth will (and has) said the same thing.

    In short: Talk to him about it. If he says the right things, give him a clean slate. If he doesn't, give it anyway. Unless he calls you an asshole or something.



  • @dlikhten said:

    Sort of like training a puppy
     

    Right. Make sure you put down newspaper in his cubicle, and keep a rolled up newspaper handy in case he misbehaves.



  • My tendency would be to play it openly. Sit him down with you and give him the talk, along the lines of: "Let me be honest with you. You have been an arrogant asshole to me in the past, but I don't intend to do likewise. If you manage to turn your attitude around and be a cooperative and helpful coworker, then I'll forget about the past and give you a clean slate. If you don't, you know I'm in a position to make your life a living hell."



  • @TheRider said:

    My tendency would be to play it openly. Sit him down with you and give him the talk, along the lines of: "Let me be honest with you. You have been an arrogant asshole to me in the past, but I don't intend to do likewise. If you manage to turn your attitude around and be a cooperative and helpful coworker, then I'll forget about the past and give you a clean slate. If you don't, you know I'm in a position to make your life a living hell."

     

    Wow. That would end badly in just about every conceivable circumstance I can think of...



  • @MasterPlanSoftware said:

    Wow. That would end badly in just about every conceivable circumstance I can think of...

    Definitely. I can't even see how that would come out the way it was planned.



  • @AbbydonKrafts said:

    @MasterPlanSoftware said:
    Wow. That would end badly in just about every conceivable circumstance I can think of...

    Definitely. I can't even see how that would come out the way it was planned.

     

    Why would you ever to warn someone that you are going to screw them [over]?



  • @bohica61 said:

    Tell him if he can't design a sort algorithm with consistently better performance than a quicksort, his next performance review will not go well. 

    Actually, quick-sort only works well up to around 10,000 items. After that, I've found that I get better performance by breaking the data up into 10,000-item chunks, quicksorting each, then merge-sorting the chunks - using multiple passes of merge-sort if needed.



  • @AbbydonKrafts said:

    @Spectre said:
    If confronted with a question like this, I'll probably answer "it depends" or "the built-in one".
    It's actually a trick question. The real answer is: "I like cheese."

    But I [i]hate[/i] cheese! I just can't chew it.

    Oh crud, now I realize I won't be able to land a job. Time to apply to the Cleaning University.

    [b]morbiuswilters[/b], I don't disregard algorithm analysis, but trying to pick the generic "fastest" sorting algorithm, IMHO, is just silly. Just use your language/library's sort and Jam It be happy.



  • @MasterPlanSoftware said:

    Why would you ever to warn someone that you are going to screw them [over]?

    Because that would not be my intention (to screw him over). I would rather want to give him a chance to improve. Sort of make the world a better place for everyone. But maybe I'm too idealistic.



  • @snoofle said:

    Question: should I make his life miserable by treating him with the same disdain and disregard he showed me and others, or should I give him a clean slate?
    I'd start him off with a clean slate.  If he's as bad as his reputation says he is, then it won't take long for the slate to fill up.  OTOH, maybe the people in his company deserve to be looked down upon, and this guy could be a good resource for you.  Either way, he'll be deciding his own fate, and you can dump on him with a clean conscience if that's how it plays out.



  • @TheRider said:

    I would rather want to give him a chance to improve
     

    Not many people would respond to that by being nice. They would see it is the threat/ultimatum it is and act even worse. More likely if the guy is smart he will go right behind your back and have you fired.

    @TheRider said:

    But maybe I'm too idealistic.

    I tend to think you might be.



  • You should find out who the sadist was that made HIM interview you,while probebly knowing fully well you where going to be his direct manager.  



  • @stratos said:

    You should find out who the sadist was that made HIM interview you,while probebly knowing fully well you where going to be his direct manager.  

    I found out (afterward) that that particular decision hadn't been made until after the "interview". I think that his manager(s) figured that I wouldn't take his crap and (t)he(y) dumped him off on me.



  • The arrogant programmer has just proven to you that being an asshole can backfire and now you're considering being an asshole? What if this guy later works for a client you're trying to get business with or becomes a manager for a company you want a job with?

    It's always best to carry yourself with dignity and not worry much about people who don't carry themselves the same way.



  • @poopdeville said:

    You often can do better than Quicksort in applications.

    I kind of figured that there was probably something better; I just didn't know what it was. I figured that in most cases, the built-in sorting provided by the language library would be more than up to the task. In the context of the interview, the whole sorting question was totally off base w.r.t. the kinds of things that he was supposed to be checking me out on (knowledge of MQ and TIBCO, threading models, SOA, managing a global team of developers, etc)



  • @Carnildo said:

    There are sorting algorithms with O(n log n) worst-case performance, where quicksort is O(n2) worst-case. Further, radix sort is O(n)

    The best performance is O(1). Just use the multiple-universes theory, and you can assume the set is already sorted.

    But efficient algorithms are boring... bad algorithms are interesting! What about  evilsort, with O( (n^2)! ) ?



  •     Do not repay anyone evil for evil. Be careful to do what is right in the eyes of everybody. If it is possible, as far as it depends on you, live at peace with everyone. Do not take revenge, my friends, but leave room for God's wrath, for it is written: "It is mine to avenge; I will repay,"says the Lord. On the contrary:
       "If your enemy is hungry, feed him;
          if he is thirsty, give him something to drink.
       In doing this, you will heap burning coals on his head."



  • @mister said:

    What about  evilsort, with O( (n^2)! ) ?
    Now THAT's evil!  bridges hands eeeeeexcellent.



  • So the majority seem to be leaning towards a clean slate, and if he alienates folks (again), it's on him.

    So it has been written, so it shall be done!

    Thanks to all!



  •  @belgariontheking said:

    @mister said:

    What about  evilsort, with O( (n^2)! ) ?
    Now THAT's evil!  bridges hands eeeeeexcellent.

    That goes to show you, even being inefficient is sometimes hard. Hows that... instead of interview question: "Come up with the fastest sort", make one "come up with the worst sort algorithm... and define the big O of that algorithm. If you run out of time, write a point describing how your algorithm can be further improved to run slower than what is written"



  • @snoofle said:

    He asks if I can design something with consistently better performance. I think for a nanosecond before firing back: "If Knuth couldn't do better, what makes you think that I can?" He bristled and began to talk down to me.
     

    If you want consistency, use heapsort 



  • Take all the reviews and toss them in the air and let them land. The ones on top stay the ones on the bottom get canned. There's the quickest sorting method.

    As for anyone in management ever deliberately trying to sabotage the career of a report this is morally wrong and often illegal. So (as you intend to) ... do the right thing.



  • Do a clean slate, because he now works for you instead, so it is different, so you can forgive him. If he does the bad thing again, then you can fire him.



  • @mister said:

    The best performance is O(1). Just use the multiple-universes theory, and you can assume the set is already sorted.

    I'm having some trouble with this. The best I can manage is O(n). Here's my code:

    if notSorted(arrayToSort): destroyUniverse()

    My problem is that testing to see if the array is sorted still takes O(n). Any help? Plz send teh codez.



  • @mister said:

    But efficient algorithms are boring... bad algorithms are interesting! What about  evilsort, with O( (n^2)! ) ?

    That's nothing, Bogosort has an upper bound of O(∞).  True, it's average case is better than Evilsort and it's best case is O(n), but that's what makes it particularly insidious, because there is no telling how long it will take.



  • @Lexarius said:

    My problem is that testing to see if the array is sorted still takes O(n). Any help? Plz send teh codez.

    void sortArray( arr[] ArrayToSort ) { }

    There you have it, the full function. It works flawlessly if you call it in the correct universe (the one where the algorithm is already sorted). If you run it in the wrong universe... well, I can't help you with that, can I?



  • For me, I'd look at this as an opportunity.  Assuming you find out a year from now that you have to get rid of this jerk, it may be much more difficult.  Use the current opportunity to clear the decks.  Plausible deniability rules.  Too many people, too few positions -- a shame he has to bear the brunt of it. 



  • @UpNDown said:

    For me, I'd look at this as an opportunity.  Assuming you find out a year from now that you have to get rid of this jerk, it may be much more difficult.  Use the current opportunity to clear the decks.  Plausible deniability rules.  Too many people, too few positions -- a shame he has to bear the brunt of it. 

    Man, I wasn't gonna mention it, but this whole thread reminds me of something similar from my own life.   My company absorbed this other, puny company and my bosses decided to hold "internal interviews".  I got stuck interviewing this loser who called himself programmer.  My bosses were there and I decided to show off a little -- you know, rev my engines -- and asked him about sorting algorithms.  The idiot shoots back that he would just use the built-in sort function!  How ridiculous can you get!?  Anyway, I hear he might be my new boss, which just goes to show you TRWTF is technically incompetent management drones.

     

    Waitaminute...  shit! 



  • Just in case you are seriously, honestly going to abide by the opinions of TDWTF readers i want to voice my vote for clean slate.


    This will probably make my vote count less, but in fact, I have yet to see any benefit ever accrue to a person who persecutes another for previous slights or wrong doings. In the real world (as opposed to many people's sick fantasies) it best to treat everyone with respect, all the time - and extra, especially so if you are their boss. Others will see how you treat people and will feel respected. OK yes, don't over do it, you need to honest and up front if you find him irritating but be professional as well.

    If someone is a louse, then  yes you may need to take their statements with a grain of salt, ask them to please hold their tongue and/or double check their work etc etc. And, yes, if they really, really suck then you must go ahead and fire them - for the sake of the company.. but treating people with disdain and disregard - as a manager - is not just pointless and counterproductive - its really potentially quite dangerous for the health of the whole team that you are trying to lead. The danger is that, subconsciously you will treat him with disdain and disregard anyway, and thats just karmic payback for him - there is really no need to make it any worse by actually doing it consciously. Consciously, you should always attempt to rise above..



  • @mister said:

    There you have it, the full function. It works flawlessly if you call it in the correct universe (the one where the algorithm is already sorted). If you run it in the wrong universe... well, I can't help you with that, can I?

    Ah, I see. That works, but my QA guys aren't happy with your error handling. I guess if they want it to work in all (remaining) universes, they'll just have to deal with O(n).



  • Clean slate. He'll probably dirt it anyway. 

    EDIT: yeah, I read a bit further into the thread. Glad you agree with me. 🙂 


Log in to reply
 

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