Wed Nov 30
#rubyist.org
Tue Nov 29
Tip Move windows in OS X without changing focus
Hold down the Command key, then drag the titlebar of an unfocused window.
“ First Law of Distributed Object Design: Don’t distribute your objects! ”
Martin Fowler
Mon Nov 28
Sun Nov 27
RailsConf 2006
The first official International Rails Conference, sponsored by RubyCentral, is June 22-25 in Chicago. Don’t miss out on registration details and speaker information—subscribe to the RSS now.
Fri Nov 25
Agile lie detector
A lie detector for your mobile phone.
Agile Lie Detector measures the amount of stress caused by lying in a person’s voice and displays this information in a graph in real-time.
Modules mixed into an instance
class Object def extended_by class << self; ancestors end end end foo = Object.new foo.extend Enumerable Object.ancestors.include? Enumerable # => false foo.extended_by.include? Enumerable # => true
Wed Nov 23
“ It was the first part of my life. Second is the rest. ”
Bill Callahan, Drinking at the Dam
#rubyist.org
“ It would have been simpler to begin at the beginning, but the beginning didn’t mean much without what came after, and what came after didn’t mean much without the end. ”
Lydia Davis, The End of the Story
Tue Nov 22
“ I am a rock bottom riser and I owe it all to you. ”
Bill Callahan – Rock Bottom Riser
Mon Nov 21
“ It turns out not to have been worth the wait. ”
Michiko Kakutani on Gabriel García Márquez’s first work of fiction in 10 years
“ I have a bunch of zombie shells hanging around dated Fri13. ”
Sam
Sun Nov 20
Sat Nov 19
#rails-core
“ It’s like the word “allopathic.” It just means doing things right, and it’s a bad sign when you have a special word for that. ”
Paul Graham on Web 2.0
#rubyist.org
Tip Storing sessions in your database
1. Run a rake task
rake create_session_table
2. Edit your
config/environment.rbconfig.action_controller.session_store = \
:active_record_store
3. Cruise for burgers
“ I pledge to post only the cream of the meme, in order to uphold the standards of link quality and rarity to which Project.ioni.st aggregators have become accustomed. ”
Patrick Ewing, newest addition to Projectionist
Fri Nov 18
“ Our house looks like a life explosion. ”
Chad, who just moved
“ There are two full snark-free, poignant pages where she goes on about abolitionist Frederick Douglass in such a way that makes me want to be a better person. ”
from a review of Sarah Vowell’s Assassination Vacation
#rubyist.org
Thu Nov 17
“ Dash my buttons if you aren’t a handsome-looking sea-calf. ”
The Woman at the Department Store in Bruce Jay Friedman’s The Lonely Guy’s Apartment
#rails-core
Wed Nov 16
#rubyist.org
“ Selling is short-term satisfaction. Building is long term enjoyment. ”
Jason Fried
#rails-core
Mon Nov 14
#rubyist.org
“ It’s been too many days of fighting the weather, and too many nights of not being together. ”
Guy Clark, Let Him Roll
Sun Nov 13
Sat Nov 12
Danby countertop dishwasher
Cheap, hooks up to your faucet, and cleans four placesettings at a time. I think I’ve finally found the answer to all of my problems.
Fri Nov 11
#rails-core
Thu Nov 10
Tip Dump your Rails session data
Think something weird’s going on with your sessions during development?
ruby -rpp script/runner \
“Dir[‘app/models/*rb’].each{|f|require f}
pp Dir[‘/tmp/ruby_sess*’].collect{|f|
[f, Marshal.load(File.read(f))]}”
Wed Nov 9
Airless tires?
I look forward to finding all sorts of baubles affixed to the spokes of my car’s airless tires.
Get out your baseball cards. What’s old is new is the new new.
The Case of the Fraudulently Adhesive Toilet Seat
“It’s not about the money. I want my health back. I want to be back to normal,” Dougherty said. “I want to make sure this doesn’t happen to anybody ever, ever again.”
Tue Nov 8
“ It’s no longer aspergers and emacs…we’re putting people back into the equation. ”
Nat Torkington
#rubyist.org
#rubyist.org
“ People have said that it’s going to be my year for the past twelve years. ”
Sarah Silverman
#rubyist.org
Mon Nov 7
“ I defy anyone to come up here and use any other framework to duplicate what we’re doing in Rails as quickly. ”
Except Avi.
The Bumblelog
Jamis Buck has fulfilled rule 1 of the tumblelogging manifesto with his new buzzing braindump, The Bumblelog. He’s got individual feeds for each tag – a great idea – and you can create your own feed with two or more tags by joining them with
+ in the URL (/rss/haskell+ruby+rails).
Sat Nov 5
Tip Kernel#display
In Ruby, there is a little-known method called `display` defined in the Kernel module. Its job is to allow an object to print itself:
1.display # prints “1”
“ralph”.display # prints “ralph”
In Rails, it’s often tempting to create an action called `display` for, say, displaying a product’s details (http://myapp.com/product/display/1).
Don’t do it. It won’t work. And you’ll spend a lot of time not knowing why it doesn’t work.
Fri Nov 4
#rails-core
“ During the Bubble, a lot of people predicted that startups would outsource their development to India. I think a better model for the future is David Heinemeier Hansson, who outsourced his development to a more powerful language instead. ”
Paul Graham
“ Irish folk tales scare the shit out of me. ”
Stephen Malkmus
Thu Nov 3
Tip Make your Rails layouts more Rubyish
You can use <%= yield %> instead of <%= @content_for_layout %> in your templates. Makes sense, doesn’t it?
#rubyist.org
Wed Nov 2
“ Build great apps. Don’t get distracted by legitimacy. ”
Jeremy Kemper
“ Tumblelogs; just a fancy name for the weblogs people like me used to have back in the day, really, back when Blogger was state-of-the-art. ”
What tumblelogs aren’t
Tip Succinct substring inclusion check
You can use String#[] instead of String#include?:
>> fiesta_mexicana = ‘restaurant’
>> fiesta_mexicana[‘aura’]
=> “aura”
>> fiesta_mexicana[‘lutefisk’]
=> nil
“ I believe everyone will die someday. ”
From an urgent correspondence
#rubyist.org
Tue Nov 1
#rails-core
“ If you’re looking for someone to quote…just drop me a line. ”
Peter Cooper, Rails expert
“ NaNoWriMo is a forum exclusively committed to the timely production of crappy novels. ”
November is National Novel Writing Month
Unpack a Gem
#!/usr/bin/env ruby # unpack_gem - Unpack the contents of the specified # gem into the specified destination directory. # ex. # % unpack_gem fcgi-0.8.5.gem require 'rubygems/format' require 'rubygems/installer' abort "#{File.basename($0)} archive [destdir]" unless (1..2).member? ARGV.size gem, destination_dir = *ARGV destination_dir ||= gem[/^\w+/] Dir.mkdir(destination_dir) unless File.exists? destination_dir Gem::Installer.new('').extract_files(destination_dir, Gem::Format.from_file_by_path(gem))