PHP Lead Developer Interview: Your suggestions please!

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

PHP Lead Developer Interview: Your suggestions please!

Post by JAB Creations »

I have an interview for a Lead PHP Developer position at 3pm later today. They are looking for someone who will be working pretty much exclusively with PHP (no clientside code) which is good and fine as well as Apache and Linux experience which I'd say Linux (while I have some experience) is my weak point (relative to everything else) though I understand the console and SSH enough to get around. Any way I'm preparing examples of my work to demonstrate how I approach various things (such as verifying things via regex only after less server intensive tasks are handled), OOP/Classes, some of the things I've setup in Apache (well mostly my .htaccess file since I won't be bringing a box with me though I'll be bringing my USB Flash drive with examples of my work), etc.

I want to prove that I'm interested in focusing on doing what they need. I'd like to know what possible things they are likely to ask me during the interview that I should be able to conjure up some examples of. They also will expect me to write code which is fine (I'll have pretty much the bulk of my source available if I need to reference my own work which I would expect they are fine with, if it's done it's done right?) So what sort of things should I expect to be asked about and able to show that I am capable of in a LAMP environment for a lead PHP developer? Also the lady who contacted me initially and spoke with on the phone twice said that I'm the first person that they have initiated contact with first whereas they usually chat with people who contact them first. Obviously my clientside experience is a bit heavier then serverside; not that I can't do at least he majority of what they're looking for...I just want to make sure that I can prove that I can fulfill the role they need. If I seem inadequate in any areas (let's say not being a Linux guru) what advice can I follow? I'm pretty certain I can prove I have the initiative and follow things through. Ok, I'll leave it at that. It's almost 10am and the interview is at 3pm. I highly value the things you guys say, maybe now I can use all that I've learned to land this job and change my perception of what up to this point seemed like a tech-dead town. :)
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: PHP Lead Developer Interview: Your suggestions please!

Post by jaoudestudios »

Not sure what the time difference is, but did you have the interview yet? if so, how did it go?

If they ask you to write code (as a test) it will probably be by hand (which is really odd) and they wont let you use your code as reference. From my experience they wont ask you to write a CMS system or something like that as there will not be enough time. Probably more...pick out the errors in this code. What does **** mean? How would you reference a variable? How would you reference an object? ...etc....

Let us know how you got on.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: PHP Lead Developer Interview: Your suggestions please!

Post by JAB Creations »

I'm running out the door in a few minutes right now, I'm EST -0500 (Florida/East Coast). Not using my own code as reference would be a pain for more advanced stuff though I should be able to do alright. I'll let you guys know how it went. Thanks for the advice. :)
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: PHP Lead Developer Interview: Your suggestions please!

Post by JAB Creations »

Back....after five frigin hours at my sister's place. The interview was an hour and a half long. Lots of good vibe and they gobbled my website up in regards to the functionality. I didn't do any code while I was there though we discussed a lot of things (regex and cURL were mentioned, things like executing regex last, minimizing server load, technical demographics (how I don't rely on jQuery to do simple stuff like change a class where I have a function that is like 300 bytes long though obviously it's important for DHTML animation so we had a lot of similar agreements) etc. Even if I don't become a senior lead developer they basically hinted at a sort of junior lead developer role of sorts which I wouldn't mind either way to put it modestly. Some of you guys could put me to shame here though I'll catch up sooner or later. :wink:

I'm excited though I won't base my life on whether or not I get the job. If I don't I'll just keep doing what I'm doing. If I do then I'm looking at about three months to get comfortable and up to speed with their setup. I won't go in to details (not that I saw much in the way of code) though they seem fairly organized, brick and mortar, dependable paycheck to do what I love to do: web programming. They'll be sending me code to mess with via email in the morning (didn't get it tonight) with directions for what they want (or if not I'll look for bugs and any way I can optimize it). Even if I don't get the job it's nice to know Sarasota isn't (at least completely) tech-dead. I've just never been big on connections really. Any way been up since 5am so I'm going to crash. I'm looking forward to getting back on some Red Bull and working with code again (after a few very code-light days).
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: PHP Lead Developer Interview: Your suggestions please!

Post by jaoudestudios »

Nice, well done. Keep us posted.

When you get a copy of their code, let us take a look.

If you dont get this one, there are plenty more out there! Especially for dedicated people who love coding and keeping up with the latest technologies.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: PHP Lead Developer Interview: Your suggestions please!

Post by JAB Creations »

Got his email a little bit ago and got the bulk of the easier stuff without any problem. There is a small MySQL project that I'm now tackling...
Design for me a MySQL database that stores a video game collection. I would like this to be a relational database, and all tables should be normalized. I would also like an open-ended categorization scheme to allow for any number of categories to be applied to any one game entry (ex: first person shooter, Mature Rating, Multi-player etc). Seed the database with a few entries, and send me your CREATES , INSERTS, and the db export. Also, please send some sample SELECT statements to pull data out of you database.
Sounds something similar to how the gamer section of my website is setup. I'm not clear on what "normalizing" tables means though it could be an idea that I am already familiar with and practice without knowing the terminology in example.

Any number of categories per game is not going to be difficult, my initial approach would be to simply create a table per category and then to display the (if) multiple categories is to execute something (maybe an array of the table names?) to scan for instances of the the game being listed per table (a row count in example).

I've already begun setting up this small project per his request merged along with some other simpler things he requested.
Paul Arnold
Forum Contributor
Posts: 141
Joined: Fri Jun 13, 2008 10:09 am
Location: Newcastle Upon Tyne

Re: PHP Lead Developer Interview: Your suggestions please!

Post by Paul Arnold »

Making a table per category is a prime example of what Normalisation ISN'T.

You want to be using a linking table to create a relationship between your games table and a categories table.
You'd store foreign keys in the linking table relating to the Primary Keys from the games and categories tables.

i.e:


cat_link
-------
id: int
game_id: int
cat_id: int
Last edited by Paul Arnold on Wed Oct 15, 2008 10:57 am, edited 1 time in total.
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: PHP Lead Developer Interview: Your suggestions please!

Post by jaoudestudios »

Like Paul Arnold said use a link table, but to be honest I would simplify it a little and have a category table which feeds a drop down and then stores the category id in the game table. This still allows for unlimited categories but does not have too many tables that you would have join on to each other.

I.e.
# game table #
id
name
category_id (foreign key)
...

# category table #
id
name
...
Paul Arnold
Forum Contributor
Posts: 141
Joined: Fri Jun 13, 2008 10:09 am
Location: Newcastle Upon Tyne

Re: PHP Lead Developer Interview: Your suggestions please!

Post by Paul Arnold »

Would that not limit the system to only allow an individual game to be in one category though?
Or have I misunderstood what you're saying.
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: PHP Lead Developer Interview: Your suggestions please!

Post by jaoudestudios »

Yes you are right! It would only allow the game to be in 1 category - sorry I assumed that it would only be in 1 category. But thinking about it again this may be an incorrect assumption and a game could appear in multiple categories. Therefore I would use a link table like you suggested which would allow the game to be in multiple categories and if a limit is required (i.e 3 categories) it can be done in the code.
Paul Arnold
Forum Contributor
Posts: 141
Joined: Fri Jun 13, 2008 10:09 am
Location: Newcastle Upon Tyne

Re: PHP Lead Developer Interview: Your suggestions please!

Post by Paul Arnold »

That's definitely the way I'd suggest from what you've told us.

But yeah, it's definitely worth reading up on Database Normalisation.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: PHP Lead Developer Interview: Your suggestions please!

Post by JAB Creations »

I suppose instead of tables it would be better to use a column per genre then? In example...

id, name, name_base, genre_1, genre_2, genre_3, genre_4, genre_5


...I've got thus far...

1.) list page with index/php?game_title_here
2.) add page/form to add a new game
3.) plenty of reusable functions
4.) methods to prevent duplicate games

