Hi, I am Amit Mathur. Welcome to my blog. I write mostly about my experiences with Software development, Web apps, Rails, and occasionally some personal stuff.

Rails testing 101

November 29th, 2009

From my completely unscientific survey, it appears a lot of people have still not taken to writing tests for their Rails projects. Mostly because either they don’t know why and how much they should be testing or unfortunately, because they feel overwhelmed by the myriad options: Should I checkout Rspec? or may be Shoulda? what is autotest? Should I learn about mocks and stubs first?

If you are one of those feeling overwhelmed, firstly, don’t feel bad. Here’s a guide about why, what and how of testing for the completely uninitiated. Simplified, especially for you. (The rest of you can scroll over to the next article please).

I will use the Test::Unit framework that comes built-in with Rails and at the end, cover all the other options available.

Read the rest of this article »



Web development is hard

October 29th, 2009

Despite a lot of progress, from what I see, developing a web application and running it successfully involve a lot of hard work. Here’s what I think are reasons for that.

Read the rest of this article »



There are a lot of tutorials on the web explaining how to use Rails to build a RESTful application but very few that goes beyond toy applications. Here, I present a slightly more complicated example and show how to build it using Rail’s RESTful architecture.

Read the rest of this article »



Recently Web Services have been a major driving force towards making application development easy, modular and more robust. Here’s a list of some popular and proven ones for Rails development.

Read the rest of this article »



Beautiful code

September 24th, 2009

Joel Splosky once defined beautiful code as: code which does something in much less lines than what it seems like the task should take. I think these examples fit the definition exactly.

Read the rest of this article »



There are several important things for a business owner to do before letting engineers start developing code. Here I give a comprehensive list of such tasks. It will make your project more controllable and eventually will make your developers happy as well.

Read the rest of this article »



DB Backups

July 8th, 2009

Having a robust database backup scheme is essential for any production application. Here’s a brief summary of popular schemes used with Rails applications and a description of my own favorite.

Read the rest of this article »



Rails migrations revisited

March 24th, 2009

Rails Database migrations is a great piece of technology and deservedly popular. However, there are aspects of it which are not quite well understood. Here I discuss couple of such points: how to manage the schema.rb file and how to handle data migrations.

Read the rest of this article »



Running jobs in background is part of every non-trivial web application – for either speeding up user response, or running periodically scheduled tasks. Here, I explain how to install, configure and use the elegant delayed_job plugin to process background jobs.

Read the rest of this article »



call
Web Statistics