elz: (archive of our own)
elz ([personal profile] elz) wrote2009-04-26 12:35 pm
Entry tags:

This week in coding


In which I sip margaritas on a beach

Not literally, alas. But there are points where we have to stop adding and fixing things for a while to let the testers verify that the current version of the code is stable enough to be deployed. I fixed a couple of small things, but mostly I've been reading up on caching, installing memcached on my local machine and trying it out with our code.

Memcached, incidentally, is a system that was developed by Brad for Livejournal, so it's kind of funny to run into these highly technical articles about it that stop to explain what this "live-journal" thing is and how a "friends" page works.

My layperson's explanation of caching: imagine you give a kid a calculator and ask her what 13 times 4 is. She punches in the numbers and tells you: 52. Ask her again what 13 times 4 is and she doesn't need to use the calculator because she has the answer in her memory. When you tell a program to remember the information it gets from a database, for example, it doesn't need to access the database again the next time someone loads the same page, which makes your pages faster, your users happier, and your servers less stressed. Where it gets tricky is if, for example, you want to cache the number of comments on a story, but you also want to make sure that number changes whenever a comment is added or deleted. And generally speaking, the more a page can change based on who's looking at it (picture a friends page with a lot of locked and filtered posts - it'll look differently to different people), the more complicated caching gets.

Rails does have a lot of built-in support for caching (including built-in support for memcached), and there are a few different third-party plugins out there, including a relatively new one from one of the Twitter guys. So it's mostly just a matter of figuring out what works best for us and implementing it. Piece of cake, I'm sure. *g*



Plug: if you'd like to help work on the archive but you're not big on coding, think about signing up to be an official tester. Testers are the ones who make sure things that have been fixed are actually fixed and new features work the way they're supposed to. They're a hugely important part of the process, and you don't need any particular technical know-how to join up.

(To volunteer for anything, you can drop a note via the official form or just flag down any OTW volunteers you might happen to know or see around, any of whom will be thrilled to put you in touch with the right people.)

...and a bug flew in my eye while I was trying to write this post. Apropos, I guess? But mostly: OUCH!
stultiloquentia: Campbells condensed primordial soup (Default)

[personal profile] stultiloquentia 2009-04-26 04:41 pm (UTC)(link)
just flag down any OTW volunteers you might happen to know or see around

*waves flag*

I've got a beta account and I'd love to help. stultiloquentia@yahoo.ca
stultiloquentia: Campbells condensed primordial soup (Default)

[personal profile] stultiloquentia 2009-04-26 04:50 pm (UTC)(link)
Thanks. :) I really appreciate your weekly updates, btw.