Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Question to ask an interviewee

Question to ask an interviewee

Scheduled Pinned Locked Moved The Lounge
questioncomtools
52 Posts 25 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Vikram A Punathambekar

    Isn't that technically undefined, at least in C++? You can't change the value of an lvalue on the right side of the = sign. Crikey, Score: 5.0 (2 votes). I haven't written a single line of C++ production code, and don't even remember when I last wrote any C++ code at all. Maybe my mentor at my previous company was right in asking me to switch from C# to C++. :^)

    Cheers, Vikram.


    The hands that help are holier than the lips that pray.

    modified on Friday, May 23, 2008 11:59 AM

    B Offline
    B Offline
    Brady Kelly
    wrote on last edited by
    #13

    I should have qualified that it was C#

    1 Reply Last reply
    0
    • D Duncan Edwards Jones

      Why should you avoid floating point variable types in financial applications?

      '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

      B Offline
      B Offline
      Brady Kelly
      wrote on last edited by
      #14

      Cos everyone knows that cents only have two digits, fool!

      1 Reply Last reply
      0
      • B Brady Kelly

        int i = 0;
        i = i++;

        What is the value of i after executing these statements.

        D Offline
        D Offline
        Dario Solera
        wrote on last edited by
        #15

        1? :-O

        If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe - but not a personality. - Charlie Brooker My Photos/CP Flickr Group - ScrewTurn Wiki

        1 Reply Last reply
        0
        • B Brady Kelly

          int i = 0;
          i = i++;

          What is the value of i after executing these statements.

          A Offline
          A Offline
          Anthony Mushrow
          wrote on last edited by
          #16

          For some crazy reason 0. It must get the current value of i and store it, increment, then set the stored value back into i undo-ing the increment.

          My current favourite word is: I'm starting to run out of fav. words!

          -SK Genius

          Game Programming articles start -here[^]-

          B 1 Reply Last reply
          0
          • A Anthony Mushrow

            For some crazy reason 0. It must get the current value of i and store it, increment, then set the stored value back into i undo-ing the increment.

            My current favourite word is: I'm starting to run out of fav. words!

            -SK Genius

            Game Programming articles start -here[^]-

            B Offline
            B Offline
            Brady Kelly
            wrote on last edited by
            #17

            SK Genius wrote:

            For some crazy reason 0

            It's not a crazy reason, it's a very logical reason. But, hey, you got it. :rose:

            W 1 Reply Last reply
            0
            • B Brady Kelly

              Clue: The ++ operator is called post-increment.

              J Offline
              J Offline
              John M Drescher
              wrote on last edited by
              #18

              I know that it is the post increment and that

              int i,j;
              i = 0;
              j = i++;

              So after this j=0 and i=1 But in your case with i being on the both side made me have a little doubt. To my defense I had less than 5 hours sleep and no caffeine yet. My 36 year old brain does not function until the first few cups of coffee take effect.. Either way, I agree this is a good question because it leads to a follow up question to ask why is the answer 1? [EDIT]I read the other posts... And well at least the answer is 1 in vc6.[/EDIT]

              John

              modified on Friday, May 23, 2008 9:43 AM

              1 Reply Last reply
              0
              • J jchigg2000

                You're actually keeping track of the number of lines of code you produce??

                J Offline
                J Offline
                John M Drescher
                wrote on last edited by
                #19

                Since I work on my own code and projects this is pretty easy. I use project line counter from www.wndtabs.com[^]

                John

                1 Reply Last reply
                0
                • P Programm3r

                  Hi all, What would you consider a good question to ask to a potential programmer to see whether he/she is worth their salt? Thanks in advance for any suggestions Regards,


                  The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^

                  M Offline
                  M Offline
                  Mushtaque Nizamani
                  wrote on last edited by
                  #20

                  http://www.newinterviewquestions.com/list.htm[^] This may help according to a job category.

                  Regards, Mushq

                  N 1 Reply Last reply
                  0
                  • P Programm3r

                    Hi all, What would you consider a good question to ask to a potential programmer to see whether he/she is worth their salt? Thanks in advance for any suggestions Regards,


                    The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^

                    T Offline
                    T Offline
                    ToddHileHoffer
                    wrote on last edited by
                    #21

                    I wouldn't ask them anything. Sit them down in front of pc with VS and sql server. Ask them to create a simple web page (if it is asp.net) or winform (if a windows job) using the pubs database that has a drop down list with authors and grid populated with books by each author. If they can make it work under the pressure of the interview then hire them. If not, don't.

                    I didn't get any requirements for the signature

                    O C L 3 Replies Last reply
                    0
                    • V Vikram A Punathambekar

                      Isn't that technically undefined, at least in C++? You can't change the value of an lvalue on the right side of the = sign. Crikey, Score: 5.0 (2 votes). I haven't written a single line of C++ production code, and don't even remember when I last wrote any C++ code at all. Maybe my mentor at my previous company was right in asking me to switch from C# to C++. :^)

                      Cheers, Vikram.


                      The hands that help are holier than the lips that pray.

                      modified on Friday, May 23, 2008 11:59 AM

                      N Offline
                      N Offline
                      Nemanja Trifunovic
                      wrote on last edited by
                      #22

                      Vikram A Punathambekar wrote:

                      Isn't that technically undefined, at least in C++?

                      Yep, in fact gcc and MSVC will give different results.

                      Programming Blog utf8-cpp

                      1 Reply Last reply
                      0
                      • T ToddHileHoffer

                        I wouldn't ask them anything. Sit them down in front of pc with VS and sql server. Ask them to create a simple web page (if it is asp.net) or winform (if a windows job) using the pubs database that has a drop down list with authors and grid populated with books by each author. If they can make it work under the pressure of the interview then hire them. If not, don't.

                        I didn't get any requirements for the signature

                        O Offline
                        O Offline
                        Oakman
                        wrote on last edited by
                        #23

                        This would test their skills as a programmer. What a novel idea!

                        Jon Smith & Wesson: The original point and click interface

                        1 Reply Last reply
                        0
                        • P Programm3r

                          Hi all, What would you consider a good question to ask to a potential programmer to see whether he/she is worth their salt? Thanks in advance for any suggestions Regards,


                          The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^

                          realJSOPR Offline
                          realJSOPR Offline
                          realJSOP
                          wrote on last edited by
                          #24

                          Here's a couple of ideas: ------------- Just sit there staring at them, kinda quivering. Start chain smoking (fumble with each match and cigarette - hand tremors are a nice visual touch) and look around nervously as if startled by a nearby noise. Swat at imaginary insects flying around your head. Occasionally, smile for no apparent reason, and then look off to one side as if there's someone beside you giving you advice. Nod in agreement, and/or shush the imaginary person. Do all that for about 15 minutes (remember - don't ask a question or speak to the candidate). When your show is completed, tell him thanks for coming in and to call back in an hour to see if he got the job. Oh yeah, it would help if your eyes were red and you were sweating profusely. ------------- Walk in with a loaded 9mm semi-auto, and lay it on the desk pointed at the candidate. Ask him if he'd like to declare any inaccuracies on his resume before you start the interview. If he craps his pants at the sight of your 9mm, dismiss him immediately. If he lays his own gun up on the table, give him points for coming to the interview prepared for anything.

                          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                          -----
                          "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                          modified on Friday, May 23, 2008 9:43 AM

                          1 Reply Last reply
                          0
                          • P Programm3r

                            Hi all, What would you consider a good question to ask to a potential programmer to see whether he/she is worth their salt? Thanks in advance for any suggestions Regards,


                            The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^

                            N Offline
                            N Offline
                            Nemanja Trifunovic
                            wrote on last edited by
                            #25

                            Programm3r wrote:

                            What would you consider a good question to ask to a potential programmer to see whether he/she is worth their salt?

                            Some of common Microsoft interview questions[^] are pretty good.

                            Programming Blog utf8-cpp

                            J 1 Reply Last reply
                            0
                            • J John M Drescher

                              Not knowing the answer (0 or 1) even though I have 11 years of experience and I have written > 500K lines of C++ code I would have to answer that this is bad code and the coder should be shot on the spot.

                              John

                              C Offline
                              C Offline
                              Colin Angus Mackay
                              wrote on last edited by
                              #26

                              John M. Drescher wrote:

                              would have to answer that this is bad code and the coder should be shot on the spot.

                              Good answer!

                              Recent blog posts: * Introduction to LINQ to XML (Part 1) - (Part 2) - (part 3) My website | Blog

                              1 Reply Last reply
                              0
                              • T ToddHileHoffer

                                I wouldn't ask them anything. Sit them down in front of pc with VS and sql server. Ask them to create a simple web page (if it is asp.net) or winform (if a windows job) using the pubs database that has a drop down list with authors and grid populated with books by each author. If they can make it work under the pressure of the interview then hire them. If not, don't.

                                I didn't get any requirements for the signature

                                C Offline
                                C Offline
                                Colin Angus Mackay
                                wrote on last edited by
                                #27

                                That is very similar to what we do. It works very well.

                                Recent blog posts: * Introduction to LINQ to XML (Part 1) - (Part 2) - (part 3) My website | Blog

                                T 1 Reply Last reply
                                0
                                • B Brady Kelly

                                  SK Genius wrote:

                                  For some crazy reason 0

                                  It's not a crazy reason, it's a very logical reason. But, hey, you got it. :rose:

                                  W Offline
                                  W Offline
                                  W Balboos GHB
                                  wrote on last edited by
                                  #28

                                  Reading the thread, I was rather saddened that I came up with 1 instead of 0. What's come over me? I still didn't get it. Then I did the experiments (VS2008):

                                  C#: result is 0, as noted.
                                  C++: result is 1, as I thought.

                                  Although it was cited as 'a very logical reason' that the value was set back, it would seem to conflict with the logic that is supposed to define the post-increment operator. Certainly the logic that has defined it heretofore! I'd love, therefore, to know what that 'a very logical reason' it's set back to 0 in c#. An Aside: If it's to appease the memory management . . . that's not a good reason. It's an unpleasant artifact that needs to be addressed and corrected.

                                  "The difference between genius and stupidity is that genius has its limits." - Albert Einstein
                                  "How do you find out if you're unwanted if everyone you try to ask tells you to go away?" - Balboos HaGadol

                                  B 1 Reply Last reply
                                  0
                                  • P Programm3r

                                    Hi all, What would you consider a good question to ask to a potential programmer to see whether he/she is worth their salt? Thanks in advance for any suggestions Regards,


                                    The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^

                                    C Offline
                                    C Offline
                                    Colin Angus Mackay
                                    wrote on last edited by
                                    #29

                                    Give them the fizz-buzz problem in the language you are hiring for. If you don't know what that is, Scott Hanselman explains in his podcast and has some links on his blog: http://www.hanselman.com/blog/HanselminutesPodcast53HiringAndInterviewingEngineers.aspx[^] I also have an implementation in LINQ: http://blog.colinmackay.net/archive/2008/04/16/2251.aspx[^]

                                    Recent blog posts: * Introduction to LINQ to XML (Part 1) - (Part 2) - (part 3) My website | Blog

                                    1 Reply Last reply
                                    0
                                    • W W Balboos GHB

                                      Reading the thread, I was rather saddened that I came up with 1 instead of 0. What's come over me? I still didn't get it. Then I did the experiments (VS2008):

                                      C#: result is 0, as noted.
                                      C++: result is 1, as I thought.

                                      Although it was cited as 'a very logical reason' that the value was set back, it would seem to conflict with the logic that is supposed to define the post-increment operator. Certainly the logic that has defined it heretofore! I'd love, therefore, to know what that 'a very logical reason' it's set back to 0 in c#. An Aside: If it's to appease the memory management . . . that's not a good reason. It's an unpleasant artifact that needs to be addressed and corrected.

                                      "The difference between genius and stupidity is that genius has its limits." - Albert Einstein
                                      "How do you find out if you're unwanted if everyone you try to ask tells you to go away?" - Balboos HaGadol

                                      B Offline
                                      B Offline
                                      Brady Kelly
                                      wrote on last edited by
                                      #30

                                      RHS expression is evaluated to 0, then i is incremented, but the RHS expression value is assigned back to i.

                                      W 1 Reply Last reply
                                      0
                                      • B Brady Kelly

                                        int i = 0;
                                        i = i++;

                                        What is the value of i after executing these statements.

                                        L Offline
                                        L Offline
                                        Lost User
                                        wrote on last edited by
                                        #31

                                        Hehe, nice one. Then ask them how to get a value of 1.

                                        Visit http://www.notreadytogiveup.com/[^] and do something special today.

                                        1 Reply Last reply
                                        0
                                        • T ToddHileHoffer

                                          I wouldn't ask them anything. Sit them down in front of pc with VS and sql server. Ask them to create a simple web page (if it is asp.net) or winform (if a windows job) using the pubs database that has a drop down list with authors and grid populated with books by each author. If they can make it work under the pressure of the interview then hire them. If not, don't.

                                          I didn't get any requirements for the signature

                                          L Offline
                                          L Offline
                                          Lost User
                                          wrote on last edited by
                                          #32

                                          A bit harsh but very good.

                                          Visit http://www.notreadytogiveup.com/[^] and do something special today.

                                          N 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups