Jul
03
2009
So, I’m a regular on WebDevGeekly, a “discussion about web development issues, news, and views”—really, it’s a kibitz session between Michael Kimsal (publisher of WebDevPublishing), me, Matthew Eernisse, and the Windmill guys (Mikeal Rogers and Adam Christian). Topics range wildly, but it’s always exploring the dynamic and changing culture of web development.
I’ve been making a habit of sharing my media appearances via the EnfranchisedMind podcast feed, but stopped sharing WebDevGeekly when it became clear I was going to be a regular. At this point, though, I’ve gotten a request to put it back onto the feed. What do people think? Let people subscribe themselves to the WebDevGeekly’s feed, or ship it with the EnfranchisedMind podcast feed?
Popularity: 1% [?]
Jul
02
2009

I’ve got an article in this month’s GroovyMag entitled “Goldilocks and Grails Logging — Part 1″. As the title implies, it’s about getting logging just right, and this month’s installment talks about how to think about logging, the underlying Log4J library design, and the basics of the Grails Log4J DSL. Next month will be on advanced Log4J DSL manipulation (including a stunt I just learned!), Sublog, and P6Spy.
And as a bonus to the EnfranchisedMind readership, the first 9 people who comment on this post get a free copy. [EDIT: They've been awarded! Thanks for playing!]
Popularity: 5% [?]
Jun
29
2009
Lots of interesting podcasts over on the NFJSOne Podcast site, including one with yours truly.
Here’s the summary of my interview from the NFJSOne podcast site:
Robert and Jared talk about the wave of convention over configuration that’s sweeping the Java software, a little about GORM versus Hibernate, and how Grails is leading the way for the next wave of software developers.
The podcast has been added to the EnfranchisedMind podcast feed, available at http://enfranchisedmind.com/blog/feed/podcast/.
You can subscribe to the NFJSOne podcast feed at http://www.nfjsone.com/s/podcast/itunes.xml.
Popularity: 2% [?]
Podcast: Play in new window
| Subscribe | Download
Jun
25
2009
I’m working on an app that is using the JQuery JavaScript framework. Time came for a bit of AJAX long-polling (which I can no longer say without snickering thanks to WebDevGeekly), and so I went looking for a way to do that in jQuery: specifically, I wanted something like Prototype’s Ajax.PeriodicalUpdater, which has a nice decay to pull load off the server if not a lot is changing.
Unfortunately, such a beast doesn’t exist within the core JQuery code. I bitched about the lack of one on Twitter (cite), and ddelponte resisted routing me to http://letmegooglethatforyou.com/?q=jquery+periodicalupdater and instead pointed out the #1 hit on Google: 360innovate’s port.
That port didn’t do quite what I wanted, and I saw a few places to eke efficiencies out of the code, so I did. The new version of the code is hosted at http://github.com/RobertFischer/JQuery-PeriodicalUpdater/. Specific advantages over the 360innovate version are:
- Any option in jQuery’s $.ajax can be used, including any callbacks. The only exception is the flag that treats modifications as errors. That’s always going to be
true (see the next bullet).
304 Not Modified pages are now treated like they weren’t modified (that is, timeout increases). Their treatment before was as errors, which caused the timeout to reset to the base value.
- The settings passed into the function are now deep-copied, which means the setting object can be mangled after the call without hosing up the entire works.
- As much work as possible is done up front, so the actual polling AJAX call is fairly fast and lightweight. This is important so that it doesn’t clog up the limited resource that is JavaScript user processing threads.
- The first poll begins once the document has finished loading, which should speed initial page load and avoid issues caused by the AJAX response returning before the page is totally rendered.
The code for the PeriodicalUpdater is pretty cool. One stunt which people should definitely pay attention to is using executable code blocks for factoring out loop-invariant checks. In this case, it’s demonstrated in the logic to boost the decay:
// Function to boost the timer (nop unless multiplier > 1)
var boostPeriod = function() { return; };
if(settings.multiplier > 1) {
boostPeriod = function() {
timerInterval = timerInterval * settings.multiplier;
if(timerInterval > settings.maxTimeout)
{
timerInterval = settings.maxTimeout;
}
};
}
In this case, this behavior is either a nop (for multipliers <= 1), or it's got some involved logic. The 360innovate version did the multiplier check each time the interval was going to be boosted, but that multiplier isn't going to change. Since the multiplier isn't going to change, the code can be factored out and the check can be saved.
The same functionality could be done by the function null unless there is logic attached, but then call points look like this:
if(boostPeriod) boostPeriod();
And I’ll take the overhead of a call to the nop method to get easier-on-the-eyes, more maintainable code.
Popularity: 9% [?]
Jun
22
2009
I’ve been hinting at a new book for quite a while, but not really saying much about it. Well, Michael Kimsal got the scoop on my new book over at WebDev Radio: Episode 66: Robert Fischer on Groovy, Grails, GORM and more. I’ve added it to this blog’s podcast feed, too: you can subscribe to this blog’s podcast feed at http://enfranchisedmind.com/blog/feed/podcast/. The interview seemed to go pretty well despite being pretty tired and a few minor technical glitches. It’s a lot more opinionated than a lot of my other interviews (I forgot I this wasn’t just me and Michael shooting the shit a couple of times), so it’s definitely worth a listen.
Popularity: 2% [?]
Podcast: Play in new window
| Subscribe | Download
Jun
17
2009
In Neal Ford’s JavaOne 2009 “‘Design Patterns’ for Dynamic Languages” talk1, he presented a record/playback object as an example of a decorator. He did so in JRuby, which is probably a good call since JRuby is more slide-friendly than Groovy (more on this later), but in presenting the recorder he said something in passing about Groovy having a problem because of operators and how they correspond to methods. This struck me as odd, since (as a once and future Groovy DSL hacker) I regularly work with operators. So I decided to check it out. Continue Reading »
Popularity: 5% [?]
Jun
15
2009
If you’re interested in conspiracy theories, fringe science, and the occult (and who isn’t?), you really should check out the archives over at Out There Radio, and Raymond, Joe, and Austin’s newest endeavor, the Disinfo.com Podcasts. They have lots of interesting interviews and news, and the best sampler of the new series is probably the recent news segment/Bill Ayers interview.
For those subscribed to the podcast feed (details here), I’m including a sampler episode. The sampler is Episode 41: “Guyana’s Heart of Darkness”.
Episode 41: Guyana’s Heart of Darkness
Fri, 30 Mar 2007 19:20:58 EST
In this episode, we take a look at the dark events of 1978 in Jonestown, Guyana. What drove the people of Jonestown to commit mass suicide under the direction of the Reverend Jim Jones? Was Jones simply a charismatic paranoiac, or was there something deeper involved? In Out There News, we look at the coming of a green antichrist, and Austin warns us about a roving demon who sodomizes people in their sleep. Don’t say you haven’t been warned!
Here is the RSS feed for “Out There Radio” (all 50 episodes are outlined here), and the Disinfo podcast information is here.
Popularity: 2% [?]
Podcast: Play in new window
| Subscribe | Download
Jun
14
2009
I was going to do a final summary post on JavaOne, but it would really just be a rehash of the liveblogging I did over at http://em-javaone.posterous.com, so just check out that stuff. If there are particular questions or insights that you’d like me to share, feel free to ask.
Popularity: 1% [?]
Jun
12
2009
Those who follow my Twitter account probably noticed two things over the course of the last week: 1) I was surprisingly quiet; 2) what tweets I did have were about the NC beaches. The reason is because I spent the last week in Kure Beach, NC, with my wife and parents. Thought I’d give a feedback report for Google to index: hopefully it’ll improve someone else’s vacation in the future. Continue Reading »
Popularity: 2% [?]
Jun
11
2009
Scott Davis interviewed me for the ThirstyHead News Show. My glasses are reflecting like crazy and my skin tone is about the same as the wall behind it, but the conversation (predominantly about Grails persistence) is interesting (especially once I loosen up!).
I was also interviewed for Adrian Bridgwater’s “View from the Floor at JavaOne” article: read it here. I had my brain stuck on the JavaOne keynote, so I sounded pretty corporate-y, but there you go.
Popularity: 2% [?]