Ads 468x60px

Friday, 19 April 2013

89 QUESTIONS FOR EVRY PHP WEB EVELOPER


Hiring the right PHP web developer is an important task for a company looking to grow their web presence. If you’re in the process of trying to find the right PHP developer, or if you are a PHP web developer looking for a job, preparing the right interview questions can help you. A PHP developer typically works on the front end or back end processes of a web system. Though some web developers have some design skills, you are more likely to find a talented PHP developer who can develop great code, but not necessarily great designs. Our sample PHP developer interview questions are focused on finding a talented PHP developer.
If you’re looking for a job as a PHP web developer, reviewing these questions can help you prepare for the interview.
These are just example questions, you likely will not use them all in an interview, but they can be used to help understand the level of the developer you’re interviewing and whether or not he/she will be the right fit in your organization.

PHP WEB DEVELOPER INTERVIEW QUESTIONS

We’ve organized the questions into several categories to help you prepare for the interview.

GENERAL WEB INDUSTRY QUESTIONS

These questions are used to measure the candidate’s understanding of the web in general and give you an idea of how they keep up to date on industry trends.
  1. What do you do offline to learn about your work online?
  2. What industry blogs do you enjoy reading?
  3. Do you prefer working on a team or alone?
  4. How would you rate your level of expertise in a shell environment?
  5. Can you show me some of the code you have written in the past?
  6. What is your favorite programming language? Why?
  7. What web browser do you use?
  8. Do you have your own personal site? What is it? What’s the purpose of your site?
  9. Have you ever worked on an open source project? Was your code accepted into the project?
  10. What’s the largest website you’ve worked on? What specifically did you code on that site?
  11. How did you get into PHP?
  12. What is a cookie and what do you use it for?
  13. How does a cookie differ from a session variable?
  14. If you run into a problem while coding, how do you find a solution?
  15. What is XML? When do you use it?
  16. What is LAMP?
  17. Is PHP an old language? Should we be using .NET instead? Why? Why not?
  18. What is HipHop for PHP?
  19. What is the largest site on the Internet running on PHP?
  20. Outside of PHP, what web development areas do you believe you are most strong in?
  21. How do you connect to a remote Linux server?
  22. If your Apache web server is serving pages slowly, how would you troubleshoot the problem?

PHP TECHNICAL QUESTIONS

The bulk of your interview will be focused on these questions. These are the in-depth technical PHP questions you will use to identify the right candidate. Even if you are not proficient in PHP itself, you will learn a lot based on how well a candidate answers these questions.
  1. Have you ever used a PHP framework? What’s your favorite? What are the major differences between the major PHP frameworks?
  2. You’re receiving an error when uploading a file that the limit is set too low. Where would you change the setting to allow for larger file uploads?
  3. (Give the candidate some broken source code) Fix this code please.
  4. What features would you add to PHP if you could?
  5. What is the different between include and require?
  6. How and when would you use endif to end a conditional statement?
  7. Under what circumstances would you use === in a conditional statement?
  8. Explain what the ternary conditional operator is.
  9. What is an array?
  10. How would you combine two variables together into a new variable?
  11. When would you use Get versus Post? What are the major differences between the two?
  12. How would you access information sent via Post? Get?
  13. How do you encrypt data using PHP?
  14. Describe your experiences with web services.
  15. If I told you I needed data from a web service, would you prefer it in XML or JSON?
  16. In general terms, describe how you would extract data from a web service if it returns JSON?
  17. What is a regular expression? How do you use regular expressions in PHP development?
  18. How many times can you include a php file in another php file?
  19. How do you send email in PHP?
  20. How do you increase the maximum script execution time for PHP?
  21. How would you sort an array in PHP?
  22. What do we uses classes for in PHP? In what cases would you define a class?
  23. What’s the difference between echo and printf?
  24. How do you calculate the number of days between two dates in PHP?
  25. When I open up a web site you developed and its a blank white screen, what steps do you take to troubleshoot the problem?
  26. How would you redirect a page in PHP?
  27. What is ob_start(); used for? Why would you use it when developing web pages?
  28. How do you define a constant in PHP?
  29. How do you determine if a constant is defined in PHP?
  30. What is the difference between <? ?>  and <?php ?>?

