Double Shot #40

Posted by Mike
Liquid error: wrong number of arguments (5 for 2)

I’ve now reached the point where I’m finding it easier to find stuff for this blog than for my .NET link blog. Which is good for me but not so hot for the bottom line, since I sell ads over there. But onwards!

Double Shot #39

Posted by Mike
Liquid error: wrong number of arguments (5 for 2)

Time to clean out the links bucket in anticipation of a busy weekend.

  • Hackety Hack – Ruby-based take on the idea of a starter’s coding environment for kids. (via Ruby Inside)
  • ActsAsSecure – Automatically encrypt specific fields from an ActiveRecord model when they’re stored in a database.
  • Compiling RMagick on OS X 10.4.9 Intel – RMagick, or at least its setup, is one of the pieces of the whole Rails story that just seems utterly devoid of elegance.
  • Tips for Upgrading to Capistrano 2 – I’ll probably jump in this pond sooner rather than later. One of the nice things about being new to the Rails world is that everything is new anyhow so there’s no special penalty to being out on the edge.
  • acts_as_sphinx plugin – Yet another option for full-text searching in Rails applications.
  • Rails: Group results by week – This came in handy last night when I needed to do multilevel reporting in a Rails view.

Double Shot #38

Posted by Mike
Liquid error: wrong number of arguments (5 for 2)

Those attending RailsConf can now plan their detailed schedule with the nifty MyConfPlan . If you’re bored enough you can even look at my own plans .

Double Shot #37

Posted by Mike
Liquid error: wrong number of arguments (5 for 2)

Yup, I’m still collecting the random linkage…

Double Shot #36

Posted by Mike
Liquid error: wrong number of arguments (5 for 2)

I’ve actually spent a couple of days doing paid work on a Rails application. I feel all accomplished and stuff. Of course two thirds of the time has been off the clock as I scurry around researching things, but it’s a start.

Searching a Model on Multiple Fields

Posted by Mike
Liquid error: wrong number of arguments (5 for 2)

I’m looking for a way to do a complex search across a variable set of multiple fields in a Rails form. In .NET, I’d just build up dynamic SQL by brute force, but that doesn’t seem very Rails-ish, so I went hunting.

  • Use find_by_sql and the join method to build up a condition string. This is essentially the brute force method translated to Rails.
  • Acts_as_Ferret lets you set up full-text searching across multiple fields, but that doesn’t actually fit the requirements.
  • ModelSearch is a plugin that was demoed in one of the talks at RailsConf Europe 2006. It lets you do things like

 search = ProductSearch.new
 search.keyword = 'television'
 search.max_price = 300
 search.sort = :price
 search.find(:all)

This is cool, but it doesn’t seem to have actually been released into the wild yet.

  • ez-where is a plugin from Brainsplat (more info here and here). It enables things like

 articles = Article.find_where(:all) do |article|
   article.title =~ 'Lorem%'
   article.author.name  'Ezra'
   article.comments.user.name  ‘Fab’
 end

  • Squirrel is another plugin inspired by ez-where. It has a similar syntax and includes pagination support.

Right at the moment I’m inclining towards using Squirrel to meet my requirements.

Double Shot #35

Posted by Mike
Liquid error: wrong number of arguments (5 for 2)

Just a couple of quickies this morning.

Double Shot #34

Posted by Mike
Liquid error: wrong number of arguments (5 for 2)
  • ActsAsReadonlyable – One approach to scaling a Rails application out to multiple databases. More information here .
  • REST 101: Part 4 – Routing – More information from the Softies on Rails crew.
  • Introducing: gui.cs – Faced with the choice between Apollo and Silverlight, the Mono team have gone off and written yet another cross-platform GUI toolkit.

Double Shot #33

Posted by Mike
Liquid error: wrong number of arguments (5 for 2)

Yeah, I’ve been MIA for a few days. Life has been pretty hectic. Here are a few liks to make up for that.

