Skip to content

Commit 33b2234

Browse files
PR arialdomartini#70 - no pages containing answers
No resources
2 parents 1f726b0 + 160d42b commit 33b2234

20 files changed

+18
-295
lines changed

README.md

Lines changed: 18 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,7 @@ Sooner or later I will complete it with the relative answers. Feel free to contr
277277
### [[]](#toc) <a name='patterns'>Questions about Design Patterns:</a>
278278

279279
#### Globals Are Evil
280-
Why are global and static objects evil? Can you show it with a code example? <br/>
281-
[Resources](design-patterns/globals-are-evil.md)
280+
Why are global and static objects evil? Can you show it with a code example?
282281

283282
#### Inversion of Control
284283
Tell me about Inversion of Control and how it improves the design of code.<br/>
@@ -295,39 +294,31 @@ Active-Record is the design pattern that promotes objects to include functions s
295294
[Resources](design-patterns/active-record.md)
296295

297296
#### Data-Mapper
298-
Data-Mapper is a design pattern that promotes the use of a layer of Mappers that moves data between objects and a database while keeping them independent of each other and the mapper itself. On the contrary, in Active-Record objects directly incorporate operations for persisting themselves to a database, and properties corresponding to the underlying database tables. Do you have an opinion on those patterns? When would you use one instead of the other?<br/>
299-
[Resources](design-patterns/data-mapper.md)
297+
Data-Mapper is a design pattern that promotes the use of a layer of Mappers that moves data between objects and a database while keeping them independent of each other and the mapper itself. On the contrary, in Active-Record objects directly incorporate operations for persisting themselves to a database, and properties corresponding to the underlying database tables. Do you have an opinion on those patterns? When would you use one instead of the other?
300298

301299
#### Billion Dollar Mistake
302-
Why is it often said that the introduction of `null` is a "billion dollar mistake"? Would you discuss the techniques to avoid it, such as the Null Object Pattern introduced by the GOF book, or Option types?<br/>
303-
[Resources](design-patterns/billion-dollar-mistake.md)
300+
Why is it often said that the introduction of `null` is a "billion dollar mistake"? Would you discuss the techniques to avoid it, such as the Null Object Pattern introduced by the GOF book, or Option types?
304301

305302
#### Inheritance vs Composition
306-
Many state that, in Object-Oriented Programming, composition is often a better option than inheritance. What's you opinion?<br/>
307-
[Resources](design-patterns/inheritance-vs-composition.md)
303+
Many state that, in Object-Oriented Programming, composition is often a better option than inheritance. What's you opinion?
308304

309305
#### Anti-corruption Layer
310-
What is an Anti-corruption Layer?<br/>
311-
[Resources](design-patterns/anti-corruption-layer.md)
306+
What is an Anti-corruption Layer?
312307

313308
#### Singleton
314309
Singleton is a design pattern that restricts the instantiation of a class to one single object. Writing a Thread-Safe Singleton class is not so obvious. Would you try?
315310

316311
#### Data Abstraction
317-
The ability to change implementation without affecting clients is called Data Abstraction. Produce an example violating this property, then fix it.<br/>
318-
[Resources](design-patterns/data-abstraction.md)
312+
The ability to change implementation without affecting clients is called Data Abstraction. Produce an example violating this property, then fix it.
319313

320314
#### Don't Repeat Yourself
321-
Write a snippet of code violating the Don't Repeat Yourself (DRY) principle. Then, fix it.<br/>
322-
[Resources](design-patterns/dont-repeat-yourself.md)
315+
Write a snippet of code violating the Don't Repeat Yourself (DRY) principle. Then, fix it.
323316

324317
#### Dependency Hell
325-
How would you deal with Dependency Hell?<br/>
326-
[Resources](design-patterns/dependency-hell.md)
318+
How would you deal with Dependency Hell?
327319

328320
#### Goto is Evil
329-
Is goto evil? You may have heard of the famous paper "Go To Statement Considered Harmful" by Edsger Dijkstra, in which he criticized the use of the `goto` statement and advocated structured programming instead. The use of `goto` has always been controversial, so much that even Dijkstra's letter was criticized with articles such as "'GOTO Considered Harmful' Considered Harmful". What's your opinion on the use of `goto`?<br/>
330-
[Resources](design-patterns/goto-is-evil.md)
321+
Is goto evil? You may have heard of the famous paper "Go To Statement Considered Harmful" by Edsger Dijkstra, in which he criticized the use of the `goto` statement and advocated structured programming instead. The use of `goto` has always been controversial, so much that even Dijkstra's letter was criticized with articles such as "'GOTO Considered Harmful' Considered Harmful". What's your opinion on the use of `goto`?
331322

