Tuesday, 31 January 2006


I get up at 5:30 pretty much every morning to workout…“a healthy geek!?”, you say, startled at the notion.

Well, I’m not a vegetarian. I had three doughnuts, a handful of Munchkins™ and some left over birthday party goodies (cupcakes and rice krispie squares) yesterday. I have to work out to work that off!

I follow a good diet though most of the time, avoiding such bingeing for the large part. When you have a 3 year old daughter, you’ll understand too why such things happen. :)

Geeks sit at a desk all day. Exercise is important and I try to exercise each day. Alternating a weight routine with an aerobic routine. A sterotypical geek, bearded, fat, with a bag of chips, I do not want to become. In time, you’ll find I’m not that PC about stereotypes, stereotyping, or for that matter, profiling.

Posted by caffeinated at 6:35 AM in 0xDECAF

Monday, 30 January 2006

Day 2

I don’t anticipate that I’ll knock out a chapter a day studying for the SCWCD exam, but the first two chapters of Head First Servlets & JSP have been good, solid, review of stuff I know pretty well.

I found myself breezing through the code magnet puzzle writing a simple servlet and associated web.xml.

The puzzles and sidebars through out the chapter (and even the graphics) have been really good cues for reinforcing the material and make the book fun to read. I find myself scribbling a note or a “supplemental” bad joke in the margins. All part of meta-cognition.

Okay, I’m starting to sound like a HF fan-boy…but have you seen this series? I’m genuinely impressed.

Posted by caffeinated at 10:28 PM in SCWCD

Sunday, 29 January 2006

The Journey Begins

I picked up Head First Servlets & JSP. Great book! I love the irreverant writing and the learning philosophy, meta-cognition.

Lots of questions. A mock exam. Puzzles. Sidebars. Thinking games. Satire. Pro UNIX/BSD. Tomcat.

Chapter 1 is a solid review of HTTP and HTML. There is a good introduction to Tomcat deployment actually in this first chapter, just to satisfy the impatient. Nothing I’m not already familiar with actually, but a good review of the foundations of what makes it all work while introducting Objective 1.1 of the SCWCD exam.

The authors love one thing: beer. And maybe one other, I’ll let you work out this puzzle: what’s with all the 4:20 references, there’s even a 24 hour clock 4:20 reference (16:20:01)! Too many happy coders on the slopes out there in CO? I think! :)

Posted by caffeinated at 10:19 PM in SCWCD

blojsom, anti-splog, and captcha

Yesterday was a banner caffeinated day: blojsom captcha plugin, SCode by Cliffano Subagio, was implemented after some configuration headaches.

blojsom documentation has been updated since by myself and Cliffano. For posterity, I wanted to note some of the finer details of the origin of the problems and how they were solved.

The SCode Plugin

Cliffano's SCode Plugin is a nice little servlet that uses the open source jCaptcha library to create images with numeric codes that must be entered before posting comments. The gist of this effort is to reduce or eliminate comment spam in one's blog.

The blojsom documentation was thorough and easy to follow, but it contained a trival configuration slip and made an assumption about the host running the blojsom webapp. The configuration error was simple to address (and has been corrected in the online documentation); the host assumption was a bit more difficult to address, if only because it was an assumption and because the configurator, me in this case, looked right at the solution and failed to see it in the error being presented.


The trivial configuration slip noted above, and still the source of some questions, was an <init-param> block for the SCode servlet definition in the webapps web.xml. For this instance of blojsom, running on Tomcat 5.0.28, defining the <init-param> for the scode.properties in the servlet definition failed. The servlet loaded, but the parameter could not be seen by the blojsom servlet.

Still being debated is the why—some servlet containers apparently scope the init-params globally—but the solution was to move the SCode's <init-param> block out of the SCode definition and into the blojsom servlet definition where other similar property files were loaded. A more knowledgeable reader might be able to explain how this works in various versions of Tomcat and other servlet containers.

Hosting assumptions

YMMV with the following, as such, yet more assumptions will be made: you’re running blojsom on a Virtual Dedicated or Private Server (VPS) and your OS is some commercial or open-source variant of BSD—this includes Mac OS X (“Ten”, not “Ex” )—or GNU/Linux. This writer cannot vouch for behaviors in Microsoft/IIS hosting environments.

Most VPS hosts run “headless”, meaning that you do not have a physical monitor attached to the server. You may be remotely administering the server via SSH, a VPN or Serial console over SSH, or... well, you get the idea. Headless does not mean that the host did not consider virtual monitors through X consoles and the like, but your host might be cautious or be considering other factors such as memory or storage limits, thus not install the necessary X libraries to run X servers for virtual terminals.

