Craft By Zen

📖 11 min read

🔖 learning   interview   prep

Interview Prep

A friend asked for my help with an upcoming interview she’s preparing for, so I thought it’s a good time to write-up the interview preparation process.

Interview Help Request

The following is the initial exchange of what areas she wanted to focus on.

Here are the areas and key points (I know of) that they will be asking me about during the interview.

For some additional context, the interview itself will have the interviewers seated and me standing in front of a whiteboard I can use when I am trying to explain a concept as well. Definitely meant to help them get a feel for how a candidate would present the information to a group of students.

1. Explaining the HTTP Request and Response Cycle

This is what [the interviewers] like to start with.

I should be able to comfortably navigate through the [HTTP Request & Response] cycle at its simplest. [For example, explain a GET request].

Accurately describe major components:

[And] note possible variations of a particular step. For example, naming a few common HTTP request and/or response headers that may be included and why. You must mention when & how a set-session token/key fits into this.

Not sure whether or not I will need to get into the difference between handling a request for static content vs. a request requiring server-side processing.

[They may want me to cover] server-side processing in the next topic.

Additionally, I wouldn’t be surprised if they wanted to test my general knowledge of the server setup. I would probably touch on this in my explanation, however they may want me to further clarify the role of the load balancer/proxy server software we typically install during deployment, such as Nginx/Phusion Passenger, and how its role differs from the server where the actual application/site resides.

Or, just throw out a question to test that I know what it is. While listening to my presentation they will be making sure that I properly refer to the different parts and how they relate to each other.

Interviewers are likely to interject asking for clarification on a point I glossed over, or if they want to see whether I have further knowledge of a component mentioned. From what I was told they try to make some questions somewhat similar to how a student may probe a new teacher during a lecture.

2. Explaining MVC pattern architecture

I wasn’t asked this in the first interview, however know I will be asked about this on the second. I am not sure exactly about the depth they will want me to go into. I think it mainly pertains to my understanding purpose of this architecture as well as being able to explain what each component/part does and how they interact. Finally, they will probably want my presentation to touch on request handling within an MVC pattern framework as well, definitely heard the motto “fat models, skinny controllers” a lot when I was being taught.

3. OOP - 3 Pillars (Inheritance, Encapsulation & Polymorphism)

I think they want me to be able to provide a good 1-3 sentence definition of each of the three pillars. They will likely ask me to define some basic components and throw in trivial questions regarding classes, objects, method overriding, etc. In addition to above, they may want me to write out an example of one or possibly all the 3 pillars in Python/Ruby. (for this specific position, they will likely want some verbal/written examples to be provided for most of the topics mentioned)

4. REST APIs & RESTful Routing

These areas I am more unsure about, in regards to what kind of information they would want. We didn’t go very deeply into the concept of REST APIs during the bootcamp itself, any explanations were usually in optional sections of the platform. My best guess, based on the curriculum, is they would be satisfied with a well-rounded overview/definition of what REST is and why its used. Additionally, explaining implementation of RESTful Routing in a framework such as Rails or Django (more semi-RESTful for the latter).

And there is a small chance they may ask me about APIs, which can be as general as “What is an API?” and “How are they used?” or as specific as providing an example of API usage with AJAX and jQuery.

5. JavaScript Algorithms

There is a 75% chance they will ask me to do up to 2 of the following, however depending on the interviewer there is an off-chance I can get an algorithm I have never seen before or one they know I can’t solve.

Basic Data-type Manipulation (strings/arrays/dictionaries) - eg; reversing an array in place

Popular Sorting Algorithms (Bubble, Selection, Insertion or Merge). most likely culprits, but Quick Sort is on the table as well

Algorithms using Linked Lists or Binary Search Tree data structures. Could be Push/Shift/Unshift/Pop methods, linked lists algorithms & find/search with a BST

Based on the advice I was given, they would first want me to explain how a particular algorithm works/show I understand the objective (eg, that the Push method would mean adding a node to the end of the linked list in question, or that I can explain how the Bubble sort actually sorts an array rather than how the Selection sort would accomplish that), next psuedo-code and say how I plan to approach the solution, then writing out the code (last two parts can be combined, like explaining as I write out the code).

Sample Questions

From this scope, I’m taking a stab at formulating questions I would ask if I was interviewing this candidate.

Questions about HTTP Request & Response Cycle

Networking Questions

Security Questions

Questions about MVC Model

Extra database questions

Server Side Rendering

Resources

Questions about OOP - 3 Pillars (Inheritance, Encapsulation & Polymorphism)

A brief detour in Functional Programming

Resources

Questions about REST APIs & RESTful Routing

Questions about JavaScript Algorithms

getPrime(2); // 3
getPrime(5); // 11
// answer
const addBy = (factor) => (number) => factor + number;
[{
  "displayName": "California",
  "Abbr": "CA",
  "code": 4
}]

Capital City collection example entry:

[{
  "displayName": "Sacramento",
  "stateCode": 4
}]

Follow-up: How could you filter this so you only return states that start with “North” or “South”? Could you do this using the reduce function for Javascript Arrays?

Resources

Ruby Questions

These questions can also be for Python.

Other Questions

Sample Criteria

Here’s some criteria I look at when interviewing a new candidate. This is from past experience.


Written by Jeremy Wong and published on .