Sep 12 2008

Pin Your Footers The CSS Way

Category: Programming, Tutorialsstephen @ 7:59 am

I have been using a new CSS tech­nique for cre­at­ing fixed foot­ers – that is, foot­ers which pin them­selves to the bot­tom of the browser win­dow – with­out using JavaScript. Head­scape designer Ed Mer­ritt is the one who came up with the idea, and like most ele­gant solu­tions, this one is so sim­ple that I wish I’d thought of it. It really works.

Assum­ing your basic HTML lay­out markup looks like below:

1
2
3
4
<div id="container">
  <div id="content"></div>
  <div id="footer"></div>
</div>

… you can use the fol­low­ing CSS exam­ple to pin your footer:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#container {
  position:absolute;
  min-height:100%;
}
 
#content {
  margin-bottom:100px; /* same as footer height */
}
 
#footer {
  position:absolute;
  bottom:0;
  height:100px; /* same as content margin-bottom */
}

So, hack away. It’s not suit­able for every design, of course, but it just might help you get rid of that annoy­ing white­space below your footer, for instance on a content-starved page which ends up far short of the win­dow height.

Tags:


Aug 19 2008

Game Review: Ra

Category: Gamesstephen @ 10:41 am

Box cover of Ra

For my first review of a board game, I’d like to fea­ture a true clas­sic: Ra, by pro­lific game designer Reiner Knizia. Knizia has designed hun­dreds of board and card games, but among gamers, Ra is widely con­sid­ered to be one of his finest creations.

Box, board, and bits of Ra

Ra is a Eurogame with a pasted-on Egypt­ian theme. What I mean by this is that, in the end, it’s really an auc­tion game that could just as eas­ily have been about space ships, dinosaurs, or fine art. It could have been about any­thing else, and it would play exactly the same way. The game­play has lit­tle to do with Egypt, and the theme has lit­tle to do with what makes Ra a great game. The credit for that goes to the game’s core mechan­ics, and that is what places Ra squarely in the Eurogame camp: Its main focus is on the game­play itself, rather than the theme.

I’m review­ing the Überplay edi­tion of Ra, which I own. I under­stand that Überplay is now defunct, but Rio Grande Games has picked up the rights to pub­lish the next edi­tion Ra, and that print­ing will prob­a­bly hit shelves in 2009.

What’s in the box?

The board

In addi­tion to the nicely printed (and short) rules book­let, there is a board, a can­vas bag, “sun” auc­tion mark­ers, scor­ing coun­ters, a Ra fig­urine, and a bunch of card­board tiles (and by a bunch of tiles, I mean a whole lot of tiles).

As it turns out, the board is lit­tle more than a pair of “tracks” for auc­tion tiles to sit on. For­tu­nately, it’s not entirely point­less, as it also con­tains a sim­ple ref­er­ence that reminds how the dif­fer­ent types of tiles are scored. I sup­pose the only other jus­ti­fi­ca­tion for the board is its Egyptian-themed art­work, which can help rein­force an oth­er­wise weak theme. As I’ve already pointed out, though, the theme is of no real impor­tance to this game.

When you score points in Ra, you receive lit­tle “tablets” with quasi-Egyptian numer­als on them. They come in denom­i­na­tions of 1, 2, 5, and 10. A cool way to keep track of how many points you have through­out the game.

The auc­tion mark­ers are wooden “sun” pieces, num­bered 1 – 16. In an auc­tion, play­ers bid with these suns, and ties don’t hap­pen because there are no dupli­cate num­bers. The heart of the game, how­ever, is the enor­mous com­ple­ment of auc­tion tiles, and as I men­tioned above, there are quite a few of those. The dif­fer­ent types of auc­tion tiles you’ll come across are:

Pharaoh tiles

Pharaoh tiles

Nile tiles

Nile tiles

Flood tiles

Flood tiles

Civilization tiles

Civ­i­liza­tion tiles

Monument tiles

Mon­u­ment tiles

Disaster tiles

Dis­as­ter tiles

God tiles

God tiles

Gold tiles

Gold tiles

Epoch tiles

Epoch tiles

How to play (in a nutshell)

Ra is all about auc­tions. Every auc­tion gives play­ers a chance to win a set of tiles. The basic gist is that you can choose to do one of three pos­si­ble things on your turn:

  1. Draw a tile from the bag and place it on the board.
  2. Call for an auc­tion to begin.
  3. Dis­card one of your god tiles and claim a sin­gle tile of your choice on the board.

Scor­ing points