This does not mean that you as the VPS administrator cannot install the libraries for X, it just means that you have to weigh the impact to your hosted environment if you do so. Do you need an X console? Probably not, but Java likely will need the X libraries to run a headless environment. Java does this with the system property java.awt.headless=true. In fact the SCode configuration notes this property as something to consider.

Now, all this has been said before and more succiently by Philip Isenhour at JavaTechniques. Philip's Linux X11 Libraries for Headless Mode page has the background and detail you need.

It is enough to say that my VPS host did not install the X libraries and I ended up with UnsatisfiedLinkErrors. Some research on Google (finding Philip's resource) and some knowledge of Linux distros, solved my problem. For the Fedora Core series I determined the following packages provided the necessary X libraries to satify the link errors on my Java/blojsom/OS combination (again I need to say, YMMV):

  • Fedora Core 2:  xorg-x11-libs
  • Fedora Core 3+: xorg-x11-deprecated-libs

Philip's notes are more focused and tell you exactly what libraries are needed in a Java 1.4 environment, whereas the above packages have dependcies that need to be satisified. If the dependencies are a non-issue, load them, otherwise consider a method to get just what you need; Philip outlines how one might go about doing so on RHL9.

Fill the bit-buckets

With the blojsom notes, Philip's resource, and my tribulations, I hope to fill infinite bit-buckets with comment spam. May your days too be comment spam free.

Posted by caffeinated at 9:51 AM in kaffehaus

Saturday, 28 January 2006

SCode Plugin working

I got the SCode comment program working. Schweet stuff. Hopefully, this will throttle the SPLOG comments I’m getting. A lot.

I’ll be testing it immediately, and documenting my trail to get it working.

Posted by caffeinated at 1:04 PM in kaffehaus

Friday, 27 January 2006

Themematic presense and AdSense

I’m going to create a theme for anothercaffeniatedday.com. Patience my few readers.

No, seriously, the theme is a work in progress. Part of the purty theme will be a well placed block for Google AdSense.

AdSense is something I tried on YAFB for myself. The content and the limited audience was not a driver for AdSense. We had ads that showed up for completely unrelated content, e.g. record setting beer consumption at a party kept displaying ads for criminal record searches and celebrity mugshots!

Posted by caffeinated at 2:38 PM in kaffehaus

Thursday, 26 January 2006

On becoming a SCWCD

I have delayed this long enough. I going to study for and take the Sun Certified Web Component Developer (SCWCD) exam.

I'm already SCJP for 1.3. Didn't upgrade to 1.4 and probably won't take the 1.5 exam, I'm just to deep into the web tier; that is unless Sun forces me to upgrade. Does anyone know how current your SCJP has to be to take another track? Or if it is even required? Oh, I'll Google it, but if a reader knows, drop me a comment.

This blog category will be for notes and observations while I study.

I'll be working out my log in at the JavaRanch too.

Posted by caffeinated at 2:11 PM in kaffehaus

Wednesday, 25 January 2006


I'm in the process of designing and implementing YAFB1 for an old friend. Unlike myself, he is not likely going to drop an annual fee to a host for a VPS.

So I picked SPHPBlog2, or Simple PHP Blog. Open source, well-written (some of the best PHP I’ve had the pleasure to work with, i.e. it’s not OSCommerce), themable.

sPhpBlog takes its cues from blosxom and blojsom. Flatfile entries and the like. The developers really makes sphpblog easy to install: 1) most hosts have PHP features, 2) unzip, run setup and start blogging. The most difficult, but I respect the reasons, is configuring the user name and password. You have to copy and paste the resulting PHP code into a text doc, save it as a .php file and upload it. I think this is good security measure (as long as you don’t upload it over a clear text channel…I mean, come on, aren’t you always using SFTP/SSH/SCP too?)

I'm about to test the trackback facilities of sPhpBlog. My first test did not work.

Update:So trackbacks are broken in of sPhpBlog. WTF? Why even display options or links? I turned off the display option. Sadness.

  1. [1] YAFB, n. abbr., Yet Another Family Blog

  2. [2] SPHPBlog

Posted by caffeinated at 9:31 AM in kaffehaus

Tuesday, 24 January 2006

The Core Image Fun House

Holy Photoshop!

Apple must have plans for this app, and not just for iPhoto.

Those that live everything Mac probably look at this as old news (don't get me wrong, I've used a Mac since 1986); and I'm sure I glossed over the discussions about this application in the lists many moons ago, but I just found it today by accident when opening an image.

It's not Photoshop, but… wow.

Just wow.

If you haven't played with this yet, install the Developer Tools. Core Image Fun House is in /Developer/Applications/Graphic Tools/

Posted by caffeinated at 1:07 PM in the mac bloc