yashke.com

Kuba Filipowski @ October 18th, 2006

Rekrutacja na stanowisko PHP developer’a w Yahoo

Yahoo zaczyna rekrutacje od rodzaju testu na inteligencję czy może raczej na intelektualne przystosowanie do zawodu. Test na pewno odfiltruje z miejsca tych kandydatów, którzy wysłali CV ale tak na prawdę nie do końca wiedzą co chcą robić w życiu. Test nie jest bardzo trudny ale biorąc pod uwagę fakt, że odpowiedzi trzeba wysłać po bodajże 30 minutach i pytania nie zawsze są banalne może nastręczać pewnych trudności. Zresztą sprawdźcie sami:

Aptitude Test

  1. If the price of an item including 17.5% VAT is x, what is the price without VAT?
  2. Look at certain groups of letters and see whether they meet certain criteria

    Group number Contents

    1 A B C
    2 A B
    3 A
    4 B C
    5 C

    For each group answer YES, if it contains

    A and not B
    OR A and C
    OR C and not B
    Otherwise answer NO

  3. To build a house the following activities must be completed:

    Activity Duration
    Foundation 3 weeks
    Walls 3 weeks
    Roof 3 weeks
    Set out garden 1 week
    Paint inside 2 weeks
    Telephone 1 week
    Paint outside 1 week
    Plumbing 2 weeks

    Assuming that there is no shortage of labour and materials, what further type of information is needed to enable you to calculate the elapsed time to build the house?

    (The answer is short. No calculating required).

  4. How many ways can you arrange the letters ABCD?

    eg ABCD, CDBA, ADCB, etc.
    If you use scrap paper for this or the next question, please save it.

  5. How many different ways can you arrange ABBC?
  6. Given month number x (x can be from 1 to 12), how would you calculate the quarter number for that month?

    (eg. for June x=6 and June is in quarter number 2)

  7. A and B have a bet for £10

    A loses but doesn’t pay yet.
    A and B have a second bet for £10.
    A loses again and pays £20 to B.
    After consideration it is agreed that A did not lose the second bet but won it instead.
    How much should B pay A?

  8. If a hen and a half lay an egg and a half in a day and a half, how long does it take one hen to lay one egg?

Jeśli pozytywnie przejdziemy powyższy test dostajemy się do kolejnego etapu rekrutacji czyli… dostajemy kolejny test :)
Ten test, to już konkretne pytania związane ze stanowiskiem o które się ubiegamy. Test podzielono na sekcje. Zaczyna się od pytań związanych z logiką, potem ogólnie programowaniem a dalej już konkretnie - PHP, programowanie obiektowe, bazy danych. Acha no i znowu tylko pół godziny.

Candidate Test
GENERAL LOGIC QUESTIONS

  1. Which of the statements below is true?

    1. The number of false statements here is one.
    2. The number of false statements here is two.
    3. The number of false statements here is three.
    4. The number of false statements here is four.

  2. Lets consider the following to be true

    1. Some animals are cats
    2. All cats are envious
    3. Some envious animals are blue
    4. No cats can fly
    5. All animals that can fly are not envious

    Is it true that at least one animal that can fly has to be blue?

  3. GENERAL PROGRAMMING QUESTIONS

  4. Write a regular expression that will match only dollar amounts that are correctly formatted. Your regular expression must enforce the following rules:

    1. The amount begins with a dollar symbol.
    2. The amount has either no decimals, or exactly two, as in $13 and $13.20.
    3. Commas appear correctly to separate thousands, millions, etc., as in $1,234,567.89.

    Make your regular expression easy to understand and efficient.

  5. Order the following sorting algorithms in order of decreasing efficiency:

    1. Merge sort
    2. Quick sort
    3. Insertion sort
    4. Bubble sort

  6. PHP PROGRAMMING QUESTIONS

  7. What is the difference between =, ==, and === (one, two, or three ‘=’ signs)?
  8. How do you cast an array to an object?
  9. What does the following expression evaluate to?
    (bool)(‘’ == null)
  10. What does the following expression evaluate to?
    is_null(‘’)
  11. Why may it be a problem to start your scripts with ‘<?’ instead of ‘<?php’, even when PHP is configured to allow short open tags?
  12. What is the difference between ‘MyClass::method()’ and ‘$this->method()’?
  13. Is it possible to override the way PHP handles errors? If so, how do you do it?
  14. What is the output of the following snippet?
    $i = 0;
    echo $i++;
    echo ++$i;
  15. In PHP4, what is the value of $a?

    function increment_1(& $arg)
    {
    $arg++;
    }
    function increment_2($arg)
    {
    $arg += 2;
    }
    $a = 1;
    increment_1($a);
    increment_2($a);
    echo $a;

  16. OBJECT ORIENTED PROGRAMMING QUESTIONS

  17. Given the following code, explain which design pattern is being used, and why. Error handling omitted for clarity and brevity.

    abstract class FoodItem
    {
    private $_price;
    public static function instance($foodItem)
    {
    $class = 'FoodItem_' . $foodItem;
    $file = 'FoodItem_'.$foodItem.'.php';
    include($file);
    return new $class;
    }
    public function getPrice()
    {
    return $this->_price;
    }
    }
    class FoodItem_Burger extends FoodItem
    {
    private $_price = 1.99;
    }
    class FoodItem_Fries extends FoodItem
    {
    private $_price = 0.99;
    }

  18. Given the classes in the previous question, and the following skeleton for Order class:

    class Order
    {
    private $_items = array();
    private $_totalCost = 0;
    public function addItem(FoodItem $foodItem)
    {
    // your code here
    }
    public function getTotalCost()
    {
    // your code here
    }
    }

    1. Fill in the details for the addItem method, making sure a new FoodItem object is created, and a count of the total cost is maintained.
    2. Fill in the details for the getTotalCost method so that it returns the total cost of the order.

  19. Finally, given a fast-food order of a burger and fries, provide the code necessary to model the following:

    1. The creation of a new order
    2. Adding a burger to your order
    3. Adding some fries to your order
    4. Getting the total cost for the order

    <?php
    // your code here
    ?gt;

    Discuss briefly how inheritance can break encapsulation.

    RDBMS & MYSQL QUESTIONS

  20. Create a database BOOKSTORE schema that describes:
    1. AUTHORs
    2. BOOKs
    3. The relationship between AUTHORs and BOOKs

    AUTHOR BOOK

    For the sake of simplicity, keep the schema as basic as possible.

  21. On the database above, what query would you run to determine which AUTHOR(s) wrote more than one book.
  22. In MySQL, what statement needs to be run to give permission to the user MYUSER, with password MYPASSWORD, to read and write to all the tables in the database BOOKSTORE.
  23. In your opinion, which of the following SQL queries is most correct and adheres to the best programming practices for achieving its apparent goal?
    1. SELECT Table_One.* FROM Table_One, Table_Two WHERE Table_Two.Index > 100 ORDER BY Table_One.Rank LIMIT 20;
    2. UPDATE Table SET Index = Index + 1;
    3. INSERT INTO Table VALUES (1, 2, 3, 4);
    4. DELETE * FROM Table;

