Design Principles Junior

1 / 8

What is the "Tell, Don't Ask" principle in object-oriented programming?

Select the correct answer

1

The 'Tell, Don't Ask' principle means documenting code thoroughly.

2

The 'Tell, Don't Ask' principle advises to command objects rather than querying their state.

3

The 'Tell, Don't Ask' principle suggests avoiding global variables.

4

The 'Tell, Don't Ask' principle means using encapsulation for data protection.

Explain TDD.

Select the correct answer

1

TDD stands for 'Time-Driven Development' focused on timely delivery.

2

TDD is a way to debug software effectively.

3

TDD stands for 'Test-Driven Development,' where tests are written before code.

4

TDD emphasizes writing detailed documentation first.

Explain the Fail-Fast Principle.

Select the correct answer

1

The Fail-Fast Principle suggests that a system should immediately report any failure.

2

The Fail-Fast Principle means delaying error reporting to gather more data.

3

The Fail-Fast Principle stands for implementing fallback mechanisms.

4

The Fail-Fast Principle encourages redundancy in code.

What is the "Law of Big-O Notation," and why is it important in algorithm design?

Select the correct answer

1

The 'Law of Big-O Notation' is used to predict software bugs.

2

The 'Law of Big-O Notation' helps in writing secure code.

3

The 'Law of Big-O Notation' dictates the structure of databases.

4

The 'Law of Big-O Notation' measures the efficiency of an algorithm in terms of time and space complexity.

Explain YANGI.

Select the correct answer

1

YANGI stands for 'You Aren't Gonna Need It' and advises against adding functionality until necessary.

2

YANGI means to frequently refactor code for clarity.

3

YANGI emphasizes using newer technologies in development.

4

YANGI stands for 'Yet Another New Great Idea' in software innovation.

Explain KISS.

Select the correct answer

1

KISS stands for 'Keep It Simple, Stupid' and promotes simplicity in design.

2

KISS emphasizes using sophisticated algorithms for better performance.

3

KISS stands for 'Keep It Safe and Secure' in software.

4

KISS refers to continuously integrating code changes.

Explain DRY.

Select the correct answer

1

DRY stands for 'Don't Repeat Yourself' and emphasizes reducing repetition in code.

2

DRY refers to keeping your data storage minimal.

3

DRY means to make your code robust against errors.

4

DRY encourages writing code that is easy to understand.

What is SOLID?

Select the correct answer

1

A methodology for testing software through unit tests.

2

A principle to keep code simple and straightforward.

3

A set of five design principles intended to make software designs more understandable, flexible, and maintainable.

4

A way to develop software using Agile methodologies.