Web Developer Interview Questions - General

Web Developer Interview Questions - General

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

If you jumped on a project and they used tabs and you used spaces, what would you do?

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (20)

Section 1

(20 cards)

If you jumped on a project and they used tabs and you used spaces, what would you do?

Front

I would use tabs because it is the convention used for the project. Introduce a linter or other scripts to ensure indentations are consistent Use a tool like EditorConfig to configure editors team members are using automatically

Back

If you have 5 different stylesheets, how would you best integrate them into the site?

Front

Use a CSS preprocessor to nest them with @import statements in class names for each stylesheet, and merge them into a built file. In production, minify the built file with a CSS minifier.

Back

Explain some of the pros and cons for CSS animations versus JavaScript animations.

Front

CSS animations: pros - They use GPU, so they are CPU-efficient. Don't consume JavaScript event loops. cons - Hard to handle, as CSS doesn't contain logics. Not supported in old browsers. JavaScript animations: Opposite to CSS animations

Back

What is Flash of Unstyled Content? How do you avoid FOUC?

Front

It is caused when content is loaded before styles are applied to the content. It happens when style tags are placed after other content, or applied asynchronously, for example, by scripts. To avoid FOUC, the styles should be placed in order that they can be loaded and applied in the same rendering process as HTML elements do. The easiest way is to place them in the head, and avoid applying styles by scripts at the first load.

Back

How many resources will a browser download from a given domain at a time?

Front

It depends on browser implementations. Usually 6 to 8 in the modern browsers, and less in the old browsers. What are the exceptions? When we use several subdomains pointing the same domain, we can increase the concurrency level of the download.

Back

Which version control systems are you familiar with?

Front

Back

What is a recent technical challenge you experienced and how did you solve it?

Front

Back

What UI, Security, Performance, SEO, Maintainability or Technology considerations do you make while building a web application or site?

Front

UI: I like minimal UI which contains only what it should. I believe it results in the better user experience, as a user knows what to do intuitively. Security: I always try to make both frontend and backend secure, concerning CSRF, XSS, etc. Performance: I consider space and time complexity for the algorithms and logics I use and write. SEO: Set meta tags for search engines and consider and consider server-side rendering for SPA. Maintainability: Try to keep the source code consistent and make objects immutable. Use statically typed languages such as TypeScript. Use CI with tests and lints. Technology: I like to learn new technologies, but if the project is in production, I would consider using technologies which is well-documented and widely used.

Back

Explain the importance of standards and standards bodies.

Front

Standards describe how a thing does and should work. It is extremely important especially in software, because the thing can be used by many people for different perposes. For example, there are several engines for JavaScript including V8, JavaScriptCore, Rhino, etc, and if there is no standard for the language, developers and users cannot feel ensured when doing something with it. Standards bodies, in the same manner, do a key role to form a standards and are essential in everywhere including both software and hardware.

Back

If you could master one technology this year, what would it be?

Front

Back

Can you describe your workflow when you create a web page?

Front

I usually use Node.js to build a web page, so will describe the workflow with it. Decide a CSS preprocessor. I may consider using SCSS, but Less and Stylus are also viable options. Decide a HTML template engine. I may go with Pug(formerly Jade). Decide a JavaScript preprocessor or other languages being compiled to it. I may go with TypeScript or ES6 with Babel. Decide a task manager. I recently like to just use NPM scripts instead of using huge task managers like Gulp or Grunt. Write tests and make them fail. Write app code and check the tests succeed. Set CI. Publish the code and check a task in CI succeed.

Back

How would you optimize a website's assets/resources?

Front

Minimise CSS and JavaScript using minifier(or uglifier), archive them using gzip, use separated file servers, use CDN, etc.

Back

What does CORS stand for and what issue does it address?

Front

CORS stands for cross-origin resource sharing. There could be situation where some resources should be allowed from sources having different origin. CORS is a standard to enable cross-site HTTP requests for: AJAX API call Web Fonts WebGL textures Image/video frames drawn to a canvas using drawImage Stylesheets Scripts

Back

Name 3 ways to decrease page load (perceived or actual load time).

Front

Use minifier and gzip to decrease the page size - actual Show spinner or progress bar - perceived Preload the page before actually loading it using libraries like InstantClick - both actual and perceived

Back

Can you describe the difference between progressive enhancement and graceful degradation?

Front

Progressive enhancement is a way to implement a web page where basic features, which are supported by most environments, are implemented first and then progressively enhance them for advanced environments. On the other hand, graceful degradation is an opposite. The advanced features are freely implemented at any time, and additional works are done to support the environment where the features don't work well.

Back

What did you learn yesterday/this week?

Front

Back

Talk about your preferred development environment.

Front

Back

What excites or interests you about coding?

Front

Back

What is a model view controller?

Front

It's an architectural pattern. Model handles logic, View is the portion user interacts with, Controller handles communication between model and view. receives user requests and calls appropriate actions for them to carry out request.

Back

Explain what ARIA and screenreaders are, and how to make a website accessible.

Front

Accessible Rich Internet Applications (ARIA) defines ways to make Web content and Web applications (especially those developed with Ajax and JavaScript) more accessible to people with disabilities. The role attribute defines what the general type of object is (such as an article, alert, or slider). Additional ARIA attributes provide other useful properties, such as a description for a form or the current value of a progressbar.

Back