reading-notes


Project maintained by sanaa-almoghraby Hosted on GitHub Pages — Theme by mattgraham

General code design principles:

Don’t repeat yourself” (DRY, or sometimes “do not repeat yourself”)

is a principle of software development aimed at reducing repetition of software patterns,[1] replacing it with abstractions or using data normalization to avoid redundancy. When the DRY principle is applied successfully, a modification of any single element of a system does not require a change in other logically unrelated elements. Additionally, elements that are logically related all change predictably and uniformly, and are thus kept in sync. Besides using methods and subroutines in their code, Thomas and Hunt rely on code generators, automatic build systems, and scripting languages to observe the DRY principle across layers.

Rule of three

“Three strikes and you refactor”) is a code refactoring rule of thumb to decide when similar pieces of code should be refactored to avoid duplication. It states that two instances of similar code do not require refactoring, ** Duplication is considered a bad practice in programming because it makes the code harder to maintain. When the rule encoded in a replicated piece of code changes, whoever maintains the code will have to change it in all places correctly.

# “You aren’t gonna need it” (YAGNI)[3] is a principle of extreme programming (XP) that states a programmer should not add functionality until deemed necessary. It is meant to be used in combination with several other practices, such as continuous refactoring, continuous automated unit testing, and continuous integration.

A minimum viable product (MVP)

is a version of a product with just enough features to be usable by early customers who can then provide feedback for future product development. It is utilized so that prospective entrepreneurs would know whether a given business idea would actually be viable and profitable by testing the assumptions behind a product or business idea. The concept can be used to validate a market need for a product[9] and for incremental developments of an existing product.