Fork me on GitHub
Subscribe to RSS Feed

Elijah Miller

31 Jan 2009

All My Code Are Belong to Us

I’ve really been pushing myself to move as much code as possible into the public space. GitHub has come at a perfect time to encourage this behavior. It makes the tedious process of sharing code so easy you’d be stupid not to.

I put all of it directly on GitHub as a Rails plugin and a Ruby gem. Learning how to do this is a few hours of investment, but it’s an investment you only need to make once. I’m using Echoe right now, but I’ll probably switch to Jeweler for even simpler releases.

I am certain that making code reusable is one of the best ways to gain a solid understanding of how a software developer’s tools should be used. Polishing up code for public release encourages a ton of good behavior that makes even personal reuse easier and as a side benefit, other people will improve my code for free!

Most of the plugins and gems I write are simple enhancements to patterns and are the result of DRYing up code in a single project. After abstracting the initial idea from one project, I find it’s much easier to recognize the same pattern in other projects.

So take a few minutes and look for patterns in your code. Give the pattern a name. Uncover the simplest way to express it. Start using it. Discover it’s limitations. Publish it. Talk about it.