Inno 3.0 Statuses, Acronyms Flashcards

(29 cards)

1
Q

What does the SOLID acronym stand for in object-oriented design?

A

Single Responsibility,
Open/Closed,
Liskov Substitution,
Interface Segregation, and
Dependency Inversion

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

What is the Single Responsibility Principle (SRP)

A

A class should have only one reason to change, meaning it should have only one job or responsibility. This makes the class easier to test and maintain.

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

What is the Open/Closed Principle (OCP)

A

Software entities (classes, modules, functions) should be open for extension but closed for modification. You should be able to add new behavior without changing existing code.

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

What is the Liskov Substitution Principle (LSP)?

A

Subtypes must be substitutable for their base types without altering the correctness of the program. If class B is a subclass of A, you should be able to use B instead of A without issues.

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

What is the Interface Segregation Principle (ISP)?

A

Clients should not be forced to depend on interfaces they do not use. It’s better to have many small, specific interfaces than a large, general-purpose one.

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

What is the Dependency Inversion Principle (DIP)?

A

High-level modules should not depend on low-level modules; both should depend on abstractions. This reduces coupling between modules.

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

What does DRY stand for and mean?

A

Don’t Repeat Yourself — avoid code duplication. Every piece of knowledge should exist in a single, unambiguous place in the codebase.

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

What does KISS stand for and mean?

A

Keep It Simple, Stupid — favor simple, straightforward solutions over complex ones. Simpler code is easier to understand and maintain.

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

What does YAGNI stand for and mean?

A

You Aren’t Gonna Need It — don’t implement functionality until it’s actually required. Avoid overengineering.

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

Why are good naming conventions important in code?

A

Descriptive names make code easier to read, understand, and maintain over time. They help developers quickly grasp what a class, method, or variable is supposed to do without needing additional explanation. Poor naming can lead to confusion and misunderstandings, especially in team environments. Good naming reduces the need for excessive comments and improves collaboration across the codebase. It’s a fundamental part of writing clean, self-documenting code.

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

What are common naming practices in .NET?

A

In .NET, PascalCase is used for class names, method names, and public properties,

while camelCase is used for local variables and method parameters. Interfaces typically start with an “I” (e.g., IRepository).

Meaningful names should be preferred over short or cryptic ones. Avoid abbreviations unless they are very common (like Id or Url). Consistent naming improves readability and ensures the codebase follows predictable patterns.

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

When should you write comments in code?

A

Comments should be used to explain why something is done, not what is done — the code itself should tell what. Good comments provide context or rationale that’s not obvious from the code. Avoid writing comments that simply repeat what the code says, or that become outdated as the code evolves. Use comments sparingly and ensure they remain relevant and up to date. Well-placed comments can improve understanding without cluttering the code.

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

What is the role of documentation in a project?

A

Documentation serves as a guide to understanding the system, how to use it, and how to contribute to it. It helps new team members onboard more quickly and ensures consistent knowledge sharing. Well-maintained documentation reduces the dependency on specific individuals and improves project continuity. It should include setup instructions, API references, architecture decisions, and usage examples. Good documentation complements readable code and boosts team productivity.

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

What is Separation of Concerns (SoC)?

A

SoC is a design principle that advocates dividing a system into distinct layers or components, each responsible for a specific aspect of functionality.

For example, separating presentation (UI), business logic, and data access logic into different layers.

This makes code easier to understand, test, and maintain. It also reduces coupling between parts of the system, making future changes less risky. Following SoC helps build scalable and flexible applications.

DIVINDING SYSTEM INTO LAYERS OR COMPONENTS

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

Why is SoC important in software design?

A

When concerns are separated, developers can work on one part of the system without affecting others. This isolation improves maintainability and testability. It also enables better team collaboration, where developers specialize in different layers of the application. SoC supports the principle of single responsibility and allows for cleaner architecture. Overall, it leads to more robust and adaptable code.

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

What is modular code and why is it valuable?

A

Modular code is organized into small, self-contained components or modules, each with a clear purpose. These modules can be developed and tested independently, improving reliability and efficiency. It’s easier to reuse modules in other projects or contexts, reducing duplication. Modular design also supports parallel development and simplifies debugging. It’s a key aspect of maintainable and scalable software systems.

17
Q

How do you achieve code reusability?

A

Code reusability is achieved by writing generalized, well-abstracted functions, classes, or components.

Avoid duplicating logic and extract shared functionality into services or utilities. Use interfaces and dependency injection to make code flexible and easy to plug into different contexts.

