Panasonic Youth rob sanheim writes about software, business, ruby, music, stuff and things



Posts from August 2006

Symbol#to_proc and inconsistent code vs DRY

Jeremy recently wrote some good tips on cutting back on your code base, but his last tip is one I'm not sure about. It recommends using the Symbol#to_proc (in ActiveSupport, coming in ruby 1.9) shortcut for simple enumerable calls. Like many rubyists, I appreciate the elegance and DRYness of to_proc, as you [...]


Code worth Stealing From Ruby 1.8.5 - pretty_inspect

If you look at the changelog for Ruby 1.8.5, there is a note on the addition of a wonderful little helper method for inspecting objects: Kernel#pretty_inspect. If you work in irb or script/console, you are probably familiar with PrettyPrint (aka pp) for turning this:

hsh => {:nested=>{:hi=>"i'm a nested hash, yo!!"}, :bar=>"this is a bar", [...]


Rails Schema Dumper + Mysql ENUM’s = Bad For Business

Yesterday was burned on trying to get our legacy database working again with Rails. I say "again" as we already had things working with a dual db setup - where the legacy stuff was just always there and never needed to be re-created via schema dump and "rake clone_db_structure". The plan was to [...]


Why Can’t I Show Line Numbers in “View Source” in Firefox

A simple request. I want to be able to show line numbers in view source for Firefox. It already has the pretty syntax highlighting, and fifty thousand developer friendly extensions - where is the line number option for view source?


Memcached, Rails, and You

Geoffrey continues the run of helpful articles with an intro of how to implement memcached with ActiveRecord. I know my team will have to look into this soon, as we have some model objects that are essentially lookup objects, but need to be used for every request in some way. Since they change [...]


More on Java/Ruby Communities, or Chill Out: Its Just Code Dude

I think the point of my original post on the java and ruby communities was kinda missed.
Criticism is great for any community, and if you are really passionate about something you should constantly question it and look for crappy things to call out. I agree with that 100%. However, there is a huge [...]


The Difference Between the Ruby and Java Communities

Ruby has people like why and Dr. Nic, and blogs like the Rails Blob.
Java has Hani and the Bile Blog.
I know which one I'd rather be a part of.
</tongue-in-cheek>


Posted
9 August 2006 @ 2pm

Tagged
Rails, Ruby, TDD

Using Autotest with Integration Tests

Autotest by default doesn't try to do anything with integration tests...since they can test so many files, its impossible to map x controller and z model to a integration test. However, that shouldn't prevent it from at least rerunning an integration test when there are changes to the integration test itself, and also running [...]


Hacking green bar color output into Autotest

update: You don't need to do this hack anymore - the RedGreen plugin is builtin into autotest with the latest versions.
A much welcome upgrade of the indispensable autotest recently came out which speeds things up greatly, but the output was still plain test_unit output. There are now hooks to add plugins to add widgets [...]


Comand Line Tip: How to List Only Directories

Finding this took over three tries with Google, which means it took too long and that I'll forget as soon as I need to do it again.
To list only directories in the current directory, this does the trick:
ls -d */
Though it doesn't make since to me, because the -d option for ls says:
-d [...]


← Before