Cracking the Web Dev Interview

Cracking the Web Dev Interview

Hello Guys,

Disclaimer:This Post is more helpful for 0-3 years of Exp Web developers.

Recently I got in to a  situation where I had to look for a new job (Personal Problem) . Well like all the other professional even I had to go through the Hell..Because When I started appearing for the interviews I realized most of the question that was asked was not related to what I have worked in the past (I was mainly working on core PHP back-end stuff... ). and I was looking for a Web Dev position 

I will not make you suffer by writing a long long story on how i appeared for the interviews etc etc because my post is mainly going to be  helpful for those who have bit of experience in web development.

coming to the point now .

If you are looking for a Web Developer post then you have to have a fair knowledge of following points .

  1. Basic Data Structure (Sorting and Searching )
  2. Server Side script (PHP. Java ,Python).
  3. Front end scripting (Jquery ,HTML5, Javascript etc...)
  4. MySql/Sql data base.
  5. Design Pattern (MVC,Singleton , Factory)

Well I think we all know till here nothing new or important . But now I will write down some important questions that I observed in every interview which was asked in one or other way. This could be a great help for you because I was asked the same question repeatedly in 5 different interview . I cleared 3 of them

lets start with the .

Data structures

Well before you start reading about data-structures . If you are PHP developer then following tips might be helpful.

Tips:

  • In php many things can implemented by just using different types of array .
  • Should have good understanding of Associative array and , Multidimensional array.
  • should know how to use for-each loop it will make your life easier when working with Associative arrays.

In web development if you observe you do two task frequently. Searching and Sorting.

1.Searching

basically two techniques you will have to study

Linear Search , Binary Search

the interviewer will assume you already know all this since its very common in development process. hence he will give you situation and observe how you solve it . You need to have fair knowledge of both these algorithms .

One of the question that was asked to me was

$x = array (1,1,2,2,3,3,4,4,5,5,6,7,7);

In the following array find out the element that is occurring only once . Since it was a sorted array you can apply Binary Search here .If the array was not sorted then you might opt for linear search .

2.Sorting.

Don't break your head too much on learning all kind of sorting because you and me we both know most of the time we work with the default Function provided in the library :D , but in the interview they might ask you some of them .

  • Bubble Sort
  • Quick Sort
  • Selection Sort
  • Heap and merg (Optional) .

If you are not DS freak like me then this you tube link will be really helpful :)

Algorithms by Ravindrababu

3.Also know all the basic implementation of Heap , Stack and linked list.

Server Side script

In server side I work on PHP script so I will be writing some of the questions that were asked to me related with that . Most of the Interviewer will start with very basic questions and if you are bale to answer then they go into deeper concepts.

For basic concept of PHP you should go and read from

W3Schools.com  and when you have fair knowledge of it then you can study from www.php.net for a deeper understating of it .

Some of the questions that I feel important are .

  1. What are different types of error in PHP?
  2. What is the difference between GET and POST?
  3. If the data is transferred in URL through GET then how does it transfer through POST?
  4. How does SESSION/COOKIES works in background (Should have proper understanding of this).
  5. What is HTTP ?
  6. How does a server maps a HTTP request to the local files and folder?
  7. What makes a server available to the internet ?
  8. How does server understand that the HTTP request is coming from a particular website?
  9. On what layer the HTTP request is routed to the files ?
  10. What are the different design patterns in programming language?
  11. What is MVC ?
  12. Any one MVC framework in PHP?
  13. What are the two different types of API's?
  14. What is your understanding of RESTFul Api?

OOPS

In oops there could be either straight forward question asking different definitions or they will give you some situation and ask what OOPS concept you can apply to solve that .(If you have no knowledge of OOPS then first study the concept of OOPS then go through these question).

1.Suppose you have a class and you want to use that multiple times but the object has to be created only once. How will you do that .?

Answer:  SINGLETON CLASS. Check out this link for proper description.

#LinkToSingleton

2.What is static keyword explain with an example.

Answer: I usually explain this with following script .

function printx()
{

 static $x=0;
 $x=$x+1;
  echo $x;
}

for($i=0;$i<3;$i++)
{
  printx();
}

OUTPUT:1,2,3

If you will remove the keyword Static the outPut will be 111. The answer to this Magic is that if you declare any variable STATIC. Then memory allocation for variable $x happens only once but if you remove STATIC then every time the function is called it allocate new memory space for the variable $x .For better understanding please follow this link.

#LinkToStaticKey

3.What is the difference between Copy Constructor and Constructor .

4.How can you differentiate between Interface and Abstract classes.

#LinkToDifference

5.Why multiple inheritance is not supported in PHP explain with an example ?

#LinkToTheAnswer

6.What is public , Private and Protected Keywords ?

7.What is friend function ?

HTML/CSS

  1. What is the difference between Div and P element ?
  2. What is the difference between DIV and SPAN?
  3. How You can make a BLOCK element to INLINE element?
  4. Whats the difference between Margin , Border and Padding ?
  5. What is webWorkers explain ?
  6. What is the difference between HTML5 and HTML?
  7. What is localstorage and session storage ?
  8. What is difference between SVG and CANVAS write a simple script to draw a line using SVG and CANVAS?
  9. If you don't write the <!doctype HTML> then will the browser know that its an HTML5 page?
  10. Suppose you have to make to divs adjacent to each other and also spread to the full length of the body for example left side bar for menu and right for the description what CSS property will you use ?
  11. How can you make the corners of a button round?.
  12. What is the difference between <b> tag and <strong> tag?

JQuery

  1. What is the difference between .onload() and  $(document).ready() function?
  2. Write a script to make an AJax() call to server .
  3. Suppose there are some element ex :<p id="#some1"></p>with different ids then write a script to iterate over all the <p> element and alert the ID's   .
  4. How can you make a line scroll across the browser just like marquee .
  5. What is the difference between class and id selector explain using example.
  6. What are event delegates
  7. How do you define an array in Javascript?
  8. What is Dom tree ?
  9. How can you get all the parent element of the current element ?
  10. What is the difference between Parent and Parents ?
  11. In what scenarios jQuery can be used?

Some more JQuery related Question you can study from #LinkToJquery

Sql/MySql

I am assuming you all know the basics of MySql If you don't then do read from following link #LinkToMysql.

Once you are through with all the Basics definitions etc . You should try to observe the normal day to day applications that you use . Like if you have an Android/Ios device you will have tons of app that help you do some work in very simple steps .

The most common scenario for beginners would be

  1. Personalized blogging app.
  2. A simple questionnaire /Survey app

For any kind of Database design is to analyze the un-normalized data that will be used for the App and then try to understand how many tables you can normalize it into . Well for this you should have a basic Idea of Normalization You can read from the following link about that

#LinkToNormalisingTable

 if you are really lazy to read that then maybe following video urls will be in Handy

#LinkForCreatingAsurveryApp

 

Wish you all the best in the Job Hunt :D

To view or add a comment, sign in

More articles by Vikram Anand Bhushan

Others also viewed

Explore content categories