From 5383a979d36a0abf6d27ec03b1503d3da8a7e974 Mon Sep 17 00:00:00 2001 From: Peter Gribanov Date: Mon, 11 Sep 2017 12:54:39 +0300 Subject: [PATCH 1/2] add links to every sections in table of contents --- README.md | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d68583e..1583e61 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,40 @@ 1. [Introduction](#introduction) 2. [Variables](#variables) + * [Use meaningful and pronounceable variable names](#use-meaningful-and-pronounceable-variable-names) + * [Use the same vocabulary for the same type of variable](#use-the-same-vocabulary-for-the-same-type-of-variable) + * [Use searchable names (part 1)](#use-searchable-names-part-1) + * [Use searchable names (part 2)](#use-searchable-names-part-2) + * [Use explanatory variables](#use-explanatory-variables) + * [Avoid Mental Mapping](#avoid-mental-mapping) + * [Don't add unneeded context](#dont-add-unneeded-context) + * [Use default arguments instead of short circuiting or conditionals](use-default-arguments-instead-of-short-circuiting-or-conditionals) 3. [Functions](#functions) + * [Function arguments (2 or fewer ideally)](#function-arguments-2-or-fewer-ideally) + * [Functions should do one thing](#functions-should-do-one-thing) + * [Function names should say what they do](#function-names-should-say-what-they-do) + * [Functions should only be one level of abstraction](#functions-should-only-be-one-level-of-abstraction) + * [Don't use flags as function parameters](#dont-use-flags-as-function-parameters) + * [Avoid Side Effects](#avoid-side-effects) + * [Don't write to global functions](#dont-write-to-global-functions) + * [Don't use a Singleton pattern](#dont-use-a-singleton-pattern) + * [Encapsulate conditionals](#encapsulate-conditionals) + * [Avoid negative conditionals](#avoid-negative-conditionals) + * [Avoid conditionals](#avoid-conditionals) + * [Avoid type-checking (part 1)](#avoid-type-checking-part-1) + * [Avoid type-checking (part 2)](#avoid-type-checking-part-2) + * [Remove dead code](#remove-dead-code) 4. [Objects and Data Structures](#objects-and-data-structures) + * [Use getters and setters](#use-getters-and-setters) + * [Make objects have private/protected members](#make-objects-have-privateprotected-members) 5. [Classes](#classes) - 1. [S: Single Responsibility Principle (SRP)](#single-responsibility-principle-srp) - 2. [O: Open/Closed Principle (OCP)](#openclosed-principle-ocp) - 3. [L: Liskov Substitution Principle (LSP)](#liskov-substitution-principle-lsp) - 4. [I: Interface Segregation Principle (ISP)](#interface-segregation-principle-isp) - 5. [D: Dependency Inversion Principle (DIP)](#dependency-inversion-principle-dip) + * [S: Single Responsibility Principle (SRP)](#single-responsibility-principle-srp) + * [O: Open/Closed Principle (OCP)](#openclosed-principle-ocp) + * [L: Liskov Substitution Principle (LSP)](#liskov-substitution-principle-lsp) + * [I: Interface Segregation Principle (ISP)](#interface-segregation-principle-isp) + * [D: Dependency Inversion Principle (DIP)](#dependency-inversion-principle-dip) + * [Use method chaining](#use-method-chaining) + * [Prefer composition over inheritance](#prefer-composition-over-inheritance) 6. [Don’t repeat yourself (DRY)](#dont-repeat-yourself-dry) 7. [Translations](#translations) From 4a5cedb6fbe1bf5784e4707201242717d76c8585 Mon Sep 17 00:00:00 2001 From: Peter Gribanov Date: Mon, 11 Sep 2017 13:00:07 +0300 Subject: [PATCH 2/2] correct link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1583e61..8675bb4 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ * [Use explanatory variables](#use-explanatory-variables) * [Avoid Mental Mapping](#avoid-mental-mapping) * [Don't add unneeded context](#dont-add-unneeded-context) - * [Use default arguments instead of short circuiting or conditionals](use-default-arguments-instead-of-short-circuiting-or-conditionals) + * [Use default arguments instead of short circuiting or conditionals](#use-default-arguments-instead-of-short-circuiting-or-conditionals) 3. [Functions](#functions) * [Function arguments (2 or fewer ideally)](#function-arguments-2-or-fewer-ideally) * [Functions should do one thing](#functions-should-do-one-thing)