19th
As I use various plugins in my Rails apps, I find that I always need to make small tweaks to the plugin or the files it generates. This is why I like to use something like piston or braid to manage the plugins. It allows me to make any change at will and know that it will be part of the app when I deploy, but at the same time keep up with any new upstream changes.
The problem with this is that I can’t easily centralize my hacks so that my other apps can use them. I could host the plugin myself but I want to be tethered to upstream for the occasional update.
I found the solution in Github.
Just today, I cloned the restful_authentication plugin so that I can move out the model authentication concern into lib/authenticated_base.rb. This will leave your User model squeaky clean, like so:
class User < ActiveRecord::Base
include AuthenticatedBase
end
You can now focus on adding new associations, validations and methods that are unique to your app without being distracted by all the authentication cruft. Credit goes to the caboo.se sample app for exposing me to this organizational technique.
So, what I have now is twofold:
This marks a turning point for me in my opensource contribution. The barrier to entry for pushing patches is so low that I expect to see myself cloning a bunch more repos and making my teeny tiny fixes.
You can imagine a future where, for example, the Rails project is on git and that there would be many competing forks, each with their own flavor. Heavy contributors like Pratik Naik and the Russian Mafia could have Lifo Rails and Performance Monster Rails respectively. Suddenly, Rails is no longer just a web framework, it’s a web framework distribution.
Anyway, if you want to get clean:
$ git-submodule add git://github.com/kamal/restful-authentication.git vendor/plugins/restful_authentication
(I’m sure you can use braid, but I’ve never gotten it to work with a git repo)
UPDATE: Cristi Balan, the creator of braid, emailed to let me know mirroring a git repo with braid only works if you have a pretty recent git, above 1.5.4 or so.
Awesome article of a professional front-end developer dad ‘contracted’ to create a website for his 10-year old son.
My daughter is 10-months old today. Perhaps one day she’ll come up to me and ask me to build her a web app.
After months of using Tumblr, I finally found out how to get the post title to show up in a permalink page. Check out the pastie.
The above alone will probably help earn a few more Google Juice points.
A week ago, HashRocket shook the Rails consulting world by storm with a unique offering called 3-2-1 Launch in which they will launch your app in three days for USD$30,000. Obie has since given more details on how they operate 3-2-1 Launch, such as the number of developers dedicated to each project and the pre-implementation lead time. This post aims to estimate how much all this breaks down to in terms of rate per hour, and if it’s a good bang-for-your-buck deal.
Let’s estimate the hours spent on a typical project, based on details given by Obie.
Lead time of three weeks for User Stories and High-fidelity mockups. I estimate two people are dedicated to this task, a designer and a developer.
Lead Time Hours: 40 hrs x 3 weeks x 2 people = 240 hrs
Three days of implementation with 4-6 developers (paired)
4 developers: 8 hrs x 3 days x 4 people = 96 hrs
6 developers: 8 hrs x 3 days x 6 people = 144 hrs
So, the total hours hours on a project will be in the range of 336-384 hours.
Now, let’s divide this up by $30,000 to get the effective rate per hour
4 developers: 30,000 / 336 =~ $90/hr
6 developers: 30,000 / 384 =~ $78/hr
This gives us the estimated consulting rates of around $78-90 per hour. This is a pretty standard rate for an experienced Rails developer. Suddenly, the $30,000 price tag doesn’t seem like a lot. BUT THAT’S NOT ALL! They throw in other value added services like client mentoring, deployment and post-production. Based on these factors, I think 3-2-1 Launch offers a pretty good bang for the buck.
However, there are still some questions unanswered by the post. For example, how long is their post-production support for? What is in the scope of post-production - monitoring, bug fixes, small enhancements? Are hosting fees for Amazon EC2 and S3 part of the $30k (I doubt it)? Do the clients receive the full source code (most probably)? Additionally, what will the cost model be if the client wants to take the app past 1.0 (I know for a fact that traditional consulting makes a killing in Change Requests)?
All in all, HashRocket is a pretty cool concept and I’m sure many will follow suit to offer similar products.
Disclaimer: Obie and I are Rails Rumble 2007 alumni (my team’s entry was Redux), so I can definitely connect with the 48-hour rush feeling. Unlike Obie, I swear not to do it ever again. Apart from that, I don’t know Obie personally.
I’m compiling all the event dates for Ruby/Rails-related conferences in convenient Google Shared Calendar based on the initial listing by Jay Fields in a recent blog entry. If you’d like write access, email me at kamal.fariz@gmail.com and I’ll give it to ya.
Looks like April is Ruby conference season with five conferences happening in five different countries!
Let me know if I’ve missed out any events.
