Wednesday, May 19, 2010

A designers goldmine for software developers

If you're like me, you're mainly into code. You like writing systems to solve problems that you have and you can do just enough UI design to be functional. You'd like for your projects to be prettier, but spending a ton of time on tweaking the positioning and color of elements is not your idea of a good day.

Helpful Hint: Theme Forest

Hundreds of nicely layed out UI skins that you can buy pretty cheap and use for your pet project. I don't need to say much more about it, just go check it out (This is not an affiliate link, I have no finiancial reason to want you to go buy a template from these guys, I just have bought a couple in the last few weeks and am plenty happy with them).

Tuesday, May 11, 2010

Cucumber and BackgroundJob

The problem: you want to have some nice integration tests that cover situations where jobs get submitted to the background queue, but haven't gotten around to writing it yet or haven't wanted to deal with it.

The solution: we at my office have suffered for you. If you are a BackgroundJob user (and someone who uses Cucumber for their acceptance testing), this steps file (and the associated BJ Model) should help you with your workflow:

GIST!

In short, it uses active record to make sure all your jobs are far enough in the past to get run (a problem with BJ and timezones), executes the queue when you want it to, and has a step for making sure that the job you wanted to submit actually exists.

As an aside, BJ takes a while to startup before working off the queue, so I wouldn't use this all the time. There is probably a good way to speed it up that I haven't thought of, but the idiot-proof way would be to switch to DelayedJob (something we're planning on doing in the next couple months).

Enjoy!

Monday, May 10, 2010

Heroku, you are amazing

I've been spending my weekends trying to keep up with the ruby community. Building toy projects, testing new gems out, and I've found a lot of cool stuff out there.

But what has really struck me as more of a game changer than anything else is Heroku.

You remember when Rails first came out? I remember experiencing it as an epiphany, of sorts. I had spent years writing java apps, configuring every application down to the most minute details. Along come this Rails framework and says "I know what's usually best, and that's what I do by default. My conventions are king.", and that changed web development for me. I could get features done twice as fast because all the config I usually did up front for each piece was already done for me. Yeah, that meant a loss in flexibility, but I didn't mind much. If I have to do something special, I'll cross that bridge when I come to it.

The same sort of feeling came over me this weekend when I tried deploying my first heroku application. I just ran a simple "heroku create" command from my home directory of my app, and it was deployed in seconds, ready to be updated by a simple git push, and already live and kicking. Once again, there's this new guy on the block who says "This is what you usually need, so this is what we always do", and it works so beautifully. Need email? Push an add-on, it's already preconfigured. Performance monitoring? memcached? error notification? it's push-button simple.

And the best part? If you want to spike out an application that you aren't sure you want to build all the way out yet, you can have it deployed and running on their simplest and smallest configuration for FREE! That's right, just try it out, see if it's viable, and when you're ready to bring the traffic you just reconfigure it to spool up more resources. Everything is billed by a running meter (I think around 5 cents an hour per process), and it just works.

To the creators of Heroku, I salute you, you've made Rails deployment fun.