Skip to content

Instantly share code, notes, and snippets.

View VictorHom's full-sized avatar
👋
😀

Victor Hom VictorHom

👋
😀
View GitHub Profile
@VictorHom
VictorHom / .block
Last active July 23, 2018 04:29
barchart
license: mit
@VictorHom
VictorHom / .block
Created May 17, 2018 12:51
nyc_map
license: mit
@VictorHom
VictorHom / .block
Created May 16, 2018 11:04
nyc_map
license: mit
@VictorHom
VictorHom / .block
Created May 16, 2018 11:04
nyc_map
license: mit
@VictorHom
VictorHom / .block
Created May 16, 2018 10:51
fresh block
license: mit
@VictorHom
VictorHom / .block
Created May 16, 2018 02:44
fresh block
license: mit
# contrived sum function
function sum(a, b, c) {
let x = a + b;
let y = b + c;
let z = x + y - b;
return z;
}
@VictorHom
VictorHom / .block
Last active April 24, 2018 18:08
fresh block
license: mit
@VictorHom
VictorHom / adapter.js
Created January 19, 2016 05:24
examples
function Shipping() {
this.request = function (zipStart, zipEnd, weight) {
return 40; // assume calculations take place
}
};
function ModifiedShipping() {
this.login = function(credentials) {
console.log("setting credentials");
};
// Design Pattern by Victor Hom
// Design Pattern - A reusable solution that can be applied to commonly occurring problems in software design.
// 3 main benefits
// 1. Patterns are solutions to problems. There is a degree of certainty that they work since they have been used widely over time
// 2. Patterns can be reused and can be easily adapted to different scenarios. It provides DRYness and you don't have to worry about
// compromising usability.
// 3. Patterns are expressive and offer a common vocabulary among technologists
// Patterns are not a solution. It is a plan/ template that describes how pieces interact to solve certain problems