Double Shot #32

Posted by Mike
Liquid error: wrong number of arguments (5 for 2)

After 18 months of drawing a paycheck, I’m having to learn anew how to self-motivate. Which is to say that I had a very lazy Easter weekend.

  • Microsoft is Dead – You know, being a good developer and making a bunch of money with a startup in the right place at the right time does not qualify you to be an insightful commentator. I dislike Microsoft as much as the next guy, but it’s absurd to say that Microsoft is dead or to imply that the era of desktop applications is over. And ending the essay by implying that those who disagree with you are old and therefore stupid is just offensive. Graham should realize that his public posturing reflects on the companies that Y Combinator funds.
  • Schools should use Openoffice.org – I’m of two minds on this. On the one hand, NeoOffice (which is essentially OO for Mac) is handling all of my personal Office needs quite well these days, and that’s after having been a heavy Microsoft Office user from versions 2.0 through 2003. On the other, those students are going to end up in a world where they’re required to use Microsoft Office. It’s a quandry.
  • ActiveWarehouse ETL 0.7.0 Released – One of the more ambitious Rails-related projects that I know about continues to march along.
  • The Absolute Moron’s Guide to Capistrano – Baby steps and a helpful explanation of the conceptual framework. Useful if Capistrano is still a mysterious black box to you.

Double Shot #31

Posted by Mike
Liquid error: wrong number of arguments (5 for 2)

Time to put my money where my links are (to fracture a metaphor) – I’m on the verge of signing a contract to do a small amount of custom Rails work. Exciting and a bit scary.

Double Shot #30

Posted by Mike
Liquid error: wrong number of arguments (5 for 2)

Picked up a few more odds and ends in my peregrinations around the net.

  • Get your Rails tests results via Growl notifications – I’m starting to rethink whether every bloody thing should come in via Growl. If test results come back quickly enough to be useful, aren’t they foreground information? Still, eye candy is seductive. (via dzone)
  • Ajax File Upload – Not really Ajax, but a reasonably clever hack to keep everything on one page.
  • iStalkr – New lifestreaming site with a public feed of everything. If this one becomes at all popular it could be a surefire recipe for drowning in infotrivia.
  • “Ruby In Steel Developer Updated”: http://www.sapphiresteel.com/Ruby-In-Steel-Developer-Updated – With various editing and debugging improvements, for folks doing Ruby on Windows.

Progress Report

Posted by Mike
Liquid error: wrong number of arguments (5 for 2)

3 months into the 12-month clock for reinventing my career, so it’s time to take stock again:

  • I quit my full-time .NET consulting job, effective last Friday. This was 9 months sooner than originally planned, but the time was right for a lot of reasons. This means that I’m definitely interested in talking to people who want to hire a freelancer (though I’m actually fairly busy for the month of April already). While I expect to take on some more .NET work to hold things together, my first preference is going to go to Rails work if I can find any, even if that means substantially discounting my rate.
  • I didn’t do a lot of Rails work in March, mainly through lack of time (which is one reason for the sudden change of job status). I did find time to explore some of the interfaces between Rails code and LSL, the scripting language used in Second Life, which has been fun if not terribly instructive or lucrative. This has also led me to the Rubyists of Second Life group, which may end up being my local user’s group (for some value of “local”).
  • I’m now writing daily pieces for Web Worker Daily . This isn’t going to be money to live on, and I don’t expect to be a full-time writer, but it’s good fill-in money and I enjoy having the new direction to stretch in. Good new set of contacts, too.
  • Traffic on this blog is still going up, roughly linearly by month. That’s good, though I still need to figure out what all the doubling in the XML feed is about.
  • I’ll definitely be trolling for business at RailsConf. During April I need to figure out what to do about a Mac Book (Pro?) to take along with me. At this point, roughly 75% of my daily desktop work is now on the Mac, so bringing a Windows laptop along isn’t going to cut it.