|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Join Date: Dec 2003
Posts: 464
|
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! |
|
|
|
|
|
#2 |
|
Confirmed User
Join Date: Oct 2002
Location: European Union
Posts: 1,752
|
What is localhost?
|
|
|
|
|
|
#3 |
|
Confirmed User
Join Date: Jan 2004
Location: Cleveland & Atlanta
Posts: 6,706
|
Are you or any of your family sick and/or dying, or will they be sick and/or dying when the deadline approaches?
__________________
|
|
|
|
|
|
#4 | |
|
Confirmed User
Join Date: Feb 2003
Location: Canby, OR
Posts: 7,453
|
Quote:
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) |
|
|
|
|
|
|
#5 |
|
Sofa King Band
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
|
If they have any experience in optomization/streamlining both php code as well as mysql databases to run on higher traffic loads.
|
|
|
|
|
|
#6 | |
|
Confirmed User
Join Date: Feb 2003
Location: Canby, OR
Posts: 7,453
|
Quote:
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) |
|
|
|
|
|
|
#7 |
|
Confirmed User
Industry Role:
Join Date: Jun 2002
Location: South America
Posts: 350
|
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.. |
|
|
|
|
|
#8 |
|
Confirmed User
Join Date: Jan 2003
Location: San Jose
Posts: 548
|
I always make up shit in interviews and see if they act like they know it, LOL.
|
|
|
|
|
|
#9 | |
|
Confirmed User
Join Date: Oct 2002
Location: European Union
Posts: 1,752
|
Quote:
I know... but you got to start somewhere |
|
|
|
|
|
|
#10 |
|
Confirmed User
Join Date: Dec 2002
Posts: 542
|
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 .. |
|
|
|
|
|
#11 |
|
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
".. 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. |
|
|
|
|
|
#12 | |
|
Confirmed User
Join Date: Aug 2003
Posts: 1,798
|
Quote:
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. |
|
|
|
|
|
|
#13 | |
|
So Fucking Banned
Join Date: Aug 2003
Location: San Diego, CA
Posts: 5,464
|
Quote:
![]() |
|
|
|
|
|
|
#14 | |
|
Confirmed User
Join Date: Dec 2003
Posts: 464
|
Quote:
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.
__________________
Five of the Top 10 Largest Programs Host with Jupiter. Find out why at http://www.jupiterhosting.com |
|
|
|
|
|
|
#15 |
|
Confirmed User
Join Date: Feb 2002
Posts: 1,424
|
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 ;) |
|
|
|
|
|
#16 |
|
Confirmed User
Join Date: Sep 2001
Location: Boston
Posts: 4,873
|
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! |
|
|
|
|
|
#17 |
|
Confirmed User
Join Date: Aug 2003
Posts: 1,798
|
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. |
|
|
|
|
|
#18 |
|
Confirmed User
Join Date: Sep 2001
Location: Boston
Posts: 4,873
|
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 |
|
|
|
|
|
#19 |
|
making it rain
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,158
|
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 |
|
|
|
|
|
#20 | |
|
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
Quote:
__________________
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 |
|
|
|
|
|
|
#21 | |
|
So Fucking Banned
Join Date: Aug 2003
Location: San Diego, CA
Posts: 5,464
|
Quote:
![]() |
|
|
|
|
|
|
#22 |
|
Confirmed User
Join Date: Mar 2003
Posts: 365
|
How about.... 'do you have references'?
|
|
|
|
|
|
#23 |
|
So Fucking Banned
Join Date: May 2003
Location: San Pedro, Costa Rica
Posts: 788
|
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. |
|
|
|
|
|
#24 |
|
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
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. |
|
|
|
|
|
#25 |
|
Confirmed User
Join Date: Aug 2002
Location: BC Canada
Posts: 5,542
|
|
|
|
|
|
|
#26 | |
|
Confirmed User
Join Date: Feb 2004
Posts: 597
|
Quote:
__________________
IcooCash - DVD Content for your TGP Cheap FreeBSD Virtual Hosting ICQ me at 605104 for Custom PHP/MySQL Programming |
|
|
|
|
|
|
#27 |
|
Confirmed User
Join Date: Nov 2003
Location: Penguin vs Devil
Posts: 745
|
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 |
|
|
|
|
|
#28 |
|
Confirmed User
Join Date: Sep 2002
Posts: 352
|
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... |
|
|
|
|
|
#29 |
|
Confirmed User
Join Date: Jun 2002
Location: Seattle
Posts: 1,062
|
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. |
|
|
|
|
|
#30 | ||
|
Confirmed User
Join Date: Oct 2002
Location: Where the hell am I now?
Posts: 153
|
Quote:
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 Quote:
__________________
The wiseman owns little but knows much, while the fool knows little but owns much |
||
|
|
|
|
|
#31 | |
|
Confirmed User
Industry Role:
Join Date: Jan 2002
Location: Land o Nubiles
Posts: 2,350
|
Quote:
__________________
www.nubilefilms.com | www.nubiles.net | www.anilos.com | tubescript.nubiles.net | icq4162727 |
|
|
|
|
|
|
#32 |
|
Confirmed User
Join Date: Oct 2002
Location: Where the hell am I now?
Posts: 153
|
bump
![]()
__________________
The wiseman owns little but knows much, while the fool knows little but owns much |
|
|
|
|
|
#33 |
|
So Fucking Banned
Join Date: May 2003
Location: San Pedro, Costa Rica
Posts: 788
|
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. |
|
|
|
|
|
#34 |
|
So Fucking Banned
Join Date: May 2003
Location: San Pedro, Costa Rica
Posts: 788
|
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. |
|
|
|
|
|
#35 |
|
Confirmed User
Industry Role:
Join Date: Jul 2003
Posts: 3,108
|
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 = $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 |
|
|
|
|
|
#36 |
|
Confirmed User
Industry Role:
Join Date: Jul 2003
Posts: 3,108
|
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 |
|
|
|
|
|
#37 |
|
Confirmed User
Industry Role:
Join Date: Jul 2003
Posts: 3,108
|
*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 |
|
|
|
|
|
#38 |
|
Confirmed User
Join Date: Nov 2002
Posts: 880
|
Ask him if he ever discovered a bug in php or mysql and be able to workaround till it get fixed..
![]() |
|
|
|
|
|
#39 | |
|
making it rain
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,158
|
Quote:
![]() |
|
|
|
|
|
|
#40 |
|
making it rain
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,158
|
And goddamn, that's a tricky test!
|
|
|
|
|
|
#41 | |
|
Confirmed User
Join Date: Feb 2003
Location: Bostonnnn
Posts: 8,985
|
Quote:
|
|
|
|
|
|
|
#42 | |
|
UNSTOPPABLE
Join Date: Aug 2003
Location: UK :: ICQ# 156068
Posts: 11,569
|
Quote:
![]() |
|
|
|
|
|
|
#43 | |
|
Confirmed User
Industry Role:
Join Date: Jul 2003
Posts: 3,108
|
Quote:
__________________
"Think about it a little more and you'll agree with me, because you're smart and I'm right." - Charlie Munger |
|
|
|
|
|
|
#44 |
|
Confirmed User
Join Date: Apr 2004
Posts: 1,102
|
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 ? |
|
|
|
|
|
#45 | |
|
So Fucking Banned
Join Date: May 2003
Location: San Pedro, Costa Rica
Posts: 788
|
Quote:
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). |
|
|
|
|
|
|
#46 |
|
Confirmed User
Industry Role:
Join Date: Jul 2003
Posts: 3,108
|
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 |
|
|
|