concepts Flashcards

1
Q

DevOps

A

Definition: a set of practices intended to reduce the time between committing a change to a system and the change being placed into normal production, while ensuring high quality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Daemon

A

Computer program that runs as a background process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Hashing

A

Practice of using an algorithm to to transform a string of characters into a usually shorter fixed-length value or key that represents the original string. Hashing is used to index and retrieve items in a database because it is faster to find the item using the sorter hashed key than to find it using the original value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Zero-sum game

A

Mathematical representation of a situation in which an advantage that is won by one of two sides is lost by the other. If the total gains of the participants are added up, and the total losses are subtracted, they will sum to zero.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Encapsulation

A

Encapsulation is used to hide the values or state of structured data, preventing access in a way that could expose hidden implementation details

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Abstraction

A

Data abstraction is the property by virtue of which only the essential details are displayed to the user. The trivial or the non-essentials units are not displayed to the user.

Example: Consider a real-life example of a man driving a car. The man only knows that pressing the accelerators will increase the speed of a car or applying brakes will stop the car, but he does not know about how on pressing the accelerator the speed is actually increasing, he does not know about the inner mechanism of the car or the implementation of the accelerator, brakes, etc in the car. This is what abstraction is.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Abstract classes

A

An abstract class allows you to create functionality that subclasses can implement or override. It cannot be instantiated, the purpose is to provide a common definition of a base class that multiple derive classes can share.

An abstract class is a class that has at least one abstract method. Abstract methods can only have names and aruguments. An abstract method is a method that is declared, but not implemented in the code.

To create object we need to create child classes that add the code into the bodies of the methods and use these child classes to create objects. All the abstract method must be defined by the child class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Abstract method

A

An abstract method is a method that is declared, but not implemented in the code.

When inheriting from an abstract class, the child class method must be defined with the same name, and the same or a less restricted access modifier. So, if the abstract method is defined as protected, the child class method must be defined as either protected or public, but not private. Also, the type and number of required arguments must be the same. However, the child classes may have optional arguments in addition.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Expression

A

An expression is any valid unit of code that resolves to a value.

Conceptually, there are two types of expressions: those that assign a value to a variable and those that simply have a value.

The expression x = 7 is an example of the first type.
This expression uses the = operator to assign the value seven to the variable x. The expression itself evaluates to seven.

The code 3 + 4 is an example of the second expression type.
This expression uses the + operator to add three and four together without assigning the result, seven, to a variable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Primitive data types

A

A primitive data type is pre-defined by the programming language. Non primitive data-types are not actualy defined by the programming language but are created by the programmer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the difference between Method Overloading and Method Overriding?

A

Method overriding always needs inheritance. In method overloading, methods must have the same name and different signatures

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the difference between an abstract class and an interface?

A
  • Abstract classes can have access modifiers but interface methods are implicitly public and abstract.
  • Interfaces are used to define contract for the subclasses whereas abstract classes also define a contract but it can provide other methods implementations for subclasses to use.

I see it like abstract class is and
interface can do

Interface
A person at the same time can have different charactericts. Like a man at the same time is a father, a husband, an employee. So the same person posesses different behavior in different situtations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Polymorphism

A

Having multiple forms.

In OOP, describes situations in which something occurs in several different forms.

It can be implemented through method overloading/overriding (through interfaces or abstract classes)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What types of inheritance exist?

A

Single inheritance.
Multi-level inheritance.
Multiple inheritance.

others:
Multipath inheritance.
Hierarchical Inheritance.
Hybrid Inheritance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does it mean when developers say “Composition over inheritance”?

A

Instead of object is a… the object will have a …..

Object composition is a different method of reusing functionality. Objects are composed to achieve more complex functionality. This approach requires that the objects have well-defined interfaces since the internal objects are unknown.

Composition allows decoupling, making it easy to swap components.

We use composition through dependency injection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is OOP?

A

Programming paradigm based on the concept of objects, which can contain data and code.

17
Q

What are the 4 pillars of OOP?

A

Encapsulation
inheritance
Abstraction
Polymorphism

18
Q

What is Encapsulation?

A

Encapsulation is used to hide the values or state of structure data inside a class, preventing direct access to them by clients in a way that could expose hidden implementation details

19
Q

What is abstraction?

A

Data abstraction is the property by virtue of which only the essential details are displayed to the user.

Not the same as abstract classes or methods.

20
Q

What is dependency injection?

A

In SE, dependency injection is a technique in which an object receives other objects that it depends on, called dependencies.

Typically, the receiving object is called a client and the passed-in (injected) object is called a service. The code that passes the service to the client is called the injector

21
Q

What types of dependency injection exist?

A

Constructor Injection: The dependencies are provided through a client’s class constructor

Setter injection: The client exposes a setter method that the injector uses to inject the dependency

Interface injection: The dependency’s interface provides an injector method that will inject the dependency into any client passed to it.

22
Q

What is the difference between imperative and declarative programming?

A

Declarative programming is a paradigm describing WHAT the program does, without explicitly specifying its control flow. Imperative programming is a programming paradigm describing HOW the program should do something by explicitly specifying each instruction step by step, which mutate the program’s state.

23
Q

What is a PURE function?

A

add answer ….

24
Q

What is functional programming?

A

add answer…

25
Q

What is memoization?

A

add answer