332323
#### Robustness Principle
333324
The robustness principle is a general design guideline for software that recommends "*be conservative in what you send, be liberal in what you accept*". It is often reworded as "*be a tolerant reader and a careful writer*". Would you like to discuss the rationale of this principle?
@@ -469,40 +460,31 @@ In web development, Model-View Controller and Model-View-View-Model approaches a
469460
### [[]](#toc) <a name='databases'>Questions about Databases:</a>
470461

471462
#### DB Migrations
472-
How would you migrate an application from a database to another, for example from MySQL to PostgreSQL? If you had to manage that project, which issues would you expect to face?<br/>
473-
[Resources](databases/db-migrations.md)
463+
How would you migrate an application from a database to another, for example from MySQL to PostgreSQL? If you had to manage that project, which issues would you expect to face?
474464

475465
#### NULL is special
476-
Why do databases treat null as a so special case? For example, why does ```SELECT * FROM table WHERE field = null``` not match records with null ``field`` in SQL?<br/>
477-
[Resources](databases/null-is-special.md)
466+
Why do databases treat null as a so special case? For example, why does ```SELECT * FROM table WHERE field = null``` not match records with null ``field`` in SQL?
478467

479468
#### ACID
480-
ACID is an acronym that refers to Atomicity, Consistency, Isolation and Durability, 4 properties guaranteed by a database transaction in most database engines. What do you know about this topic? Would you like to elaborate?<br/>
481-
[Resources](databases/acid.md)
469+
ACID is an acronym that refers to Atomicity, Consistency, Isolation and Durability, 4 properties guaranteed by a database transaction in most database engines. What do you know about this topic? Would you like to elaborate?
482470

483471
#### Schema Migrations
484-
How would you manage database schema migrations? That is, how would you automate changes to database schema, as the application evolves, version after version?<br/>
485-
[Resources](databases/schema-migrations.md)
472+
How would you manage database schema migrations? That is, how would you automate changes to database schema, as the application evolves, version after version?
486473

487474
#### Lazy Loading
488-
How is lazy loading achieved? When is it useful? What are its pitfalls?<br/>
489-
[Resources](databases/lazy-loading.md)
475+
How is lazy loading achieved? When is it useful? What are its pitfalls?
490476

491477
#### N+1 Problem
492-
The so called "N + 1 problem" is an issue that occurs when code needs to load the children of a parent-child relationship with a ORMs that have lazy-loading enabled, and that therefore issue a query for the parent record, and then one query for each child record. How to fix it?<br/>
493-
[Resources](databases/n1-problem.md)
478+
The so called "N + 1 problem" is an issue that occurs when code needs to load the children of a parent-child relationship with a ORMs that have lazy-loading enabled, and that therefore issue a query for the parent record, and then one query for each child record. How to fix it?
494479

495480
#### Slowest Queries
496-
How would you find the most expensive queries in an application?<br/>
497-
[Resources](databases/slowest-queries.md)
481+
How would you find the most expensive queries in an application?
498482

499483
#### Normalization
500-
In your opinion, is it always needed to use database normalization? When is it advisable to use denormalized databases?<br/>
501-
[Resources](databases/normalization.md)
484+
In your opinion, is it always needed to use database normalization? When is it advisable to use denormalized databases?
502485

503486
#### Blue/Green Deployment
504-
Of of the Continuous Integration's techniques is called Blue-Green Deployment: it consists in having two production environments, as identical as possible, and in performing the deployment in one of them while the other one is still operating, and than in safely switching the traffic to the second one after some convenient testing. This technique becomes more complicated when the deployment includes changes to the database structure or content. I'd like to discuss this topic with you.<br/>
505-
[Resources](databases/bluegreen-deployment.md)
487+
Of of the Continuous Integration's techniques is called Blue-Green Deployment: it consists in having two production environments, as identical as possible, and in performing the deployment in one of them while the other one is still operating, and than in safely switching the traffic to the second one after some convenient testing. This technique becomes more complicated when the deployment includes changes to the database structure or content. I'd like to discuss this topic with you.
506488

507489

508490
### [[]](#toc) <a name='nosql'>Questions about NoSQL:</a>

databases/acid.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

databases/bluegreen-deployment.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

databases/db-migrations.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

databases/lazy-loading.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

databases/n1-problem.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

databases/normalization.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

databases/null-is-special.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

databases/schema-migrations.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

databases/slowest-queries.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

design-patterns/anti-corruption-layer.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

design-patterns/billion-dollar-mistake.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

design-patterns/data-abstraction.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

design-patterns/data-mapper.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

design-patterns/dependency-hell.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

design-patterns/globals-are-evil.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

design-patterns/goto-is-evil.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

design-patterns/inheritance-vs-composition.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)