Skip to content

Instantly share code, notes, and snippets.

nkallen_: nkallen_: anyway, i want to stress that we basically agree about things so i want to be sure that the tone of the blog post is such
[7:25pm] nkallen_: [7:17pm] nkallen_: i would argue that what you do in rails 3 (according to these tweets I've read)
[7:25pm] nkallen_: [7:17pm] nkallen_: is exactly what I propose... this is just how one might do it in Ruby
[7:25pm] nkallen_: [7:18pm] nkallen_: but my point is conceptual and not about ruby
[7:25pm] nkallen_: [7:18pm] nkallen_: it applies to every oo language and also I might argue to functional languages
[7:25pm] nkallen_: [7:18pm] nkallen_: which is to structure a program around the ability to layer on enhanced functionality and ensure that no assumptions are hardcoded by abstracting over the manufacture of objects
[7:25pm] nkallen_: [7:19pm] nkallen_: in the literature, these techniques are called DI, decorators, and factories.
[7:25pm] nkallen_: [7:20pm] nkallen_: i like these terms because they reflect the concepts that are at work. because ruby m
# require_here.rb
# by Josh Susser
class String
# __FILE__.require_here 'foo' # => require 'CURRENT_DIR/foo'
# __FILE__.require_here %w(lib foo) # joins path segments so you don't have to
# __FILE__.require_here # add the current file's directory to the load path
def require_here(path=nil)
here = File.expand_path(File.dirname(self))
if path
Host project1.github.com
HostName github.com
User git # Probably not needed but just a note if you want to skip it
IdentityFile ~/.ssh/your_key_file
IdentitiesOnly yes # This is only if you want to avoid trying other identities which can speed things up a bit.