Moving a Rails app to UTC in PostgreSQL

2009-03-22 20:00:00 -0400


We all make mistakes. Or we make decisions that we have to later revisit, to put it kindly! I’ve got a Rails app where I wasn’t using UTC back in the beginning, and this was pre Rails 2.1, so ActiveRecord has been storing all the time stamps into postgres as Eastern time. I need to move all those dates over to UTC for this particular app to go through its next growth spurt, so I threw together a migration that does just that. I’d like to think it couldn’t get more DRY, hope it’s useful to anyone else out there. It’s dependent on Postgres, but you could adapt the increment statement to suit your own DB or to be more generic:


Wrapping Up the Week

2009-03-19 20:00:00 -0400


The last two weeks have seen a ton of development work here at Zetetic. We’ve been working to cut over one of our bigger client’s single-sign-on systems to a new location, we’ve built new features into the Strip beta (update coming soon, promise!), and we’ve completed a pile of performance, stability, and maintenance improvements for Tempo, our time tracker.

I should say that a lot of this work was made possible by an extra pair of hands; we’ve recently brought Bret Morgan onto our team as a developer. He’s been doing a lot of great Rails development work on Tempo and helping out with testing and Q&A for Strip.

Without going into all the changes we’ve made in Tempo, there are two I’d like to highlight:

Message Handler Stability

Tempo provides our customers with various ways to log time remotely and start timers, and our message handler is responsible for scooping up email and Twitter messages. We did some tweaking that dramatically improves its ability to handle the unexpected (you wouldn’t believe the weird stuff that comes in from MS Exchanges and Outlook systems), touches up its ability to respond to erroneous messages, and ensures that Message Handler keeps it up. We had some older daemonizing code in there, and ripped it out in favor of the Looper module we posted to Github recently. We’ve been using Looper in PingMe’s handlers for quite some time now, it was time to gemify it and use it in Tempo.

Tag Operations Improved ++bajillion

Sometimes you need to re-name your tags in Tempo, sometimes you need to add a tag like ‘oracle’ to everything tagged ‘apex’, and sometimes you just need to delete a tag from all of the entries in the current report. To provide this capability we added the Batch Tag interface, and it got the job done, but it was horribly slow. We got down and dirty with the SQL and updated our tag caching strategy to get it right. Operations on hundreds and hundreds of entries that used to take really long times (often leading to time-outs, I’m sad to say) are now complete within a second or two.

The batch tags interface still needs work, I will concede. We’re not entirely happy with the UI itself and expect to overhaul it soon.

We are planning to roll out these updates and more on Monday night EDT, and we’ll publish a full list of improvements made once it’s complete.

So let’s talk Strip. A number of people are already finding that the simple Categories → Entries navigation can be a little restrictive. We’re working on a number of features to allow for easy re-categorization of Entries, but there are two new features that will make accessing your data a lot easier:

Recents

Simple idea, extremely convenient, a tab displaying the most recent entries you’ve opened up:

I use this more than the Categories → Entries navigation already.

Search

Sometimes I just don’t remember where I put something, and I don’t really want to figure it out, I just need the information, and I need it now. I also tend to think that perfect taxonomies are a thing of fantasy, and I get annoyed at software that expects me to be a perfect person. Accordingly, the new Search interface allows me to start typing the name of an Entry, or any data I’ve stored in Strip and it will pull up any matching Entries:

I think you can expect to see these new features among others in the next version of the Strip beta early next week. Thanks for all the great feedback, and keep it coming. If you’ve recently e-mailed us about joining the beta, or you’d like to join the beta, be sure to send us your device’s UDID to support@zetetic.net. The Ad Hoc Helper app (free) will actually take care of the details for you.


Bands On A Budget & Ben Franklin

2009-03-19 20:00:00 -0400


We’re a pretty diverse bunch here, so once in a while I like to drop some info and links to various things we’re involved in.

Bret, who recently joined our team, has a really cool project called Bands On A Budget. I’ve been in a number of musical projects in the last.. uhm… 15 years I guess? And while I love the
whole DIY thing, I have songs to write and shows to book, so I don’t have time to go silk-screening anything, really. For my last band we needed good and cheap t-shirts and stickers on the quick, and we kept going back to BoaB because the orders were always correct, the work was always good (the silk screening of our t-shirts was fantastic).

I’ll definitely be going through them to get merch done up for my next project. The new band is called Ben Franklin. In the words of Scott Pilgrim, we’re totally not sucky, and we’ll be recording our first proper record in the beginning of May.


Nichepapers

2009-03-15 20:00:00 -0400


I’m still keeping an eye on the development of Papernet-like things, and my friend Warren posted a link to an interesting article this morning about the shrinking newspaper/print business and “nichepapers”, which includes this neat little quote:

“When a 14 year old kid can blow up your business in his spare time, not because he hates you but because he loves you, then you got a problem.”

Quite a different perspective that people have these days.


Using SoS for blog comments/discussion

2009-03-11 20:00:00 -0400


I like Zed’s idea of using Son of Sam for blog comments/e-mail discussion, it’s a really great idea. It’s perfect for sites with high comment rates that need to filter down noise in a discussion and foster some real thought churning. It may give the impetus for actual discussion instead of the common sounding off of anonymous trolls.

Zed’s really into rules (is this blog post even 500 words?), which makes perfect sense for high traffic sites, but a little less restriction on the length of time that a discussion can last and that a user can stay subscribed, it’d be really useful for folks like us who have a blog that does get comments but doesn’t have quite such a need for policing them and keeping the discussion on track.

An interesting marriage between the forum and the mailing list! Too bad the Son of Sam code isn’t up anymore, I’d be looking at it right now (despite my utter and complete aversion to Python). I even checked archive.org, I’m so curious.