Showing posts from June, 2008

Issues with Active Scaffold and Rails 2.1, Solved

If you are looking to upgrade to Rails 2.1 and you are using Active Scaffold , be aware it still has a few rough edges. Make sure you install the Rails 2.1 branch of Active Scaffold: git clone git:// cd active_scaffold git branch -r (just lists the branches) git checkout origin/rails-2.1 (Check out the full thread for Rails 2.1 and Active Scaffold compatibility ) Second, I had to patch vendor/plugins/active_scaffold/lib/extensions/generic_view_path.rb . On line 53, make it look like this: if !@template.controller.is_a?(ActionMailer::Base) && @template.controller.class.uses_active_scaffold? I had to add !@template.controller.is_a?(ActionMailer::Base) && All my tests are now passing! I still love Active Scaffold, even though it's a bit behind the times.

Scalable Counters for Web Applications

So you need to provide a count or counter for your web application, but you want it to scale. The naive approach would be to simply select count(*) from table . That will fail under load because it requires scanning your entire collection. The first question you need to ask is, Do you need exact counts or will approximate counts be good enough? I bet in many situations, an approximate count will be perfectly reasonable. Think about the use case of tracking web hits. When you're talking about millions of hits, what is the difference between 1,000,000 and 1,000,001? Of course, only your business expert will know if approximate or exact answers are required. The decision, though, is crucial because it's the difference between an easy implementation and a hard (costly) implementation. Let's say, for the purposes of this article, that you'll need very close to accurate counts, plus you need to scale a lot . The first step is to pre-calculate the count, and cache the

Announcing Whatever Is Fine With Me, The Easiest Friend Polling Site

World , meet Whatever Is Fine With Me . I think you two will really hit it off. Whatever Is Fine With Me is a easy, quick polling or voting application that you can use to find an answer to a question faster than you can sing the Canadian national anthem. The site was created after we found it difficult to make ad hoc decisions among our group of friends. Most famous is "where are we going to lunch?" Of course, the most common answer to that is: "whatever is fine with me." I wanted to create a site that is task focused, fast to use, and with as close to a zero barrier of entry as possible. I am sick of creating accounts on sites, so my first rule was banish account signups. It's still fairly secure, as each page is identified by a very hard to guess URI. Why use Whatever Is Fine With Me? No login required for you or your friends Extremely fast and easy Totally and completely free I'd love to hear feedback, please post any comments to the Whatever Is Fi

Proposed Enhancements For Web Browsers

I was listening to Muxtape (quite possibly the best user interface for a web application). I use Firefox and I have lots of tabs open. Muxtape is playing the background, in another tab. Sometimes a song comes up on Muxtape that I don't like and wish I could skip, however, I'm in "the flow" and don't want to leave my current tab or application. I'd like to propose an enhancement for web browsers to simplify the interaction with tabs in the background. Web applications should be able to specify a small menu of commands which can be executed from the tab without having to pull that tab into the foreground. I'd love to be able to right-click on the tab and see options such as "Skip", "Pause", "Back", or "Repeat". This context relative menu is specific to each tab, and by clicking on any of the options, a Javascript function would be called. I envision this as easily specified as part of the larger effort of HTML 5