Ernie Miller

No, I don't work in NYC, DC, or the valley, and I'm cool with that.

RSS Feed

Tag Archives: coding

Mobile Devices and Rails: Maintaining your Sanity

16 Comments

The “mobile web” may look more like the web we know and love as devices get more powerful, but there will always be a place for a bit of customization in the name of improved UX on mobile browsers. CSS media queries go a long way toward accomplishing this, but you may find yourself wanting to do more. Ask around or do some searches, and you’ll find the usual answer to supporting mobile devices in Rails involves adding a MIME alias for text/html named “iphone” or “mobile” with register_alias, then forcing a mobile request’s format to this MIME for use with respond_to. This can work, but it’s a huge pain in the neck, and I believe there’s a better way. Read on.
Read the rest of this post

Filed under Blog
Jan 5, 2011

Converting Your Code to ARel 2.0

3 Comments

If you haven’t read Aaron Patterson’s post about the massive rewrite of ARel that happened for version 2.0, do yourself a favor, and go read it. It’s good stuff, and Aaron’s work rewriting ARel was a monumental feat of awesomeness. Plus, it’s responsible for tipping me off that someone else did a momentous rewrite: porting the venerable zombo.com to HTML5. Back? Good. Aaron mentioned, “for people using ARel directly, some methods have been removed, but all previous functionality should be available in one way or another.” Since I spent some time making sure that the old functionality was available to support the arel-2.0 branch of MetaSearch and MetaWhere, I thought I might tackle explaining some of the changes you’ll see.
Read the rest of this post

Filed under Blog
Oct 15, 2010

MetaSearch 0.9.7(.1)(.2)!

3 Comments

We’re getting dangerously close to 1.0 here. (Update:: not that dangerously close. Grab 0.9.7.12 if you run into compatability issues with MetaWhere.) Squashed a silly bug or two, and added support for two features often requested by Searchlogic switchers, searching against multiple columns with _or_, and polymorphic belongs_to association searches. I’ve also switched to using left outer joins for searches now. This has its pros and cons. SQL geekery past the break.
Read the rest of this post

Filed under Blog
Oct 12, 2010

The Underused collection_singular_ids Method

2 Comments

I was talking to someone a few weeks back, and he was jumping through a bunch of hoops to create fields in his form that allowed him to set associated objects. “You know about the collection_singular_ids methods, right?” I asked. “No, please explain,” he said. So I did. I wanted to write a quick post here, as well, in case it might help someone else.
Read the rest of this post

Filed under Blog
Oct 2, 2010

Reaper

0 Comments

If you get a free moment, and don’t mind parting with one of your Twitter follows (OK, you can always navigate away if you chicken out) try out Reaper, my latest little Twitter toy. Twitter app development is really a lot of fun, compared to Facebook apps. I think I’m addicted. :)

Filed under Blog
Sep 27, 2010

MetaSearch::Builder#relation and you

2 Comments

A recurring question I have been seeing regarding MetaSearch has been the need to modify or access the relation generated by the search. That’s precisely why MetaSearch::Builder#relation exists, so I thought I’d make a quick post detailing its usage.
Read the rest of this post

Filed under Blog
Sep 20, 2010

Git Bisect is Awesome

3 Comments

As the sole developer on most of the projects I use git with, I generally know who breaks my code: me. However, when attempting to maintain Rails plugins that do some pretty intrusive stuff in core Rails functionality, I find myself waking up some mornings, doing a git pull in my vendor/rails submodule, and finding a bunch of failing tests. Then, I go get some coffee, and spend a bit of time scratching my head over what just caused the breakage. It comes with the territory. Still, better to track 3-0-stable as changes come along than scramble to figure this stuff out all at once and release a new version of MetaWhere every time a new Rails gem is released, right? Thus began my love affair with git bisect.
Read the rest of this post

Filed under Blog
Sep 10, 2010

H8ball, the HTTP Status 8-ball

0 Comments

So, there’s this pointless little side project I did last week. It’s called h8ball, and it’s completely stupid. I’ll say it first so you don’t have to. Still, I figured I’d make a quick post about it, all the same, just so you’d know how something so random and stupid came to be.
Read the rest of this post

Filed under Blog
Aug 26, 2010

Why MetaWhere 0.9.2 raises errors (and why you’ll thank me later)

3 Comments

If you updated MetaWhere recently, and your application started raising MetaWhereInAssociationErrors, I’m sorry. But not too sorry. Because that error probably saved you from running into strange, confusing problems later. Let me explain.
Read the rest of this post

Filed under Blog
Aug 26, 2010

Coder Archetypes: The Line Worker and the Artist

0 Comments

It’s no secret that there are two types of coders out there. The first went out and got a CS degree because someone once told him that there’s a good future in anything having to do with computers. We’ll call him the Line Worker. The second has a passion for coding. His degree might not be in CS. He may not even have a degree (oh, the humanity!), but he loves to code. He’s an Artist. It’s not just a day job for him. Companies who don’t seek out and retain Artists are doomed.
Read the rest of this post

Filed under Blog
Aug 4, 2010

About

I'm Ernie Miller. But then, you probably knew that by looking at the page title, or the URL. I'm a Ruby programmer in Louisville, Kentucky. This blog used to be called "metautonomo.us", which I thought was kind of clever, but nobody, including me, could type it. Lesson learned.