Monthly Archive for April, 2006

Fusebox 5 is Alive!

Sean's done a great job with the Fusebox 5 cores (as if anyone had any doubt), and released Alpha 2 to the mailing list this week.  There've been a few little issues, but nothing major, and I'm happy to say I'm now running two production apps on the new version.

Both are stock _VC FB4.1 apps, with the model (the missing 'M' in _VC) entirely encased in CFCs called directly from the controller circuits.  Except for a small compatibility bug in the cores that Sean already fixed, both apps ran without changing a single line of code.  With that kind of seamless upgrade available, the adoption rate of FB5 should be fantastic, even without the cool new stuff it brings to the table.

If you're interested in following along before the first public beta, go hit the fusebox5 Yahoo! Group, and sign up for the mailing list. 

CFPOP and Emailing Pictures to my Blog

I used CFPOP for the first time ever this evening.  Kind of surprising that I've never had occasion to use it in 6 years of full-time CF development, now that I think about it.  Once again, CFML makes it easy (or at least straightforward) to accomplish what is a horribly nasty task.

Anyway, I just got a new cell phone because my old one didn't have a speakerphone option, and now that I'm working remotely, I spend a lot of time on the phone.  What I didn't anticipate was that it has a camera as well.  Being the good geek that I am, I decided to implement an "email pictures to my blog" thingy, so I can take a picture with the phone, email it off to a designated address, and it'll get automatically posted to my blog.

As always, design comes first, so I'll be releasing a resusable component to perform all the nasty work should anyone else want to incorporate the same feature into their blog.  Just extend it to provide your blog-specific posting implementation, set up a scheduled task so it fires regularly, and the rest will happen by magic.  But that's not ready yet.  ; )

Trac Patch for Mid Air Collision Bug

Trac, for those of you who don't know, is a simple but powerful project management tool that sits atop a Subversion repository and does all kinds of neat things.  Ticket tracking is on, release scheduling, an integrated wiki, and source browsing, all wrapped up in a nice package.  If you're not using Subversion, Trac is reason enough to consider switching.

It has a little issue, though.  It prevents you from submitting a comment on a ticket, if you don't have the most current state of the ticket displayed on the form.  In other words, if you open the ticket form, someone else submits a comment, and then you submit your comment, Trac will prevent it from being recorded.  In my mind, this is correct behaviour.  The problem is that when you submit your disallowed comment, the comment text disappears into the Ether, and is irrecoverable.  Certainly not ideal if you've just entered a long comment.

I recorded this bug with Edgewall (who develops Trac) a few months ago, but nothing's come of it.  Today, I went through and hacked the sources to avoid the issue, and supplied as patch as part of the ticket.  The solution isn't elegant, it just dumps the submitted form values to the screen, beneath the error message.  However, it prevents loss of data, which is the important part.

The patches are against the 0.9.5 release of Trac, so you'll want to have that version before applying them.  If you want this bug fixed for real, go leave a comment of support on the ticket.

Neuromancer 0.6.5 Released

Neuromancer 0.6.5 has been released, and is available for download.  Along with the changes I've mentioned in previous posts, there are a few goodies from Rob in there.

We're in the process of finalizing some API changes that will comprise the next release.  As the project has evolved, the initial design has put forth a few limitations that we're going to address to make future growth easier, and to make the API a more consistent.

On a sad note, Rob's nightly build script doesn't run on the new Apple JVM for some unknown reasons, so nightly builds are out of commission for the moment.  Hopefully they'll be back up and running soon.  As always, you can get the bleeding edge from Subversion.

JS Remoting PDX-CFUG Presentation

Last Thursday I presented at the PDX CFUG on JS remoting and composite UIs.  I've uploaded my presentation and example code as a ZIP archive, and also made it available for direct preview.

Thanks to all who attended, and my apologies for having to jet out of there in such a rush, but the whole "getting a paycheck" thing is kind of important. 

Google Calendar Quick Add

When Google Calendar went public a couple days ago, I finally got to abandon my Yahoo! account for good, which doesn't pain me one little bit.  Nice interface, kind of rough in places, but it's brand friggin' new, so it's expected.  Fortunately, I was able to export/import all my events from Yahoo! directly into Google Calendar, which was nice.

Just now, I discovered the "Quick Add" feature.  It gives you a single text field to enter an event it.  Mysterious.  I tried "Golf 4pm tomorrow".  Bing: a new event named "Golf" is scheduled for tomorrow afternoon at 4pm.  How about "Easter Dinner noon sunday".  Yep, you got it.  How about "dinner with heather, next friday at 6"?  You got it, one week and one hour from now, a "dinner with heather" event. 

