Skip to content

Instantly share code, notes, and snippets.

Mike Aono aonomike

Block or report user

Report or block aonomike

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aonomike
aonomike / TemplateAndStrategyDesignPatterns.md
Last active Nov 11, 2015
Template Design Pattern and a Strategy Design Pattern
View TemplateAndStrategyDesignPatterns.md

Template Design Pattern

Works with dependency inversion, which states that low level objects should not depend on high level objects Mainly used when objects follow a given sequence to perfom a task but the tasks are implemented differently in every object

//the abstract class, note that the manufacture function calls the abstract methods
public abstract class GeneralManufacturingProcess {
 public abstract void assembly();
 public abstract void test();
 public abstract void pack();
@aonomike
aonomike / iffyFunctionDemo.js
Created Nov 5, 2015
Immediately Invoked Function Expression in Javascript - (function(){..})()
View iffyFunctionDemo.js
//Test Function showing the use of iffe (Immediately Invoked Function Expression ) in javascript .
//The function executes immediately after it’s created.
var myVariable;
(
function(myParameter){
alert(myParameter)
}
)(myVariable);
You can’t perform that action at this time.