Build tools for yourself. Ship to the world!

A few weeks back I released 2 gems (for Rails) that I use almost on a daily basis. One of them is a simple backport of a Rails 4 feature and the other one is the way I prefer to write and test SQL queries.

They’re not perfect by any stretch, they don’t have tests and both could use some refactoring. I like to follow the lean startup approach and release minimum viable products before investing more time in them.

Bladerunner

The way I wish every SQL editor worked: Edit SQL files with your favourite editor; View results in your browser in realtime as your files are saved.

I’ve never found an SQL editor/runner that I liked for PostgreSQL, so why not profit from Rails and an active connection to your database to solve this problem? Write SQL files in bladerunner/*.sql and open your browser to http://localhost:3000/bladerunner to browse your queries and see them updated in realtime.

See how it works: demo screencast.

Every time I’ve used any SQL editor or runner, I always wished that it would allow me to go back to see previous queries. I plan to build in logging so that you can refer to your previous queries, some sort of “source control”.

rails_pending_migration_errors

I often run into this issue where migrations are added to feature branches by my team members and I forget to run them when switching branches. This gem will append a warning to your page or raise an error if you make a request and some migrations have not ran.

This exact feature made it into Rails 4 and it is a backport of the same functionality for Rails 3.2.x.

Ship it!

Perfect or not, just ship it! These two gems solve a problem that I have and who knows, they could solve a problem that you might have.

I strongly encourage you to release or extract tools from your projects if they have the potential to help others and make the world a better place. An extremely important benefit from extracting your tools is also that they are now portable from project to project, making your future self more efficient as well.

P.S. If you have any feedback, don’t hesitate to open issues, pull requests or just email me.

Learn More

Subscribe via RSS