Skip to content

Commit 50fd2af

Browse files
Small review: questions enhanced when possible
1 parent 874520e commit 50fd2af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ Sooner or later I will complete it with the relative answers. Feel free to contr
4848

4949
### [[]](#toc) <a name='patterns'>Questions about Design Patterns:</a>
5050

51-
* Why are global objects and static evil? Can you show it with a code example?
51+
* Why are global and static objects evil? Can you show it with a code example?
5252
* Tell me about Inversion of Control and how does it improve the design of code.
5353
* The Law of Demeter (the Principle of Least Knowledge) states that each unit should have only limited knowledge about other units and it should only talk to its immediate friends (sometimes stated as "Don't talk to strangers"). Would you write code violating this principle, show why it is a bad design and then fix it?
5454
* Active-Record is the design pattern that promotes objects to include functions such as Insert, Update, and Delete, and properties that correspond to the columns in some underlying database table. In your opinion and experience, which are the limits and pitfalls of the this pattern?
5555
* 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 against the other?
5656
* Why it is 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?
57-
* Why is Composition often better than Inheritance?
57+
* Many state that, in Object-Oriented Programming, Composition is often a better option than Inheritance. What's you opinion?
5858
* What is an Anti-corruption Layer?
5959
* 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?
6060
* The ability to change implementation without affecting clients is called Data Abstraction. Produce and example violating this property, then fix it.

0 commit comments

Comments
 (0)