Help me hire the best programmer. Really important for me! really :)

Discussion in 'PHP' started by nikolaalx, Jul 26, 2007.

  1. #1
    Hello,
    I have a rather strange problem.

    I have prepared a campaign for finding a programmer on regular work basis for my newly created company here and this is a big step for me.

    However I am feeling a little bit shaky about not picking the best possible guy.

    I have narrowed down all the candidates from 12 to 5 based on their CVs, and have prepared a bunch of tests (HR stuff...I have been studying this in my Uni)

    However I really want to test them about how adequate they are in real time.

    I am thinking of asking them to answer 2-3 questions which are strictly php related, and based on which answers I will know alot about the person...(if he is a capable programmer or not).

    I am speaking more of a simple question of logic which will reveal the technique or the methods which the person uses. But for this I need someone who is a perfect programmer to give me an advise:

    What to ask them?

    So please, suggest 2-3 questions which you personally believe are pretty simple and show alot about the capability and the level of creativity of a given programmer.


    Thanks,
    Nik
     
    nikolaalx, Jul 26, 2007 IP
  2. wmbetts

    wmbetts Peon

    Messages:
    27
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What's the difference between GET and POST?
    When should GET be used?
    When should POST be used?
    How are object-oriented programming and procedural programming different?
    What is the benefit of use object-oriented programming?
    Please explain the "extend" keyword.
    Please write a recursive function that will display the contents of the current directory and all subdirectories (Output should look like this:

    main_dir/file1
    main_dir/file2
    main_dir/sub_dir1/file1
    main_dir/sub_dir2/file1
    )

    Hope this helps.
     
    wmbetts, Jul 26, 2007 IP
    nikolaalx likes this.
  3. Sygon

    Sygon Peon

    Messages:
    439
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    What is OOP
    Why is OOP (Object orientated prograaming) benefitial
    Whats the main differences between php 5 and php 4
    What is an array
    What is regex and how is it benefitial

    Hope that helps too
     
    Sygon, Jul 26, 2007 IP
    nikolaalx likes this.
  4. nikolaalx

    nikolaalx Well-Known Member

    Messages:
    996
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    100
    #4
    Thanks guys...and what would be the best answers to these questions?
     
    nikolaalx, Jul 26, 2007 IP
  5. SeLfkiLL

    SeLfkiLL Active Member

    Messages:
    85
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    50
    #5
    Here’s my long list of hardball questions I use myself. Most are design-specific.

    Name some common security issues PHP programmers should keep in mind and measures to prevent them.
    • SQL Injection – All user-supplied variables should be “escaped” to prevent injection of false/exploitive SQL code.
    • File Access Exploits – Any user-supplied variables that are later used by file functions can be exploited to expose sensitive server files. These variables must be validated to protect private files.
    • Email Injection – All user-supplied variables should be validated before passed to the PHP mail() function to prevent anonymous mail exploitation
    • In general, it is best practice to assume any data that is supplied from a user can be possibly corrupted or exploited and thus should be checked for integrity.

    What are some best practices of making readable and maintainable code?
    • Comments should be placed in strategic locations throughout the code to identify its purpose and/or how the code works.
    • Appropriate and consistent indentation, spacing, and code structure should be used to create clean and easy-to-read code.
    • Variable and function names should represent what they are. Variable names should represent the data they hold and functions should represent the operations they perform. A consistent naming scheme should be used.
    • Files should be named to represent the code they contain. Similar code should be grouped together in their respective files for easy management.
    • Good design methodologies such as OOP and MVC should be employed where appropriate and a project should stick to such pattern throughout.

    What is "information hiding" and how is it used in programming?
    • It hides critical data that can be corrupted by human error
    • It creates an interface for input to ensure integrity of data (validation)

    What is OOP and how is it useful?
    • OOP is short for Object Oriented Programming.
    • It focuses on problem solving by using objects and classes to create abstract code
    • It encapsulates data and operations through functions that can be performed on that data
    • It describes state and behavior for objects
    • The abstract nature of OOP enforces Information Hiding
    • It allows the creation of user-defined types of data
    • It helps organize code
    • It promotes the methodology of “code re-use”

    What are the drawbacks of using OOP?
    • It can slow down a script’s execution speed
    • If abused, the code may not scale well with increasing traffic

    What is the benefit of using the Model-View-Controller design pattern?
    • It helps separate logic, data and presentation
    • The presentation is not affected by changing the way data is handled
    • The organizational structure of MVC allows scripts to scale better
    • Developers using the MVC pattern can easily separate responsibilities between specialties of designing and programming

    Most of these questions are good computer science practices beyond just PHP knowledge. A good programmer should have adopted most of these practices and knows how and when to use them. I hope you find some prime candidates and good luck with your new company. ;)
     
    SeLfkiLL, Jul 26, 2007 IP
    nikolaalx likes this.
  6. wheel

    wheel Peon

    Messages:
    477
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Wrong approach folks. You're asking questions about specific programming issues. That's not the sign of a great programmer.....language and specific issues don't matter.

    The way I've hired programmers in the past (and this technique was passed on to me by a friend who used it to hire programmers and engineers) and it works fabulously - because it tests what you care about; their ability to solve problems and how they solve problems.

    here's what you do - give them some basic questions designed to test how they solve problems. no right/wrong answer, just a bit of a thinker type problem. Give them five minutes, then discuss their answer and how they arrived at it. This is far more telling than asking about knowledge of specific exploits or a program specifics. I'm sure we can all agree that on the first one a good programmer can stay up to date on,and on the second one for agood programmer language doesn't matter.

    For example;
    ----------------------------------------------------------------
    You're given a list of words. We don't know how many words, but it's less than 5000. Write an algorithm to sort these words in reverse order.
    -------------------------------------------------------------------

    Now some folks will struggle for an elegant solution. Others will bring out the biggest, baddest, fastest sorting algorithm you've ever seen. And so on. The best programmer I ever hired basically came up with 'do a bubble sort in reverse'. Two seconds, done, thank you very much.

    You can judge it however you like. For me, that answer (and my follow up questions) proved this guy knew his stuff cold. Why a bubble sort? because it was easy - 5 minutes to program. Why not some fancy algo? because with 5000 items, speed isn't going to be an issue from a business perspective. He basically indicated he could spend 4 hours designing an elegant solution that ran in a quarter of a second,or spend 5 minutes writing this one and it would run in a second. The only difference I'd see would be the extra 4 hours of free programmers time. :).

    Anyway, that's the kind of general problem solving question I'd be asking.
     
    wheel, Jul 26, 2007 IP
    nikolaalx likes this.
  7. Chemo

    Chemo Peon

    Messages:
    146
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #7
    wheel hit the nail on the head with asking questions geared toward understanding the candidate's problem solving abilities. However, it also requires a thorough understanding on the part of the interviewer for evaluation of the answer.
     
    Chemo, Jul 26, 2007 IP
  8. nikolaalx

    nikolaalx Well-Known Member

    Messages:
    996
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    100
    #8
    Thanks, but arent those a bit more like theoretical questions....I mean what I am thinking is that even though someone might be a total retard and a looser, if he has read and memorized the answers can easily pass this test.

    Nice idea. This is what I thought of. To see how they approach a given problem.

    Maybe I will combine the theoretical questions and this question.

    Cheers,
    Nik
     
    nikolaalx, Jul 27, 2007 IP
  9. SeLfkiLL

    SeLfkiLL Active Member

    Messages:
    85
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    50
    #9
    In theory, yes someone can probably memorize the answers to those questions. I would think of them as more of guideline questions and to have the interviewee be able to prove his understanding of them. Not just answer them like test questions, but explain how they've applied to their own work in the past or how they would use them on X project for example.

    wheel's answer is also a good interview method to test on-the-spot thinking. The more interactive you can make the interview, the better you can understand the interviewee's thinking process.
     
    SeLfkiLL, Jul 27, 2007 IP