A recent Heroku-hosted Rails application required fulltext search of the content including field boosting. The best options quickly narrowed down to Solr and Sphinx. I’ll detail some of the reasons Solr won and the differences between the two.
Boosting in Solr allows customizing search relevance to offer users the best experience. Here’s the short and sweet on boosting at search time using the Sunspot gem so documents associated with other users who are your Facebook friends show up first.
While working on a project (to be announced) creating responsive design templates from PSDs, I wanted to structure the positions and sizings in a way that allowed the greatest flexibility and sanity. Enter EMs. A great technique but requires conversion of pixels to EMs based on the current font size leaving you with cryptic “0.875em” and “1.125em” expressions throughout your CSS. Not the most maintainable code. A Sass mixin allows expressing measurements in pixels in code while using EMs in the final output.
UPDATE: I’ve published the code I use in a bunch of projects as a gist: PX to EMs conversion
I attended the New Blood Boston event, hosted by Bocoup, which featured and introduced a handful of Boston startups. Awesome food (grilled cheese and good beer) combined with a crowd of some of the most capable people in the boston tech scene made for a great event.
In the midst of writing integration tests with Capybara and RSpec, my tests started freezing and eventually giving me the error
ActiveRecord::StatementInvalid (Mysql::Error: Lock wait timeout exceeded; try restarting transaction. Turns out this is a problem with RSpecs database cleaning strategy and manually seeding the database during a test run.
If you are using Node.js, particularly on Heroku which mandates a specific version, and need to work across multiple versions doing this manually can be frustrating (and insane). “No such module” problems like this and this have naturally led to some nice tools for managing NPM and Node.js versions.
PaaS (Platform as a Service) with support for specific stacks is the latest wave of cloud-based hosting services. Awesome providers such as Heroku show you why; simple (and often free) deployment and scaling of common stacks like Rails. Here are the best known Node.js PaaS offerings.
active_admin is a cool gem for quickly creating an admin interface over your Active Record models. By default, it puts it’s JS and CSS files into your app/assets folder which then get included in your application. Not what you want.
Introducing http://logolifter.com, a free and simple tool for more easily creating images for blog posts and other content. Search for what you want, drag the images onto a canvas, customize, and download. This project came out of wanting good, relevant, unique images for blog posts and avoiding stock photos.
UPDATE: The project is now on github.
I had a great time at the Rails meetup hosted by Cantina last week. People were gracious enough to sit through my talk no MongoDB, an overview how to use it, and how to use it with Ruby / Rails. Slides are posted on Speaker Deck and embedded below. Thanks to those who attended and I’m looking forward to the next one.