Add Feed Discovery Links Easily
Code: , , , ,
Comments Off on Add Feed Discovery Links Easily

I’m working on discussion forums for NearbyGamers and I’m building the first feeds into the site. I worked up a clean way to add them from my controllers similar to my tidy stylesheets code. Here’s how to do it.

Continue this post

Colorizing Rails Test Output
Code: , , , ,
No comments

I love making things easier to read, to skim, to take in at a glance. At last night’s the ChiRb presentation on rspec I noticed the output was nicely colorized.

Continue this post

Announcing NearbyGamers
Biz: , , , , ,
1 comment

I’d like to invite you all to check out my newest project, NearbyGamers, a service for tabletop gamers to find other players. (As I mentioned earlier, it’s a Rails site.) It’s for people who play RPGs, CCGs, TCGs, wargames, board games — basically any game where you need to have a live human on the other side of a table if you want to play.

Continue this post

Making Valid XHTML Easier
Code: , ,
2 comments

I’m working on a Rails site in my Copious Free Time and I wanted to share a little way that Ruby made my life easier. I’m making my pages valid XHTML 1.0 Transitional because it makes life easier to find bugs and it just feels good to know I’m meeting the spec.

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

Strings are a Domain-Specific Language
Code: , , , ,
No comments

Question: Isn’t a domain-specific language just the same thing as a library?

Source: Pretty much everyone the first time they hear of DSLs.

Answer: No, a DSL is much more than a library, and I have an example that won’t make you say, “Well, sure, if you’re doing something that esoteric…”

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