...I'm currently working on the categories and the game view.

I'm going to work on the game view (just basically a MySQL SELECT and spitting out information stored in the DB.

I'll leave the category normalization to be the last bit I work on I suppose since it's merely handling more of already existing information in a way. With PHP I'm familiar with my options, I just don't know all the terminology associated with them sometimes.

I'll post code in a zip or something in a little bit.
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: PHP Lead Developer Interview: Your suggestions please!

Post by jaoudestudios »

JAB are you proposing this...
# game table #
id
name
name_base
genre_1
genre_2
genre_3...

That is definitely NOT the way to do it as it would limit you to the amount of genres available to a game. The description specifically asks for...
I would also like an open-ended categorization scheme to allow for any number of categories to be applied to any one game entry
I would do it the way Paul Arnold suggested. It is the best, it allows the most flexibility.

Post your database schema when you have it.
4.) methods to prevent duplicate games
Also prevent the game being added to the same category twice. This can easily be achieved with a sub query.
3.) plenty of reusable functions
Good time to use a class. Especially for the SELECTs he asks for.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: PHP Lead Developer Interview: Your suggestions please!

Post by JAB Creations »

I have never heard of a linking table until Paul mentioned it. :| I'm going to try to learn it in like an HOUR right now! :mrgreen: Not exactly the best time to research it considering I'm trying to get this out to him before 5pm our time. While classes = OOP I'm trying to keep this fairly minimal. I can show him separate examples of my site's OOP for example with the class file as well as more DB stuff with my current and mostly stable 2.8.6 Alpha 2 build.

