The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Code examples and interviews

Last post 05-05-2008 3:06 PM by ammoQ. 111 replies.
Page 1 of 3 (112 items) 1 2 3 Next >
Sort Posts: Previous Next
  • 03-10-2008 12:44 PM

    Code examples and interviews

    Locked Reply Contact

    I thought you might like this one. Trouble is - I'm having a bit of an issue deciding which category to choose to submit this under. You'd be far better of with some kind of enterprisey web 2.0 ajax tagging feature than a simple drop down of choices. ;) So I'm throwing it to the side bar, the name of which doesn't seem to make sense either. Where is the side bar? Can I drink there?

    We're looking for some new developers on our team here at our online travel reservation startup. London being London at the moment, it's proving hard to get good quality candidates to actually show up at an interview. Little did we know how bad the quality can be at times.

    We have a coding test that we give to potential hires. Not terribly hard, it's just a simple string manipulation exercise: Given a string, find all occurences of a substring without using any in built string functions. Obviously you'd never do this in real life, but your run of the mill 'teach yourself c# in 24 hours' developer could probably give it a shot and fool us.

    It does however, weed out a suprisingly number of people - their code doesn't compile, it doesn't work or somtimes they don't read the instructions and submit finger paintings instead. 

    The other day, a "friend" of one of our workmates pointed out the question had been posted to the msdn forums.   

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2940944&SiteID=1

    Technically - not a wtf, posting to forums can be a valuable source of information.  Proving how clueless you are in a public forums, however is.

    There are a couple of classic responses in there, none really good enough for our potential hire, so he had a follow up post the next day:

     http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2947702&SiteID=1

    Being the masochists that we are, we couldn't help but look up some of our potential hire's other questions. A few listed here:

     http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2098703&SiteID=1

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=802585&SiteID=1

     

    And this beauty:

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1263379&SiteID=1

     

    So many wtfs, so little time. 

     

  • 03-10-2008 12:46 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact
    It's called the sidebar because a list of the five most recently posted topics to it shows up in a box in the sidebar on the right^H^H^H^H^Hleft side of the non-forum pages
  • 03-10-2008 12:58 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    I always thought of it as something secondary to the main front-page article.  That usage resolves fairly neatly with the definitions here: 

     http://www.merriam-webster.com/dictionary/sidebar

  • 03-10-2008 1:11 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    MonkeyCode:

    "I deleted everything, completely fucking it all.  Save my ass, for I cannot save it myself."

    To fill your mind with knowledge, we must start by emptying it


    Hey JimBastard, listen up: NO YOU CANT HAVE A PONY

    PLEASE SPAM:
    jtobin@ohioinstituteofhealthcareers.edu
    jtobin@ohiobusinesscollege.edu
  • 03-10-2008 1:20 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    belgariontheking:

    MonkeyCode:

    "I deleted everything, completely fucking it all.  Save my ass, for I cannot save it myself."

     

    Yeah, that one is awesome. And it explains why he is looking for a job in the first place....

    Yes, I have been banned. Thanks to all for a good time.

    Tired of incompetent moderation?
    Wondering where all the clever discussion went?
    Try irc.slashnet.org #TDWTFMafia.
    We don't ban or kick and everyone is welcome.*

    *Stupid people will be mocked mercilessly and encouraged to commit suicide, however.
    Filed under:
  • 03-10-2008 1:32 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    MonkeyCode:

    Before you phone him to tell him not to bother with the interview, back everything up extra securely. There is no knowing how far that sort of thing can spread... do you really want to bet your database on the belief that speaking to him by phone can't screw your data?

    Linux is not a code base. Or a distro. Or a kernel. It's an attitude. And it's not about Open Source. It's about a bunch of people who still think vi is a good config UI.

    Notice: Phorm, and it's agents including ISPs collecting data on Phorm's behalf, are specifically forbidden from performing any processing or monitoring of the content of the above post. Hence, under the Regulation of Investigatory Powers Act 2000 any such attempt to profile this page by Phorm or it's agents is illegal.
    Filed under:
  • 03-10-2008 2:56 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    MonkeyCode:
     

    Wow -- this makes my day a whole lot better, for some sinister reason.

  • 03-10-2008 3:21 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    The one about the NullReferenceException particularly irritated me because I watched this happen in real-time.

    The explanation/excuse sounded almost the same:  I know what it means, and I tried debugging, but I can't figure out what's causing it, can you help?

    Isn't this supposed to be second nature to programmers?  If you can't track down an NRE/NPE, the most clear-cut and obvious of all exceptions, then you're in the wrong profession. 

  • 03-10-2008 3:21 PM In reply to

    • tster
    • Top 10 Contributor
    • Joined on 04-11-2006
    • Worcester, MA
    • Posts 1,106

    Re: Code examples and interviews

    Locked Reply Contact

    MonkeyCode:

    I thought you might like this one. Trouble is - I'm having a bit of an issue deciding which category to choose to submit this under. You'd be far better of with some kind of enterprisey web 2.0 ajax tagging feature than a simple drop down of choices. ;) So I'm throwing it to the side bar, the name of which doesn't seem to make sense either. Where is the side bar? Can I drink there?

    We're looking for some new developers on our team here at our online travel reservation startup. London being London at the moment, it's proving hard to get good quality candidates to actually show up at an interview. Little did we know how bad the quality can be at times.

    We have a coding test that we give to potential hires. Not terribly hard, it's just a simple string manipulation exercise: Given a string, find all occurences of a substring without using any in built string functions. Obviously you'd never do this in real life, but your run of the mill 'teach yourself c# in 24 hours' developer could probably give it a shot and fool us.

    It does however, weed out a suprisingly number of people - their code doesn't compile, it doesn't work or somtimes they don't read the instructions and submit finger paintings instead. 

    The other day, a "friend" of one of our workmates pointed out the question had been posted to the msdn forums.   

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2940944&SiteID=1

    Technically - not a wtf, posting to forums can be a valuable source of information.  Proving how clueless you are in a public forums, however is.

    There are a couple of classic responses in there, none really good enough for our potential hire, so he had a follow up post the next day:

     http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2947702&SiteID=1

    Being the masochists that we are, we couldn't help but look up some of our potential hire's other questions. A few listed here:

     http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2098703&SiteID=1

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=802585&SiteID=1

     

    And this beauty:

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1263379&SiteID=1

     

    So many wtfs, so little time. 

     

    how do you know that's the same guy?  Is that word for word the question you asked?  Even then, did you get the question from somewhere or make it up yourself?  Did you verify that that msdn forum name is his somehow?  I mean, you did ask a very generic string searching question. Also, the real WTF is thinking that you can search a string object without using any built in string functions.  Unless you use reflection (which will indirectly use string functions anyways) it will be impossible to do.

    The pig go. Go is to the fountain. The pig put foot. Grunt. Foot in what? ketchup. The dove fly. Fly is in sky. The dove drop something. The something on the pig. The pig disgusting... see bio for the earth shattering ending.
  • 03-10-2008 3:31 PM In reply to

    • mfah
    • Top 500 Contributor
    • Joined on 12-01-2007
    • Posts 112

    Re: Code examples and interviews

    Locked Reply Contact
    Oh wow, that was one of the best in a long time.
  • 03-10-2008 3:33 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    tster:
    how do you know that's the same guy?  Is that word for word the question you asked?  Even then, did you get the question from somewhere or make it up yourself?  Did you verify that that msdn forum name is his somehow?  I mean, you did ask a very generic string searching question. Also, the real WTF is thinking that you can search a string object without using any built in string functions.  Unless you use reflection (which will indirectly use string functions anyways) it will be impossible to do.
     

    Whoo hoo! Quoting the entire OP sure is fun!

    Anyway, why wouldn't you be able to use a character array and manually loop and search?

    I assume they are only looking for the person to be able to think for themeselves and solve a problem, so I don't think they are looking for anything that is going to set records in optimization or anything...

    Perhaps I am missing something... but this certainly seems possible to me....

    Yes, I have been banned. Thanks to all for a good time.

    Tired of incompetent moderation?
    Wondering where all the clever discussion went?
    Try irc.slashnet.org #TDWTFMafia.
    We don't ban or kick and everyone is welcome.*

    *Stupid people will be mocked mercilessly and encouraged to commit suicide, however.
    Filed under:
  • 03-10-2008 3:45 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    MasterPlanSoftware:
    but this certainly seems possible to me
    It is obviously possible to implement these things without string functions: the string functions had to have been implemented somehow. I don't know what tster is talking about, either.

  • 03-10-2008 3:46 PM In reply to

    • mfah
    • Top 500 Contributor
    • Joined on 12-01-2007
    • Posts 112

    Re: Code examples and interviews

    Locked Reply Contact
    tster:
    the real WTF is thinking that you can search a string object without using any built in string functions
    The .NET String class (as opposed to the string type) can actually be accessed using an index (look it up on MSDN), so it's perfectly possible.
  • 03-10-2008 3:49 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    tster:
    how do you know that's the same guy?  Is that word for word the question you asked?  Even then, did you get the question from somewhere or make it up yourself?  Did you verify that that msdn forum name is his somehow?  I mean, you did ask a very generic string searching question. Also, the real WTF is thinking that you can search a string object without using any built in string functions.  Unless you use reflection (which will indirectly use string functions anyways) it will be impossible to do.

    * Word for word, formatting included, the question we asked. Not sure where it came from, but the string used is a google whack.

    * The question was posted the day we asked several candidates to do the test

    * It's not impossible, the idea is just to get candidates to write a simple loop that iterates through a character array.

    * Apologies if these were your msdn posts ;) 

     

  • 03-10-2008 3:50 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    Welbog:

    MasterPlanSoftware:
    but this certainly seems possible to me
    It is obviously possible to implement these things without string functions: the string functions had to have been implemented somehow. I don't know what tster is talking about, either.

     

    Anyone who has ever used base C++ with no string library should be able to accomplish this easily. But I suspect a lot of CS graduates that were/are only exposed to .NET or Java would probably have a lot of issues with this. For better or for worse...

    Yay for 'intro to programming'!

    Yes, I have been banned. Thanks to all for a good time.

    Tired of incompetent moderation?
    Wondering where all the clever discussion went?
    Try irc.slashnet.org #TDWTFMafia.
    We don't ban or kick and everyone is welcome.*

    *Stupid people will be mocked mercilessly and encouraged to commit suicide, however.
    Filed under:
  • 03-10-2008 3:52 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    would the regular expressions class be considered in the category of built in string functions ?

  • 03-10-2008 3:53 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    MasterPlanSoftware:
    But I suspect a lot of CS graduates that were/are only exposed to .NET or Java would probably have a lot of issues with this.
    The idea that there are such graduates who have never encountered low-level programming before graduation terrifies me. Did you have to terrify me like that?

  • 03-10-2008 3:53 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    MasterPlanSoftware:

    Anyway, why wouldn't you be able to use a character array and manually loop and search?

    I assume they are only looking for the person to be able to think for themeselves and solve a problem, so I don't think they are looking for anything that is going to set records in optimization or anything...

    Perhaps I am missing something... but this certainly seems possible to me....

     That's exactly what we're hoping for. It's a really basic test - loop through a char array and look ahead the next x characters to see if it matches the search string. There are a couple of slight optimizations you can do - but they're not the point of the exercise. It's just to weed out the dead wood - we suggest that they do it at home and spend no more than an hour on it.

    Sadly for the development community, it weeds out ALOT of candidates.

     

  • 03-10-2008 3:53 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    pitchingchris:

    would the regular expressions class be considered in the category of built in string functions ?

     

    I think that would tend to defeat the purpose of the exercise...

    Yes, I have been banned. Thanks to all for a good time.

    Tired of incompetent moderation?
    Wondering where all the clever discussion went?
    Try irc.slashnet.org #TDWTFMafia.
    We don't ban or kick and everyone is welcome.*

    *Stupid people will be mocked mercilessly and encouraged to commit suicide, however.
    Filed under:
  • 03-10-2008 3:54 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    Welbog:

    MasterPlanSoftware:
    But I suspect a lot of CS graduates that were/are only exposed to .NET or Java would probably have a lot of issues with this.
    The idea that there are such graduates who have never encountered low-level programming before graduation terrifies me. Did you have to terrify me like that?

     

    Yeah you are right, made me queasy as well... but it had to be said.

    Yes, I have been banned. Thanks to all for a good time.

    Tired of incompetent moderation?
    Wondering where all the clever discussion went?
    Try irc.slashnet.org #TDWTFMafia.
    We don't ban or kick and everyone is welcome.*

    *Stupid people will be mocked mercilessly and encouraged to commit suicide, however.
    Filed under:
  • 03-10-2008 3:55 PM In reply to

    • mfah
    • Top 500 Contributor
    • Joined on 12-01-2007
    • Posts 112

    Re: Code examples and interviews

    Locked Reply Contact
    pitchingchris:

    would the regular expressions class be considered in the category of built in string functions ?

    Probably not, but it's definitely using a sledgehammer to crack a walnut.
  • 03-10-2008 3:58 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    mfah:
    pitchingchris:

    would the regular expressions class be considered in the category of built in string functions ?

    Probably not, but it's definitely using a sledgehammer to crack a walnut.

     

    You're probably right.. But its the best alternative in a few instances, especially since there's not a 1 - 1 relationship to C++'s  sscanf function.

  • 03-10-2008 4:00 PM In reply to

    Re: Code examples and interviews

    Locked Reply Contact

    MonkeyCode:
    It's just to weed out the dead wood - we suggest that they do it at home and spend no more than an hour on it.
     

    Hell, sounds like something I would let them do on the whiteboard. You would have to allow for the awkwardness and pressure, but it would be beneficial to see their thought process in realtime. I wouldn't even be concerned about syntax in any way. And I would say an hour would be about right in person so you could have a dialogue about things you could improve, potential pitfalls, etc. Again, the thought process would be my main focus there....

    Yes, I have been banned. Thanks to all for a good time.

    Tired of incompetent moderation?
    Wondering where all the clever discussion went?
    Try irc.slashnet.org #TDWTFMafia.
    We don't ban or kick and everyone is welcome.*

    *Stupid people will be mocked mercilessly and encouraged to commit suicide, however.
    Filed under:
  • 03-10-2008 4:02 PM In reply to