Te etapy odbywają się drogą mailową. Co jest dalej? Ktoś wie?

Tagi: ,

16 Komentarzy do “Rekrutacja na stanowisko PHP developer’a w Yahoo”

  1. hmm napisał:

    Nie mam pojęcia:
    “Why may it be a problem to start your scripts with ‘

  2. hmm napisał:

    Coś mi usunęło…

  3. serafin napisał:

    Widać, że “amjerykański” koncern bo pytania sa banalne i kazdy student informatyki na nie bez problemu odpowie (znajac troszke php i troszke bazy danych). Takze jak dla mnie - kicha totalna i smiech na sali.

  4. SiteMAn napisał:

    “serafin ” w takim razie odpowiedz chocby na ostatnie pytanie

  5. g2 napisał:

    serafin: wliczając to z kurą?

  6. pawlik napisał:

    hmm - mogą się gryźć z tagami otwierającymi xmla

    SiteMAn - ostatnie jest banalne, odp: 1
    2 - brakuje WHERE (uaktualni wszystkie rekordy w tabelii)
    3 - przy zmianie struktury tabeli zapytanie sie sypie (dodac nazwy pol)
    4 - brakuje WHERE (usunie wszystkie rekordy z tabelii)

    serafin - 1

    dostałem się? ;-)

  7. kuba napisał:

    hehe serain, przyjrzyj się jeszcze raz :) co jest nie tak z 1? no?

  8. losamorales napisał:

    mielismy restore bazy wiec niektore komentarze poszly. przepraszam za to

  9. SiteMAn napisał:

    DrLex moze ty sie osmieszasz bo tylko paplasz, a nie potrafisz pokazac ze znasz chociaz jedna odpowiedz. Pozatym chcialem aby serafin, skoro dla niego to smiech, udowodnil to i dal odpowiedz na ktores pytanie, wiadomo ze na koncu sa zazwyczaj najlatiwejsze, wiec napisalem ze na ostanie. Jak widac wie co mowi.

  10. SiteMAn napisał:

    DrLex moze ty sie osmieszasz bo tylko paplasz, a nie potrafisz pokazac ze znasz chociaz jedna odpowiedz. Pozatym chcialem aby serafin, skoro dla niego to smiech, udowodnil to i dal odpowiedz na ktores pytanie, wiadomo ze na koncu sa zazwyczaj najlatiwejsze, wiec napisalem ze na ostanie.

  11. xinn napisał:

    pawlik:
    w 4) wcale nie chodzi o `brak where`
    w przypadku checi usuniecia wszelkich rekordow w tabeli znacznie efektywniejsze jest `truncate table`

    ten etap testu jest naprawde prosty..:) wlasciwie zadnych problemow z pytaniami

  12. Paweł Gościcki napisał:

    Dlaczego mi się wydaje, że pierwsze zapytanie SQL jest bez sensu - tj. nie łączy Table_One z Table_Two poprzez (domniemany) klucz obcy, a to oznacza wybranie jakiegoś misz-maszu dwóch tabel (chyba, że czegoś nie dostrzegam).

  13. sajon napisał:

    Ciekawy jestem, jak odpowiedzieliście na tytanie nr 3. :)

  14. SongoQ napisał:

    @Paweł Gościcki Nie ma czegos takiego jak domniemany klucz obcy takie zapytanie da iloczyn kartezjanski.

  15. Sebastian napisał:

    W oddziale w Londynie są przynajmniej dwie rozmowy telefoniczne, a później kilka godzin rozmów na miejsu z deweloperami i kierownikami.

    Jeśli ktoś chce doświadczyć procesu rekrutacji na własnej skórze, zapraszam do kontaktu: właśnie pojawiły się nowe oferty :-)

  16. popielaty napisał:

    pliki xml rozpoczynają się od [znaku mniejszości]?xml / jeżeli używasz short tagów, pierwsze dwa znaki zostaną zinterpretowane przeze serwer jako PHP i zonk.

Skomentuj ten wpis!