The Talent500 Blog
7 Common full stack developer interview questions 1

7 Common full stack developer interview questions

Full-stack developers are in-demand professionals because of their ability to work on both the frontend and backend of a web application. Companies look for full-stack developers with industry knowledge and appropriate technical skills. The U.S. Bureau of Labor and Statistics expects the demand for these developers to grow by 13 percent by 2030.

Learn about the common interview questions for full-stack developers to help you ace your interview.

Can you write an endpoint for checking if a resource exists? 

This question is to test the RESTful API capabilities of a full-stack developer. The interviewer wants to know what method and path the developer uses.

A standard full-stack development best practice is to use only nouns in an API path, not descriptive verbs.

For example, these are not the correct path to use:

GET /users/search

GET /posts/create

The right way is to use the method noun on the endpoint to determine the action like this:

POST /users (create user)

PUT /users/{id|slug} (replace user)

PATCH /users/{id|slug} (update part of a user model)

DELETE /users/{id|slug} (delete user)

GET /users/{id|slug} (retrieve a user)

Determining whether a resource exists is one of the most common actions an API performs. An experienced full-stack developer will use the HEAD command for the purpose. For example:

HEAD /users/{id|slug}

This is the right approach that uses the least bandwidth because of no returning data, just the HTTP status- 200 OK if the resource exists and 404 if the resource does not exist.

What considerations do you make when coding with SEO in mind? 

Full-stack developers must be acquainted with SEO best practices when writing frontend code. It is crucial for organic search engine rankings.

Basic standards to include:

  • Using alt tag with images
  • Properly maintain content hierarchy with <h1>/<h2>/<h3> and p HTML tags
  • Add a robots.txt file
  • Add an XML sitemap
  • Avoid broken links
  • Create vanity/friendly URLs
  • Ensure lightning-fast page load speed
  • Avoid JavaScript errors
  • Enable and force SSL
  • Leverage browser caching

What is long polling?

Long polling helps create a very stable server connection without using WebSocket or Server Side Events protocols. It operates at the top of the conventional client-server model. Long polling is used in backend development to push information to a client as soon as possible to avoid server wait time. Usually, it is part of NodeJS development.

Suppose one of our APIs, when integrating third-party services, has to wait for the response, causing users to stay long. 

How will you troubleshoot this problem? 

A straightforward way to solve this is to use queues. Every time a request is made to the API, a different job is created and added to the line. This job will get executed irrespective of the requested endpoint. It will allow the server to respond to requests without delay.

For this purpose, the most suitable technologies are Redis, Amazon SQS, and Beanstalkd.

What HTTP status code would you return if a user tries to create a resource that already exists on the server? The answer is debatable, but the 409 Conflict, HTTP status code, is widely used for this scenario. Another acceptable status code is 422 Unprocessable Entity. It will not be entirely wrong to return a 400 Bad Request status code, but conventionally it is used for errors when the server doesn’t understand a request. That’s not the case here.

What is CORS?

Cross-original Resource Sharing (CORS) is a process that enables web applications to access web resources on different domains. Additional HTTP headers enable CORS in applications that will require resources originating from an external source.

List the ways you will utilize to improve website load time

There are several ways to optimize website load time and performance. 

The most critical of these are:

  • Minimizing HTTP requests
  • Minifying CSS and JavaScript files
  • Utilize CDNs
  • Removing unused files/scripts
  • Compressing files to the minimum possible size
  • Browser caching
  • Code in HTML5 and CSS3
  • Optimize caches

Explain the application server?

An application server is a modern form of platform middleware. Its primary function is to host a user’s business logic while facilitating access to the business application. Both web applications and the server environment exist within an application server framework. Despite the traffic variation and hardware and software failures, these servers perform.

Here is a table design:

CREATE TABLE `notifications` (

   `id` INT NOT NULL AUTO_INCREMENT,

   `type` INT(8) NOT NULL,

   `notifiable_id` INT unsigned NOT NULL,

   `notifiable_type` VARCHAR(10) NOT NULL,

   `relation_id_1` INT unsigned,

   `relation_type_1` VARCHAR(10),

   `relation_id_2` INT unsigned,

   `relation_type_2` VARCHAR(10),

   `updated_at` TIMESTAMP NOT NULL,

   `created_at` TIMESTAMP NOT NULL,

   PRIMARY KEY (`id`)

);

Explain the issue here and how can you remove it? 

Here the object_id_X and object_type_X fields are the main issues. It is a poor design habit to increment named fields when you can store data in a related table. You can improve the above database table design by including a Relations Table as follows:

Notifications Table

CREATE TABLE `notifications` (

   `id` INT NOT NULL AUTO_INCREMENT,

   `type` INT(8) NOT NULL,

   `notifiable_id` INT unsigned NOT NULL,

   `notifiable_type` VARCHAR(10) NOT NULL,

   `updated_at` TIMESTAMP NOT NULL,

   `created_at` TIMESTAMP NOT NULL,

   PRIMARY KEY (`id`)

);

Notification Relations Table

CREATE TABLE `notification_relations` (

   `notification_id` INT unsigned NOT NULL,

   `relation_id` INT unsigned NOT NULL,

   `relation_type` VARCHAR(10) NOT NULL,

   PRIMARY KEY (`notification_id`)

);

We hope you got the idea of what full-stack developer interview questions you can expect in your following interview. If you are looking for challenging opportunities at some of the fastest-growing global companies, join Talent500. Sign up here.

0
Girish

Girish

Girish is Talent500’s architect for systems software. His experience in backend development has helped him convert visions of many a product into reality. From his days at BITS-Pilani, he has always dreamt about beating AplhaZero at chess.

Add comment