View on GitHub

reading-notes

My Reading Notes for Code Fellows Class

Reading Class 08

Don’t Repeat Yourself

“Don’t repeat yourself” (DRY) is a principle of software development aimed at reducing repetition of software patterns, replacing it with abstractions or using data normalization to avoid redundancy

Can’t overstate keep code simple and refactor always

“Write everything Twice” WET solutions are common in multi-tiered architectures where a developer may be tasked with, for example, adding a comment field on a form in a web application

make comments in code to help you later on for user readability

“Avoid Hasty Abstractions” AHA is rooted in the understanding that the deeper the investment we’ve made into abstracting a piece of software, the more we perceive that the cost of that investment can never be recovered

Be clear and concise in code, don’t make dumb variable names with no context, make good habits

(reference: https://en.wikipedia.org/wiki/Don%27t_repeat_yourself )

Rule of Three

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

if the code is similar in execution more than twice, refactor

(reference: https://en.wikipedia.org/wiki/Rule_of_three_(computer_programming) )

You Aren’t Gonna Need It

“You aren’t gonna need it” (YAGNI) is a principle which arose from extreme programming

Understand when to make methods and invoke functions, no need to always make something happen

(reference: https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it )

Minimum Viable Product

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

Meet the minimum goal like a BLUF(Bottom line up front) in Army jargon

Keep MVP clear and concise to get code off the ground

(reference: https://en.wikipedia.org/wiki/Minimum_viable_product )