Show Menu

Programming Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Progra­mming Paradigms

Imperative: Progra­mming with an explicit sequence of commands that update state.
Declar­ative: Progra­mming by specifying the result you want, not how to get it.
Structured: Progra­mming with clean, goto-free, nested control struct­ures.
Procedural: Imperative progra­mming with procedure calls.
Functional (Appli­cative): Progra­mming with function calls that avoid any global state.
Object­-Or­iented: Progra­mming by defining objects that send messages to each other. Objects have their own internal (encap­sul­ated) state and public interf­aces. Object orient­ation can be: Class-­based: Objects get state and behavior based on membership in a class. Protot­ype­-based: Objects get behavior from a prototype object.
A progra­mming paradigm is a style, or “way,” of progra­mming.
Some languages make it easy to write in some paradigms but not others.

Higher­-order functions

When we talk about higher­-order functions, we mean a function that either:
• takes one or more functions as arguments, or
• returns a function as its result

They let us encaps­ulate variables, make HOCs in React, currying, etc.

Pure function

A pure function is a function which:
• Given the same input, will always return the same output.
• Produces no side effects.

Functions as first-­class entities

Functions as first-­class entities can:
• refer to it from constants and variables
• pass it as a parameter to other functions
• return it as result from other functions


Currying is a process to reduce functions of more than one argument to functions of one argument.


1) Abstra­ction
2) Scaling
3) Effective costs


Redux is a state management tool. It offers a single store of state, which can be accessed from any React component. There are three main principles of Redux:
1) Single source of truth. It means that the state of the app is stored as an object tree within a single store.
2) State is read-only. It means that the state can be changed only by emitting an action.
3) Changes are made with pure functions. To specify how the state tree is transf­ormed by actions, you write pure reducers. Reducers are just pure functions that take the previous state and an action, and return the next state.


React is a JavaScript library for building user interf­aces. It is the view layer for web applic­ations. At the heart of all React applic­ations are compon­ents.
1.1 Component Creation
React enables the creation of module­-like pieces of code called “Compo­nents” which allows reusab­ility.
1.2 Virtual DOM
Considered the next biggest leap in web develo­pment since AJAX, the virtual DOM (short for Document Object Model) is the core reason why React enables the creation of fast, scalable web apps. Through React’s memory reconc­ili­ation algorithm, the library constructs a repres­ent­ation of the page in a virtual memory, where it performs the necessary updates before rendering the final web-page into the browser.
1.3 Easy to learn
We need to clarify that React is NOT a framework; unlike Angular or Vue.js, but a library that is consis­tently used in associ­ation with other Javascript libraries. Hence, there is a shorter learning curve involved in unders­tanding React compared to other compre­hensive libraries.


Scrum is a project management method­ology.
Scrum relies on a self-o­rga­nizing, cross-­fun­ctional team. The Scrum model suggests that projects progress via a series of sprints. In keeping with an agile method­ology, sprints are timeboxed to no more than a month long, most commonly two weeks. Scrum method­ology advocates for a planning meeting at the start of the sprint, where team members figure out how many items they can commit to, and then create a sprint backlog – a list of the tasks to perform during the sprint.

Prototypal Inheri­tance

In JavaScript every object has a prototype object. These prototype objects are live objects that can be changed at any point in time. The most important thing to know about prototype objects is that they can be linked with each other to create chains. JavaScript internally can traverse these chains and look for methods and proper­ties. So if you ask a random object about a property or method, it’s going to traverse the chain to find them.

When a function is called with the new keyword, couple of things happen behind the scenes:
1) A new empty object is created
2) The context object this is bound to the new empty object
3) The new object is linked to the function’s prototype property
4) this is automa­tically returned unless another value is returned explicitly from the function


In JavaSc­ript, ‘this’ normally refers to the object which ‘owns’ the method, but it depends on how a function is called.

Global Scope
If there’s no current object, ‘this’ refers to the global object. In a web browser, that’s ‘window’ — the top-level object which represents the document, location, history and a few other useful properties and methods.


Agile software develo­pment refers to software develo­pment method­ologies centered round the idea of iterative develo­pment, where requir­ements and solutions evolve through collab­oration between self-o­rga­nizing cross-­fun­ctional teams. The ultimate value in Agile develo­pment is that it enables teams to deliver value faster, with greater quality and predic­tab­lity, and greater aptitude to respond to change. Scrum and Kanban are two of the most widely used Agile method­olo­gies. Below are the most frequently asked questions around Agile and Scrum, answered by our experts.