Human-Readable ActiveResource URLs
Code: , , , , , , , , , ,
1 comment

I’ve got URLs on the brain this week. I started NearbyGamers using Rails 1.1 with just gamers and tags. I upgraded to Rails 1.2 (and liked it)
, and added discussions after I updated to Rails 1.2. I was able to use ActiveResource for Discussions with Posts as a nested resource. I’m really happy with this code, as it’s very tidy.

Continue this post

Tidy Stylesheets in Rails
Code: , , , ,
No comments

It’s very easy for a site’s CSS to grow a single giant, brittle stylesheet. It becomes impossible to change anything because of bizarre interactions between elements, unexpected interactions, and simply because it’s just too big for anyone to understand. Much of programming is managing complexity, and I’ll share a nice technique in that vein.

Continue this post

Sock Strategies
Life:
5 comments

Fox in Socks

It’s easy for socks to go missing, and it’s annoying to have to match up socks. My girlfriend and I have developed two entirely different strategies for dealing with these eventualities.

Continue this post

Ripping Unicode
Code: , ,
3 comments

some unicode glyphs
I love shoving around large amounts of data. Unicode is an industry standard for encoding data in most every written script there’s ever been. It has over 97,000 characters. A while ago I read about a guy who made his own Unicode poster and I realized I had an opportunity for a fun project. I think Unicode is an invaluable and beautiful project, and this is my tribute to it.

Continue this post

Developing With Evil
Code: , , , ,
No comments

Continue this post

Ripping Unicode at ChiPy
Code: , ,
1 comment

Last night at the June 2006 ChiPy meeting I gave a presentation on how I wrote a few small Python scripts to take apart the Unicode PDF of all its glyphs and recombine them into giant ascii-art-like posters.

Continue this post

Building a Site With Clean URLs
Code: , , ,
6 comments

As an aside in my post about Cambrian House I posted some code for making pretty URLs. A few people (no, not CH) have asked for a little more info, so I’ve written up an explanation of that code.

Continue this post

Writing and Formatting
Life: , ,
No comments

I just read a good post on Gadetopia about writing skills and had a small correction to offer. Go read it and come back (and read the two linked posts about Word and Frontpage use). I’ll wait.

Continue this post

Ruby Blocks and Blocks
Code: , , ,
7 comments

I’m reading Programming Ruby: 2nd Ed. and an example on page 57 has captured my attention. (Code slightly modified for brevity)

Continue this post

Sociable Is The New Black
Biz: , ,
15 comments

One of the problems Sociable has is that it can be incredibly tacky. Yes, speaking as officially as possible, I’m saying lots of links to social bookmarking sites at the end of your posts are ugly. So let me address why I wrote a plugin that’s easily used to make blogs ugly.

A lot of web surfers have never heard of social bookmarking sites (SBS). Gasp, shock, horror, not everyone is up-to-date on the web 2.0 meme. I put a little introduction to SBS in the hover text for newbies, and deliberately didn’t make it editable through the admin interface so that it wouldn’t get changed into a thousand variations on “OMG CLIK & MAK MY BLOGG POPULER!”. Users can (and do) edit it in the PHP, but as Sociable users are not especially technically savvy it’s uncommon.

More experienced users say linking to SBS is hammy because not every reader uses them, because the sites provide their own bookmarklets and plugins, etc. I don’t disagree. Sociable exists because blog authors want more traffic and SBS are a great way to get it. Sociable exists for the same reason grocery stores put candy in the checkout lanes and Amazon lets you buy books with one click: as soon as readers finish a post they’re reminded they can share it with others, it’s the web 2.0 equivalent of the impulse buy.

I wrote Sociable because I wanted to add those links to the bottom of my blog posts. I thought writing a WordPress plugin would be fun, and other people might like to use it. With all that in mind, let me talk about the graphic design decisions I made.

By default, Sociable only adds icons to posts when they’re displayed on individual pages and not on the front page, archives, search results, or feeds. A whole lot of users set Sociable to display everywhere with predictably bad results. I added this option because I’ve seen blogs that don’t have (or don’t prefer to use) pages for individual posts, just archive pages. I weighed this decision heavily but decided in this case that it’s better to support more users than stop all users from shooting themselves in the foot. (This option is a pretty good analogy for the different design philosophies behind Unix and OS X.)

The other big default is to show all SBS icons, and it’s getting worse and worse. New SBS contact me about once each week to get added, so pretty soon the default is going to pass from humorous overkill into a sprawling mess. (And let me parenthetically tip my hat to the folks who’ve realized it’s intentionally silly.) I’m not sure what to do about this one yet. If I have them all off by default, I’m going to get inundated with mails from people who’ve installed it and rightly say it doesn’t work out of the box. Bad first experience. If I turn on only the most popular few by default, there’s an ugly “rich get richer” effect. I haven’t thought of a good solution and would appreciate advice.

Lastly, I tried to keep the visual clutter down as much as possible in the default CSS. There’s a caption, and then the icons without adornment, period. The CSS even has to deliberately strip away a lot of visual styling that different blog themes would otherwise add. Most of the noise comes from the fact that the sites’ icons are all visually dissimilar with different color palletes. Any random blog is guaranteed that most of them won’t match the blog theme, let alone each other.

At the moment I’m looking at it as a good incentive for blog owners to prune down the number of sites they display, but it probably needs more help. One user had a creative solution to display icons in grayscale until they’re hovered over, and I’ll include that feature (probably in the next version).

I hope I’ve addressed the valid concerns of critics, and I appreciate any advice for further improvements.