I think DB optimization is I'll want to concentrate on right now...

http://www.devshed.com/c/a/MySQL/An-Int ... ization/3/
This first rule calls for the elimination of repeating groups of data through the creation of separate tables of related data.
So didn't I have a somewhat valid idea of what Normalization was?

Perhaps I could store the game table's game ID (unique/key) as the only row data on a table?

I've attached what I have right now save for the MySQL connection file...

_0_header_01_mysql.php

Code: Select all

<?php
$truedbuser = "DB_USER";
$truedbpass = "DB_PASSWORD";
 
$client_uri = explode("?", $_SERVER['REQUEST_URI']);
$truepage = $client_uri[0];
 
$db = mysql_connect("localhost", $truedbuser, $truedbpass);
if (!$db && !isset($_GET['error'])) {$_SESSION['status'] =  '<b class="bad">Could not connect to the database:</b> '.mysql_error(); header("location:".$truepage."?error");}
 
$db_selected = mysql_select_db("gamer", $db);
//if (!$db_selected) {$_SESSION['status'] == 'Could not select table: '.mysql_error(); header("location:".$error_url[0]."?error");}
if (!$db_selected && !isset($_GET['error'])) {$_SESSION['status'] =  '<b class="bad">Could not select table in the database:</b> '.mysql_error(); header("location:".$truepage."?error");}
 
mysql_query("SET time_zone = '-4:00';");
?>
Attachments
build_1.zip
(3.46 KiB) Downloaded 71 times
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: PHP Lead Developer Interview: Your suggestions please!

Post by JAB Creations »

MySQL data...

Code: Select all

-- phpMyAdmin SQL Dump-- version 2.11.6-- http://www.phpmyadmin.net---- Host: localhost-- Generation Time: Oct 15, 2008 at 03:07 PM-- Server version: 5.0.27-- PHP Version: 5.2.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; ---- Database: `gamer`-- -- -------------------------------------------------------- ---- Table structure for table `games`-- CREATE TABLE IF NOT EXISTS `games` (  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,  `name` VARCHAR(128) NOT NULL,  `name_base` VARCHAR(128) NOT NULL,  `author_name` VARCHAR(128) NOT NULL,  `author_comments` VARCHAR(8192) NOT NULL,  PRIMARY KEY  (`id`)) ENGINE=MyISAM  DEFAULT CHARSET=hp8 AUTO_INCREMENT=30 ; ---- Dumping data for table `games`-- INSERT INTO `games` (`id`, `name`, `name_base`, `author_name`, `author_comments`) VALUES(5, 'Heroes of Might & Magic III', '', 'John A. Bilicki III', 'Best turn based strategy game; sequels kind of sucked though.'),(29, 'Diablo II', 'diablo_ii', 'John A. Bilicki III', 'Addictive though game play is a bit repetitive.');
...doing research on table linking. I've already created other tables for genres. I can post those too if desired. I'm really trying to get a visual so I can figure out what the exact steps are. Once I successfully duplicate linking tables (if that is the course suggested and the requirement for table Normalization) then I should be ok from that point on. Everything else I just have to finish though and confident that I can complete as desired or at least within reason. As far as "Lead PHP programmer"...probably still Junior...if so then only for the time being... :twisted:
Post Reply