mechanical bee logo

about us

We make web applications for ourselves and for clients. or learn more.

Obj to three.js, getting your materials to show up

We were playing around with three.js and nearly died of despair when we could not get the materials to show up on our completely black but otherwise perfect looking model for no discernible reason. In hindsight, our problem with light and not having it seems obvious but at the time, it was really not obvious.

So if someone gives you an obj file with some jpgs that are supposed to be the textures for the model and asks you to render it in your browser with three.js, here’s what to do:

Organizing a large backbone and rails app, some thoughts

We recently started working on a new web app with backbone 0.5.3, rails 3.1, and couchdb. It’s not the still-raw-and-pulsing bleeding edge but it’s pretty new stuff. There are some nice examples of backbone apps, e.g. DocumentCloud, CloudApp, CloudEdit, Todo, etc., but conventions and best practices aren’t there yet in the way that they are for Rails.

Our app is larger than any of these examples so we thought we’d share how we’re currently organizing it, and handling routing, forms, and nested models.

Folders and Files

Our app files and directory structure are very similar...

Why I'll (probably) never use CoffeeScript

We started a new project using Rails 3.1, so I was checking out all the new stuff in this release. Most of it looks great, since the new baked in features solve problems that we were using third party or home grown solutions for anyway. On our last project (Rails 3.0), we used Less and Jammit. On this one, we use Sass and Sprockets. Rails chose for us and that’s great, because now we don’t have to deal with it. But there’s one new feature that I just don’t get: CoffeeScript.

I mean, I...

Geek fun: building a lil' node.js app

We recently wrote a little service in Node.js and deployed it on Heroku’s Cedar stack. All it does is return UPS shipping rates when we do an http get with certain parameters. So instead of hitting UPS directly every time an item page loads, we hit the node app and it either pulls the rate out of Redis or asks UPS, meaning that shipping rates should come up a lot faster. We didn’t really need to spin up a Node app for this but hey, this is how we have fun :D.

It’s a pretty basic app but...

couch_record: a new CouchDB ORM for Ruby on Rails

We’ll write a more detailed post about it later but we’re excited to open this up now: couch_record, a new couchDB ORM for Ruby on Rails, using couchrest and based on our experiences with couchrest_model and, to a lesser extent, couchrest_rails.

Why do we need another CouchDB ORM?

When we were deciding which ORM to use, it seemed like couchrest_model had the most traction and most activity. But there were a number of aspects we were unhappy with (we wrote about one of them here).

Then recently we added New Relic and noticed some really...