Reusable code saves time and effort, especially in large projects or teams. It also leads to more consistent and reliable applications.

18
Q

What are the benefits of organizing code by layers (e.g., presentation, business logic, data)?

A

Layered architecture helps to separate responsibilities and keep the system well-structured. Each layer focuses on a specific task, which improves clarity and maintainability. Changes in one layer (like switching a database) usually require minimal or no changes to others. This structure also enhances testing, as individual layers can be tested in isolation. Organizing code by layers aligns with clean architecture principles and supports scalability.

19
Q

What does “Stateless” mean in the context of RESTful principles?

A

“Stateless” means that every request from a client to a server must contain all the information needed to understand and process the request.

The server does not store any client context between requests. Each interaction is independent, and the server does not retain state between requests, which simplifies the design and scalability.

If state is needed, it must be managed by the client or stored on the client side, typically using tokens or cookies.

STATELESS MEANS EVERY REQUEST HAVE ALL THE REQUIRED INFO TO PROCESS IT

20
Q

What does “Uniform Interface” mean in RESTful principles?

A

“Uniform Interface” refers to the consistent and standard way of interacting with resources through APIs.

This principle simplifies the architecture, as it decouples the client and server. The interface is based on standard conventions such as HTTP methods (GET, POST, PUT, DELETE) and resource URIs. It reduces the complexity of the system by providing a common understanding of how resources can be manipulated and accessed, leading to better scalability and ease of integration.

21
Q

What is the significance of “Client-Server” in RESTful architecture?

A

The “Client-Server” principle emphasizes the separation of concerns between the client and the server. The client is responsible for the user interface and user experience, while the server handles data processing, storage, and business logic. This separation allows both parts to evolve independently. The client and server communicate over a standard interface (typically HTTP), and they are loosely coupled, making the system more scalable and flexible.

22
Q

What does “Cachable” mean in RESTful principles?

A

A: The “Cachable” principle states that responses from the server should explicitly define whether they can be cached by the client or any intermediate systems, such as proxies.

If the response is marked properly, it has the information, that it can be stored.

Caching improves performance by reducing the need for redundant data retrieval. It enables the system to handle requests more efficiently, especially when dealing with frequently accessed resources. Caching is typically controlled using HTTP headers like Cache-Control, Expires, and ETag.

THE RESPONSE SHOULD HAVE INFORMATION IF ITS CACHABLE

23
Q

What does HTTP status code 204 No Content mean?

A

204 No Content means that the server successfully processed the request, but there is no content to return in the response body. This is often used for DELETE requests or when updating resources where no response body is necessary, but the operation is successful. It tells the client that the request was successful, but no further information is needed.

SUCCESSFULL DELETED

24
Q

What does HTTP status code 301 Permanent Redirect mean?

A

301 Permanent Redirect indicates that the requested resource has been permanently moved to a new URI. This status code is used to redirect the client to the new location of the resource, and it tells the client to update its links to the new URI. It is often used when resources are permanently moved or URLs are restructured.

25
What does HTTP status code 400 Bad Request mean?
**400 Bad Request indicates that the server cannot process the request due to malformed syntax or invalid data**. This typically occurs when the client sends data that the server cannot understand or process, such as missing required parameters or incorrect data types. It signals the client to correct the request and resend it.
26
What does HTTP status code 403 Forbidden mean?
403 Forbidden means that the server understands the request, but the client does not have permission to access the requested resource. **This status is typically used when the user is authenticated** but does not have sufficient privileges to perform the operation, or the server intentionally blocks access to certain resources. AUTHENTICATED BUT HAS NO ACCESS
27
What does HTTP status code 404 Not Found mean?
404 Not Found indicates that the server cannot find the requested resource. **This status is commonly returned when the client attempts to access a URL that does not exist on the server**. It might also be returned if the resource has been deleted or moved, but the client has the old URL.
28
What does HTTP status code 500 Internal Server Error mean?
500 Internal Server Error signals that the server **encountered an unexpected condition that prevented it from fulfilling the request.** This is a generic error message indicating that something went wrong on the server side, but it doesn't provide specific details about the issue. It's important to log the error on the server for further investigation.
29
What does HTTP status code 502 Bad Gateway mean?
**502 Bad Gateway indicates that the server, while acting as a gateway or proxy**, received an invalid response from the upstream server. This often occurs when the server is trying to forward a request to another server, but that server fails to respond correctly. It's a common error when dealing with reverse proxies or load balancers.