Ra is played in three rounds, or Epochs. An Epoch comes to an end when the Ra tile track fills up, or when every­one has played all their suns. At the end of each Epoch, play­ers score points for the tiles they own. The goal is to have the most points at the end of the game.

Else­where…

In the inter­est of (rel­a­tive) brevity, I won’t get into the details of the rules any fur­ther here, but BoardGameGeek has a down­load­able PDF of the rules for those that are inter­ested in learn­ing more about how the game works. The BGG forums for Ra are also a great resource to check out if you have rules ques­tions, or just want to read what other peo­ple have to say about the game. BGG also has a won­der­ful image gallery of peo­ple play­ing Ra, some of the play­ing pieces, etc.

Auction tiles

The Review

Ra is such a sim­ple, smart, easy-to-teach game. It’s just plain fun, and I’d rec­om­mend it to almost any­body, even many non-gamers. It plays pretty quickly, and the press-your-luck ele­ment is fan­tas­tic. Every­one I’ve intro­duced to Ra has loved it, too. Despite the loose-fitting theme, the game is still visu­ally rich. Yelling “RA!” when you want to start an auc­tion is a blast as well. I very highly rec­om­mend Ra.

I would say that the biggest hur­dle for new­com­ers to Ra would be pick­ing up on how some of the scor­ing works, but even that isn’t too cum­ber­some. There’s a cheat sheet on the game board that sum­ma­rizes the scor­ing very nicely, and it’s not too hard to get used to. Like most games, the best way to learn how to play it is to play it.

The bid­ding is stream­lined, and the other play­ers’ suns are easy to read across the table, so you will always have an idea of how likely you are to win those tiles you want. There are often plenty of oppor­tu­ni­ties to bluff or force some­one else to play their high sun too early, set­ting you up to win a big­ger auc­tion later. That is, if the Epoch doesn’t end first!

There is won­der­ful ten­sion in Ra. Play­ers are con­stantly bal­anc­ing the desire to wait and get the best value for their suns with the knowl­edge that they need to get what tiles they can before the end of the round arrives. The game is a tick­ing clock, and every­one feels it.

In con­clu­sion, Ra is one of my favorite games. It’s not a ter­ri­bly heavy or com­plex strat­egy game, and there is a bit of luck/chaos due to the draw bag, but it still rewards smart play most of the time. Most impor­tantly, it’s ridicu­lously fun, and doesn’t take all night to play. In the end, those two things are what makes it so much more likely to hit the table than some other really good games. Even if the Egypt­ian thing was just tacked on at the last minute.

If you enjoyed this review and would like to see more of them from me, please let me know in the comments.

Pho­tos by Kurt Keck­ley and Stan Mamula on BoardGameGeek. Many thanks, guys!

Tags: ,


Aug 14 2008

Picking Up the Bass Again

Category: Musicstephen @ 11:54 am

Now that's a rig In about a week, I’ll be play­ing bass again for the first time in about a year. I’m really look­ing for­ward to it. All things being equal – if I were to lose all my won­der­ful elec­tric gui­tar effects ped­als (toys) – I think I might even pre­fer bass gui­tar over electric.

Bass play­ers are often maligned. Many assume a bassist is prob­a­bly the least tal­ented player in a band. That may be true some­times, but that doesn’t change the fact that bass is just as vital to a band’s sound as drums, gui­tars, or any other instrument.

Bass is about keep­ing the bot­tom end mov­ing. It’s about paving a musi­cal road­way for the other instru­ments to travel on. As a gui­tarist, I have another rea­son to appre­ci­ate bass: with­out it, gui­tars sound weak and tinny. Bass epit­o­mizes unselfish musi­cian­ship on the sur­face, but under­neath, it is per­haps the most impor­tant instru­ment on stage. It’s sub­tle and sub­lim­i­nal, and enhances every­thing around it.

I find myself fol­low­ing the bass line more often than gui­tar parts when lis­ten­ing to music.

When I mix a live band, I usu­ally try to bump up the bass as much as pos­si­ble. Every­thing else sounds bet­ter with a good dose of bass. Like any­thing else, there can be too much of a good thing, but don’t be afraid to be gen­er­ous when dol­ing out bass. Your ears will thank you later.

Years ago, I sold my mon­ster bass rig. I used to own a 800W amp and an Aguilar 410 cab. I still have my funky Rev­erend Rum­ble­fish bass, though. It hasn’t been touched in I don’t know how long, and I antic­i­pate some clean­ing, re-stringing, and action adjustments!

Tags:


Jun 20 2008

ALA: Faux Absolute Positioning

Category: Programmingstephen @ 8:20 am

