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.
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.
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.
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…”
I’m reading Programming Ruby: 2nd Ed. and an example on page 57 has captured my attention. (Code slightly modified for brevity)