Friday, 29 February 2008

WFRP is dead, long live WFRP

Looks like Fantasy Flight Games inked a deal (PDF) for the licensing for WFRP from Games Workshop.

I have some mixed feelings about that...excited that my favorite RPG is going to live on after Green Ronin. But not sure if FFG can live up to the passion and production value of Chris Pramas and Green Ronin. I don't know because I'm not familiar with FFG. I harbor worry because FFG is vested in d201. Ugh. Don't “d20” WFRP, because I won't buy it.

Update

WFRP is not going to be “d20'd”. From FFG's words to your eyes, thank God. I don't think I could have stomached a “d20’d” version of WFRP

Chris Pramas posted a open letter as to what happened between Green Ronin and GW. It hurt to read it.

meta-footnote-1=d20 is the foundation, and the basis for the OGL, Open Gaming License, system; think GURPS for D&D system aficionados.
Posted by caffeinated at 10:30 PM in d10

Sunday, 24 February 2008

Updating AWStats when changing a domain

I recently had the need to update an awstats installation on a website. The website had not changed, but the domain name had. CNAME in place, I needed to move the statistical information over so that all of the previous history—three years of it—came with it.

A very simple UNIX command facilitated the move: rename.

awstats stores the records is a proprietary flat file database based on the domain name. Where the data is stored is configurable, so I won't detail this, it might be different for you.

I backed up the files in /tmp and executed the following rename command, in the directory storing the record files:

% rename newDomain oldDomain awstats*

Done.

Need awstats services? Email me, I'm always looking for a little extra cash.

Posted by caffeinated at 5:56 PM in nerdery

Wednesday, 20 February 2008

Hack YSlow to ignore CDNs, a HOWTO, part deux

So in my first installment, I showed you how to configure Firefox to "grade on a curve," pointing CDNs at "100" when you are not using a CDN, or have no short/long term needs for a CDN.

The configuration method is by far the easiest.

But what if you want to do as Steve Souder points out in the Rule 2 discussion, "ignore or weight CDNs differently"? This will mean you will have to invasively hack YSlow. This option may not be for the faint at heart. Additionally, you have to consider that weighting or ignoring CDNs in YSlow will negatively affect your score. And in the end you might just want to wait for Steve's YSlow update.

How YSlow Works

YSlow uses a weighted averaging scheme. I won't explain what this means, but suffice to say your YSlow score is not averaged against 13 rules, but an effective 64 rules. You can find the default weights in yslowcontext.js.

  this.lintweights = { "NumComps"  : 8,
                       "CDN"    : 6,
                       "Expires"    : 10,
                       "Gzip"    : 8,
                       "CssAtTop"  : 4,
                       "JsAtBottom"  : 4,
                       "Expression"  : 3,
                       "ExternalFiles"  : 4,
                       "Domains"    : 3,
                       "Obfuscate"  : 4,
                       "Redirects"  : 4,
                       "JsTwice"    : 4,
                       "ETags"    : 2
                     };

By example, CDNs are weighted "6". This means that a score of 0 is 0, or a score of 100 is 600. So setting a weight of 0 will goose egg your average, and so on. Removing CDNs from the equation changes the number of items, weighted of course, to average against.

Enough math. Now, what to do, what to do?

Method 1, Simple Weighted Average

Finding the yslowcontext.js file will be an exercise for Windows users, but simple enough. The file is located on a Mac is in the following location:

/Users/{user.name}/Library/Application Support/Firefox/Profiles/{profile.name}/extensions/yslow@yahoo-inc.com/chrome/content/yslow/yslowcontext.js

The location is nearly the same on Windows and Linux, just substitute your "Documents and Settings/Application Data" folder and user home as appropriate.

Locate the lintweights object and change the property for CDN to "0". Save, restart Firefox. CDNs are effectively ignored.

But like my first post, the noise is still present about not having a CDN, etc. What about actually changing the behavior of YSlow to truly ignore the CDN rule, removing the noise? It can be done, and is more invasive. Caution, all ye that read further...

Method 2, Alter YSlow Messaging and Averaging

Instead of changing the weighted average, we can add 1) a Firefox configuration and 2) a conditional branch in the lint.js file where YSlow builds the presentation in Firebug. Here we go...

Step 1 is to create a new boolean preference in Firefox. This is not unlike the earlier post:

  1. Type "about:config" in the location bar
  2. Right-click in the window and select "New > Boolean"
  3. Create the preference: name: extensions.firebug.yslow.ignoreCDN, value: true.
  4. Restart Firefox

Step 2 is to hack the lint.js file to do actually do the "ignoring" part, and present a friendly message when using it.

Find the lint.js file, it is in the same location as yslowcontext.js and back it up.

Around line 80, you will find the function that builds the CDN report. Simple study will show that it loops over the components of the page reported to it from Firebug, appropriately adjusts your score and moves on.

We are now going to wrap this behavior in an if branch based on our new Firefox preference. At line 86, some context provided, insert the following:

...
hLint["rulehref"] = "http://developer.yahoo.com/performance/rules.html#cdn";
if( YSLOW.getPref("yslow.ignoreCDN", false) ) {
   // you will be adding some code here later   
} else {
var compObj = {};
...

Whew... what is happening here? Basically, we are telling YSlow that if you don't a preference for ignoring CDNs, assume it is false and execute the else statement. Which is where the original code is now blocked at line 88. Let's make sure we don't break this function and close the else block at line 140:

   ...
   FirebugContext.yslowContext["lintscores"]["CDN"] = iScore;
   }
   return hLint;

