Thursday, 27 March 2008

Code horror

Here's something that was brought to my attention this evening, when I should be working on encounters for a Friday night WFRP game... no, instead I'm working. Literally. On a production problem. For my employer.

Scenario: a badly written stored procedure has a race condition. Instead of fixing the stored procedure, get the web geeks to fix it on the front end with Javascript. Problem: double clicking a submit button inserts duplicate records in the backend. Solution: stop users from double clicking, because fixing the database or the stored procedure is not the place you want to fix this problem. Whatever.

Assignment: get a flunky in a remote production support facility (we haven't left the US, fortunately) to craft a Javascript function that would prevent the form from submitting twice.

var submitted=0;
function checkAlreadyDone() {
        if (submitted < 2) {
                document.forms[0 ].submit();

There are a couple of problems with this charlie foxtrot. The first being the zero-indexed variable and the boolean check for less than 2! WTF? is that. Why not a boolean? It's easier to read. Now I have to do math to review the code. It's true or false! The second is I have think about what the variable state is on the round trip of the submission. 0, now 1, or less than 2. It changes to often.

I wanted to cry. And not just because the really broken code: the stored procedure and the database aren't going to be corrected, but because this is just badly written. The flunky never even requested a code review, never tested it because the call to the forms array was submitting the wrong form and creating a Javascript error in the browser! and basically broke the functionality of the page for over 6 million users.

Posted by caffeinated at 10:37 PM in 0xDECAF

New York City!? and nerd flattery

So, the reason I was in New York City is unveiled: job offer.

I'm gainfully employed as a web application architect at an international consumer credit issuer, but was “tapped” by a former coworker to come over to his new employer. Not one to idly dismiss such an overture, I joined him in New York to meet his bosses.

It went well. An offer was made.

A “fight” ensued between the two corporate giants... over me. A nerd.

Antes were raised.

My current employer won. But not because of money alone. Because I genuinely like working there. I have truly cultured deep friendships there. And while some of those same friendships have left for the company that tapped me, I think my decision makes the most sense for me. There were times in the last 24 hours, as I told my director, on conference calls, where I threw my hands in the air and asked, "why would I want to stay here, the person on this call builds technology like it was the Russian space shuttle1," but I would have those same calls at the new place I guess.

Well, I had to get this off my chest. I have been flattered in the last couple of weeks since my visit to New York City. Just doing my job as best I can, making the best decisions I can for those that pay me. And tiptoeing too. I don't want to burn bridges.

I can be the worse at tiptoeing. I can keep a secret, but I walking on eggshells, I always break a few...

meta-footnote-1=That's right, I slammed the Russian space shuttle program, trying to invoke stereotypes of cold war behemoth machines, mighty industrial visions of the simple ideas. Maybe there's a better stereotype. Whatever the metaphor, that's how this guy builds systems. I want to tell this guy The KISS Principle is not a band.
Posted by caffeinated at 6:21 AM in kaffehaus

Monday, 24 March 2008

YUI and the missing 25-50-25 grid

For a while now I have struggled with the lack of a "25%/50%/25%" grid template in the YUI. It seems like such a natural template, one might say it is ubiquitous on the web.

Alas, the developers of the YUI have conspicuously left it off. There is a hack out there that provides the said 25/50/25 template, but nothing official. There is only silence in the last minor releases since I began wondering about the absence.

Recently it dawned on me why it is absent, in the context of a larger design decision built into the YUI Grids: the IAB factor.

You will find templates specific to all the IAB standard ad sizes. You will find grids and nested grids that are built to accommodate the IAB ad sizes. In fact, one might argue that the absence of the 25/50/25 grid is because, for Yahoo!, such a template does not make sense in the context of what the IAB, and so many web advertisers, define as standard.

This actually goes to another criticism, tangental to YUI Grids, said about YSlow: "Yahoo!'s problems are not your problems."

True enough.

Yet I would counter and say, why should you consider the need for 25/50/25, or Yahoo! consider, given Google Ads and other click revenue options likely to be employed on the most personal or the most commercial website you can fathom? You should be building your sites with the IAB in mind.

Maybe Yahoo! is quietly prodding you, and me. By design.

Posted by caffeinated at 10:50 PM in Bohemian Breakfast

Thursday, 20 March 2008

My YUI Wall


Posted at 10:47 AM in bad cell

Tuesday, 18 March 2008

A WFRP Conspiracy Theory

I recently stumbled across something perusing the internets that metaphorically had me grabbing a pencil and drawing conclusions. And yet there could be something to the theory that I'm about to posit. No one else, to my knowledge, has drawn this conclusion, so this might be a blogging scoop. Pay attention, then comment, call me a kook if necessary, but I think you will come to the same conclusion I did.

Games Workshop lined up Fantasy Flight Games for WFRP development at least six weeks in advance before announcing the closing of Black Industries, throwing Green Ronin and Chris Pramas under the bus.


On February 22, 2008, GW and FFG made joint announcements (here and here) revealing the licensing deal. Four weeks, almost to the day, after the GW announced the closing of Black Industries on January 28, 2008.

On February 23, 2008, Chris Pramas—who called WFRP "one of my favorite RPGs of all time"; the second edition a testament—candidly revealed what was happening at Green Ronin in those four weeks. Pramas said of Green Ronin's good faith inquiry to GW about the WFRP licensing and the FFG deal:

...No one at GW warned me that a deal was going to happen this fast. I wasn't give a deadline for the proposal, or a heads up that they were close to signing with FFG. After having had a close business relationship with GW for over three years, I was surprised that the negotations were handled in this way.

I now believe that GW and FFG had inked a confidential deal as early as December 2007! Whether anyone at Black Industries knew this is unknown, but I would find it highly unlikely. You're asking, "what is the evidence of this top secret deal?"

Evidence by Accident

Michael Hurley, "one-of-the-new-editors-technically-the-senior-editor," at FFG posted an innocent "rant" on December 12, 2007 on the FFG "Rant" page about iChat status options and FFG projects. Michael included the shown screen grab of his "entire iChat status menu" as Exhibit A.

Note one status is greeked and stamped "Top Secret." WTF?

It is this innocent post, but conspicuous attention grabbing mark up of the screenshot that started the cog works of my mind chewing up inputs over the last 2 months and producing the thesis of my conspiracy theory. The "Top Secret" mark is boastful in some ways. Encoded in the boast, almost like a three-letter agency hack posting a Word document and not scrubbing it for change tracking data, is "hindsight" information. Just what would have been "Top Secret" leading up to a bombshell announcement such as Black Industries is closing its doors and WFRP is going dark... again? Even the effort to hide the project would raise questions. FFG could take away the importance of internal project code names (avoiding such possible leaks)?

I put this out there for your examination. But it is my belief that FFG had WFRP, and much more, locked up well before the announcement and had started working on proposals and books. It backs up too how quickly the deal was made, explaining to Pramas, who believing the GW licensing lead, "would take [GW and Black Industries] several months to sort [licensing inquiries] out."

For Green Ronin and Chris Pramas emails would bounce and everything would "happen to quickly."

It's easy to connect the dots. ~o)

meta-photo-album-thumbnail=topSecretThumb.gif meta-photo-album=hurley-ichat.jpg
Posted by caffeinated at 10:46 PM in d10

Monday, 17 March 2008


I love stumbling across a well implemented, open-source, project that does something extremely well. Especially, if it's written in Java.

Today, after reading a rant on a forum about something unrelated, the developer mentioned JForum. The ‘J’ of course a cue to its pedigree.

If you're looking at a forum for your website, JForum looks pretty robust. Check it out.

Posted by caffeinated at 10:22 PM in nerdery

Wednesday, 12 March 2008

'bad cell' working again

Funny how things work, then quit working, then start working again.

I was in New York today. Stealth Mode. Confidential. There may be an announcement later.

I happened to walk out the building I was in and looked up to see the Empire State Building. Cool. Snapped a shot with my shitty camera phone (still holding out for my contract to end to get my iPhone).

Posted by caffeinated at 10:09 PM in kaffehaus



Posted at 9:33 PM in bad cell

Sunday, 9 March 2008

GM Wiki

I'm running a "localhost" instance of JAMWiki for my WFRP game.

I love JAMWiki already... a Java implementation of MediaWiki. Solid. No DB required. Drop into Tomcat, and booya!

I have templates now for character stats, in the fashion of the standard sidebar callout, with parameters, and more.

A wiki is an awesome tool for GMs; the contextual linking is just natural extension of the game notebook. If you GM, you should give your favorite wiki tool a spin.

Posted by caffeinated at 11:30 PM in kaffehaus

Saturday, 8 March 2008

Fantasy Flight Games is hiring a WFRP developer

Enjoy the worlds of Warhammer and Warhammer 40K? Want fame among the hordes of RPG players that enjoy the same worlds? Check out the call for a game developer at FFG.

The job posting is here (PDF).

The compensation is, well, for a passionate lover of RPGs and WFRP specifically. I would gladly do it part-time for the posted salary; it would be to significant a paycut otherwise.

Though, if FFG is listening, I also do web server administration, web architecture procurement and design, web application development and design (HTML, J2EE web-tier, Ajax integration, and much more). Got a design that needs integration into a web application architecture, say, some Photoshop comps for the new WFRP and W40K websites? I do that and guarantee a valid HTML response using the best practices of accessibility and CSS. And so much more. Contact me. Seriously.

Posted by caffeinated at 8:32 AM in d10

Friday, 7 March 2008

WSJ on the passing of Gygax

In case you missed the Wall Street Journal article on the passing of Gary Gygax, check it out.

On the rise of MMORPGs I could not have said it better: the risk of sounding like a geek and a curmudgeon at once, in my day we did it the old-fashioned way. In all likelihood we were in somebody's basement, sitting around a table with our dice at the ready and our character sheets in front of us.
Posted by caffeinated at 7:55 PM in d10

Tuesday, 4 March 2008

Gygax Dead at 69

A fitting day... GM Day. March 4, 2008.

I could pontificate for 5000 words on this, but I'll spare you, and the soul of Gary.

Suffice to say, I'll remember that Gary could laugh with you, at himself, and the hobby that he helped found in D&D.

I remember most recently an episode of Futurama where he was a "member" of Al Gore's Vice Presidential Action Rangers. At the end of the episode, Gygax asks the Vice Presidential Action Rangers, "Who wants to play Dungeons and Dragons for the next quadrillion years?"

'nough said.

Posted by caffeinated at 9:10 PM in kaffehaus