taylorbarstow.com

NYT Explorer: Now with Customization

I just added a feature to NYT Explorer which lets you use additional refinement categories (technical term: facets). The newly available facets are:

  • NYT “Desk”
  • Organization
  • Publication month
  • Publication year

There are other facets available too, but the ones up there now are the most user friendly. (Perhaps I should provide an “advanced” mode which would show you all of them, even the unfriendly ones.)

To choose which facets you see, hover over the “Refine your search” area—a “Customize” link will appear in the upper right hand corner.

Enjoy! Any feedback is appreciated.

simple_pagination

I just pushed a new project to github: simple_pagination. It is a dead simple, standalone pagination library.

Some might say I’m reinventing the wheel, but I don’t see it that way. I realize there are some great pagination libraries for Rails/ActiveRecord (will_paginate), and I’m not trying to compete with or replace them. Rather, I see simple_pagination as a compliment to these projects. It is useful when you aren’t using ActiveRecord but you have data to page through… such as when you are consuming search results from a remote API.

(In fact, if mislav wanted to, he could refactor will_paginate to use simple_pagination. I doubt he wants to though. I know I wouldn’t want to.)

I hope other people find this useful—I know I’m tired of writing pagination logic when dealing with non-ActiveRecord data, which I am doing more and more of. Anyway, enjoy!