HTML/CSS QUESTIONS

Though your candidate may only do PHP development, he/she still needs to understand HTML and CSS well enough to produce a good looking product.
  1. Are you comfortable coding HTML by hand?
  2. Can you write table-less code using CSS?
  3. If you are presenting an error message and want the text colored red, how would you achieve this?
  4. How would you hide content on a page? How would you show hidden content later?
  5. What does float left do? How would you clear a float?
  6. What browser is the most difficult to write good, clean code for? What are the major problems with this browser?
  7. What is an inline style? When would you use it?
  8. What width should you develop a web page for?
  9. What tools do you use to ensure your code passes w3c compliance?
  10. When you create an element, how do you create a name for it so you can target it using CSS or JavaScript?

JAVASCRIPT QUESTIONS

Many systems use a form of Ajax to make them work right and JavaScript is essential to any Ajax.  These questions will test the JavaScript knowledge of your candidate.
  1. Is JavaScript a programming language? Why/why not?
  2. Do you have experience with JavaScript frameworks? Which ones? Which one do you like the most? Why?
  3. How do you submit a form without user interaction?
  4. What is Ajax?
  5. Describe code you have written which uses Ajax. Why did you use Ajax? How did you implement it? Why did you write it with Ajax in mind?
  6. What is jQuery?
  7. How would you animate an object on the page?
  8. What is the DOM?
  9. What are two ways you could attach JavaScript to an element to be executed on click?
  10. When would you write JavaScript on a web page and when would you include it in an external file?

MYSQL QUESTIONS

Most PHP systems which require a database rely on MySQL. These questions are focused on MySQL and databases.
  1. How would you fix a corrupt table in a database?
  2. What is a primary key?
  3. What is an inner join? Left join? Right join? How are they different?
  4. Write a simple query for me to query all of the columns in a particular table.
  5. You have two tables which are connected via a unique ID. Write a query which will query both tables based on that unique ID.
  6. You have a table with an unknown number of records. You want to delete half of the records. You don’t care which records are deleted. What’s the most efficient way to do it?
  7. How would you create a new table in MySQL?
  8. What is a stored procedure? When would you use a stored procedure? Have you ever written a stored procedure?
  9. What is the difference between GROUP BY and ORDER BY?
  10. What is UNIQUE used for?
  11. What is DISTINCT used for?
  12. What is a temporary table?
  13. How would you select data into a temporary table?
  14. How do you delete records in MySQL?
  15. What is an alias? What would you use it for?
  16. How do you encrypt data in MySQL?
  17. What is a table index? Why would you use it?

WHAT QUESTIONS WOULD YOU ADD?

There are a number of things we could have asked to find the right PHP web developer. What questions did we miss? What would you ask? What have you been asked? Answer in the comments below.

Bill Gates Quotes #1304003


It's fine to celebrate success but it is more important to heed the lessons of failure.






Bill Gates 

Bill Gates Quotes #1304002

Bill Gates Quotes #1304001


Success is a lousy teacher. It seduces smart people into thinking they can't lose.




Bill Gates 

What is computer programming?




What is computer programming?

Writing computer programs means writing instructions, that will make the computer follow and run a program based on those instructions. To explain how programming works, I will give a brief history. The basic instructions are composed of a sequence of ons and offs, that the computer follows as it runs them through the processor, turning switches on and off. The ons are coded (meaning written in programming) with an 1, and the offs with a 0. Numbers and letters are also represented by this; 0000=0, 0001=1, 0010=2, 0011=3, etc. In the beginning, programs looked like "1010100100101111010101010101". Someone realized that since the purpose of writing programs is in order to make life easier, why don't we write a program that will take a kind of code that is easier to create, and the program will translate it into computer code (1s and 0s). So, assembly language was created, where the code then looked like "add $5, $7, $8 #comment", which although not completely readable, it was a lot better than "010101". The program that converted the assembly language into computer code was called the assembler. Then someone decided, why don't we make a program that will translate English-like words into assembly language, so we can write code in English. Thus modern "third generation" code was created. Now the programmer can write code like "x = 5 + 8;" or "String stupid = "You are not smart;". (The first piece means that x will equal 5 + 8, and the second means that whenever the program writes stupid it means the words in the quotes. However, that is not important now, the important thing to realize is that programming is more "Englished" and understandable than before".) Now, a compiler will translate the new code into assembly language, to which an assembler will translate into computer language, that the computer will execute into a series of ons and offs. This new way enabled writing more complex code, as it was now more readable and easy to program. Java is one of the newer languages that uses this third generation code writing technic.

