Tyler Cowen Mostly Cloudly on Cumul.us

Ben and I have been exchanging late-night previews of our respective side projects for a while now.

The idea behind Ben’s project – Cumul.us asks, can we turn the weather into Wikipedia? (Wisdom of the clouds – hehe).

Will we get better weather predictions from it? Dunno. From what I’ve seen of the site, it’ll be fun trying.

Tyler Cowen gets all uncov on Ben:

“I predict this will fail — how many government agencies already work at predicting the weather?”

I’m glad we got out of the way even before launch.

I’ll Be Back

AJ gave me call today wondering when there was going to be another First Crack podcast. Thanks AJ!

The answer – Soon. I hope. I’ve been working on a new podcast receiver app, which is eating up all my podcast production time.

Then there’s the bit about needing some new inspiration. There’s something new fermenting. I’m excited about it, but more excited about what I’m calling a ‘feed curator’.

Until then, I’ll be posting at garrickvanburen.com and on Twitter.

REST-less with link_to

This week, I file my first major complaint with Rails.

I was innocently running tests and tweakings some views – when I discovered function that should work longer did.

A little background, my app is filled with routes the make the URLs more contextually appropriate and memorable than the standard REST URL construction. If you have any Rails experience – you can see the problem with using the link_to helper

Rails likes to turn this:
< %= link_to 'Edit', :controller => 'items', :action => 'edit', :id => '1' %>
into this:
/items/1/edit

Now my standard routes are more like this:
/name_of_item_1/edit

If I do something like this, consistent with how my routes are structured:
< %= link_to 'Edit', :controller => 'items', :action => 'edit', :item_name => 'name_of_item_1' %>
link_to doesn’t pick up the item_name. If I throw other variables into the mix, say to pre-pop some attributes, link_to grabs it’s 3 perferred variables and forgets the rest.

Makes me feel like link_to is a lot like scaffolding: great for getting things up and running quickly, but something you want to clear out once you get serious.

Where are the Good Minnesota Business Blogs?

I asked twitter about good MN business blogs and Mike Keliher mentioned the new Twin Cities Business Magazine site, while it’s not wholly a blog, there’s an editor’s blog and a very short list of local business blogs, including Graeme Thickins’ blog.

I’m not confident in getting the whole story from a single source, so who else needs to be on the list?

Add links in the comments and I’ll put together an aggregation.

Thanks.

Kongrats to Kris with a K

Since the beginning of podcasting I’ve looked to Kris Smith to make a go of it professionally in a way that feels right (selling services) verses some of the smarmier approaches I’ve seen (CPM, shoehorning the broadcast network model).

Today, Kris announced he’s leaving Room 214, the marketing firm he joined at the beginning of the year.

There’s a conversation started about re-invorgating podcast-o-land – and I’d keep an eye on Kris if you want to see how it’s done in a smart way.

Passing Sessions and Referers in Rails Functional Tests

So, you’ve set up your Rails app to present different views to authenticated people verses non. Now, how do you test functionality for the authenticated people?

Seems silly to have your tests sign in before checking whatever it is you want them to check.

Well, pass the session data in the test as a hash. Turns out the action tests are formatted like this:
method :action, {action variables hash}, {session variables hash}
Pretty straight-forward, except the session variables need to be passed as ‘strings’, not :symbols.
This works:
post :add_member, {:email => 'test@test.com', :group => '1'}, {'person_id' => '1'}

This doesn’t
post :add_member, {:email => 'test@test.com', :group => '1'}, {:person_id => '1'}

A less than intuitive distinction that I’ve bumped into before with cookies

Also a big thanks to Jon @ Ruby Nuggets for the tip passing referers info in the tests:
@request.env['HTTP_REFERER'] = 'http://foo'
not the @request.referer = ‘http://foo’ that I assumed.

Project Launch: Sun Downloads

Sun’s new download service launched yesterday – a project I’ve been working on for 18 months or so. Big congrats to Gary Zellerbach and the rest of the project team on this milestone.

If you’d like to compare and contrast, the initial four products (of the 1000s being migrated) are:

MySQL on OS X Reinstall Reminders

First off, if you can avoid reinstalling MySQL on OS X – by all means do. Whatever the reason is that you want to do a reinstall, it’s not a good one1. Just buck up and work around whatever issue you have. It’s not as bad as what follows.

Let’s say you decide to reinstall anyway.

Since there’s no easy way to uninstall, you go on a crazy rabbit hunt – including showing all the hidden files2 – through your system to eradicate all instances of MySQL and any dbs (bu-bye data). Then, you downloaded and installed a fresh binary from dev.mysql.com. Now, there’s no reason to do 3 or 4 system restarts, but you haven’t listened to me this far.

Weeee.

Now, I’m pretty sure that if you go back into your Rails app and run rake db:migrate you’ll get the following:
dyld: Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib

Thank Peter Morris for reminding you to run:
sudo install_name_tool -change /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib /usr/local/mysql/lib/libmysqlclient.15.dylib /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle

Hey, not so fast, make sure you set up the same root pass you had before:
/usr/local/mysql/bin/mysqladmin -u root password new_password_here

1. My reason – I was intermittently getting "Lost connection to MySQL server during query" when running rake test. It seems better now. There had to be
2. defaults write com.apple.finder AppleShowAllFiles ON