rails plugin: find_by_association
June 4th, 2007
Buck and Koz show put on a sesssion of do’s and don’t s at railsconf – an expression of their fab rails way vision – Helping us to clean up our code with smart coding practices. (Buck and Koz show)
During one session they reinforced we should associations instead of finders to clean up our code.
..and while demonstrating the finders, they left us with a line that read something like “Blog.find_all_by_author_id” – and I thought to myself. No, they must be wrong. Don’t associations have the same sugar? I can’t remember the exact code, but a few of us thought the use of the syntax wasn’t quite free…
Can’t I do Blog.find_all_by_author(@author). Isn’t that clearer?
Banging on our laptops in the lunch space, it seems they don’t exist.
Not for long. This is railsconf.
And so is the intro, that started with chatting with Chris O’Meara @ Code Rhythm(and Chris’ bud) and ended with me pounding keys at PDX and JFK while Tibet Sprague of Public Display was knocking off the code for a new startup.
and along the way if find myself wondering around rails internal into method_missing and extending AR find methods.
I hope you enjoy find_by_association and the joys of syntactic sugar.
Read the rest of this entrysavage beast
May 18th, 2007
1 2 3 4 |
class Project < ActiveRecord::Base has_one :forum, :as => :owner, :dependent => :destroy end |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
class ForumsController < ApplicationController #this is the standard before filter called by SB def find_or_initialize_forum if params[:id] && params[:project_id] @project = Project.find(params[:project_id]) @forum = @project.forum.find(params[:id]) elsif params[:id] @forum = Forum.find(params[:id]) end end end |
1 2 3 |
#get routes for beast map.from_plugin :savage_beast |
1 2 3 4 5 6 7 8 9 |
ForumsController before_filter :find_or_initialize_forum PostsController before_filter :find_post TopicsController before_filter :find_forum_and_topic |
The Soup is tasty - come on in
May 11th, 2007
It’s taken months to assemble a v1 release of The Soup. I’ve been stealing away every free minute to pour into this baby, and now I feel a great sense of release. I think my wife and 2 year old remember me - hopefully they let me back in.
Finished not a moment too late - knackered as our UK cousins say - and just in time to take a break. Next week I’m off to Rails Conf to learn, hookup with all the cool kids,learn, relax..
I really intended to make a nice series of blog entries to track the thought progression for The Soup, but alas, who’s got time to do and write?! Better folks than me I guess.
Well onto the next stage. Bug fixes and planning for v2. Oh, all that client stuff that’s backed up!
charting the creation of a new product idea
January 18th, 2007
This article explores both the business and technology progress of a new startup - code named “Stonezoup”. Wearing both technology and business hats, I will shift back and forth - compromising, grumbling, lying awake at night, excited to take the next step.
Being a technologist who was ran software companies, I hope this series will help my fellow technologists chart the journey from a good idea along the path towards a substainable venture. The mixture of skills required can be daunting, and usually the science of “what step comes next” can be as much about the art of asking the right questions.
Read the rest of this entrySoftware as a Service - Part III, Implications & Challenges
January 3rd, 2007
The following discussion studies the value proposition of the Software as a Service (SaaS) business and licensing model. Additionally we’ll look at the sales, marketing and cultural and operational challenges it presents for corporations looking to deploy such a model.
Part I in this series evaluated the Value Proposition, or “what makes this business model interesting to the customer”. You may find that introduction will help as an introduction to this one. Additionally in Part II we examined the specific SaaS Revenue Model and Operating Expenses.
This section, considers the cultural, Technical, Sales and Customer Facing challenges identified to successfully execute an SaaS business Model. As before, the ISV model is contrasted to highlight these challenges.
rspec and testing various return types
December 16th, 2006
I’ve just started a new project so I’m starting with 1.2RC and the experimenting with BDD with rspec.
I won’t delve into either as folks with more FU than myself have explored both topics.
Specifically though I have run into problems with rspec and the new simply_helpful - thankfully Lourens of methodmissing has nailed down a monkey patch.
Laurens also supplies a monkey patch to permit testing of various return types - but, alas, since rspec is maturing at the speed of light it doesn’t work with rspec 0.7.4.
Read the rest of this entrySoftware as a Service - Part II, Revenue & Expenses
December 11th, 2006
The following discussion studies the value proposition of the Software as a Service (SaaS) business and licensing model. Additionally we’ll look at the sales, marketing and cultural and operational challenges it presents for corporations looking to deploy such a model.
Part I in this series evaluated the Value Proposition, or “what makes this business model interesting to the customer”. You may find that introduction will help as an introduction to this one.
This section, considers the Revenue Model and Operating Expenses. We’ll look at the inherent implications of this model and it’s specific financials as contrasted with the ISV licensing model.
Read the rest of this entryinnovation is not enough
December 3rd, 2006
As with porn, it seems that spamming (marketers) are on the cutting edge of technology and uses thereof. Just as the pr0n industry were early adopters of Beta video and at one time were one of the only industries making money on the back of our beloved infrastructure, today we find innovative spammers pushing the envelope (and our patience!).
PayPerPost comes to mind. (from the web site) “Get paid for blogging. Write about websites, products, services”. I wonder if bloggers get paid for bad reviews? Talk about conflict of interest.
Coincident with the above PPP discovery, my wife and I were researching elliptical cross-trainer. In particular we were interested in reviews of the Iron*Man ET30. A google search revealed a number of the usual suspects (fake review sites, without any reviews but aggregated prices - can you read affiliate?).
And this one….
Read the rest of this entrySoftware as a Service - Part I, Introduction
November 22nd, 2006
The following discussion studies the value proposition of the Software as a Service (SaaS) business and licensing model. Additionally we’ll look at the sales, marketing and cultural and operational challenges it presents for corporations looking to deploy such a model.
Part I in this series evaluates the Value Proposition, or “what makes this business model interesting to the customer”. Part II considers the Revenue Model and Operating Expenses and III concludes with the Challenges faced.
For ease of consideration, many of the arguments are contrasted against the traditional ISV licensing and business model.
Read the rest of this entryputs "Hello World. TNG is live!"
November 9th, 2006
Mephisto is a Rails based blogging/cms system. I've been intending to use CMS for the corporate website plus a site for my wife's naturapathic clinic (long past due, I may say). With the ease of this implementation, I'll have little reason for not getting her up asap.
Read the rest of this entry

