This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## basic workflow | |
* edit files | |
* stage the changes | |
* review your changes | |
* commit the changes | |
## basic[er] workflow | |
* edit files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SOLID => | |
Single Responsibility Principle (SRP) => object should only have single responsiblity | |
Open/Closed Principle (OCP) => should be open for extension , but closed for modification | |
Liskov Substitution Principle (LSP) => design by contract | |
Interface Segregation Principle (ISP) => many client interfaces are better than one general purpose interface | |
Dependency Injection Principle (DIP) => one should 'depend upon abstractions, not depend upon concretions' | |
http://en.wikipedia.org/wiki/Solid_%28Object_Oriented_Design%29 | |
Code smell - http://en.wikipedia.org/wiki/Code_smell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# move positions | |
# | |
# 0 | 1 | 2 | |
# ---+---+--- | |
# 3 | 4 | 5 | |
# ---+---+--- | |
# 6 | 7 | 8 | |
class TicTacToe | |
module Patterns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
move positions | |
0 | 1 | 2 | |
---+---+--- | |
3 | 4 | 5 | |
---+---+--- | |
6 | 7 | 8 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns sieve | |
(:use clojure.test)) | |
(defn square [x] (* x x)) | |
(defn seq-contains? [ls x] | |
(boolean (some #(= x %) ls))) | |
(defn multiple-of? [product divisor] | |
(and (= 0 (mod product divisor)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from http://www.conwaysgameoflife.net/ | |
function conwaysgameoflife() { | |
var M = '', | |
nb = '" for "gwt:onLoadErrorFn"', | |
lb = '" for "gwt:onPropertyErrorFn"', | |
Y = '"><\/script>', | |
$ = '#', | |
Lb = '.cache.html', | |
ab = '/', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sys, | |
url, | |
querystring, | |
http, | |
searchUser, | |
listRepos, | |
postHandler; | |
sys = require('sys'); | |
url = require('url'); | |
querystring = require('querystring'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sauder, Maloof, O'Sullivan, and Stickley. Four names that have one thing in common: furniture. Two of these build cheap knock-together furniture that can be found at IKEA or any office furniture store, the other two build one-of-a-kind instant classics. Sauder and O'Sullivan are companies that make pre-cut pieces of composite wood and veneer using CNC machines, and package them with a hardware kit and assembly instructions. Sam Maloof and Gustav Stickley were furniture craftsmen. Both have passed on, but their legacy of impeccable craftsmanship remains, and demand for their work only increases with time. | |
The two companies mass-produce identical copies of economical furniture for sale in large retail stores, where customers can purchase them cheaply. The relative quality of the products is reflected in their prices and availability. While both companies make a serviceable product at a reasonable price, it's likely people buy it for its convenience and availability and price, not its fine craft |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.mouse, #preview{ | |
position: absolute; | |
background-repeat: no-repeat; | |
height: 22px; | |
min-width: 15px; | |
z-index: 100; | |
} | |
.mouse{ | |
background-image: url('../images/cursor.png'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Chris Rathman / [email protected] | |
************************************************************************ | |
* Allowable characters: * | |
* - a-z * | |
* - A-Z * | |
* - 0-9 * | |
* - .+/\*~<>@%|&? * | |
* - blank, tab, cr, ff, lf * | |
* * | |
* Variables: * |