Monday, 17 September 2007

More about why Java engineers should not code HTML

When writing JSP custom tags Java developers should avoid writing HTML attributes to the response. There are a lot of examples of this in Struts, but what prompted this post is special.

We had need to set autocomplete="off" in some secure forms using a custom tag written c. 2000. A seasoned Java developer felt this could be supported in the custom tag easily enough through a tag property.

Wait for it…

The new property was autocomplete. The property accepted two values: (true|false). This would of course be written then as autocomplete="false" if the desired output was autocomplete="off".

WTF?

There are at least two problems with this: 1) it is completely unmaintainable, 2) it is useless. The former is more important than the latter.

Visiting this code for the first time I thought some HTML developer got the attribute wrong, setting false where he/she meant off. Instead, I learned that the custom tag used this as a property to produce the corresponding HTML form attribute autocomplete="off". Being a Java programmer, I actually looked at the tag class source code to figure this out; making my point that it is unmaintainable for most front-end developers.

My latter point is: why have this tag property at all? There is a concept of pass-through attributes in most JSP frameworks, like Struts, Stripes, even JSF. Even if the developer had to add this property, why change the standard—yeah, autocomplete is not W3C, but it is adopted by all major browsers for the form element (except Opera)—and just handle the values (on|off) in the tag class appropriately. It’s just like an engineer to actually use the HTML attribute, but change the value to use a boolean literal.

Then there are the Java programmers that confuse an HTML attribute with a JavaScript property... sorry dude, form.autocomplete="off" will not work. Ugh.

Posted by caffeinated at 10:35 PM in nerdery

Saturday, 15 September 2007

I hate the Visa PayWave TV ads

Hate is such a strong word. The social Marxists would have everyone think that by making hate a bad word, it will just go away, or we will all become Vulcans. But let me repeat that for the easily offended:

I Hate The Visa PayWave Ads

What exactly is this video gem that conjures up such ugly feelings? You probably have seen the commercial: The world is ballet. Perfectly orchestrated by the movement of money. Cue soundtrack scratch. Everything halts because of a) someone bothers to write a check, or b) pays with cash.

The message is that using these forms of payment disrupts the world's ballet. The ugly reality is that the ballet is not for your enjoyment but Visa's Profit. A profit of interest rates and service charges.

I choose to pay cash more often than not. Mostly because I hate the interest rates of the credit industry. And I know a little something about interest rates in the credit industry.

Ugh, I hate those ads.

Posted by caffeinated at 9:13 AM in kaffehaus

Sunday, 9 September 2007

How a web browser works

Holy Chicken Necks!

Dave Hyatt, of WebKit fame, has posted some excellent articles on how a web browser actually works behind the scenes on things like floats, positioning and more, at webkit.org. The code gymnastics that a properly rendering browser has to perform for implementing complex CSS has always been “magic” to me. Dave gives us a peek behind the curtain of the magic show that is Safari.

I don’t following the WebKit blog enough so I just caught the posts, but I love this kind of stuff.

Posted by caffeinated at 1:46 PM in nerdery

It is like playing roulette with the devil and a fully loaded gun

No, not really.

But I caught a title surfing the digital cable channels yesterday that was evocative of such a thought: that as a player of Dungeons and Dragons I was going to “lose touch with reality, enter an inescapable cult of lost children, at any moment ready to slit my wrists at the emotional loss of a ‘dead’ player character.” That’s quoted, not because it is a quote, but because it is the thought left by Rona Jaffe’s Mazes and Monsters in the minds of so many viewers and readers of that, now, pulp fiction.

I didn’t get to watch it, so I bought it! On Amazon.

The made-for-TV movie stars a very young Tom Hanks that loses the, apparently tenuous, connection with reality playing Mazes and Monsters. M&M is depicted as a D&D like game, only the player’s game master has kicked it up a notch by introducing a LARP element to the player's regular sessions. At least that’s how I remember it.

There is little doubt that the MSM loves a good story about innocence lost at the hands of demonic cults, unfortunately it is not the true story that M&M is loosely based on, the story of James Dallas Egbert III.

I won’t repeat what is told so well here and here. Instead, I’ll just laugh; to myself at the hysteria engine of the MSM and to the more laughable idea that I’m on a path to hell because of my hobby.

Posted by caffeinated at 1:32 PM in d10

Thursday, 6 September 2007

Waiting

The podcast is on hold. Not for lack of having it done, but because I don't have anything to actually cut the MP3.

I'm waiting for my new PowerBook MacBook Pro. Jones'n more than waiting. I'm so psyched about the new Intel platform. I'm equally pumped about the idea that I'll get Mac OS 10.5 (Leopard) for free, possibly free at least.

A few days to get all of the tools installed and running, then some development tests, then life becomes normal again, and the waiting ends.

Then I'm also waiting for Stardust to come to DVD. That movie rocked.

Posted by caffeinated at 7:25 PM in kaffehaus