In short, writing code means writing a bunch of instructions. Each instruction is relatively simple, yet because of the computer's speed, it is able to run millions of instructions in a second. In order for a complex 3d game, like for example Diablo, millions of little code lines are being executed per second, as each code line only does very little. Your job as a programmer is to be able to not focus only on what the end product looks like, but on how each little piece runs, and then being able to write all of the little lines of code that enable the whole program to run. When you learn how to program you learn how to break up the objective into different chunks, and work only on that chunk at a time. This is in order to focus on what you need to do right now, and that which you don't need to know is pushed off to be done at a different time. For example, when you are writing code for a game, when you are focusing on the good guy fighting, you ignore the rest of the game, and only focus on getting the guy to swing the sword, etc. When you are writing the code on how the good guy finds and picks up treasure, you write only the code for that, ignoring, the code on how he fights. Then, you take a step back and put the pieces together. Although this seems hard, it is one of the basic aspects that you are taught when you write programs, and you become extremely used to it. This is known as abstraction.

One writes code with a specific terminology for the language that he is programming in. The different terminologies can be grouped into the few categories of keywords, variables, operations and predefined classes (in Java). (This is an oversimplification, as I am trying to make this easy to be understood for beginners). Keywords are the words that have a specific meaning to the compiler. For example, "if" tells the compiler that "if the condition is true then run the next piece of code". Operations are symbols that give specific meaning. For example, the operation of "+" can be used to add two numbers together. The operation of "=" means that the operand (the thing using the operation) on the left "gets" what is on the right. Variables are the values that you give to a word that you make up. For example, in Java the keyword "int" means a number. If you write "int sum = 8 + 7;" you are telling the compiler, I want a variable called sum to get the value of 8 and 7 added together. From now on until you change it, whenever you write "sum" in the program, the compiler reads it as "15". For example if you were to write "if (sum==15)" means if that variable called sum equals 15 (which for now it has not been changed) then run the next piece of code. (for more see the terminology section.) Also, in Java you have already made classes that will do a huge amount for you. All you have to do is bring them into your code, and it will save you a huge amount of programming.

Thursday, 18 April 2013

PHP Short Tags

PHP Short Tags

You know when you just want to prepopulate a form or add one PHP variable into the middle of a an HTML block. Well having to write an open PHP tag and then a close PHP with all of the line breaks and indentions to make it readable is such a pain. So what is the solution? PHP short tags like this.



1<?php
2    $example 'This is some text that I want in my paragraph.';
3?>
4<html>
5    <head>
6    </head>
7    <body>
8        <h1>I love short tags</h1>
9        <p>
10        < ?php
11            echo $example;
12        ?>
13        </p>
14    </body>
15</html>
16</pre>
17Personally I like to get things done with as little typing and code as possible, so I am not a fan of this.  I love my short tags.
18<pre>
19<?php
20    $example 'This is some text that I want in my paragraph.';
21?>
22<html>
23    <head>
24    </head>
25    <body>
26        <h1>I love short tags</h1>
27        <p>
28        < ?=$example?>
29        </p>
30    </body>
31</html>


That will produce the exact same output as the first but much neater and with a little less code.

NOTE: Short tags is something that can be disabled in the php.ini so it is not guaranteed to work but industry standard has short tags enabled.




Most Wanted Posts

Related Posts Plugin for WordPress, Blogger...