Skip to content

Instantly share code, notes, and snippets.

View thepatrickniyo's full-sized avatar
:octocat:
Building & Mentoring

Patrick Niyogitare thepatrickniyo

:octocat:
Building & Mentoring
View GitHub Profile
@thepatrickniyo
thepatrickniyo / clean_code.md
Created April 26, 2021 05:42 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

How to define enums in Javascipt

Enumerations offer an easy way to work with sets of related constants. An enumeration, or Enum , is a symbolic name for a set of values. Enumerations are treated as data types, and you can use them to create sets of constants for use with variables and properties.

Natively javascript doesn't support enums but still you can implement enum in javascipt. One of the available ways is to defining an object and then freezing it after definition.

Basic stardard description of a Pull Request

Hi folks 🖐! I'm sharing the template of describing your PR. Most of the time people describe Pull requests in their way but the thing is that there is a stardard way of PR description, what I'm sharing today is a basic template of PR description. You can folk this out or copy to be used in your PR description. Thank you.

Mackdown