Skip to content

Instantly share code, notes, and snippets.

View chinel's full-sized avatar
🎯
Focusing

Chinelo Kwazu chinel

🎯
Focusing
  • Remote
View GitHub Profile
@chinel
chinel / clean_code.md
Created September 10, 2021 19:57 — 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

@chinel
chinel / task2.js
Last active March 31, 2021 07:19
Check if a string begins with Capital Letter
const validateString = (value) => {
const FIRST_LETTER = value[0];
return FIRST_LETTER === FIRST_LETTER.toUpperCase();
}
console.log(validateString("Mart"));
@chinel
chinel / task1.js
Last active March 31, 2021 07:22
A function that determines the area of a circle
const areaOfCircle = (radius) => {
const PI = 3.14;
return PI * (radius ** 2);
}
console.log(areaOfCircle(4));
please where is the states_ajax file in the $this->Html->script();