Now, it is time to tell YSlow how we want it to behave when ignoring CDNs. We are going to borrow liberally from Rule 8 and it's code. Insert the following, copy and paste if you desire, the following at line 87 (shown above as "blank"):

   hLint["nonwarnings"] = "Only consider this if your property is under heavy load, for example from file sharing and streaming media; may not be applicable to small and medium properties.";
   hLint["score"] = "n/a";
   // This rule should require manual evaluation. Don't score it automatically.
   // FirebugContext.yslowContext["lintscores"]["CDN"] = iScore;

Note, line breaks are for readability, see line numbers. Lines reflect the new code inserted.

Save and restart Firefox.

Have fun

Finally, one might wish to clean up the code and indent the new branch, for readability. Or not. It works as is. Comment on your experience or make suggestions.

Posted by caffeinated at 8:38 AM in nerdery

Monday, 18 February 2008

Hack YSlow to ignore CDNs, a HOWTO

I went code diving tonight as I wanted to test ACD and a few other websites with Steve Souder's YSlow, a Firefox plugin to Firebug, for grading performance of websites against his 14 Rules for High Performance Web Sites.

Seems that Rule 2, "Use a CDN" is so important that YSlow does not take into account a simple matter: most websites a) don't need the overhead, b) most webmasters can't afford a CDN, and c) most websites don't need the overhead. Free or not.

While Steve has stated an update to the tool will better allow the configuration of Rule 2, it currently is not possible to "ignore" Rule 2. If you don't use a CDN, you are given a big fat goose egg ("0") and your website score is appropriately noted in the average.

Some code diving revealed that preference to YSlow is available, undocumented, that will allow you to get full credit for a CDN, even if you don't use one. Follow these steps to "be graded on a curve":

  1. Type "about:config" in the location bar
  2. Right-click in the window and select "New > Integer"
  3. The preference name is: extensions.firebug.yslow.pointsNotCDN, value: 0. Type it precisely as shown here.
  4. Restart Firefox

You still are told "Use a CDN" but now you get an "A." And you didn't have to study, or really cheat... much.

Hope this little gem is helpful. ~o)

Posted by caffeinated at 10:33 PM in nerdery

Sunday, 10 February 2008

Warhammer meetup

I went to a local Warhammer table top club today. The Icehouse Warriors.

What a great group of people. Made a few friends in the short hour I was there, may have picked up a WFRP player too.

Very talented mini painters all around. The one shown is a Tau army fielded on a Warhammer 40K table.

Kudos to Jesse for the organization and for providing an excellent space for gaming. Thanks for hosting me guys. Well met.

meta-photo-album-thumbnail=tauThumb.jpg meta-photo-album=tauLine.jpg
Posted by caffeinated at 8:32 PM in d10

Saturday, 9 February 2008

Warhammer Fantasy Roleplay not likely abandoned

I'm late hearing the news. Again.

First the release of WFRP 2nd Edition. Now, with the news that Black Industries, an imprint of Black Library Publishing, is out of the RPG business.

I don't know how I feel right now. I'm saddened, almost heartbroken. Is BLP (BI) leaving me to whatever crap WotC wants to press upon me? Not likely. But at the same time I'm not as angry as Mike at hackslash.net.

I have weathered this before and remained a fan of the setting and the game. The WFRP renaissance of the last three years has been good to me. Many other fans are speaking out too, disheartened but not discouraged. There are licensing possibilities that may keep the WFRP on the shelves for years to come, like what of Green Ronin? Do you read me Chris Pramas?

My hopes are not dashed. My spirit not crushed. Long live WFRP. It will remain my favorite game and setting. Chris Pramas did more that a great job resurrecting it from 1st Ed. His work is richly detailed and greatly advances the system that was clunky in 1986.

Green Ronin... are you listening?

Posted by caffeinated at 7:40 PM in d10

Thursday, 7 February 2008

But it was bizarro porn...really.

I have taken to listening to Fear The Boot. FTB is a table-top gaming podcast, mostly focused on role-playing games, like Savage Worlds and D&D. I'm not a D&D player, but, as you know readers, dabble a bit.

Well, FTB was talking about two videos circulating the Internets: Shake That Bear and Two Girls, One Cup.

The latter is probably quite disturbing, and possibly the most repulsive act ever caught on film; the descriptions alone left me queasy. YOU'VE BEEN FOREWARNED. Instead, go watch the John Mayer parody, it's much safer.

The former, Shake That Bear is not as disturbing, but just bizarre. Think snuff film for hunters.

Well, I went to watch Shake That Bear last night (I couldn't stomach the idea of even considering Two Girls, One Cup). I left the movie open on my computer and put the computer to sleep.

In a pair programming moment at work today, I took my computer over to a coworker's desk, opened it, and was greeted with the frozen frame of a naked woman. Opps! Thankfully, it wasn't playing (no internet connection). I quickly closed the window, probably blushing; very embarrassing. To my coworker, I'm sorry. He's a cool guy, but it was a work environment.

You can't explain that away. Ok, it was porn. But not like, I'm surfing for porn, as much as it was an out-of-band event.

Never mind. Playboy, I'm told, has some great articles this month.

Posted by caffeinated at 11:04 PM in kaffehaus