PHP / MySQL Programmer - What are good interview Questions?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Big Ray
    Confirmed User
    • Dec 2003
    • 464

    #1

    PHP / MySQL Programmer - What are good interview Questions?

    So, I am hiring a PHP / MySQL Guru. Top notch. Good Pay. Free Red Bull.

    Anyway, I have some decent interview questions.. but am looking for more.

    Post your PHP / MySQL Interview questions and answers here!

    Five of the Top 10 Largest Programs Host with Jupiter. Find out why at http://www.jupiterhosting.com
  • Calvinguy
    Confirmed User
    • Oct 2002
    • 1752

    #2
    What is localhost?

    Comment

    • egonetworks
      Confirmed User
      • Jan 2004
      • 6706

      #3
      Are you or any of your family sick and/or dying, or will they be sick and/or dying when the deadline approaches?

      Comment

      • JDog
        Confirmed User
        • Feb 2003
        • 7453

        #4
        Originally posted by egonetworks
        Are you or any of your family sick and/or dying, or will they be sick and/or dying when the deadline approaches?
        That's great!

        jDOG
        NSCash now powering ReelProfits.com
        ALSO FEATURING: NSCash.com :: SoloDollars.com :: ReelProfits.com :: BiminiBucks.com :: VOD
        PROGRAMS COMING SOON: Greedy Bucks :: Vengeance Cash
        NOW OFFERING OVER 60 SITES
        CONTACT :: JAMES SMITH :: CHIEF TECHNOLOGY OFFICER :: ICQ (711385133)

        Comment

        • StuartD
          Sofa King Band
          • Jul 2002
          • 29903

          #5
          If they have any experience in optomization/streamlining both php code as well as mysql databases to run on higher traffic loads.
          This is me on facebook
          This is me on twitter

          Comment

          • JDog
            Confirmed User
            • Feb 2003
            • 7453

            #6
            Originally posted by Calvinguy
            What is localhost?
            Dude, that is so fucking easy! Anybody that knows anything about fucking computers know what localhost is!

            jDoG
            NSCash now powering ReelProfits.com
            ALSO FEATURING: NSCash.com :: SoloDollars.com :: ReelProfits.com :: BiminiBucks.com :: VOD
            PROGRAMS COMING SOON: Greedy Bucks :: Vengeance Cash
            NOW OFFERING OVER 60 SITES
            CONTACT :: JAMES SMITH :: CHIEF TECHNOLOGY OFFICER :: ICQ (711385133)

            Comment

            • sjoerdv
              Confirmed User
              • Jun 2002
              • 350

              #7
              Do you expect to get pregnant soon????

              BTW, I know a good PHP/MySQL and ASP programmer. Experienced in high traffic sites and payment systems. ICQ me at 133480259 if interested..

              Comment

              • phpslave
                Confirmed User
                • Jan 2003
                • 548

                #8
                I always make up shit in interviews and see if they act like they know it, LOL.

                Comment

                • Calvinguy
                  Confirmed User
                  • Oct 2002
                  • 1752

                  #9
                  Originally posted by JDog
                  Dude, that is so fucking easy! Anybody that knows anything about fucking computers know what localhost is!

                  jDoG

                  I know... but you got to start somewhere

                  Comment

                  • Trafficbrokercom
                    Confirmed User
                    • Dec 2002
                    • 542

                    #10
                    php:

                    they should know how a class is written ..

                    let them write a sample script.


                    mysql:

                    they should be able to define a left outer join ..

                    Comment

                    • Tempest
                      Too lazy to set a custom title
                      • May 2004
                      • 10217

                      #11
                      ".. how a class is written..."?? Real programmers don't need no stinkin' classes.. or is it don't have any class??

                      Ask him/her
                      - how to surpress errors at runtime.
                      - write code to randomize a list, eg: like shuffle deck of cards.
                      - define tables for a "quick" bookstore database.

                      Comment

                      • SMG
                        Confirmed User
                        • Aug 2003
                        • 1798

                        #12
                        Originally posted by Trafficbrokercom
                        php:

                        they should know how a class is written ..

                        let them write a sample script.


                        mysql:

                        they should be able to define a left outer join ..

                        I've been coding php fulltime for 5 years now, and I only use classes when I want "pretty" code, I dont need them in php unless I wanna make something thats ultra easy to reuse, and I've only made 2 classes out of my last maybe 100 projects...

                        Also, I've never required to use a left outer join EVER, so I dont know how that should be a req :-P (but I know how, just never use them myself)



                        I would simply ask for examples of their work, and code snippets, I FUCKING HATE IDIOTS WHO MAKE UGLY CODE :D
                        TGP Webmasters: sign up for the top 100 tgp list!
                        Submit galleries
                        If you add me to icq (title) make sure to mention GFY or I'll think you're a bot and deny you.

                        Comment

                        • JSA Matt
                          So Fucking Banned
                          • Aug 2003
                          • 5464

                          #13
                          Originally posted by SMG
                          I've been coding php fulltime for 5 years now, and I only use classes when I want "pretty" code, I dont need them in php unless I wanna make something thats ultra easy to reuse, and I've only made 2 classes out of my last maybe 100 projects...

                          Also, I've never required to use a left outer join EVER, so I dont know how that should be a req :-P (but I know how, just never use them myself)



                          I would simply ask for examples of their work, and code snippets, I FUCKING HATE IDIOTS WHO MAKE UGLY CODE :D
                          Agreed 100%. In the last 4 years i've used classes in PHP for maybe 2 projects, and that was just for fun, not required. I would just have them code something simple, you can easily tell by their code if they know what they are doing or not

                          Comment

                          • Big Ray
                            Confirmed User
                            • Dec 2003
                            • 464

                            #14
                            Originally posted by JSA Matt
                            Agreed 100%. In the last 4 years i've used classes in PHP for maybe 2 projects, and that was just for fun, not required. I would just have them code something simple, you can easily tell by their code if they know what they are doing or not
                            What is a good project to code in PHP that utilizes MySQL? 2 Hours. In house.

                            BTW - If you think you have the skills and want to apply, send me your resume. [email protected]. Position is in Santa Clara at our office.
                            Last edited by Big Ray; 05-25-2004, 03:54 PM.

                            Five of the Top 10 Largest Programs Host with Jupiter. Find out why at http://www.jupiterhosting.com

                            Comment

                            • bawdy
                              Confirmed User
                              • Feb 2002
                              • 1424

                              #15
                              give them something like the following and see if they can get it to work:

                              $form = new Form("form1", hahahahahaha, "manage.php", "validateForm(this)");

                              $form->addElement(new formElementHiddenField("id", $id));
                              $form->addElement(new formElementHiddenField("mode", $mode));
                              $form->addElement(new formElementTextField("Title", "title", $title, 60, 255, "smallfield",true));
                              $form->addElement(new formElementTextField("Text Version", "textcontent", $textcontent, 60, 255, "smallfield",true));
                              $form->addElement(new formElementTextArea("HTML Version", "fullstory", $fullstory));
                              $form->addElement(new formElementSubmitButton());

                              $form->getForm();


                              I wouldnt expect them to be successfull but you will get an idea if the can figure stuff out and use classes etc.... thats what all my code looks like ;)

                              Comment

                              • s9ann0
                                Confirmed User
                                • Sep 2001
                                • 4873

                                #16
                                ask them if you can do a goto in php like in perl and without making it a function
                                cos I wanna do that and I don't think you can icq me the answer 8775429!

                                Comment

                                • SMG
                                  Confirmed User
                                  • Aug 2003
                                  • 1798

                                  #17
                                  I'd say make em do something fun ... hell, there are tons of php contests out there, make em do one of them :D
                                  TGP Webmasters: sign up for the top 100 tgp list!
                                  Submit galleries
                                  If you add me to icq (title) make sure to mention GFY or I'll think you're a bot and deny you.

                                  Comment

                                  • s9ann0
                                    Confirmed User
                                    • Sep 2001
                                    • 4873

                                    #18
                                    classes are gay and people that only do stuff in php / mysql or think you need classes for shitty porn web stuff are super gay


                                    mmap your graphics and install APC cache

                                    if your webserver is not using php unload the module

                                    stop being so gay and talking about classes

                                    Comment

                                    • fuzebox
                                      making it rain
                                      • Oct 2003
                                      • 22359

                                      #19
                                      At my last company we made up a little mini exam for all of the prospective developers...

                                      5 separate mini programs printed out, 3 had a bug and 2 were written inefficiently... They had to correct the problem and explain why (writing with a pen).

                                      One guy ended up asking for extra paper, and by the time he was done had written what was basically an essay... We hired him

                                      Comment

                                      • woj
                                        <&(©¿©)&>
                                        • Jul 2002
                                        • 47880

                                        #20
                                        Originally posted by fuzebox
                                        [B
                                        5 separate mini programs printed out, 3 had a bug and 2 were written inefficiently... They had to correct the problem and explain why (writing with a pen).
                                        [/B]
                                        That's a good way to tell if someone knows what they are doing..
                                        Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
                                        Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
                                        Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

                                        Comment

                                        • JSA Matt
                                          So Fucking Banned
                                          • Aug 2003
                                          • 5464

                                          #21
                                          Originally posted by fuzebox
                                          5 separate mini programs printed out, 3 had a bug and 2 were written inefficiently... They had to correct the problem and explain why (writing with a pen).
                                          Very good idea, no testing allowed, just pure code. I like it.

                                          Comment

                                          • SicChild
                                            Confirmed User
                                            • Mar 2003
                                            • 365

                                            #22
                                            How about.... 'do you have references'?

                                            Comment

                                            • KidCock
                                              So Fucking Banned
                                              • May 2003
                                              • 788

                                              #23
                                              We have a small mysql/php test I made up here we use...15 question:

                                              10 multiple choice
                                              3 short answer
                                              2 coding examples

                                              I can send you it by email if you like.

                                              No one ever got above 9/15 though but it's not that hard hehe.

                                              Comment

                                              • Tempest
                                                Too lazy to set a custom title
                                                • May 2004
                                                • 10217

                                                #24
                                                Just pulled out some of my old interview questions/tests. Too bad it's all C or assember. Here's a good "old" simple one.

                                                $i=1;
                                                $i=$i++ + ++$i;
                                                echo $i;

                                                what gets displayed?

                                                Seriously, if he/she's going to be designing your databases, then having them do up a "simple" bookstore DB for you would be a very good idea. If they do it with 1 or 2 tables you've got a problem.

                                                Comment

                                                • Thomas1007
                                                  Confirmed User
                                                  • Aug 2002
                                                  • 5542

                                                  #25
                                                  Let me grab our programmer and get you a few

                                                  need something done
                                                  contact me Thomas
                                                  BUY THIS SPOT CONTACT ME FOR DETAILS


                                                  Comment

                                                  • piker
                                                    Confirmed User
                                                    • Feb 2004
                                                    • 597

                                                    #26
                                                    Originally posted by MaskedMan
                                                    If they have any experience in optomization/streamlining both php code as well as mysql databases to run on higher traffic loads.
                                                    You don't know php/mysql do you?
                                                    IcooCash - DVD Content for your TGP
                                                    Cheap FreeBSD Virtual Hosting
                                                    ICQ me at 605104 for Custom PHP/MySQL Programming

                                                    Comment

                                                    • Volantt
                                                      Confirmed User
                                                      • Nov 2003
                                                      • 745

                                                      #27
                                                      Tests and essays are not a good pointer. The coder should be willing to do a small job before being hired, this should give you a good detail of how they code:

                                                      1. Take direction
                                                      2. Innovate
                                                      3. Perform
                                                      4. Deliver

                                                      It is tuff to hire a coder, designers are easy because artistic ability is either bad, good, or excellent. Coders come in all shapes and sizes.

                                                      V

                                                      Hit me up on ICQ if you have any questions.
                                                      "Only the dead have seen the end of war." - Plato
                                                      "In the abscence of orders, go find something and kill it." - Erwin Rommel
                                                      "A man's worth is no greater then the worth of his ambitions." - Marcus Aurelius

                                                      Comment

                                                      • untitled
                                                        Confirmed User
                                                        • Aug 2002
                                                        • 352

                                                        #28
                                                        using classes in php isn't necessary but a good programmer should know object oriented programming
                                                        Suicide isn't so bad, give it a chance...

                                                        Comment

                                                        • vending_machine
                                                          Confirmed User
                                                          • Jun 2002
                                                          • 1070

                                                          #29
                                                          Ask them how many pennies it would take to create a stack as tall as the Statue of Liberty.

                                                          You don't want the 100% correct answer, or anything near that for that matter, you should pay attention to how they think. If they're good problem solvers it'll be easy for them. That IMO is the biggest plus for a programmer.

                                                          Comment

                                                          • Mortimer
                                                            Confirmed User
                                                            • Oct 2002
                                                            • 153

                                                            #30
                                                            Originally posted by KidCock
                                                            We have a small mysql/php test I made up here we use...15 question:

                                                            10 multiple choice
                                                            3 short answer
                                                            2 coding examples

                                                            I can send you it by email if you like.

                                                            No one ever got above 9/15 though but it's not that hard hehe.
                                                            Hi,
                                                            i'd like to see what your test is, why don't you post it here for everyone to see? Maybe we could even improve it with everyone's feedback?

                                                            There are some good suggestions in this thread, and some not worth even talking about But I think this test is pretty good for testing them out if you already have a programmer that can write it out for you and evaluate the results:

                                                            5 separate mini programs printed out, 3 had a bug and 2 were written inefficiently... They had to correct the problem and explain why (writing with a pen).
                                                            The wiseman owns little but knows much, while the fool knows little but owns much

                                                            Comment

                                                            • FiReC
                                                              Confirmed User
                                                              • Jan 2002
                                                              • 2350

                                                              #31
                                                              Originally posted by Big Ray
                                                              What is a good project to code in PHP that utilizes MySQL? 2 Hours. In house.

                                                              barebones tgp script that pulls a listing of galleries from the db and also has a submit form or mass import system to insert data.
                                                              www.nubilefilms.com | www.nubiles.net | www.anilos.com | tubescript.nubiles.net | icq4162727

                                                              Comment

                                                              • Mortimer
                                                                Confirmed User
                                                                • Oct 2002
                                                                • 153

                                                                #32
                                                                bump
                                                                The wiseman owns little but knows much, while the fool knows little but owns much

                                                                Comment

                                                                • KidCock
                                                                  So Fucking Banned
                                                                  • May 2003
                                                                  • 788

                                                                  #33
                                                                  Sorry everyone for the delay...

                                                                  Soon as I can find it I will post it, if I still can't find where I kept my document I know at the office I have a hard-copy printed out I can type up.

                                                                  Comment

                                                                  • KidCock
                                                                    So Fucking Banned
                                                                    • May 2003
                                                                    • 788

                                                                    #34
                                                                    Here is the test we are using. It's something we came up with pretty quick, to weed out some candidates.

                                                                    I'm sure it's not the greates and can be much improved, but it's working well for us.

                                                                    Mysql Questions
                                                                    1 - You need a column type which will be able to store time and date in the range 1900-01-01 - 2199-12-31. Which column should you choose for this range?
                                                                    a. DATETIME
                                                                    b. TIMESTAMP
                                                                    c. Either DATETIME or TIMESTAMP
                                                                    d. Neither DATETIME nor TIMESTAMP will work for this range of dates.

                                                                    2 ? You have the following table:

                                                                    mysql> DESCRIBE keywords;
                                                                    +------------+-------------+------+-----+---------+-------+
                                                                    | Field | Type | Null | Key | Default | Extra |
                                                                    +------------+-------------+------+-----+---------+-------+
                                                                    | article_id | int(11) | | PRI | 0 | |
                                                                    | keyword | varchar(20) | | PRI | | |
                                                                    +------------+-------------+------+-----+---------+-------+
                                                                    2 rows in set (0.00 sec)

                                                                    You want to find all articles that contain both the keywords 'MySQL' and '4.0'. How can you do this in one query?

                                                                    a. By using the BIT_COUNT() function in your SELECT
                                                                    b. By using the FIND_IN_SET() function in the WHERE part of the SELECT
                                                                    c. You cannot do this in MySQL
                                                                    d. You write a query where you join the table with itself

                                                                    3 - What is MySQL AB?

                                                                    a. An upcoming version of MySQL that includes new table types
                                                                    b. The company that develops and promotes the MySQL suite of programs
                                                                    c. A MySQL client for use on UNIX platforms
                                                                    d. A form-based front-end for generating reports based on data in a MySQL server

                                                                    4 - What is purpose of the mysqldump program ?

                                                                    a. it is used to resolve mysql core dumps and sending bug reports
                                                                    b. it is used for low-level interaction with MySQL table data
                                                                    c. it is used to dump table structure and content in text format
                                                                    d. it is used to flush all tables prior to shutting down the MySQL serve
                                                                    5 - Suppose you have the following tables :
                                                                    mysql> DESCRIBE Country;
                                                                    +----------------+------------+------+-----+---------+-------+
                                                                    | Field | Type | Null | Key | Default | Extra |
                                                                    +----------------+------------+------+-----+---------+-------+
                                                                    | Code | char(3) | | PRI | | |
                                                                    | Name | char(52) | | | | |
                                                                    | Capital | int(11) | YES | | NULL | |
                                                                    +----------------+------------+------+-----+---------+-------+
                                                                    3 rows in set (0.00 sec)

                                                                    mysql> DESCRIBE City;
                                                                    +------------+----------+------+-----+---------+----------------+
                                                                    | Field | Type | Null | Key | Default | Extra |
                                                                    +------------+----------+------+-----+---------+----------------+
                                                                    | Id | int(11) | | PRI | NULL | auto_increment |
                                                                    | Name | char(35) | | | | |
                                                                    | Country | char(3) | | | | |
                                                                    | Population | int(11) | | | 0 | |
                                                                    +------------+----------+------+-----+---------+----------------+
                                                                    4 rows in set (0.00 sec)
                                                                    The tables are related through Capital in Country to Id in City and Code in Country to Country in City
                                                                    Which rows will the following query return?
                                                                    SELECT Country.Name, Capital FROM City, Country WHERE Capital = Id;

                                                                    a. It will return all rows from the Country table, with or without corresponding Capitals in City
                                                                    b. No rows, it will result in an error
                                                                    c. It will return all rows from the City table with or without corresponding Capital entries in the Country table
                                                                    d. It will return the number of rows in Country multiplied by the number of rows in City
                                                                    e. It will return all rows from the Country table that have corresponding Capitals in the City table

                                                                    6 ? You encounter a corrupt table in MySQL. How do you resolve the issue?









                                                                    PHP Questions



                                                                    7 ? What is the purpose of the PHP function print_r() ?

                                                                    a. used to automatically display text with line breaks
                                                                    b. displays information about a variable in a way that's readable by humans.
                                                                    c. is identical to ?echo?
                                                                    d. outputs a string of text in html format

                                                                    8 ? Which of these is an invalid use of the PHP function substr() ?

                                                                    a. substr(?abcdef?,1);
                                                                    b. substr(?abcdef?,-1,3);
                                                                    c. substr(1,?abcdef?);
                                                                    d. substr(?abcdef?,0);

                                                                    9 ? Using the PHP function date() , and assuming $time is the current time as a unix timestamp, how would you convert $time into the format ?25-11-2004 23:01? ?

                                                                    a. date(?D-M-Y h:a?,$time);
                                                                    b. date(?d-m-Y H:i?,$time);
                                                                    c. date($time,?D-M-Y h:a?);
                                                                    d. date($time,? d-m-Y H:i?);

                                                                    10 ? You have just upgraded your version of PHP and you have noticed that a GET variable you were using in one of your pages is now coming up blank. What could be the cause, assuming your code has not been modified?

                                                                    a. the new version you are using doesn?t support GET variables
                                                                    b. the new version you are using will only allow GET variables when using the special variable $_GET[]
                                                                    c. the configuration option register_globals is now set to OFF
                                                                    d. all of the above

                                                                    11 ? When using the PHP function header() to redirect a user to another location, what must you always remember?

                                                                    a. redirects of this type will not work in Netscape
                                                                    b. never use exit() after the header function or your redirect will not work properly
                                                                    c. always use exit() after the header function to prevent executing of code after the redirect
                                                                    d. you may not redirect to a SSL-enabled page (ie. https://)

                                                                    12 ? What is the purpose of the php.ini file?

                                                                    a. contains list of global variables
                                                                    b. this file doesn?t exist
                                                                    c. is the default configuration file of PHP
                                                                    d. this file is no longer supported past PHP3




                                                                    13 ? What is the value of $x, after the following PHP statement ?

                                                                    $a=1; $b=3; $c=5;

                                                                    if ($a = $b) {
                                                                    $x = 100;
                                                                    }
                                                                    elseif ($b > $c) {
                                                                    $x = 50;
                                                                    }
                                                                    elseif ($b < $a) {
                                                                    $x = 42;
                                                                    }
                                                                    elseif ($a > $c) {
                                                                    $x = 20;
                                                                    }

                                                                    a. $x = 100;
                                                                    b. $x = 50;
                                                                    c. $x = 42;
                                                                    d. $x = 20;

                                                                    14 ? Your PHP script returns you the error ?Warning: mysql_connect(): Host not allowed?. How do you resolve the problem?
















                                                                    15 ? Write a block of PHP code to output every fifth (5th) line of a text file. To help you, here are some functions you might want to use:


                                                                    fopen -- Opens file or URL
                                                                    Description
                                                                    resource fopen ( string filename, string mode [, int use_include_path [, resource zcontext]])
                                                                    fopen() binds a named resource, specified by filename, to a stream. If filename is of the form "scheme://...", it is assumed to be a URL and PHP will search for a protocol handler (also known as a wrapper) for that scheme. If no wrappers for that protocol are registered, PHP will emit a notice to help you track potential problems in your script and then continue as though filename specifies a regular file.

                                                                    fclose -- Closes an open file pointer
                                                                    Description
                                                                    bool fclose ( resource handle)
                                                                    The file pointed to by handle is closed.
                                                                    Returns TRUE on success or FALSE on failure.
                                                                    The file pointer must be valid, and must point to a file successfully opened by fopen() or fsockopen().


                                                                    fgets -- Gets line from file pointer
                                                                    Description
                                                                    string fgets ( resource handle [, int length])
                                                                    Returns a string of up to length - 1 bytes read from the file pointed to by handle. Reading ends when length - 1 bytes have been read, on a newline (which is included in the return value), or on EOF (whichever comes first). If no length is specified, the length defaults to 1k, or 1024 bytes.
                                                                    If an error occurs, returns FALSE.


                                                                    feof -- Tests for end-of-file on a file pointer
                                                                    Description
                                                                    bool feof ( resource handle)
                                                                    Returns TRUE if the file pointer is at EOF or an error occurs (including socket timeout); otherwise returns FALSE.

                                                                    Comment

                                                                    • Nathan
                                                                      Confirmed User
                                                                      • Jul 2003
                                                                      • 3108

                                                                      #35
                                                                      Pro and Cons of Object Oriented Programming has been discussed plenty of times. OOP in a non-windows type environment is in my oppinion not at all needed though.

                                                                      OOP in PHP is actually too slow in my oppinion, and I would NEVER use it.

                                                                      I usually look at old projects, if the script looks badly written or not well organized I would never higher them because it will be a pain to modify it later.

                                                                      ----
                                                                      Tempest:
                                                                      $i=1;
                                                                      $i=$i++ + ++$i;
                                                                      echo $i;

                                                                      neat little trick question I must admit, I am not sure what the answer is of the top of my head in PHP, since I am not sure how it parses this stuff exactly. But $i should be 4.
                                                                      ($i = $i++ + ++$i evaluates to $i = 1 + 3 because $i++ will increase $i to 2, but evalutes to 1 and ++$i will increase it to 3 and evalute to 3, $i is then set to 1 + 3.)

                                                                      Correct me if I'm wrong Tempest.

                                                                      ----

                                                                      KidCock.. lemme try your test.. maybe I can be the first getting above 9/15 <g>

                                                                      1. a)

                                                                      2. e) (lol) you write a query like this: select article_id, count(*) num from keywords where keyword='MySQL' or keyword='4.0' group by article_id having num=2;
                                                                      BTW, your table structure of keywords table sucks ;)

                                                                      3. b)

                                                                      4. c)

                                                                      5. e)

                                                                      6. I login to the db with the mysql client and run repair table <tablename>;
                                                                      (your table structure isn't the best again btw)

                                                                      7. b)

                                                                      8. c)

                                                                      9. b)

                                                                      10. c)

                                                                      11. c)

                                                                      12. c)

                                                                      13. is not easy since I am not sure what was replaced by the damn forbidden words thing on GFY. but $x should be a), unless the $a = $b is not a hidden idea to confuse people and is just a bug in your script.

                                                                      14. uhm, why is that a PHP question? Add the friggin connecting host to your grant tables in mysql.

                                                                      15. writing php time, gimme a minute for that. next post.
                                                                      "Think about it a little more and you'll agree with me, because you're smart and I'm right."
                                                                      - Charlie Munger

                                                                      Comment

                                                                      • Nathan
                                                                        Confirmed User
                                                                        • Jul 2003
                                                                        • 3108

                                                                        #36
                                                                        15.

                                                                        you do give them damn weird functions to use, but you said I _MAY_ want to use them, I don't... so here goes: $file_to_open is the filename to print every 5th line from.

                                                                        Code:
                                                                        $lines = file($file_to_open);
                                                                        $i = 4;
                                                                        while($i < count($lines)) {
                                                                        echo $lines[$i];
                                                                        $i += 5;
                                                                        }

                                                                        Ok, what do I win?
                                                                        "Think about it a little more and you'll agree with me, because you're smart and I'm right."
                                                                        - Charlie Munger

                                                                        Comment

                                                                        • Nathan
                                                                          Confirmed User
                                                                          • Jul 2003
                                                                          • 3108

                                                                          #37
                                                                          *bump* for kidcock
                                                                          "Think about it a little more and you'll agree with me, because you're smart and I'm right."
                                                                          - Charlie Munger

                                                                          Comment

                                                                          • Arty
                                                                            Confirmed User
                                                                            • Nov 2002
                                                                            • 880

                                                                            #38
                                                                            Ask him if he ever discovered a bug in php or mysql and be able to workaround till it get fixed..
                                                                            Last edited by Arty; 05-28-2004, 02:36 PM.

                                                                            Comment

                                                                            • fuzebox
                                                                              making it rain
                                                                              • Oct 2003
                                                                              • 22359

                                                                              #39
                                                                              Originally posted by piker
                                                                              You don't know php/mysql do you?

                                                                              Comment

                                                                              • fuzebox
                                                                                making it rain
                                                                                • Oct 2003
                                                                                • 22359

                                                                                #40
                                                                                And goddamn, that's a tricky test!

                                                                                Comment

                                                                                • AdultNex
                                                                                  Confirmed User
                                                                                  • Feb 2003
                                                                                  • 8985

                                                                                  #41
                                                                                  Originally posted by vending_machine
                                                                                  Ask them how many pennies it would take to create a stack as tall as the Statue of Liberty.

                                                                                  You don't want the 100% correct answer, or anything near that for that matter, you should pay attention to how they think. If they're good problem solvers it'll be easy for them. That IMO is the biggest plus for a programmer.
                                                                                  Wtf... A fourth grader could answer that question.

                                                                                  Comment

                                                                                  • chemicaleyes
                                                                                    UNSTOPPABLE
                                                                                    • Aug 2003
                                                                                    • 11569

                                                                                    #42
                                                                                    Originally posted by piker
                                                                                    You don't know php/mysql do you?
                                                                                    No way as way, No limitation as limitation. AmeriNOC formally PhatServers

                                                                                    Comment

                                                                                    • Nathan
                                                                                      Confirmed User
                                                                                      • Jul 2003
                                                                                      • 3108

                                                                                      #43
                                                                                      Originally posted by piker
                                                                                      You don't know php/mysql do you?
                                                                                      maybe I do not know php/mysql either, but why did you post that in reply to maskedman's post?
                                                                                      "Think about it a little more and you'll agree with me, because you're smart and I'm right."
                                                                                      - Charlie Munger

                                                                                      Comment

                                                                                      • aSStig
                                                                                        Confirmed User
                                                                                        • Apr 2004
                                                                                        • 1102

                                                                                        #44
                                                                                        do you know, what is a PC ?

                                                                                        do you know, how does it look like ?

                                                                                        do you know how to operate it ?

                                                                                        tell me how, i dont know how does it works ?
                                                                                        PAYMENT SOLUTIONS
                                                                                        http://www.firstdata.com

                                                                                        Comment

                                                                                        • KidCock
                                                                                          So Fucking Banned
                                                                                          • May 2003
                                                                                          • 788

                                                                                          #45
                                                                                          Originally posted by Nathan
                                                                                          15.

                                                                                          you do give them damn weird functions to use, but you said I _MAY_ want to use them, I don't... so here goes: $file_to_open is the filename to print every 5th line from.

                                                                                          Code:
                                                                                          $lines = file($file_to_open);
                                                                                          $i = 4;
                                                                                          while($i < count($lines)) {
                                                                                          echo $lines[$i];
                                                                                          $i += 5;
                                                                                          }

                                                                                          Ok, what do I win?
                                                                                          15/15!

                                                                                          You'd win a second interview if you were applying heh.

                                                                                          I told you it wasn't so hard ;p but you'd be amazed the number of people who get around 5-6 / 15 only. We use it to decide who should come back for the 2nd interview (of 4 total interviews).

                                                                                          You're only the second person to get the intended trick in the 13th question though. Out of something like 40 people we have interviewed. (the hahah was supposed to be a open bracket for the if/elseifs).

                                                                                          Comment

                                                                                          • Nathan
                                                                                            Confirmed User
                                                                                            • Jul 2003
                                                                                            • 3108

                                                                                            #46
                                                                                            YAY!

                                                                                            its a good test for average stuff, definately. A few nice trick questions.

                                                                                            What was your expected answer for 2) though?
                                                                                            "Think about it a little more and you'll agree with me, because you're smart and I'm right."
                                                                                            - Charlie Munger

                                                                                            Comment

                                                                                            Working...