Skip to content

Instantly share code, notes, and snippets.

@iGitScor
Last active May 8, 2021 09:48
Show Gist options
  • Save iGitScor/99612769b139582c36703385217546a6 to your computer and use it in GitHub Desktop.
Save iGitScor/99612769b139582c36703385217546a6 to your computer and use it in GitHub Desktop.
HiringProcess

Imagine that you have two classes named "Animal" and "Dog" and you want the class "Dog" to have all the properties and methods from the class "Animal", how would you do it? How is this called? What's the benefit?

To share properties and methods, we can define an inheritance so dog instances will have access to animal properties and methods. The main benefit is to avoid duplicated code, to define shared logic and eventually to precise specific behavior in subclasses.

class Animal {}

class Dog extends Animal {}

What are the benefits of using Typescript?

The benefits of using TypeScript are: Typescript is a superset of Javascript, so JavaScript developers can develop using TypeScript Typescript is a typed language, so it allows to declare parameters and return values static types Typescript makes it easy to develop using OOP paradigm, but libraries like ts-fp improve functional programming too.

Describe with your own words a web socket?

A web socket is a transaction about two devices (client and server) using a specific protocol. It allows to have a two way communication

Describe with your own words a GraphQL API.

A GraphQl API is a new approach of webservice. GraphQL is developped as a request language, it can be used for requests (read data) and command (mutation)

The advantage of GraphQL on REST api is to consume only the data we need. (some properties, or nested entities) There is also a difference between the two mains webservice architecture, the schema defintion.

How do you keep yourself up-to-date in regards the technologies you do use?

For technologies I use, I look at changelog of official blog post I also follow some expert developers on specific topics (dev.to, Twitter) I participate to local meetup to exchange about the future of technologies or new tools/languages/…

A call to the setTimeout() global method can block the event loop in NodeJS. Is this true or false? Why?

This sentence is wrong because setTimeout is an asynchronous instruction which is stacked in a specific queue to be executed after main stacked is completely resolved. The event loop is blocked when the current process composed of several synchronous instructions takes time.

How can you share information between components on a React application?

There are several ways to share information between components.

  • One of them is to use an app state, which reduce dependencies between component.
  • An application state is a specific design but it's also possible to use dependency injection to share services which have in-memory data stored.
  • It is also possible to share information during initialization with components properties (props)

How would you protect a REST API against potential SQL Injections?

It is possible to add a layer (middleware) which will validate the request data, so it can escape sql values to prevent potential SQL Injections

What does the level of coupling measure in software development?

The level of coupling measures the dependency between part of applications

What is CI? Have you used one before?

CI is continuous integration, it allows to run scripts after development. Most of the time, automated tests are launched using this tool.

I created CI pipelines for travis and circle CI, I also tested Wercker because it was dedicated to containerized applications I'm also familiar with Jenkins but I didn't use it for a while.

How would you deploy a Node application?

I deploy node application in docker containers on a droplet but I had the opportunity to work on a project during a hackathon with AWS amplify. Amplify is a serverless tool to deploy lambda (unique functions) on the cloud

Why do we do code reviews?

We do code reviews for two main reasons. The first one is to see potential issues (not the one detected with CI pipelines), about conception, clean code and understanding The second one is to have a global overview of the project.

In which files would you store API tokens, passwords, or similars?

I would store critical data in non-versionned files. Most of the time, I use .env file (and dotenv library in nodejs) I write Makefile command to ensure .env is always up to date (and warn developers) when new keys are created and have to be set

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment