California public television rules

28 January 2006 » Potpourri


27 January 2006 » Politics

“Help control the local stray pet population. Teach your dog abstinence.” – Stephen Colbert.

Ajax in ads

23 January 2006 » Ajax, JavaScript, Web design, Web development

In the time period that I transitioned from being a front-end developer, specializing in XHTML, CSS and JavaScript, and a back-end developer working with Java and DB2, Ajax has gained prominence. I suppose it snuck up on everyone, but it kind of makes me feel vulnerable because I had I thought I was Johnny-on-the-ball with client-side code.

Anyway, I picked up Ajax in Action to get myself back up to speed, which has been quite enlightening, and it casts light on what fools we have been in our approach to HTTP-based Web applications (think about all the wasted bandwidth re-transmitting boilerplate template code for each page of your site).

On the other hand, I fear the coming onslaught of advertisement based on Ajax patterns. Think about it. You use your keyboard for anything with a JavaScript-enabled Web browser window open, and it will likely fire an event, which an embedded ad could capture to reload a (possibly hidden) section of the page, and kick off another request. Some of this is mitigated by JavaScript’s inherent security constraints pertaining to cross-domain communication, but ad folks are nothing if not innovative in their use of emerging technologies.

What examples of Ajax ads have you seen in the wild? Where do you think that Ajax’s promise is most vulnerable to being stifled by malpatterns?

The Long Morrow

22 January 2006 » Travel

I just got into San Jose for a six week project. It was pretty bizarre to fly six and a half hours laterally and only land 3 time zones away, but has been nice because there’s not much jet lag. I guess I always equated one hour of flight per timezone, but I can see why flying to Scandinavia tends to shortcut a lot of longitude.

Next mission: Jack in the Box.

Ten years of HTML

18 January 2006 » Web design, Web development

Man, I don’t know how I let the official observation slip by, but this homepage has passed its tenth anniversary. It’s been at this domain for six years, and before that hosted on Trinity College’s servers. I think the official birthdate is November 14th, 1995. The incriminating evidence goes back to at least 1997 on the Wayback Machine.

WebSphere application optimizations

An application launched recently handled its biggest traffic spike in stride. No timeouts, no delays, and no application errors so far.

It was optimized according to the general principles in this Redbook and the WebSphere InfoCenter. Load testing was done with Apache JMeter.

Fortunately, many of the standard tricks for optimizing WebSphere application performance are common sense. For example:

  • Static file serving should be disabled. The front end HTTP server should serve all non-servlet resources; images, CSS, and JavaScript.
  • Reloading should be disabled. This setting prevents the Web container from checking if any changes have been made to JSPs since it last accessed them and then recompiling them.

Additionally, these tweaks boost performance considerably:

  • Caching JNDI lookups for the data source and mail session. An earlier generation of the code didn’t do this, and even though it used a database connection pool, each call to get a connection resulted in a network operation to find that pool. Ouch.
  • Guarding the logging framework. When a debugging flag is off, writing to the out and error streams for all but the most severe errors is cut off, saving lots of I/O.

And RAD helped spot the following performance pitfalls, along with providing input on internationalizing Strings in the Java code.

  • Use of String concatenation in loops.
  • Instantiating collections with an initial capacity.
  • Making sure session objects implement Serializable, to be passed among a cluster of application servers.

There were of course other optimizations, such as static content caching, and there are others that should be considered, such as stored procedures. Logging too, is a place that can benefit from using a standard tool or AOP.

What WebSphere application optimizations have worked best for you? Any hidden Java traps you’ve learned to look out for?

Back on the grid

09 January 2006 » Web development

The (second) BlackBerry I ordered from a fellow off eBay has arrived and this one has actually activated. It was cheaper than the defective one I returned and came with a hands-free headset. Good stuff.

I bought this device to replace the cheapo cell phone I broke over Thanksgiving weekend. I was over the year warranty on it, but not yet up to the end of my two year contract, so I was given the option at the Verizon Wireless store of buying their least expensive entry-level phone at $170, or cancelling my contract and paying a $175 fee. Not much of a choice there, but luckily one of the techs recommended I get a VZW capable phone from someone on eBay. I scored a BlackBerry 7250 for a more reasonable $230 (VZW sells this at retail for $450).

Anyway, it was kind of nice to be without a cell phone for a few weeks, but now I’m hooked. I’ve only tested the Web browser a bit and not yet set up email, but so far so good. Most of the Web sites that I’ve built in XHTML seem to look good, which is nice. A strategy that seems to have paid off is placing important content DIV’s first and placing other less important DIVs later in the physical file, then lining them all up via CSS positioning. More on this later.

I’ve also downloaded the BlackBerry Java IDE and look forward to creating many useless applications in my spare time. I haven’t installed it just yet because it requires Java 5 and I don’t want to mess with anything that might bork how RAD works on my workstation. Probably won’t hurt it but I don’t feel like dealing with that just yet.

Update: Excellent. I just hooked into the IMAP account on my mail server over SSL thanks to these handy wiki instructions. Very glad I didn’t have to set up a procmail forward. Life is good.

End of an era

06 January 2006 » Politics

I don’t claim to be an expert on the Arab-Israeli conflict, but if there was one thing I took away from a class I took in the Spring of 1998, it was that there were shades of gray on all sides and only one decidedly “negative” persona. I recall thinking at the time that there would be hope for a lasting resolution to the conflict, as long as that character was not centrally involved in the governance of Israel.

To my surprise, in the Spring of 2001, that man was elected Prime Minister. Recently, he had changed many of his views and policies for the better, in my opinion. Regardless of what I think and history’s final verdict, an era is over and a chapter finally closed.

Next page »