One of my favorite web pub­li­ca­tions, A List Apart, has pushed an arti­cle about a new CSS lay­out tech­nique that the author, Eric Sol, calls Faux Absolute Posi­tion­ing. Up until now, I’d always relied pri­mar­ily on float­ing divs. Other folks pre­ferred using (real) absolute posi­tion­ing, but that required the use of JavaScript to keep the footer from smoosh­ing things.

For grid­tas­tic designs, this new tech­nique appears to be the best answer CSS has to offer yet. The ben­e­fits of absolute posi­tion­ing, but using rel­a­tive posi­tion­ing + neg­a­tive mar­gins so as not to break the lay­out. I plan to try this out on future sites I work on, so I with­hold final judg­ment, but as things look right now, Eric Sol will end up as my new CSS rock­star hero.

Tags: , ,


Apr 23 2008

Amateur Hour Over at TechCrunch

Category: Generalstephen @ 11:57 am

My response to Michael Arrington’s igno­rant story blam­ing the recently departed Blaine Cook for Twitter’s problems.

Crit­i­ciz­ing Twit­ter and cru­ci­fy­ing a depart­ing Twit­ter engi­neer are two entirely dif­fer­ent things. Tak­ing one of his pre­sen­ta­tion slides out of con­text, con­jec­ture, sup­po­si­tion, lack of any cred­i­ble wit­nesses or evi­dence… This isn’t news, it’s a snipe at a guy who knows a hell of a lot more about his job than you and your 2 Rails bud­dies. What do you have to gain from attempt­ing to soil Blaine’s reputation?

“Sit­ting next to” Rails devel­op­ers does not equate to knowl­edge about scal­ing the highest-traffic Rails app there has ever been, any more than my hav­ing John Resig’s JavaScript book sit­ting on my shelf makes me a JS ninja.

This story is a bla­tant smear job, noth­ing more. We’ll see who looks a lit­tle dumb when Twitter’s prob­lems — which you don’t under­stand — con­tinue long after Blaine’s departure.

I par­tic­u­larly liked Jeremy McAnally’s well-worded responses in the com­ments. They sum up every­thing that is wrong with Arrington’s post:

Wow, this is the most unnec­es­sar­ily vit­ri­olic arti­cles I’ve ever seen. Twit­ter and Blaine took Rails to places it hadn’t been before in terms of scale and traf­fic (just as other sites did with PHP, Java, Cold­Fu­sion, and so on), and so act­ing as if he’s some unskilled hip­pie that didn’t know what he was doing just makes you look like an idiot. Sure, they had some bumps along the way, but no one else had even got­ten on the same road as them to encounter the bumps. Being forced to fig­ure out things along the way because no one has done them before doesn’t make you an “amateur.”

Even fur­ther, what the heck qual­i­fies you to crit­i­cize someone’s abil­ity to scale a web­site or doing any­thing remotely tech­ni­cal for that mat­ter? You’re out of your league. Please stick to talk­ing about busi­ness or whin­ing about some­one not giv­ing you ad money.

and later:

If you think your Rails guys or gals have their “fin­gers on the pulse of the Rails com­mu­nity” and they think that Blaine is Twitter’s prob­lem, then they’re lying to you. Peo­ple who, like, actu­ally know Blaine and other Twit­ter­ers can offer you much bet­ter infor­ma­tion rather than base­less, ad money dri­ven dri­vel. I can put you in con­tact with them if you drop me an e-mail (or I’m sure that Coda would be very happy to offer you any details you want).

Of course, inves­ti­ga­tion prob­a­bly isn’t your thing since you don’t know much about journalism.

Indeed, it’s totally unac­cept­able that this kind of tripe passes for respon­si­ble jour­nal­ism. Oh wait – it doesn’t. Per­haps peo­ple like Michael Arring­ton are part of the rea­son more legit­i­mate blogs don’t get their jour­nal­is­tic kudos.

I don’t sub­scribe to TechCrunch, and frankly, after this dis­play, I’m not about to. There are plenty of peo­ple Arring­ton could have asked to get the straight scoop, like, you know, a real jour­nal­ist would have.

Some would say that exag­ger­a­tion and over­state­ment is nec­es­sary to make an impact. Per­haps, but at what cost? A person’s rep­u­ta­tion? For what pur­pose? To infu­ri­ate con­sci­en­tious geeks? To gen­er­ate a few hun­dred extra click-throughs? To wield power great and terrible?

Do your home­work, don’t stomp on peo­ple who don’t deserve it, and the blo­gos­phere will be a much more civil and har­mo­nious place.

Tags:


« Previous PageNext Page »