Interview test......

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nicholls.Mark@mtvne.com

    #1

    Interview test......

    I want to set some simple coding tests for an interview....Jo el
    recommends (for C programmers)... .

    1. Reverse a string in place
    2. Reverse a linked list
    3. Count all the bits that are on in a byte
    4. Binary search
    5. Find the longest run in a string
    6. atoi
    7. itoa

    I'm tempted to use 1....but it seems a little contrived....an d 5 seems
    reasonable.....
    (unless people know of ways of shortcutting the test.....)

    any other suggestions....

    I obviously want to test ability rather than knowledge...so I don't
    want things that is easy if you happen to know some obscure (or not)
    method.....

  • =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?=

    #2
    RE: Interview test......

    Simple... Which test is closest to the task you are hiring the person to
    perform within your team?

    "Nicholls.Mark@ mtvne.com" wrote:
    I want to set some simple coding tests for an interview....Jo el
    recommends (for C programmers)... .
    >
    1. Reverse a string in place
    2. Reverse a linked list
    3. Count all the bits that are on in a byte
    4. Binary search
    5. Find the longest run in a string
    6. atoi
    7. itoa
    >
    I'm tempted to use 1....but it seems a little contrived....an d 5 seems
    reasonable.....
    (unless people know of ways of shortcutting the test.....)
    >
    any other suggestions....
    >
    I obviously want to test ability rather than knowledge...so I don't
    want things that is easy if you happen to know some obscure (or not)
    method.....
    >
    >

    Comment

    • John Timney \(MVP\)

      #3
      Re: Interview test......

      What exactly are you looking to get from the test? I ask because I'm not a
      fan of this type of interview scenario.

      Ability does not come from being able to write a snippet of code in an
      interview - its usually faster to download a snippet off the web these days
      as an example and code from that - and most good coders have a library of
      common functions they refer to (like string reverse etc.).

      Its not really a good assesment of whether someone can disseminate a
      problem, work out a strategy to solving it, plan an approach to solving the
      problem, design and implementing that strategy to completion. I actually
      prefer to pass a flawed piece of code to a candidate and ask them to try and
      identify the problem with it, based in given inputs and outputs - which is
      more like the real world problem a coder will face daily. You can then
      assess how they dealt with the problem and how they sought solution which
      shows experience and ability much better.

      Regards

      John Timney (MVP)




      <Nicholls.Mark@ mtvne.comwrote in message
      news:1190376545 .240738.68000@2 2g2000hsm.googl egroups.com...
      >I want to set some simple coding tests for an interview....Jo el
      recommends (for C programmers)... .
      >
      1. Reverse a string in place
      2. Reverse a linked list
      3. Count all the bits that are on in a byte
      4. Binary search
      5. Find the longest run in a string
      6. atoi
      7. itoa
      >
      I'm tempted to use 1....but it seems a little contrived....an d 5 seems
      reasonable.....
      (unless people know of ways of shortcutting the test.....)
      >
      any other suggestions....
      >
      I obviously want to test ability rather than knowledge...so I don't
      want things that is easy if you happen to know some obscure (or not)
      method.....
      >

      Comment

      • Michael S

        #4
        Re: Interview test......

        What kind of developer are you looking for?
        A C# web-developer can work magic, without knowing how to complete any of
        the tasks below.

        Hehe, I think I can do Joels test in like a minute:
        1. Use google
        2. Use google
        3. Why?
        4. Use google
        5. What?
        6. old c stuff
        7. old c stuff

        Am I hired?

        Jokes aside, having a dev actually submit the code says nothing.
        And as far as I remember, Joel says that the answer is not important,
        but how the dev thinks.

        Instead of having the applicant give you the code for a binary search,
        ask him/her what a binary search is, and if the applicant can explain
        it to you, and tells you about Ordos(log2N),
        the cost of having the list sorted and so on,
        the applicant is probably a good hire.

        My old trick is to show some of the code we are working on.
        Except that the code is mined with stupid code in some places.
        And while I talk about the code I look at the applicants reaction.
        But you have to be carful making judgement, as the applicant may
        be nervous and might not give critique as of politeness.

        The key is to get the applicant talking about the code,
        and while you promote bad code as being super smart,
        if the applicant looks at you like you are a mad-man,
        you have a good hire.

        Also, it may be good idea telling the applicant you mined your code.
        If the applicants leave still thinking you are a mad man, they probably
        won't want to work for you anyway. =)

        My 2 cents
        - Michael Starberg

        <Nicholls.Mark@ mtvne.comwrote in message
        news:1190376545 .240738.68000@2 2g2000hsm.googl egroups.com...
        >I want to set some simple coding tests for an interview....Jo el
        recommends (for C programmers)... .
        >
        1. Reverse a string in place
        2. Reverse a linked list
        3. Count all the bits that are on in a byte
        4. Binary search
        5. Find the longest run in a string
        6. atoi
        7. itoa
        >
        I'm tempted to use 1....but it seems a little contrived....an d 5 seems
        reasonable.....
        (unless people know of ways of shortcutting the test.....)
        >
        any other suggestions....
        >
        I obviously want to test ability rather than knowledge...so I don't
        want things that is easy if you happen to know some obscure (or not)
        method.....
        >

        Comment

        • Michael S

          #5
          Re: Interview test......

          <Nicholls.Mark@ mtvne.comwrote in message
          news:1190376545 .240738.68000@2 2g2000hsm.googl egroups.com...
          >I want to set some simple coding tests for an interview....Jo el
          recommends (for C programmers)... .
          >
          1. Reverse a string in place
          public class Demo
          {
          public void Start()
          {
          Console.WriteLi ne(Reverse("I know how to reverse in .NET 3.5
          *s*"));
          }

          string Reverse(string s)
          {
          var q =
          (from c in s
          select c).Reverse();

          var sb = new StringBuilder() ;
          q.ToList().ForE ach(c =sb.Append(c));

          return sb.ToString();
          }
          }

          Oops, forgot about the 'in place' part of the task.
          Guess I have to go unsafe or to solve task number 1
          as strings are immutable in .NET. =)

          - Michael Starberg


          Comment

          • Ignacio Machin \( .NET/ C# MVP \)

            #6
            Re: Interview test......

            Hi,

            <Nicholls.Mark@ mtvne.comwrote in message
            news:1190376545 .240738.68000@2 2g2000hsm.googl egroups.com...
            >I want to set some simple coding tests for an interview....Jo el
            recommends (for C programmers)... .
            >
            1. Reverse a string in place
            This is good in C, not work in C#, string in C# are inmutables. But you can
            ask that and if the answer is other than a stare look like "what r u
            talking about" he does not know it.

            Recently I got in a similar situation I was asked to implement a tree
            structure. The code itself was useless, but it gave to a good conversation
            of why/how to implement the stuff. How to test it, etc. so in resume the
            test itself was not important, the answers derived from it were the
            determinant criteria.


            Comment

            • Samuel R. Neff

              #7
              Re: Interview test......

              On Fri, 21 Sep 2007 14:54:47 +0200, "Michael S" <no@no.nowrot e:
              ....
              >My old trick is to show some of the code we are working on.
              >Except that the code is mined with stupid code in some places.
              >And while I talk about the code I look at the applicants reaction.
              >But you have to be carful making judgement, as the applicant may
              >be nervous and might not give critique as of politeness.
              >
              ....
              >- Michael Starberg
              Isn't that a little dangerous? If someone showed me the code that
              they said was what they were working on and it was lined with stupid
              stuff, my first reaction would be to appologize for waisting their
              time and leave. :-)

              Sam


              ------------------------------------------------------------
              We're hiring! B-Line Medical is seeking .NET
              Developers for exciting positions in medical product
              development in MD/DC. Work with a variety of technologies
              in a relaxed team environment. See ads on Dice.com.

              Comment

              • Michael Starberg

                #8
                Re: Interview test......

                "Samuel R. Neff" <samuelneff@nom ail.comwrote in message
                news:ijl7f3d5k6 b23nuk742glpr2g koe2b7aht@4ax.c om...
                On Fri, 21 Sep 2007 14:54:47 +0200, "Michael S" <no@no.nowrot e:
                ...
                >>My old trick is to show some of the code we are working on.
                >>Except that the code is mined with stupid code in some places.
                >>And while I talk about the code I look at the applicants reaction.
                >>But you have to be carful making judgement, as the applicant may
                >>be nervous and might not give critique as of politeness.
                >>
                ...
                >>- Michael Starberg
                >
                Isn't that a little dangerous? If someone showed me the code that
                they said was what they were working on and it was lined with stupid
                stuff, my first reaction would be to appologize for waisting their
                time and leave. :-)
                >
                Sam
                >
                Well, they key is to notice that and explain that the code was mined.
                Also, to get the applicant talking. Show that you want critique and talk
                about code.
                What applicant would start of by saying that the interviewers code sucks?
                You need to invite them into a conversation about code.
                You need to be nice.

                From what I can tell, and from the dudes and gals that got hired as coders,
                sitting in front of a computer and talk about code,
                was an important factor for them when they took the job.

                They liked that, they felt comfortable with that,
                instead of being crammed in a conference room
                and reply to silly questions.

                But it is a little dangerous, and it is important to stay low,
                as you are not just hiring, you are selling something,
                a workplace.

                So let the applicant talk, and not be a bigot, like:
                - This is my cool code, I am supercool and you just an applicant newbie.

                That would make anyone appologize for waisting their time and leave.
                I'd wouln't even apologize. I'd laugh.

                But Sam, wouln't you be comfortable sitting around talking about C#,
                perhaps comparing it to C++, Java and Delphi, and see actual code,
                and by so get proof that your co-workers code won't wind up on
                worsethanfailur e/dailyWTF =)

                - Michael Starberg


                Comment

                • Michael Starberg

                  #9
                  Re: Interview test......

                  "Michael S" <no@no.nowrot e in message
                  news:ecNgABF$HH A.3780@TK2MSFTN GP06.phx.gbl...
                  <Nicholls.Mark@ mtvne.comwrote in message
                  news:1190376545 .240738.68000@2 2g2000hsm.googl egroups.com...
                  Jon Skeet;
                  I expect you to use this code and write an article on premature
                  optimization.
                  Maybe you can publish it on your excellent website, April 1. =)

                  - Michael Starberg


                  Comment

                  • Jon Skeet [C# MVP]

                    #10
                    Re: Interview test......

                    Michael Starberg <no@no.comwrote :
                    "Michael S" <no@no.nowrot e in message
                    news:ecNgABF$HH A.3780@TK2MSFTN GP06.phx.gbl...
                    <Nicholls.Mark@ mtvne.comwrote in message
                    news:1190376545 .240738.68000@2 2g2000hsm.googl egroups.com...
                    >
                    Jon Skeet;
                    I expect you to use this code and write an article on premature
                    optimization.
                    Maybe you can publish it on your excellent website, April 1. =)
                    LOL. No, interview code is often pointless for anything other than
                    finding out about the candidate.

                    I had a Java test I gave which had about 35 problems in about 60 lines
                    of code. Some of the problems were obvious, some weren't. I converted
                    it to C#, but lost my favourite problem (String.Split in Java uses a
                    regular expression, and the idea was to split on a dot - so it had to
                    be escaped).

                    There are lots of different kinds of coding tests, of course...

                    --
                    Jon Skeet - <skeet@pobox.co m>
                    http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
                    If replying to the group, please do not mail me too

                    Comment

                    • Michael Starberg

                      #11
                      Re: Interview test......

                      "Jon Skeet [C# MVP]" <skeet@pobox.co mwrote in message
                      news:MPG.215f81 f551ede01d4ab@m snews.microsoft .com...

                      Hehe.

                      If you ever applied for a new job,
                      all you have to do is submit your webpage,
                      - Any questions?

                      You are a inpiration for all of us

                      But back to our first guru, Joel on software,
                      his c programming tasks are pure c oriented.
                      Perhaps good if you are hiring a nerd that is supposed
                      to code embedded systems in microcode,
                      or an os-kernel.

                      But what would be good C# questions?
                      Being inspired by you and this usenet channel,
                      I think I would want to know and ask a see-sharper:

                      1. What are events and tell me about delegates.
                      2. What does internal protected mean, and have you ever used it?
                      3. What is the difference between overriding and reintroducing?
                      4. What is the PME-model?
                      5. How many pages would you need to write a paper on threading in .NET? *s*
                      6. What is Linq?
                      7. What is generations in the garbage collector, and how does it work?
                      8. What is IDisposable and why do .NET rename the OO-term 'destructor' into
                      'finalalizer'?
                      9. Tell me about generics and co/contra-variance.
                      10. What is Ordos?
                      11. What are normal forms in a relational database?
                      12. How should you comment your code?

                      This summer, I got 'upgraded' from MCAD to MCPD.
                      I took me three tries until I passed the exam,
                      and got my new nifty certificate.
                      While non-MCAD can take 2 tests and become MCTS,
                      I had to take three tests at the same time.
                      88 random questions from a 700 question bank of stupidity.

                      Not one question asked anything about the 12 bullets above.
                      Stupid test. I remember one question boiled down to
                      if I should call Assembly.Load() or Assembly.LoadFr om().
                      The correct answer was Assembly.LoadFr om()
                      as there are no static Assembly.Load() metod
                      on the Assembly class. Tjeesus.

                      Hello??? Am I supposed to know these things by heart?
                      I think not. I installed the gigabytes of MSDN for a reason,
                      and I know how to press F1, or use intellisense,
                      when I want to load an assembly in runtime.

                      Another question I remember was about instrumentation ,
                      and I got to learn that I should not instrument on a daily basis,
                      nor stop using it, but the correct answer was to instrument
                      according to the maintanance plan. WTF?

                      It took me three tries to pass the exam, and every time
                      I tried, it felt surreal. What is it Cypher says in the movie The Matrix?

                      - Buckle up Dorothy, 'cause Kansas is going bye-bye.

                      This is why I downplay my MCPD certificate.
                      as it only shows that I can remember facts good enough
                      to pass a microsoft exam.

                      It says nothing, about my coding-skillz nor anything of
                      my skillz in system development and design. Or anything
                      about me not knowing how to spell skills correctly.

                      If an applicant came to me and started bragging about his
                      MCPD status, I'd end the interview with a laugh.

                      - Michael Starberg


                      Comment

                      • Jon Skeet [C# MVP]

                        #12
                        Re: Interview test......

                        Michael Starberg <no@no.comwrote :
                        If you ever applied for a new job,
                        all you have to do is submit your webpage,
                        - Any questions?
                        You might be surprised, actually...
                        You are a inpiration for all of us
                        >
                        But back to our first guru, Joel on software,
                        his c programming tasks are pure c oriented.
                        Perhaps good if you are hiring a nerd that is supposed
                        to code embedded systems in microcode,
                        or an os-kernel.
                        Well, there's more to it than that - there's seeing how someone thinks
                        and solve problems. That doesn't show you their object orientation
                        skills, but it shows a few interesting things.
                        But what would be good C# questions?
                        Being inspired by you and this usenet channel,
                        I think I would want to know and ask a see-sharper:
                        >
                        1. What are events and tell me about delegates.
                        2. What does internal protected mean, and have you ever used it?
                        3. What is the difference between overriding and reintroducing?
                        4. What is the PME-model?
                        5. How many pages would you need to write a paper on threading in .NET? *s*
                        6. What is Linq?
                        7. What is generations in the garbage collector, and how does it work?
                        8. What is IDisposable and why do .NET rename the OO-term 'destructor' into
                        'finalalizer'?
                        9. Tell me about generics and co/contra-variance.
                        10. What is Ordos?
                        11. What are normal forms in a relational database?
                        12. How should you comment your code?
                        Ha - you have high standards. If someone can tell me the different
                        between a value type and a reference type, what the "using" statement
                        is for, and when they'd use StringBuilder, they're better than most
                        candidates. Sad, isn't it?

                        To be honest, what I look for in a candidate is a spark (once I've
                        satisfied myself that they're at all competent). The questions that are
                        appropriate to find that spark are open-ended, and depend on the
                        experience of the candidate, but things like:

                        o What do you like most about C# 2 over C# 1?
                        o What would you change in C# if you could?
                        o What benefits does C# have over Java and vice versa?

                        <snip>
                        If an applicant came to me and started bragging about his
                        MCPD status, I'd end the interview with a laugh.
                        Agreed. People could claim I'm biased though, never having taken any
                        certification myself :)

                        --
                        Jon Skeet - <skeet@pobox.co m>
                        http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
                        If replying to the group, please do not mail me too

                        Comment

                        • Michael Starberg

                          #13
                          Re: Interview test......

                          "Jon Skeet [C# MVP]" <skeet@pobox.co mwrote in message
                          news:MPG.215f81 f551ede01d4ab@m snews.microsoft .com...
                          >
                          There are lots of different kinds of coding tests, of course...
                          >
                          I would never take a coding test.
                          If they want to hire me, then I ask for a offer.

                          If they ask for a code-example a la Joel,
                          we start out with a breach of trust, and per so,
                          I don't want the job.

                          This thread is stuck on hiring.
                          Real programmers don't get hired,
                          they pick where to work.

                          And so I flip the entire thread from heads to tail,
                          and using a Kennedy metaphore,

                          "Instead of asking what a coder can do for you,
                          ask what your company can do for the coder"

                          A happy coder is a bug-free coder. =)

                          - Michael Starberg



                          Comment

                          • Michael Starberg

                            #14
                            Re: Interview test......

                            "Doug Semler" <dougsemler@gma il.comwrote in message
                            news:eZ4fQIY$HH A.4656@TK2MSFTN GP04.phx.gbl...

                            Excellent post!
                            I'll ponder on this and give my 1 cent after some sleep

                            - Michael Starberg


                            Comment

                            • Jon Skeet [C# MVP]

                              #15
                              Re: Interview test......

                              (I'll reply to the longer post when I've got more time.)

                              Michael Starberg <no@no.comwrote :
                              There are lots of different kinds of coding tests, of course...
                              >
                              I would never take a coding test.
                              If they want to hire me, then I ask for a offer.
                              I don't think I'd ever go that far. I applied for my current job like
                              anyone else would. I've had a few jobs specifically offered to me, but
                              really not very many at all.
                              If they ask for a code-example a la Joel,
                              we start out with a breach of trust, and per so,
                              I don't want the job.
                              I think it's reasonable not to trust CVs too far. I've seen a *lot* of
                              rubbish talked about on CVs. I'd never assume that someone can code
                              well just because they claim they can. Of course, if they've got sample
                              code on the net etc, that helps - but it's better to see someone in
                              action.
                              This thread is stuck on hiring.
                              Real programmers don't get hired,
                              they pick where to work.
                              Well, they still have to go for an interview - at least round here.
                              There was certainly no guarantee I'd get my current job.
                              And so I flip the entire thread from heads to tail,
                              and using a Kennedy metaphore,
                              >
                              "Instead of asking what a coder can do for you,
                              ask what your company can do for the coder"
                              >
                              A happy coder is a bug-free coder. =)
                              Well, I'd settle for "a happy coder is a more productive coder" :)

                              --
                              Jon Skeet - <skeet@pobox.co m>
                              http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
                              If replying to the group, please do not mail me too

                              Comment

                              Working...