Skip to content

Instantly share code, notes, and snippets.

View paulfranco's full-sized avatar

Paul Franco (he/him) paulfranco

View GitHub Profile

Interview Questions

Node.js

Q1: What do you mean by Asynchronous API? ☆☆

Answer: All APIs of Node.js library are aynchronous that is non-blocking. It essentially means a Node.js based server never waits for a API to return data. Server moves to next API after calling it and a notification mechanism of Events of Node.js helps server to get response from the previous API call.

Source: tutorialspoint.com

Interview Questions

Kotlin

Q1: What is a primary constructor in Kotlin? ☆☆

Answer: The primary constructor is part of the class header. Unlike Java, you don't need to declare a constructor in the body of the class. Here's an example:

Interview Questions

MongoDB

Q1: Explain what is MongoDB? ☆

Answer: MongoDB is an open-source document database that provides high performance, high availability, and automatic scaling. It's Key Features are:

  • Document Oriented and NoSQL database.

JavaScript Interview Questions

Q1: Explain equality in JavaScript ☆

Answer: JavaScript has both strict and type–converting comparisons:

  • Strict comparison (e.g., ===) checks for value equality without allowing coercion
  • Abstract comparison (e.g. ==) checks for value equality with coercion allowed

Android Interview Questions

Q1: Explain activity lifecycle ☆☆

Answer: As a user navigates through, out of, and back to your app, the Activity instances in your app transition through different states in their lifecycle.

To navigate transitions between stages of the activity lifecycle, the Activity class provides a core set of six callbacks: onCreate(), onStart(), onResume(), onPause(), onStop(), and onDestroy(). The system invokes each of these callbacks as an activity enters a new state.

Test Driven Development
Main Principle: Write the test case before the implementation of the function (only for unit tests)
Convention:
1. You should only have one assertion per test case
- Why? Because we immediately want to know the cause of the failed test case
- Note: Sometimes there is no way around having multiple assertions.
Steps:
@paulfranco
paulfranco / IAM.txt
Last active June 27, 2024 04:52
AWS Certified Developer - Identity Access Management
1. What is IAM?
- IAM allows you to manage users and their level of access to the AWS Console.
2. What does IAM give you?
- Centralized control of your AWS account
- Shared Access to your AWS account
- Granular Permissions
- Identity Federation (including Active Directory, Facebook, LinkedIn, etc)
- Multifactor Authenthication
- Provides temporary access for the users/devices and services, as necessary

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user