This post is part of a series we authored on another site which has since gone offline; Great Post on Delayed Job was originally published on August 17th, 2009.
Koz has a great post on Delayed Job. Delayed Job is an alternative to using cron jobs on your *nix box to periodically call ruby scripts or rake tasks. Given that my current day job uses what feels like a damn near infinite list of cron jobs, you can bet I'll be trying this shortly. Thanks Koz!
This post is part of a series we authored on another site which has since gone offline; HopToad: Exceptions Happen was originally published on August 17th, 2009.
I've recently started using Hoptoad and hit my first (few) snags with it. As you'd expect, I began by signing up for Hoptoad. Then, as often happens for busy developers, I got slammed wiith some bugs and almost immediately had to put it aside. When I went back to it a few weeks later what I discovered was that their main web site was pretty much missing the directions for how to use it. They turned out to be located in the plugin readme. And, yes, I can understand that but a simple getting started or FAQ on their site would have saved me some digging. And I suspect digging on the part of someone else.
Suggestion 1: Put the Hoptoad docs on on the site not Just in the readme
Sidebar: Why didn't a simple grep or TextMate search through my Rails application tell me this? Well I spun up a new git branch to work on Hoptoad and when I was digging around trying to get back to Hoptoad, that branch wasn't active, so I didn't find anything.
Once I got Hoptoad running, I found that my previous behavior patterns from using Exception Notifier actually got my into trouble. Now this might be a heretical statement here but when you run a production website, I don't find that I actually get all that upset by an exception or two. I know if I was a purist I might argue that an unhandled exception should never be thrown. But, the reality of websites in a heavily crawled environment is that exceptions happen. One example of this is Googlebot caching things that no longer exist on your site due to a code re-organization and an exception being thrown when it calls a controller that no longer exists.
The architecture of Hoptoad is that when an exception is thrown, a single email is generated back to you when an exception occurs. And the idea is that you don't get an email everytime for every single exception, only the first time. Instead you have a web based inbox for exceptions that you visit after the first time. Now given that the email is generated after the first time, you (or at least me) don't always go back regularly. If you used to use Exception Notifier, which I'd argue is Hoptoad's biggest competitor, you tend to rely on frequency of those emails to tell you "Oh Crap -- You need to pay attention HERE". So what got me into trouble was my deploying a less than perfect code fix and then getting only a single exception in my inbox while 70+ actually valid exceptions stacked up in my Hoptoad account.
Suggestion 2: Give users of Hoptoad a threshold where if enough exceptions are thrown, additional emails are generated.
Configuration Tip: Making Hoptoad Ignore Certain Errors
To address the problem above where I got exceptions triggered by crawlers, you can configure Hoptoad so that certain exceptions are actually ignored. Here's how to do this:
In the HoptoadNotifier.configure block make it look like this:
HoptoadNotifier.configure do |config|
config.api_key = 'your_api_key_here'
config.ignore << SecurityTransgression # custom exceptions written for our code
config.ignore << CustomNotFoundError # custom exceptions written for our code
config.ignore << NoSuchUser # custom exceptions written for our code
config.ignore << ActionController::MethodNotAllowed
config.ignore << Ultrasphinx::UsageError
Now those are the exceptions I've found that, for my application, I just don't care about. Your exceptions will vary (YEWV) but just drop the exceptions that you find aren't needed to watched here and then you can pay greater attention to the exceptions that vary.
Don't get me wrong here -- Hoptoad works great! The good folks over at ThoughtBot have done a superb job in building Hoptoad. My suggestions are merely an extra layer of icing on an already great cake. Thanks for building this wonderful product.
This post is part of a series we authored on another site which has since gone offline; An OSX Detour: Taking your Mac in for AppleCare was originally published on August 27th, 2009
Given the prevalence of Macs within the Rails community, I thought it acceptable to detour from the normal Rails focus of this blog and post about how to take your Mac in for AppleCare. I'm the proud owner of a 13" Intel MacBook, 2nd generation that recently had to go back for some tender loving care. Here's how I did it:
Verify Your AppleCare. Before you do anything you should likely verify your AppleCare. Where to do this seems to vary from time to time (no consistent url) so start by checking the Apple Support site.
Make an Appointment. You definitely want to make a Genius Bar appointment. Sure you might get lucky and not have to wait but that's unlikely. I showed up at 10:30 and the next availability without an appointment was 3:45. Yikes!
Full Backup. Make sure you do a full Time Machine backup right before you take it in. Odds are that no data is lost but you always want to be safe.
Service Account. Create an Adminstrator account named Service with no password and set it to default log in when the machine is turned on. Make sure that Fast User Switching is turned off.
Custom Upgrades? Make note of the RAM and Hard Drive configuration if you made any upgrades yourself. This HAS TO BE TOLD TO APPLE when you take it in. That way if they do something drastic like a MotherBoard replacement they know to move over your hardware. This information should be noted on the receipt that Apple gives you.
Note: If Apple really wants access to your data then there's not much you can do but what you're doing here is preventing casual snooping.
This post is part of a series we authored on another site which has since gone offline; Recommended: Phusion on Building a More Efficient Ruby 1.8 Interpreter was originally published on December 17th, 2009.
RubyInside is running a story about Phusion Passenger and how they did it. Its based on a Google Tech Talk they gave recently. Highly Recommended.
AlloyCode.com has relaunched, with a fresh design and a newly presented focus on the sort of development services we can offer.
Since forming in 2007, AlloyCode has grown from a sole-proprietor, part-time operation to both my full time employer, and a real player in Ruby on Rails consultancy & contract development. With that growth, the need for a serious business web presence has become apparent.
The AlloyCode blog still exists, at it's new URL: http://alloycode.com/blog, and all the archived content has been retained. In fact, we've even pulled forward some content that Scott & I wrote for another site, which is currently available in the April 2011 section. Some of those articles may be a little dated, but they help to show how far Rails development has come in just a few short years.
To give credit where credit is due, the new design was produced by Lucid Design of Nelson, New Zealand, and the new website copy was prepared by Christine Parizo, of Christine Parizo Communications. Both companies have done fantastic work and I certainly hope to do business with them again in the future.
As a fledgling iOS developer myself, I'm always interested to see the new and interesting ways that the platform is being used. Last month's release of Superbrothers: Sword & Sworcery EP inspired a whole bunch of coverage, including a great article by Geraldo Nascimento.
Geraldo's article focuses on how the team behind S:S&S EP managed to time their release and subsequent in-game tweet drive with the days and hours leading up to the iPad 2's international launch. Personally, I'm not the world's biggest fan of Twitter. I've been viewing the continuing push of Twitter-integration in web and iOS applications as something of a necessary evil, but after reading Geraldo's article and seeing myself how well the integration is handled in S:S&S EP, I'll be a little less apprehensive about building social features into my applications in the future. As a non-Twitter user, I never felt pressured by the game to participate in the social media side of things, and I think that's the important take-away lesson here; social integration can be handled gracefully.
Also, last week featured the release of the Sword & Sworcery soundtrack album, titled Sword & Sworcery LP - The Ballad of the Space Babies. Given how much I enjoyed the game and Jim Guthrie's haunting music therein, I actually waited up on Thursday night so I could purchase the album as soon as it went on sale.
Those fans who happened to be awake and following the1console on Twitter were treated to something of a live album release listening party, which I have yet to see duplicated anywhere else. Given the impermanent nature of Twitter, I'm going to preserve that information here, because I think it provides some really neat insight into both the game development and soundtrack development process. While I've done a bit of editing (removed unrelated tweets and placed these in chronological order), all the following content is property of Superbrothers:
So what's the first song on Jim Guthrie's Sword & Sworcery LP - The Ballad of the Space Babies, I hear you ask? Excellent question.
It's a song called Dark Flute... the song-sketch predates the project, it suggested a hazy sunlit meadow in a haunted forest...
...so I painted an idyllic little homestead & a sheep-filled meadow, which was eventually rejiggered to contain gloomy, suspicious things.
The song in S:S&S EP is a kind of funky background tune that plays right near the start... but on the record it's something else entirely.
The song on the record starts the same only Jim added a soaring melody with epic flourishes, conjuring up a world of myth & adventure.
Seriously folks, I'm sorry to do this to you, but I'm listening to Dark Flute right now... if you like S:S&S EP it's going to slay you.
"So what's the second song?" Well that's a good if perfectly predictable question. It's Lonestar, of course. You will be humming it forever.
Ba-da-bum-ba-da-bum-badabadabadabum. We've been humming this song to ourselves for like two years now, for reals. Lonestar is hella catchy.
The third song on Jim Guthrie's new record has the name Doom Sock, which is a portmanteau of 'Poop Sock' & 'Doom Rock'. #portmanteau #wtf
Doom Sock is coooool.... it's basically 70s John Carpenter + Ennio Morricone's horror scores, filtered through Jim Guthrie's strange mind.
The reward for surviving Doom Sock is The Prettiest Weed aka The Downslope Song... only it has the craziest proggiest space sax-synth solo.
So once you've survived Doom Sock & The Prettiest Weed you're left to ponder the eerie mysteries of The Cloud, the eeriest song of them all.
The Cloud predates S:S&S EP by a few years. Jim recorded it with some friends including Owen Pallett aka @owenpallett aka Final Fantasy.
Bits & pieces of The Cloud are scattered around the meta-spaces of S:S&S EP... the whole thing can be heard in the 'info' section.
And then... folks... and then... the song after The Cloud. Oh my dear fucking lord... this takes me back... this gets the dreams going...
The song after The Cloud is Under a Tree. It was on a record Jim gave me before we met back in like 2005. It's pure deep old magic.
Under a Tree was the foundation for the GDC 2010 playable, it ended up in the final project on Side B... this song was the start of it all.
Listening to Under a Tree now freaks me out. I've been listening to it for like six years, dreaming about it, imagining what it would be.
There's this lazy hazy section towards the end... it goes on for a while... that's the stillness before dawn, the first pink sunrays...
...and then... the phrase at the end... coming home after walking all night long to a warm hut with a warm hearth... then sleep.
END OF SIDE A
START OF SIDE B
The first song on Side B is [The Maelstrom]*... this was technically the first song in S:S&S EP, in that it was the first to be implemented.
Unsettled Mood was in the barebones S:S&S EP prototype we submitted to the IGF in fall of 2009... a stormy, gloomy, heart-breaking affair...
Oh sh*t... now it's The Ballad of the Space Babies. BLISSSSSSS
SPACE BABIES HAUNT MY DREAMS
SPACE BABIES ARE FROM HEAVEN THEY ARE FROM OUTER SPACE THEY LIVE WITHIN US THEY WILL ALWAYS BE WITH US I LOVE LOVE LOVE THEM
Oh... I know that sound... that badass synth... it's time for Unknowable Geometry aka The Trigon Song... do you feel the glorious pain?!
Just want to take a moment and give a shout-out to @brandonnn who faced The Gold Trigon in an early & infuriatingly hard build of S:S&S EP.
To this day, the song of the Trigon causes Brandon to shudder & convulse as vivid of his violent rage-quitting erupt from his psyche. :)
Oh & now we're listening to Bones McCoy... the most danceable song on the record - 100 points to anyone who knows where in S:S&S EP this is!
Can't tweet, dancing for a bit.
Ok now we're on Ode to a Room. Which room, I hear you ask? The Pink Room, apologies to Angelo Bandalamente: http://vimeo.com/7107269
If you know Twin Peaks & you've played S:S&S EP then you know what's up. The owls are not what they seem, amirite?
The Prettiest Remix will remind you that you are awesome, smart & super badass.
The less said about The Whirling Infinite the better, to discuss it is to enter the mouth of madness... never to return.
And now here we are, at long last... the last song on the LP, the last song on S:S&S EP, the transcendent & heartbreaking Little Furnace.
If Little Furnace doesn't absolutely slay you then I don't know what will, it's shockingly beautiful & also actually kinda moving...
If you played S:S&S EP to the finish you knows what's up. This is an old song, I listened to it a million times while crafting the epilogue.
Once Little Furnace is over the LP is done, it's the end of Side B... it's time to stop & think & wonder & reflect on all that came before.
So that was Jim Guthrie's Sword & Sworcery LP - The Ballad of the Space Babies official live-tweet, fifteen minutes to go before launch!
*The Maelstrom was originally known as "Unsettled Mood" -- this correction was pointed out in the livestream.