Talk about a sweet UI.  The rest of it's quite nice, but that, in particular, blows me away.  If you want to see usability, look no farther.

Application Modelling

For the past month or so, I've been largely immersed in modelling a totally new version of PIER.  I've done some modellling in the past, but never a soup-to-nuts model of a brand new application.  After getting most of the domain model's class diagrams fleshed out, and starting to go back over it fixing problems, I've come to a few realizations:

  1. Modelling OO systems is friggin' hard.  I'm constantly having to remember I'm modelling classes and not a DB schema.
  2. Modelling tools are really pathetic.  I've tried a pile of UML tools, and assuming I've got two grand to spend, I can't buy something that does Java 5 round-tripping and has a decent interface.  I'll admit to being spoiled by Eclipse, but even the tools that plug into Eclipse are nasty.
  3. Modelling without round-tripping is cumbersome.  There are a lot of things that are really easy to do with code that are really difficult to do with a modelling tool.  Injecting an abstract in the middle of an existing hierarchy is a good example.

All in all, however, doing a formal model is definitely a good idea, if you ask me.  I've run into a number of issues with my initial conceptions of the app that would have been very expensive to change if I'd started implementing stuff without working things through first.  We'll see how things go once the coding starts, though.  ; )

Neuromancer Update

Rob did a bunch of work with Neuromancer last night, including appying a nice template to the site, setting up a wiki (available from the site), and committing a bunch of changes that he'd made since the 0.6.0beta was released in December, but which hadn't made it into Subversion yet.  Finally, he added automated nightly builds to the site, so you can get the bleeding-edge source without having to hit the Subversion repository, and I won't have to blog patches anymore.

GTalk Enabled

I'm now GTalk enabled with my actual IM client (gaim), rather than just inside the GMail interface (which doesn't work very well).  So if you want to message me, my username is bboisvert, and I'll probably actually respond!  I can also be reached on ICQ at 4965668, AIM at se7777777n, MSN at barneyboisvert@hotmail.com, and (unfortunately) YIM at barneyboisvert.

Wheeeee!

Graph Limits Solution

After a little discussion in the comments of my previous entry that ended up with me having a long explanatory conversation with myself, I hit upon a solution that seems to be a good one.  In a nutshell, I needed to stop caring about the specific number of horizontal gridlines dividing the range, and just use what fits "best". Here's the code:

<cffunction name="getBounds" access="private" output="false" returntype="struct">
<cfargument name="low" type="numeric" required="true" />
<cfargument name="high" type="numeric" required="true" />
<cfargument name="gridSections" type="numeric" required="true" />
<cfscript>
var result = structNew();

var range = arguments.high - arguments.low;
var factor = gridSections ^ (len(int(range)) - 1);
var oneSigFig = ceiling(range / factor) * factor;

result.interval = cleanNumber(oneSigFig / arguments.gridSections);
result.low = cleanNumber(int(arguments.low / result.interval) * result.interval);
result.high = cleanNumber(ceiling(arguments.high / result.interval) * result.interval);
result.gridSections = ((result.high - result.low) / result.interval);

return result;
</cfscript>
</cffunction>

<cffunction name="cleanNumber" access="private" output="false" returntype="numeric">
<cfargument name="num" type="numeric" required="true" />

<cfset var INCLUDE_FACTOR = 100000000000 />

<cfset num = num * INCLUDE_FACTOR />
<cfreturn fix(num) / INCLUDE_FACTOR />
</cffunction>

The three parameters are the low point of the data series, the high point of the data series, and the number of grid sections you'd like.  The return values contains the bounds' low end, high end, number of grid sections, and the interval between gridlines.  Note that the returned grid sections value is not necessarily what you passed in.

The cleanNumber function is not strictly necessary, but the way I was using the values caused errors if there were "floating point arithmetic artifacts" in the results, so I wanted to clean them.  All it does is remove any decimal portion of the number that's smaller than 1/100,000,000,000.  I found that this was enough to catch any such artifacts resulting from floating point arithmetic, while being sufficiently small enough to no affect any legitimate digits.  YMMV if you've got really small numbers.

One thing that it doesn't do, however, is ensure there's "padding" around the series on the graph.  In other words, it's possible that for the high or low point of the series to end up at the maximum or minimum value of the graph.