14
Jan 11

Oh Noes! There Goes My Blog!

So in case you are wondering… recently I was moving my database around, and in the midst of things I managed to completely blow up my WordPress database. I thought to myself: “No matter! I have backups!” Little did I know that I had actually forgotten to set up the cron job to copy the backups to AWS S3 (my backup solution du ‘jour).

Long story short, I had to scrape my content out of Google cache to get this blog back in action. One lovely side effect, however, is that all my post comments were blasted to smithereens. I do apologize for those of you that were thoughtful enough to lend me your words. I’ve learned the hard way to always confirm your backup strategy. I hereby join the ranks of Phil Haack and Jeff Atwood (*facepalm*).


17
Dec 10

The Great Host Swap

It’s funny how things work out.  If you’re reading this, you’re on my new server.  The great host swap of 2010 is complete.  God it was a pain, but, sadly, it was necessary.  Things have been solid for a long time here, but I guess everyone has their bad days.  My old host just had a few too many for me to deal with.

My former host was Linode.  For the most part, things were incredibly stable.  Barring recent events, I never had any major issues that weren’t somehow my fault.  I signed up with them in June of 2009 because I noticed their packages offered more bang for the buck than Slicehost (my first host for this blog).  They had a lot of positive reviews, and their control panel software was pretty sweet.  My geek side fell in love with Linode, and I was a happy customer for a long time.  Recently, though… things haven’t been so great.

Continue reading →


16
Nov 10

Implementing ISession in EF4

In a previous post regarding the ISession from Rob Conery, a commenter asked about our implementation of ISession with regards to EF4.  Rather than send him the specific code, I figured I’d make another blog post to outline exactly how we use it here at work.

Basically, each of our projects has a “Data” layer where we store everything needed to communicate with the database.  This is also where the ISession interface lives, so it’s easy to provide the implementation.  There is one caveat, however, because we need to provide a generic EF4 implementation that can work with any data context.  In our projects, sometimes we need to speak with multiple databases, and then it becomes just a matter of plugging the right entity collection into our implementation.  Here’s what the code looks like:

Continue reading →


14
Sep 10

Nginx, Rails and PHP: Round 2!

It’s been a while since I posted about my current webserver setup, and a few things have changed around here!  I like to stay current, and the latest version of PHP has changed the way I build from source.  I’ve also changed the way I install stuff, this way it’s much easier to update things like PHP which tend to litter files all over the place.  Anyway, you came here for the goods, so here we go:

Step 1:  Environment and Pre-Requisites

This section probably looks familiar.  The only difference now is that I’m running Ubuntu 10.04 LTS on my main server now.  The packages are pretty much the same.  First we make sure the universe repository is enabled by editing /etc/apt/sources.list and removing the hash marks in front of universe lines:

Continue reading →


26
Aug 10

Mocking Rob Conery’s ISession

Recently at work, we’ve really started to embrace TDD (and BDD).  As a team, it helps us write much cleaner, more efficient code.  I’m not going to preach forever about the benefits of TDD.  There are thousands of other blog posts out there beating this topic to death.  One of the ways that we communicate with our databases at work is by using Rob Conery’s ISession interface.  We have an implementation of this interface for Entity Framework 4, and it works beautifully.  However, given that this interface is super generic, it’s less than obvious how you would mock such a thing.  Here’s the ISession interface in all its glory:

Continue reading →