Ruminations on Development
Busy Busy Busy
I'm not gonna apologize, but I will let you know why I haven't been posting on this blog in the last month and a half... I have been in the enviable position of having so much actual coding to do that I couldn't do a heck of a lot of reading nor writing about coding.
I have been in the thick of it at Widgetbox
, and other than a bit of adjustment time in the other parts of my life I have been rockin' and rollin'!
My biggest accomplishment has been implementing MemCacheD
as our distributed cache. I've even submitted a couple of patches to the Spy MemCacheD Java Client
. (Dustin, who wrote an maintains that client is a pretty cool cat with loads of talent!)
So.. Yeah... I'm not apologizing. I guess maybe I'm gloating?!?
Posted at 11:20PM Jul 08, 2008 by Nelson "Nelz" Carpentier in General | Comments[0]
Applying the Java Keyword 'final' To Classes
I was ponderin' the usages of the final keyword as applied to classes in Java.
I have heard before that all classes should be defined as final by default. The theory goes that unless you are specifically designing (and testing) your classes as potentially extensible, the final class modifier is a nice 'pertinent negative'.
In practice, this theory falls apart.
If you are exposing your concrete classes to other clients, a final class can neuter the consumer's ability to mock your class for testing purposes. (I ran into this at one point when using Lucene
at work, and tried to mock out a class.)
Another problem that arises, even if you have hidden all your concrete classes behind a nice API, is that final classes are not accessible by AOP
. (At least, not in the framework
that I looked into.)
Posted at 06:11PM May 21, 2008 by Nelson "Nelz" Carpentier in Java | Comments[1]
GMail has MUTE!
Thanks to my fantastic girlfriend, I now know an awesome trick!
If there is a threaded discussion in GMail that you want to stop hearing from (think flamewars, or a specific discussion you are not interested in on some list that you usually do want to follow...), you can "mute" that discussion. (Supposedly, if you are directly addressed in this thread, it will still deliver the message. S-M-A-R-T!)
There are keyboard nav bindings for it, but I know it is also in the "More Actions" dropdown box at the top of the screen.
What a GREAT feature! It has been saving my attention span immeasurably today!
Posted at 04:03PM May 14, 2008 by Nelson "Nelz" Carpentier in General | Comments[0]
GIT on Leopard
I had to install the 'git' utility on my OS X (Leopard) box.
I found this blog post to be really helpful... (I just copied and pasted the command-line script, and it just ran and installed fine!)
Compiling Git for Mac OS X Leopard (10.5)
Posted at 10:50AM May 14, 2008 by Nelson "Nelz" Carpentier in Links | Comments[0]
Revelation of the Day
This revelation hit me (and my coworkers) today: Caching is a cross-cutting concern...
You many not understand the implications of that phrase, but it leads to some interesting stuff
...
Posted at 11:36PM May 13, 2008 by Nelson "Nelz" Carpentier in Java | Comments[0]
JavaDocWiki
I had this idea a while ago, but it popped back up into my brain when working on my "Participation Culture
" entry...
In the past I have felt that JavaDoc is just too... one-way.
The format is great as a one-way, generated-from-code outlet for programmers... But this ignores the benefits of the population at large. If some people spend their free time working on entirely new frameworks, I'm sure there's a larger section of people who are willing to share in the enrichment of the documentation as well.
So, why not change the one-way broadcast to a two-way conversation?
My original thought was to have a JavaDocWiki site, where I'd enable some type of processing against a given JavaDoc set. This processing would decorate the pages with whatever 'dashboards' would be helpful, and links to an interactive Wiki-stle page for each class/method/variable...
But, the fault with this course of action is that the interactivity is at a brand new site. Yes, this site could still serve the basic documentation needs just as well as the originating sites, but it would still be a whole new site that people would have to reference.
I got to thinking... Why not just 'decorate' the original source files?
Maybe a GreaseMonkey
script would be able to decorate the original source codes, slurping in the interactive dashboards and linking out to a host site for the interactive elements? (I haven't audited GreaseMonkey≈'s capabilities to see if this is even possible yet, but it offers some intriguing possibilities...)
I guess in either case you would end up depending on host sites for the interactive bits, and you might end up with a busy ecosystem of different hosts being the 'authority' for different versions or sections of the code. Another concern would be migrating from version to version.
Ideally the documentation would end up with high enough quality that the original source developers would be able to slurp up the added doc for inclusion in the actual source code.
I also think this model might work for other auto-generated code documentation. Example: RDoc.
UPDATE (16 May 2008): It turns out, someone else had this idea too. Check out JDocs.com
.
Posted at 11:24PM May 12, 2008 by Nelson "Nelz" Carpentier in Ideas | Comments[0]
Participation Culture
Gin, Television, and Social Surplus
WOW! This article is fantastic! I was so psyched after reading this article that I even sent it to my Luddite
-ish mother. (After printing the article out and reading it, she said it was 'cute' and reminded her of me... <sigh!>)
I have so much to say about this article, it will probably come out all jumbled... But I hope the reader will be able to pull out some salient points.
Participation has been a big theme in my life in recent years. About 6 year ago I fell in with the Burning Man
community, whose 10 Principles
specifically address participation as a founding pillar. A little over a year ago, I came to the Bay Area and was immediately impressed by all the Makers
, teachers
, and BarCampers
. (As I write this, I am impressed that I continually fall in love
with ideas that are only a degree or two away from Tim O'Reilly...)
Yeah, I agree magicians have been pulling people up on stage forever, but this doesn't count. These types of stage shows are more of an exercise in social engineering than in interactivity.
But, think back to the late-70's. There was a very persistent subsection of our culture who were not willing to sit back and passively watch a show. These people, considered "crazy" by some, would don fishnets and garters and high heels and feather boas to go to a theater to throw bread and yell at the screen and sing along to the music, and some of these people even tromped right up to the front of the theaters to re-enacted exactly what was happening up on the screen at the exact same time. There were, and still are, entire communities built around the pomp and circumstance of late-night showings
of "The Rocky Horror Picture Show
".
It tickles me pink that Dr. Frankenfurter, the "sweet transvestite from transsexual Transylvania", could be a material ancestor for every tweet I Twitter
or every Yelp
review I post in this "participatory internet".
One of the first shows I ever saw that took a fun step out of the passive-audience experience was the Blue Man Group
. My family went to one of their shows in Boston during Christmas time, and I was blown away! At the end of the show, they start unrolling streamers off of toilet paper rollers, covering the audience, getting them to move the streamers forward while strobe lights flash and loudly blaring techno music surrounds you. You are covered and involved in a moving black-lit sea of white streamer paper. I have a distinct memory of jamming out in my seat, looking to my right with the biggest grin on my face and seeing my grandmother get all tangled up in the streamers as they were moving forward. It was a sensory overload, but still one of my most fun memories from my teen years.
I dabbled a little bit in Dungeons and Dragons
but it never really 'stuck' with me. However, I don't think anyone can debate that it totally serves as the ancestor of the phenomenon described in the above article as 'sitting in your basement and pretending to be an elf'.
Since I've been in San Francisco, I have totally fallen in love with The Extra-Action Marching Band. Though the Blue Man Group involves the audience at the end of the show, Extra-Action not only breaks, but DEMOLISHES the fourth wall
. Through an incredible alchemy of sounds, sweat, and audacity they involve the audience as an integral part of the show. (Disclaimer: not for the claustrophobic.) To friends, I have described the experience of being right up in the front row as being in a mosh pit without any of the anger.
Posted at 07:38PM May 11, 2008 by Nelson "Nelz" Carpentier in Links | Comments[0]
Tomcat ROOT Context
I've been fighting
with Tomcat
a bunch this week.
My specific challenges have been around configuring a webapp to have the context root of "/", without having to name it ROOT.war...
The documentation page on context configuration
says that "Context elements may be explicitly defined":
In my experience this week, the option of creating the file $CATALINA_HOME/conf/[enginename]/[hostname]/ROOT.xml didn't work for me.
But, one of my coworkers (Chris) found some other resource somewhere that said you could create a $CATALINA_HOME/webapps/ROOT.xml that looked like this:
<?xml version='1.0' encoding='utf-8'?> <Context docBase="/absolute/path/to/your/webapp/dir"> </Context>
Chris tried this setup, and it seemed to work for him. Here's my caveats:
I will update if I find that this actually does work.
Posted at 11:04AM May 11, 2008 by Nelson "Nelz" Carpentier in Java | Comments[3]
Burn My Brain
Well, it has been a week or so since I've posted anything to this blog. My excuse is that I've been moving
and haven't had time to post anything.
But, over the past day or two, I've had a couple of these ideas burning my brain a bit, keeping me up a bit as well.
I'll throw out the caveat that I haven't done *any* research on these ideas to see if they already have implementations... But, I'll throw them out as my own ideas anyways.
does.
If you're not familiar with it, Google Calendar's parsing is pretty cool. You can type in "tomorrow 10am call mom" and you'll get an entry in your calendar for the current day plus 1 at 10AM that says "call mom". I believe it even does things like "next Wed" and "tonight" and "4 to 6 pm".
Creating a free library to do this kind of parsing would be cool, if it doesn't already exist.
hosted on my own site for this blog. I think it would be fun to develop a plugin for Roller that would enable the system to automatically post a title and a URL to a specified Twitter account when a post is published. I also think a similar thing for other blogging platforms would be cool as well.
After seeing Ned Batchelder's animation
of Román Cortés' CSS Homer
I got to thinking that someone could probably write some kind of suite that would spit out open-standards-compliant CSS and JavaScript that could achieve some of the basic functionalities that Flash presents.
I do think this would probably stretch the capabilities of these browser technologies, but stretching capabilities has an interesting habit of expanding possibilities when it gets into the spotlight. (I am specifically thinking of the JavaScript evolving into AJAX phenomenon... I had avoided JavaScript like the plague for many years, only to have it come out on top as a hugely functional way to change the post-update-get paradigm of the web.)
Posted at 10:23AM May 11, 2008 by Nelson "Nelz" Carpentier in Ideas | Comments[0]
Quick One - Documentation Answers
As an update to one of my previous posts
...
In the Spring documentation, I found the following in "3.9. Glue code and the evil singleton
":
"... the preferred approach when there is only one web-app (WAR) in the top hierarchy is to simply create one composite Spring IoC container from the multiple XML definition files from each layer"
The documentation was there, but I guess I was using conflicting language when searching for the answer.
Posted at 05:52PM May 01, 2008 by Nelson "Nelz" Carpentier in General | Comments[0]