Ernie Miller

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

RSS Feed

Tag Archives: coding

Why your Ruby class macros (might) suck (mine did)

0 Comments

An issue on GitHub just reminded me of a feature I added to Ransack a long while ago, but never got around to documenting. Sorry! :( Anyway, here’s a quick writeup. I’ll try and find time to get something written up for the official documentation as well, soon, if Ryan doesn’t beat me to it. But this post is about more than how to limit searches in Ransack. It’s about how I was stupid, and how I learned to be less stupid.
Read the rest of this post

Filed under Blog
May 11, 2012

What’s new with Squeel?

0 Comments

Why, I’m glad you asked! It’s been a while since I’ve made any updates about Squeel — since before RailsConf, actually! A lot’s been added since then.
Read the rest of this post

Filed under Blog
Jul 3, 2011

“WTH is happening to Rails?” I’ll tell you.

29 Comments

I just read the blog post that got some traction on HN last night, entitled “What the hell is happening to rails?” It goes on to list a litany of complaints against changes in Rails 3.x, ranging from the default commenting of the catch-all route to, yes, of course, CoffeeScript. They all end up sounding a lot like “I don’t like change,” an argument we’ve all heard before. The difference is that Steve Coast, the post’s author, casts himself in the role of a crusader for the newbies. He says that he, personally, “gets” why these changes were made, but that the most recent versions of Rails are actually harder to learn than the older ones were. The post highlighted two things, to me:

  1. Some people still miss the point of Ruby on Rails, even after all these years.
  2. There’s a difference between “easy to learn” and “easy to use,” and when these competing goals butt heads, the latter should always win out.

Read the rest of this post

Filed under Blog
Jun 14, 2011

Scaling Web Applications: My “3 Questions” Philosophy

2 Comments

As I see it, any reasonable plan for scaling web applications is going to address 3 questions:

  1. How can we accomplish more work?
  2. How can we give the appearance of accomplishing more work?
  3. How can we avoid doing work that doesn’t matter?

So, how do we address these questions? Well, first, we remember that to the end user, the perception that the application is functioning correctly and with reasonable speed is of topmost importance. Everything else lines up behind these two considerations. Since perception is reality, we quickly discover that we can cheat, and the challenge comes in determining where, when, and how to do so.
Read the rest of this post

Filed under Blog
Jun 2, 2011

RailsConf.reflect_on_all_lessons_learned

0 Comments

Today, I’m feeling mostly recovered from my first ever RailsConf, so I thought I would take some time to reflect on what I learned there, and share it with you, my dear reader. So, here we go, in no particular order…
Read the rest of this post

Filed under Blog
May 24, 2011

Introducing Squeel!

31 Comments

Not too long ago, I mentioned that a rename for MetaWhere 2.0 was coming. It’s here, and the new name is Squeel. A lot has happened since my post about the rewrite a couple months ago, but before we get into that, a bit about the name…
Read the rest of this post

Filed under Blog
Apr 13, 2011

Ransack, the library formerly known as MetaSearch 2.0

1 Comment

A couple of nights ago, I pushed Ransack to GitHub. What’s Ransack? Well, previously I was calling it MetaSearch 2.0, and it’s a complete rewrite, not unlike the MetaWhere 2.0 development in the rewrite branch (a name change is also forthcoming for MW 2.0, if you’re curious). Why change names? A few reasons:
Read the rest of this post

Filed under Blog
Apr 1, 2011

The MetaWhere 2.0 Rewrite

4 Comments

If you follow me on Twitter or have been following the rails core mailing list lately, you might have seen mention of the MetaWhere rewrite I’ve been working on. If you haven’t, let me start by linking you to the rewrite branch on GitHub. This is just a quick post explaining why I’m rewriting it, and why you should care.

Read the rest of this post

Filed under Blog
Feb 18, 2011

When to use alias_method_chain

15 Comments

Recently, I stumbled upon a fork of one of my projects in which someone made a really intelligent-sounding commit: “Remove needless indirection of alias_method_chain.” He used the term indirection, so I was duly impressed, and my curiosity was piqued: had I sinned against the programming gods and used an alias_method_chain when it wasn’t needed? No, I hadn’t. alias_method_chain is frequently abused in the Rails world, but it wouldn’t exist if there wasn’t a valid use case.
Read the rest of this post

Filed under Blog
Feb 3, 2011

attr_bucket, A Gem for Your Lolrus Model

5 Comments

Good evening, Internet! I hope you had a wonderful and productive workday. Now, with those pleasantries out of the way, I’d like to point you in the direction of a little gem called attr_bucket that I am regretful for having written even as I type this blog post suggesting you go try it. That is because this gem, while tiny and unassuming, has tremendous potential for evil.

Read the rest of this post

Filed under Blog
Jan 27, 2011

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.