Alex Chaffee

Biography

  • Code Monkey

    Code Monkey

    So I didn't go to whatever was going on in Baltimore this week, but I did do a whole bunch of open source coding over the past week or two: TestFirst has a totally revamped design, including the...

    Read More
  • RubyGems Warningitis Outbreak

    RubyGems Warningitis Outbreak

    Have you upgraded RubyGems lately? Is your console suddenly filled with warnings like this? NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on...

    Read More
  • Upgrading your Rakefile from RSpec 1.3 to RSpec 2

    Upgrading your Rakefile from RSpec 1.3 to RSpec 2

    I'm updating Erector to RSpec 2 and came across two problems for which solutions were surprisingly difficult to Google. Here are my (finally successful) results. Problem: no such file to load --...

    Read More
  • Where, oh where has my gem server gone?

    Where, oh where has my gem server gone?

    Uh-oh! ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) bad response Moved Permanently 301 (http://gems.rubyforge.org/latest_specs.4.8) Whew! gem sources -a...

    Read More
  • monkey patch of the day – activesupport vs. json_pure vs. Ruby 1.8

    monkey patch of the day – activesupport vs. json_pure vs. Ruby 1.8

    The error: /Library/Ruby/Gems/1.8/gems/json_pure-1.4.3/lib/json/pure/generator.rb:232:in `__send__': undefined method `except' for # (NoMethodError) The environment: Ruby 1.8.7, DataMapper,...

    Read More
  • Windowed String Comparison for RSpec

    Windowed String Comparison for RSpec

    When two strings fail to match, if the difference is somewhere in the middle of the strings, it can be annoying/impossible to track down the actual difference. I've written a little Comparison...

    Read More
  • Basic Ruby Webapp Performance Tuning (Rails or Sinatra)

    Basic Ruby Webapp Performance Tuning (Rails or Sinatra)

    My company launched our app, Cohuman, a few weeks ago. The rush of finishing features, fixing bugs, and responding to user feedback has subsided a bit, and it's time to go back and give the little...

    Read More
  • TextMate: The Last Straw

    TextMate: The Last Straw

    That's it. I'm done with TextMate. It hasn't been updated in over 2 years, either for essential functionality (replace in path) or performance fixes (searching through log files) or UI issues (how...

    Read More
  • UTC vs Ruby, ActiveRecord, Sinatra, Heroku and Postgres

    UTC vs Ruby, ActiveRecord, Sinatra, Heroku and Postgres

    Now that I'm starting to use DelayedJob to perform jobs in the future in my Heroku Sinatra app, its important that they happen at the scheduled time. But unless you pay attention, you'll find that...

    Read More
  • opacity (or, a paucity of transparency)

    opacity (or, a paucity of transparency)

    The rules for how to make parts of your HTML page translucent are kind of hard to understand -- in other words, the opacity rules are pretty opaque. (Anyone who can make that into a good pun, let...

    Read More
  • annotate 2.4.0 released

    annotate 2.4.0 released

    Remember the annotate_models rake task? Dave Thomas wrote it many years ago and it corrects one of the flaws in ActiveRecord: it describes the schema for a table as a comment inside the Ruby model...

    Read More
  • Why Wouldn't You Use Erector?

    Why Wouldn't You Use Erector?

    No, seriously. Why wouldn't you use Erector? Cause I think it's a pretty awesome view framework, but for some reason it hasn't caught fire yet. So if you think writing actual Ruby to emit HTML,...

    Read More
  • git unadd

    git unadd

    Sometimes I accidentally git add files. Or more often, I do git add . and get a huge changelist and then realize I want to move certain files to a different changelist or a different branch. I...

    Read More
  • git config push.default matching

    git config push.default matching

    Upgraded to git 1.6.3 yet? You should, and Jason Rudolph says why (and if you're on a Mac, Rob Sanheim says how.) Sadly, after you do upgrade, when you start doing "git push", your console will...

    Read More
  • Monkey Patch Du Jour

    Monkey Patch Du Jour

    The following monkey patch gives a bit more information in the ActiveRecord SQL logs. Instead of just saying "User Load" it also says the file and line number in your code that asked AR to perform...

    Read More
  • Capturing Standard Out In Unit Tests

    Capturing Standard Out In Unit Tests

    def capturing_output output = StringIO.new $stdout = output yield output.string ensure $stdout = STDOUT end then... it "exits immediately from...

    Read More
  • Erector 0.6.3 – Now Ready to Conquer The World

    Erector 0.6.3 – Now Ready to Conquer The World

    [Updated: added instructions "If you are using a widget in rails, you now need to inherit from RailsWidget"] Erector has been around for almost 2 years now, but we've always been a little...

    Read More
  • Safari 4 "Zoom Text Only" fixes Google Reader and GMail

    Safari 4 "Zoom Text Only" fixes Google Reader and GMail

    Problem: every since I upgraded to Safari 4 I've been annoyed that zooming in and out seems to confuse GMail and and Google Reader. When you zoom out, GMail refuses resize its panels, leaving a...

    Read More
  • JAVA_HOME on Mac OS X

    JAVA_HOME on Mac OS X

    For the millionth time, cause I always forget... Put this in ~/.bashrc: export JAVA_HOME=/Library/Java/Home [UPDATE: or this, which according to Mike Swingler, follows the Java version chosen...

    Read More
  • XPath CSS Class Matching

    XPath CSS Class Matching

    I'm writing Selenium tests again, which means a lot of XPath. Here's a trick I learned thanks to this article on Push Button Paradise. The problem is, how do you write XPath that matches one...

    Read More
  • loading
    Loading More...