The Blog: Engineering

Jan 9
0

2011 Open Source Projects

by David Czarnecki

Oh right, it’s 2012. Better late than never. In addition to the numerous contributions we make to existing open source projects, we also find the time to release libraries or projects that we extract from our applications. In 2011, those 22 projects were:

We hope you’ve found or will find these libraries useful in your own projects.

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Sep 30
0

Make Your Databases Work Smarter, Not Harder

by Jason LaPorte

Categories

When optimizing code, you profile it, find out where it’s spending most of it’s time, and figure out how to make it spend less time there. As a sysadmin, I tend to wear a lot of hats, but the one I wear the most by far is the DBA hat–I spend far more time hacking on MySQL optimizations than any particular other thing I do. So, in order to make myself more efficient, if I can find a way to streamline the time I spend with MySQL, I can reap the biggest benefits.

It turns out doing so isn’t so hard. Here are some tricks I’ve learned.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Sep 23
0

The Art of Refactoring

by Jason LaPorte

Categories

GameBattles is one of our most popular sites, with an active user base in the millions. While we’ve dealt with sites in that scale before, this particular case has been no walk in the park. While we’re a Rails shop, the fact that the site is written in PHP actually has nothing to due with the difficulties we’ve encountered. The real problems are that the codebase is almost a decade old, has been developed by dozens of developers over that time, has grown organically with a clear roadmap defined only recently, and has almost never been refactored.

So, at various intervals over the last year, I (and others) have been digging into the site and trying to clean up what we can. It seemed that the process of what weve been doing is interesting, but talking about it at any length has been something I’ve hesitated to do, as I don’t like talking about something without quantifiable statistics. But, the fact of the matter is, programming is an art, not a science, and anyone who says different is selling something. And the real trick with refactoring is that it doesn’t meet any immediate business goals: it’s purpose is entirely human, as it entirely exists to make a clean and sane working environment. All of the tangible business gains (security, performance, developer velocity, etc.) are all secondary, and so unless your managers “get it,” it can be a hard thing to argue for.

In our case, it’s no secret that GameBattles’ stability was going downhill, and so we needed to do something. And the only way for us to be able to audit for problems was to make the codebase manageable.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Aug 10
1

Chef Explosion

by waldo

Here at MLG, we use a product from Opscode called Chef to manage our server environments. Chef allows us to reliably manage our infrastructure by providing us with the ability to write code that describes how a server should be configured. While not perfect, it has served us well.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Jul 20
0

A Redis cache for RSS consumption

by Logan Koester

If you’ve ever wanted to include some data from an RSS/Atom feed on a page from Ruby, you’ve probably run into this problem:

It’s completely unreasonable to hammer the feed provider with a request every time the page is rendered, but it’s no more reasonable to use a big relational database like MySQL just to cache some stupid tweets or blog posts, especially if your application wouldn’t otherwise need one.

But apparently this layer of persistance has been deemed out-of-scope by the creators of popular RSS consumer libraries such as Feedzirra.

So I wrote a little gem called feedzirra-redis to take care of this as transparently as possible. You can use it just like you would Feedzirra normally, but your feeds and entries do not disappear at the end of the script, so you can do the dirty work from a Rakefile via cron instead of in the web request/response cycle while your users impatiently twiddle their thumbs.

Installation

$ gem install feedzirra-redis

 

See the README and test suite for example usage.

Enjoy!

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Jul 20
0

Soonatra – ‘Coming Soon’ pages on Sinatra

I was recently tasked with creating a “coming soon” page for a new project. The requirements were the usual:
  • Some description of the project features
  • A form to signup for an email list / invites
  • Display a few posts from an RSS feed
  • Show some screenshots of what we’re building to collect early feedback

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Jun 24
1

Of Penguins, Rabbits and Buses

by Aaron Westendorf

Here at Agora we make use of dedicated hardware and virtual machines running on our providers’ respective clouds. In recent months, we’ve moved our RabbitMQ hosts onto hardware because we found that we could far exceed the CPU capacity of our virtual machines and it was far cheaper to run a small cluster of hardware hosts than a giant cluster of VMs. We used an existing, underutilized host for our primary traffic while awaiting delivery and installation of a new pair servers. Expecting a simple plug-and-play swap, I set out to test the new hardware before we made the transition. What follows is a harrowing tale into the deepest depths of modern hardware architecture.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Jun 21
4

Introducing Haigha

by Aaron Westendorf

We’re pleased to announce the official release of haigha, our Python AMQP client library.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Jun 16
0

The Postman Always Rings Twice

by David Czarnecki

Categories

My colleague @logankoester posed the following question in our team chat room: “Can the Github bot notify HipChat on wiki updates as well? I mean, wikis are just git repos, right? I am equally interested in documentation changes as in software changes.”

It is possible to do this in a little bit of a roundabout way. Read on to see how I did this with Hudson, our Continuous Integration server.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Jun 9
2

The Friendly Point

by Blake Taylor

Do you use points or do you use pixels? I’ve fallen in love with points. If you know me, you might already know this because I talk about them all the time. So what is it that I like about points, or perhaps, what is it that I dislike about pixels?

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article