Kevin Marsh

sitesmetric Progress

I’ve gotten a respectable amount of work done on sitesmetric, insofar that it actually downloads data (intelligently) and displays it (somewhere intelligently)

Sneek a peek:

Head on over to sitesmetric to signup and be notified of the beta program, opening soon!

Another Project, or, Introducing sitesmetric

Yes, I’ve started yet another project. I’ve got tons of cycles spent on this, so I hope to be able to execute a really simple v1.0 and get it launched ASAP. The splash page is up. Go check it out in another tab... I’ll wait.

One interesting aspect of this project has been the planning. The really early conceptual stuff I did on MindMeister. What a great way to hammer out all the aspects of an idea you have kicking around your head. MindMeister allows you to be as broad (I started with a quick elevator pitch) or as deep (schema, models, controllers) as you want.

After this step, I used Fireworks CS3 to mockup some screens. Now, I thought Fireworks was just Macromedia’s wimpy Photoshop clone but since Adobe swallowed it, I think it’s trying to be a rapid prototyping tool. Which is fine by be, it worked great. I’ve never really worked with anything at this stage that let me mold pixels as easily as putty:

Without divulging too much, of course, here’s the pitch. (There are still some legal issues I’m working out with the largest search engine company.) It grew out of my frustration of trying to keep track of all the loose ends of various sites. dotfiles, lifemetric, taglol, this blog; they go on and on. All the information I needed wasn’t all together, so stuff randomly fell through the cracks and I didn’t know about some of the things I probably should have. I hope sitesmetric will fill this gap.

So imagine sitesmetric as being the one place you can go to see the latest traffic trends; mentions on sites like Digg, Slashdot, reddit, etc.; keyword positions; domain registrations; hosting details; and so on.

In the coming days I hope to share some more mock ups and comps.

Merb Asset Helpers

Merb, like Rails 2.0, sports some very flexible asset helpers. But Merb’s asset helpers bring a whole lot more to the table in terms of flexibility, speed, and features. Kinda like Merb itself.

Take js_include_tag. Sure, you can just throw it in your application layout and include some Javascript on every page like you would with Rails. You can even “bundle” all your Javascript assets. No, not manually. Merb is smart enough to give you the flexibility of separate files in development mode, but give you the extra speed boost in production mode. This is probably old news to a lot of Rails developers that haven’t been under rocks for the past year.

But, Merb gives us even more flexibility. What if you want to minify your Javascript? Merb supports asset bundler callbacks, which let you run some code after a bundle is created:


  Merb::Assets::JavascriptAssetBundler.add_callback do |filename|
    system("/usr/local/bin/yui-compress #{filename}")
  end

Pretty cool huh? Now, you could come close to this in Rails with something like PackR but it gets better:

If you’re the kind of web ninja who keeps their Javascript or CSS separated, it may be kind of cumbersome to figure out which assets you should be including and when. Not with Merb. Enter include_required_js and include_required_css. Throw these two methods in your application layout and you now have the flexibility to specify what Javascript or CSS files to include for what view. In the view. Where it makes the most sense:


  <!-- application.html.erb -->
  <html>
    <head>
      <%= include_required_js %>
      <%= include_required_css %>
    </head>
    <body>
      <!-- SNIP! -->
    </body>
  </html>


  <!-- list.html.erb (or any view or partial, really) -->
  <% require_js 'auto-complete' -%>

I can see this making a lot of sense for including something like Javascript auto-completion or calendar popups only on pages that actually require them. Which is a huge win for the other, say 90%, of your pages that don’t require the Javascript file to be present.

P.S. Props to the Merb team for creating clean and well-documented code that makes finding gems like this easy (and maybe even a little fun) to find.