Skip to content

Instantly share code, notes, and snippets.

View kelvinndmo's full-sized avatar
🏠
Working from home

Novak kelvinndmo

🏠
Working from home
View GitHub Profile
@kelvinndmo
kelvinndmo / interview.md
Last active April 15, 2024 12:43
Software Engineering Intern Question

Objective: Build a Rick and Morty Character Viewer

Description

Your task is to create a simple web page that fetches data from the Rick and Morty API (Rick and Morty API) and displays information about characters. You need to display at least the following details for each character:

  • Name
  • Image

Optimistic locking is a concurrency control technique used to manage data consistency in multi-user environments, particularly when dealing with distributed systems or databases. In our specific case, we are implementing optimistic locking with Redis to address concurrency issues when multiple requests attempt to update the same data simultaneously. The core idea behind optimistic locking is to allow multiple operations to proceed independently until the point of updating the shared data. Rather than blocking all but the first request, optimistic locking relies on versioning the data. Each time the data is updated, a version number is associated with it. When a request wants to modify the data, it checks the version number to ensure it matches the expected value. If the version matches, the update proceeds, and the version is incremented for the next update. If the version does not match, it indicates that the data has been modified by another request, and the current request must retry the operation with the

Folder Structure
As we move towards making the project highly scalable, the folder structure is amongst the important things that we are going to be focusing on.
A good folder structure ensures that we have a good and consistent way of doing things and everybody on the team always knows where everything belongs.
We are going to maintain the following folder structure explained below.
|-- modules
|-- home
|-- [+] components
|-- [+] pages
|-- home-routing.module.ts
|-- home.module.ts

Before you start, please follow the issue title format and add yourself as Assignee If the event is a multiple date event only add the starting date in the title

ℹ️ Event information

Please complete all applicable.

  • Event name: Script Winter of Code (SWoC)
  • Event date: 2021/01/01 to 2021/02/28
  • Estimated number of attendees: 1000
  • Event location: Remote

Book Finder App

Create an application that will allow users to search for books by entering a query (Title, Author, etc). Display the resulting books in a list on the page with all the corresponding data.

User Stories

  • User can enter a search query into an input field
  • User can submit the query. This will call an API that will return an array of books with the corresponding data (Title, Author, Published Date, Picture, etc)
  • User can see the list of books appearing on the page

license

Name of Project

  • description

Required Features

const {add, substract, multiplication, division,modulo} = require("../math")
test('should add two number and return sum', () => {
const sum = add(10, 10)
expect(sum).toEqual('sum is 20')
});
test('should substract two number and return difference', () => {
const difference = substract(20, 10)
expect(difference).toEqual(10)
const {add, substract, multiplication, division,modulo} = require("../math")
test('should add two number and return sum', () => {
const sum = add(10, 10)
expect(sum).toEqual('sum is 20')
});
test('should substract two number and return difference', () => {
const difference = substract(20, 10)
expect(difference).toEqual(10)
const add = (a, b) => {
return `sum is ${a + b}`
}
const substract = (a, b) =>{
console.log(a-b)
return a - b
}
import africastalking
username = "africa username" # use 'sandbox' for development in the test environment
# use your sandbox app API key for development in the test environment
api_key = "africa's talking api key"
africastalking.initialize(username, api_key)
# # Use the service synchronously