SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Hybrid View

  1. #1
    SitePoint Evangelist hessodreamy's Avatar
    Join Date
    Apr 2005
    Location
    uk
    Posts
    522
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    PHP programming task for candidates

    I'm trying to assess some candidates' PHP ability, specifically some OO understanding and something applicable to the application we're writing.
    I'll also throw in some multiple choice technical stuff, but I like to give them a coding task.

    For the actual coding I've come up with the following. Does it make sense? Is it suitably taxing but not too much and not going to take them a week? I only want them to spend a couple of hours tops on it. I've been working on this system exclusively for so long I can't be objective about other people's understanding of it.

    Consider a system with the following behaviour:

    Products are listed on the web site. Each product may be sourced from a different supplier.
    A customer places an order consisting of one or more products.
    For the products on the order each distinct product supplier needs to receive a purchase order for those products they supply (eg products 1 and 3 order supplied by supplier A, product 2 is supplied by supplier B etc). This represents us buying the products from the supplier, and instructs them to dispatch the products.

    Define a suitable class diagram representing these element.

    Provide code for appropriate class methods for the following operations:
    Sending the customer confirmation of the details of their order via email
    Sending the products' suppliers details of the purchase order


    What do you reckon?

  2. #2
    Community Advisor silver trophy

    Join Date
    Nov 2006
    Location
    UK
    Posts
    2,547
    Mentioned
    40 Post(s)
    Tagged
    1 Thread(s)
    Seems a reasonable task. I'd also have them store the info in a database as well as just email, their approach to this (albeit simple) task is indicative in general of their approach and whether they use modern and secure methods.

  3. #3
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Sounds as if you are operating a drop-shipping hub of some form.

    The only thing that bothers me is that this seems to follow the "happy path" and does not cater for "product not available" or delays in shipping - whether that data is available from any or all suppliers (hopefully via an API) is something that would get stuck in my head, I must admit.

    Maybe address those worries in the spec?

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,139
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Ah… wouldn't you want to dispatch a purchase order to a single distributor per product. The way it sounds you want to dispatch a purchase order to every distributor carrying the product which can't be correct.

    Quote Originally Posted by Cups
    whether that data is available from any or all suppliers (hopefully via an API) is something that would get stuck in my head, I must admit.
    How many distributors have you worked with? I guess one can dream…

    The last time I worked on something like this I was given a excell doc with the products. It was rough to say the least…
    The only code I hate more than my own is everyone else's.

  5. #5
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    I just meant that faced with that challenge, I would be wondering about the issue of fulfilment and coding defensively against it -- which, OK I admit, might not prey on else's mind but would on mine.

    So perhaps be specific with this line "You can take it that once placed all orders will be fulfilled." or similar, else, er, ask the candidate to design a fall-back?

  6. #6
    SitePoint Wizard TheRedDevil's Avatar
    Join Date
    Sep 2004
    Location
    Norway
    Posts
    1,196
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hessodreamy View Post
    Consider a system with the following behaviour:

    Products are listed on the web site. Each product may be sourced from a different supplier.
    A customer places an order consisting of one or more products.
    For the products on the order each distinct product supplier needs to receive a purchase order for those products they supply (eg products 1 and 3 order supplied by supplier A, product 2 is supplied by supplier B etc). This represents us buying the products from the supplier, and instructs them to dispatch the products.

    Define a suitable class diagram representing these element.

    Provide code for appropriate class methods for the following operations:
    Sending the customer confirmation of the details of their order via email
    Sending the products' suppliers details of the purchase order


    What do you reckon?
    Personally I don't like "do this task to prove what you can" kind of interviews and we don't normally use them ourself. I believe we have used it once or twice in the past, but each time I made it clear to the interview object, that if they did not get the job we would compensate them with $X for their time. At least if its done that way it is tasteful imo.

    What I see as the problem with using these kinds of tasks in the interview procedure, is that the person that is leading the interview does not know enough about the field to know if the interview object really know what they are talking about, or just pulling up fancy words.

    However the problem is also that unless you have a third party reviewing the code they make, you still does not know if it is optimal. You would just know if it works or if it does not work.

    If we take your example project, if it is created properly, you can add/remove suppliers by just dropping in/removing their class module. On the other side it can also be made as an intermingled mess.

    If I was to ask the interview object to do something in this task, I would ask them to setup the UML for the project (class and activity diagram), as that is all you need to judge if they are planning the development and integration correctly. Of course this does not show their PHP/MySQL skills, but it show their application development skills. And that is what most "PHP hackers" are missing, and the second they know that they can start calling themselves "developers".

  7. #7
    SitePoint Evangelist hessodreamy's Avatar
    Join Date
    Apr 2005
    Location
    uk
    Posts
    522
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by oddz View Post
    Ah… wouldn't you want to dispatch a purchase order to a single distributor per product. The way it sounds you want to dispatch a purchase order to every distributor carrying the product which can't be correct.
    Yeah, perhaps I could have been clearer on that. Perhaps the candidate will show some common sense. If not they might query it.

    Quote Originally Posted by Cups View Post
    delays in shipping - whether that data is available from any or all suppliers
    I'm afraid this part of the system is already designed around the happy path, as we don't have on-the fly information available to us, like oddz says. Would be nice (and a better system) if we did...

    Quote Originally Posted by TheRedDevil View Post
    I made it clear to the interview object, that if they did not get the job we would compensate them with $X for their time.
    I'm only asking for a few UML diagrams and a couple of complete class methods. I don't think it'll take them more than a couple of hours. I would consider that an acceptable investment into the interviewing process.

  8. #8
    SitePoint Member
    Join Date
    Jun 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Programming task looks good. But I am not sure, that you need to give it to every candidate.
    Because, first of all, not every candidate will spend his time, if he know that you give programming task to every candidate without any screening.
    Second, you can send so much time to verify the tasks of every candidate.

    I think that you should do some skills screening prior to practical test. It will allow you to save the time. And also this will add assurance to candidates. Because they will know, that they already made first test correctly and they are on the right way.

    Please checkout this PHP test:
    http://tests4geeks.com/test/php-mysql

    It has OOP questions, and aslo it has MySQL questions. The only disadvantage is that it's not free. But the price is really low in comparison with other assessment services. You can buy the tests just for several candidates for $20 - $30.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •