Skip to content

Instantly share code, notes, and snippets.

@Lakshay-Batra
Created October 16, 2020 14:39
Show Gist options
  • Save Lakshay-Batra/7332a5942b7ed49916553eeb288b0a22 to your computer and use it in GitHub Desktop.
Save Lakshay-Batra/7332a5942b7ed49916553eeb288b0a22 to your computer and use it in GitHub Desktop.

Affinity Answers

Below are the answers to questions asked by Affinity Answers as first stage of interview process.

Which web tool has impressed you the most and why?

It is Chrome Developer Tools which has really impressed me as far as Web Development is concerned. Chrome DevTools can help you edit pages on-the-fly and diagnose problems quickly, which ultimately increases efficiency. It has a lot of things which are really fascinating. There are some really helpful and amazing features which are used frequently.

  1. View and Change the DOM: It helps you to view the website and its DOM simultaneously and we can also edit it according to the needs.
  2. View and Change the Page's Styles: It allows you to look at all the css used in a very structured manner and change it if required.
  3. View Messages and Run/Debug JavaScript in the console: We as a Web Developers often log messages to the Console to make sure that JavaScript is working as expected. Console panel in DevTools brings you the feature to console the message according to the requirements. We can also make JavaScript snippets, and run/debug JavaScript over there.
  4. Device Mode, Test Responsive and Device-specific Viewport: These features allow you to view website in Device-specific Viewport. This feature is really important as websites can be accessed from mobile, tablet, laptops and many more. So it becomes really important to make our website responsive.
  5. Network Activity and Website Speed: This is also a very amazing feature to optimise your website speed and inspect Network Activity. Network panel has predefined throttling presets which allows you to test your website at different internet speeds which become very helpful in testing things like lazy load.

There are lot more things Chrome DevTools can do, which help a Web Developer in developing optimise websites and web apps.

Given a web application, how do you choose a JS framework to solve?

There are several factors which decide which JavaScript Framework we should opt for solving a particular problem. Some important factors are:

  1. Type of Web Application: This factor plays a vital role in choosing a JavaScript framework/library, as there are JavaScript frameworks/libraries which help you achieve specific goal with an optimise approach and less efforts. For example if you wish to make a single page Web Application then frameworks/libraries like React, Angular and more good environment to achieve end goal.
  2. Future Maintenance: Before choosing a framework/library we must consider future maintainer of the application. Whether they will be familiar with your chosen framework/library.
  3. Dependencies: We must keep in mind whether the framework/library depend on any 3rd party libraries. If so, does this present a conflict with any libraries you want to use or force you to use specific versions.
  4. Testability: The framework/library you are choosing should not require a lot of complicated set-up to isolate the unit you want to test.
  5. Documentation: Framework/Library must have a good and up to date documentation. There must be a healthy community discussing / supporting / writing about it.
  6. Browser Compatibility: We must keep in mind browser and its versions supported by the framework/library we are choosing.

How much of Unix command line are you familiar with? Give some examples.

I am familiar with basic Unix command line commands. Some of them are:

  1. Directory Commands
  • mkdir dirname To make a new directory inside current working directory.
  • cd dirname To change directory
  • pwd tells where you currently are.
  1. File Commands
  • ls To list all files and folders in current working directory. We can use some flags with ls command for example -a to list all files including file names starting with dot/hidden files or -l to list files in a detailed long format.
  • touch filename To create a new file.
  • mv filename destination To move file to some other destination.
  • cp filename destination To copy file to some other destination.
  • rm filename To remove a file.
  • gzip filename To compress files, so that they take up much less space.
  • gunzip filename To decompress files compressed by gzip.
  • gzcat filename To look at a gzipped file without actually having to gunzip it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment