Jim Kingdon's blog



Jim KingdonJim Kingdon
Standup 08/29/2008
edit Posted by Jim Kingdon on Friday August 29, 2008 at 04:52PM
  • Using multiple buckets for Amazon S3. One of our sites has a lot of images (perhaps 30+ photos per page, different for each page and user) and got significant benefits from using four buckets instead of one. Multiple buckets allows browsers to fetch several images in parallel. Increasing it beyond four probably wouldn't help, as browsers have a limit on how many parallel requests they will send.

  • Amazon S3 now has a copy command. This could be useful, for example, if you have a lot of data in a single bucket and want to move it to multiple buckets. Copy is faster than downloading and re-uploading all that data. The ruby S3 gem, however, only lets you copy in one bucket, so you'll need to bypass the S3 gem.

  • We wrote a script to dump a local SQL database and copy it up to a remote server (for example, a demo or production server). This is in contrast with a script we wrote some months ago which copies from demo to a local workstation (for test data, reproducing data-driven bugs, etc). The push to remote feature was for a situation in which there was a bunch of data to be generated (based on some XML input files) and we could afford to bog down a workstation for half an hour, but not an overloaded (and perhaps underpowered) server.

  • Deprec is a set of capistrano recipes for setting up a remote server (in conjunction with deploying an application), for example creating accounts, ssh keys, init scripts, logrotate, etc.

  • Capistrano 2.3 has weird sudo issues (deleting old releases or something). Recommend Capistrano 2.5.

Jim KingdonJim Kingdon
Standup 08/28/2008
edit Posted by Jim Kingdon on Thursday August 28, 2008 at 04:20PM
  • What's a good way to measure an application's memory usage (beyond top)? Ideally, this would provide summarized information (rather than a lot of raw data like Linux's /proc/pid/maps).

Jim KingdonJim Kingdon
Standup 08/27/2008
edit Posted by Jim Kingdon on Wednesday August 27, 2008 at 04:26PM
  • Does anyone have any experiences with one of the object mother libraries like object daddy? (Answers at standup were "no, we always wrote our own object mothers in a domain-specific way"). The appeal of a library is that it might help keep track of what needs to be done to make an object pass rails validation.

  • Clock.zone now has exists. (Background, pivotal has a Clock class which has a now method which can be implemented either by a call to Time.now for production, or a mock clock which lets tests specify the "time"). This is so that the rails 2.1 features like Time.zone.now have an analog in Clock.

Jim KingdonJim Kingdon
Standup 08/26/2008
edit Posted by Jim Kingdon on Tuesday August 26, 2008 at 04:14PM
  • Looking for options to maintain a website of technical documentation with the following:

    • A somewhat technical person, but not a programmer, must be able to maintain the site (think a technical manager or a tech writer).
    • I need to display code samples, so this should be easy/convenient
    • Somewhat skinnable (custom logo, custom fonts & colors)

    The ideal examples would be the google chart api or google maps api

    A possible solution is a wiki (mediawiki?). Something google-code-like gets extra points for the issue tracker. Google groups gets points for the mailing list. Google sites seems like is might be a decent basic option (it's easy to point a CNAME at it too).

    Experience reports/recommendations appreciated.

  • Rails hackfest is on through the end of August. Get points for getting patches accepted, and win prizes.