Skip to content

Instantly share code, notes, and snippets.

View realgio95's full-sized avatar
🏠
Working from home

Giovanni HoSang realgio95

🏠
Working from home
View GitHub Profile

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@realgio95
realgio95 / clean_code_summary.md
Last active July 18, 2024 19:12 — 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

@realgio95
realgio95 / factorialize.js
Created March 3, 2018 16:05
YaadCode - Live FreeCode Camp Coding Sessions
/*
Sign up for YaadCode - Live FreeCode Coamp Coding Sessions Twice Weekly on Skype
You may join the FreeCodeCamp, Kingston Group here: https://www.facebook.com/groups/free.code.camp.kingston.jamaica/
https://www.freecodecamp.org/challenges/factorialize-a-number
*/
function factorialize(num) {
if (num ==1 ){
return 1;
}
@realgio95
realgio95 / ReverseString.js
Last active March 3, 2018 16:05
YaadCode: FreeCodeCamp Live Coding Sessions Challenges
/*
Sign up for YaadCode - Live FreeCode Camp Coding Sessions Twice Weekly on Skype
You may join the FreeCodeCamp, Kingston Group here: https://www.facebook.com/groups/free.code.camp.kingston.jamaica/
https://www.freecodecamp.org/challenges/reverse-a-string
*/
function reverseString(str) {
var chars = str.split("");
chars.reverse();
newStr = chars.join("");
return newStr;
#include<cmath>
#include<iostream>
#include<climits>
using namespace std;
int Maximum_Sum_Subarray(int arr[],int n) //Overall Time Complexity O(n)
{
int ans = A[0],sum = 0;
for(int i = 1;i < n; ++i) //Check if all are negative
ans = max(ans,arr[i]);
@realgio95
realgio95 / PreorderInorderPostorder_CPP.cpp
Created December 11, 2015 12:00 — forked from mycodeschool/PreorderInorderPostorder_CPP.cpp
Binary tree traversal: Preorder, Inorder, Postorder
/* Binary Tree Traversal - Preorder, Inorder, Postorder */
#include<iostream>
using namespace std;
struct Node {
char data;
struct Node *left;
struct Node *right;
};