Skip to content

Instantly share code, notes, and snippets.

View jasonm's full-sized avatar

Jason Morrison jasonm

View GitHub Profile
@jasonm
jasonm / cal.rb
Last active December 11, 2015 03:19
require 'kramdown'
require 'nokogiri'
require 'chronic'
# gem install kramdown nokogiri chronic
# put this in ~/dev/openhack.github.com/cal.rb
# cd ~/dev/openhack.github.com
# ruby cal.rb
Dir['*/*.markdown'].each do |filename|
# bash or zsh function
# change self.up to up, self.down to down for Rails 3.1+
rails_migration() {
filename="db/migrate/`date +%Y%m%d%H%M%S`_$1.rb"
classname=$(ruby -e "puts '$1'.split('_').map{|e| e.capitalize}.join")
touch $filename
echo "class $classname < ActiveRecord::Migration" >> $filename
echo " def self.up" >> $filename
echo " end" >> $filename
  • Sep 25 - London
  • Sep 30 - Bangkok
  • Oct 10 - Kuala Lumpur
  • Oct 16 - Seoul
  • Nov 4 - Hong Kong
  • Nov 8 - Delhi
  • Dec 4 - Boston
  • Dec 13 - Buffalo
  • Dec 26 - Houston
  • Dec 31 - San Francisco
  • Sep 25 - London
  • Sep 30 - Bangkok
  • Oct 10 - Kuala Lumpur
  • Oct 16 - Seoul
  • Nov 4 - Hong Kong
  • Nov 8 - Delhi
    • Rajasthan, Varanasi, Goa, Mumbai
  • Dec 4 - Boston
  • Dec 13 - Buffalo
  • Dec 26 - Houston
  • Sep 25 - London
  • Sep 30 - Bangkok
  • Oct 10 - Kuala Lumpur
  • Oct 16 - Seoul
  • Nov 4 - Hong Kong
  • Nov 8 - Delhi
  • Dec 4 - Boston
  • Dec 13 - Buffalo
  • Dec 26 - Houston
  • Dec 31 - San Francisco
  • Sep 25 - London
  • Sep 30 - Bangkok
  • Oct 10 - Kuala Lumpur
  • Oct 16 - Seoul
  • Nov 4 - Hong Kong
  • Nov 8 - Delhi
    • Rajasthan, Varanasi, Goa, Mumbai
  • Dec 4 - Boston
  • Dec 13 - Buffalo
  • Dec 26 - Houston

On naming and refactoring:

Pirsig emphasizes the importance of our choice of terms and our facility in interrelating them, formulating the operation as the use of a "knife" which slices up and connects our experiences of the world.

This knife is "an intellectual scalpel so swift and so sharp you sometimes don't see it moving. You get the illusion that all these parts are just there and are being named as they exist. But they can be named quite differently and organized quite differently depending on how the knife moves" (Pirsig 72).

One of Pirsig's tasks, as Chautauqua orator, is to reveal which terms are fundamental in shaping our way of seeing, disclosing their interrelationships, and then demonstrating that they may be interrelated in another manner. By becoming aware of how our commonplaces have led us into our crisis of Reason, we may begin to see their limitations; and, by altering the places, we may potentially disclose a new way of perceiving and functioning in the crisis.

[Rhetoric and

**My favorite composition vs. inheritance metaphor:**
> There are only two types of relationships in an object model: composition and inheritance. Both have analogs in a family tree. A composition relation is like a marriage between objects. It is dynamic, it happens during the participating objects' lifetimes, and it can change. Objects can discard partners and get new partners to collaborate with. Inheritance relations are more like births into the family. Once it happens, it is forever. Just as both marriage and ancestry appear in the same family tree, composition and inheritance coexist in a single object model.
(from [Object Design - Roles, Responsibilities and Collaborations](http://www.amazon.com/Object-Design-Roles-Responsibilities-Collaborations/dp/0201379430))
**On naming:**
> Pirsig emphasizes the importance of our choice of terms and our facility in interrelating them, formulating the operation as the use of a "knife" which slices up and connects our experiences of the world.
Pirsig emphasizes the importance of our choice of terms and our facility in interrelating them, formulating the operation as the use of a "knife" which slices up and connects our experiences of the world.
This knife is "an intellectual scalpel so swift and so sharp you sometimes don't see it moving. You get the illusion that all these parts are just there and are being named as they exist. But they can be named quite differently and organized quite differently depending on how the knife moves" (Pirsig 72).
One of Pirsig's tasks, as Chautauqua orator, is to reveal which terms are fundamental in shaping our way of seeing, disclosing their interrelationships, and then demonstrating that they may be interrelated in another manner. By becoming aware of how our commonplaces have led us into our crisis of Reason, we may begin to see their limitations; and, by altering the places, we may potentially disclose a new way of perceiving and functioning in the crisis.
-- http://www.public.iastate.edu/~consigny/pirsig.ht