SSL checklist for Ruby on Rails Applications
Cross posted from darthsid
The purpose of SSL is to provide a reasonable level of protection against eavesdropping and man-in-the-middle attacks. Although SSL provides a greater level of security, it introduces a lot of overheads and hence should be used sparingly. Two of the most common places to use SSL is for payment transactions and user registration/login.
This post intentionally focuses only on the Rails application as there are numerous post on the net for SSL setup on the server. Enabling SSL in a Rails application is really trivial and there are just a few points that need your attention..
Read more
Git Work Flow For Ruby on Rails Developers
Cross posted from darthsid
This is my very first blog post and so I though it should be about a tool that is indispensable for me – Git. I started using git about 10 months ago and looking back I can’t imagine how I managed to get work done without it. The purpose of this post however is not to sing git’s praises, there are lots of good articles on the web that do so much better than I ever could. Instead, I wish to share the work-flow I use on my projects. I developed this work-flow by trial and error over the months and is currently the most efficient and productive approach I can think of. If any experienced git users happen to stumble upon this post, please do provide suggestions/alternatives to help me improve my process.
The project I am currently working on requires me to maintain two parallel deployment branches. One is a “production branch” which is deployed on the live server and the other is a “development branch” which is deployed on a staging server. All enhancements and feature additions are done in the “development branch” and the only changes made in the “production branch” are production bug fixes that need urgent attention. Once the “development branch” is deemed stable it is merged into “production branch” and deployed.
Read more
Funding Driven Development (FUDD)

We live in a quick-fix society so it’s no wonder that many startups especially in technology look for the magic cure to increase their sales or get funding for their projects. These projects follow funding driven development methodology. And here are few symptoms of FDD :
- Most of these products start looking for investors even when the core benefit web app is not properly conceptualized.
- The product manager spends more time with PR,investors and newspapers than with developers.
- The milestones for the project are strictly based on the next press release, media interview or conference.
- Instead of driving real people and customers to sales pipeline, you meet people who are not your target audience.
- They always think of raising capital and use major part of that in increasing/improving your sales force.
- They lack patience and you dont want to wait for few quarters to reach the right feature set after product launch based on feedback.
- They are least bothered about the backend and focus on UI. As long as the site looks cool , you are okay with that irrespective of the quality of code running in the backend.
- Instead of a single marketing launch, They have a series of launch with some new stupid feature everytime which nobody needs in every launch.
- When investors see PR stuff of your project, they expect significant momentum which usually is not there.PR is not writing code. You can not try it, iterate, learn, and try again.
- The founders feel great when they are covered by leading media instead of significant release that improves their product.
- They don’t understand the value of an early release, release often.
Migration: Adding/Removing columns are now much easier
You may have noticed by now, that in Rails 2.0 changeset 7422, you can specify columns you want to add/remove in your migration by passing attribute:type pairs to the migration generator.
For example, lets assume that we need to add a column ‘role’ in users table(User model). In this case generate a migration like:
Output:
Here AddRoleToUser plays the main role. ‘Add’ specifies the we want to add column(s) and ‘User’ separated by ‘To’ specifies the table.
Similarly, if we need to remove a column ‘role’ :
Output:
Here RemoveRoleFromUser plays the main role. ‘Remove’ specifies the we want to remove column(s) and ‘User’ separated by ‘From’ specifies the table.
Isn’t it cool?
Ruby Script for SVN commit notification with log message, list of updated files and readable colored SVN Diff
Some days ago I wrote a post about “SVN commit notification” which uses a perl script for sending commit notification with svn diff by mail. In this mail you can find svn diff from the last committed revision. I used to love this mail, soon I realized that it is a bit ugly and difficult to read. Also there were some important information missing. Like the name of user committing the code, the log message etc…
And then I started writing my own ruby script for same purpose but with some addition and modification. Commit notification script is that script, you can download and configure it with your SVN post commit hook as follows.
Add following line at the bottom of your post-commit file:
* Please remember to change the path of you commit-email ruby script.
Now open commit-email ruby file and modify the following section according to your requirement:
You are done with that, now onwards whenever someone commits the code, you’ll get the commit notification mail like:

