January 2009

You are browsing the archive for January 2009.

Awesomest Code Ever

I found this uncommitted change to a file on one of our shared dev servers today:
<CFIF IsDefined("request.traceactive")><CFELSE><CFSET request.traceactive = "false"/></CFIF>
<CFSET request.traceactive = 'false'/>
I don't even know where to start…

The Groovy Sieve of Barney

Ok, it's really Eratosthenes', but it's my implementation (in Groovy, of course) along with simple display (in CFML, of course), and can be found here (with full source, of course).  If you just want to see the core sieve, here it is ('bound' is the upper range of the search):
class Node {

Calling FB3Lite as a Custom Tag

Today at work, Joshua wanted to invoke one of our FB3Lite apps from within an external CFM file (a CMS template) to reuse some code.  So I added a little snippet to the top of index.cfm to detect if it's being called as a custom tag and only execute during the start phase.  So you [...]

Base Conversion Functions

In the theme of URL shorteners, I whipped up some simple base conversion functions that don't have the hard limit of 36 that the inputBaseN and formatBaseN built-ins do, but otherwise are exact replacements.  Everything is controlled by the first line, the list of digits.  The functions will support whatever base you want, as long [...]

My Real URL Shortening Service

For those of you who didn't get the joke last night, the whole thing was a joke.  While it does do exactly as advertised, it deliberately creates exceptionally long URLs.  In order for the app to actually return a shorter URL than you submit, the original URL must be at least 189 characters long.  I [...]

My New URL Shortening Service

Joshua, Koen and I were discussing URL shortening services (tinyurl, bit.ly, is.gd, etc.) over lunch this week, and so I decided to write my own (UrlShrink) available here: http://www.barneyb.com/applications/urlshrink/app/
It's ludicriously simple.  I opted for memory storage (think Mailinator) instead of a database for performance reasons.  With the load I anticipate, I think it'll be a [...]

What is The Matrix?

It's control. And I've decided that the control is irrelevant. There are exactly three people in my life that I'll relinquish control to. Two of them don't yet reach my waist (that'll change), the other one can nearly look me in the eye (especially in heels). The first two pretty do, [...]

Yay Akismet

Just looked at my stats and Akismet has killed off almost 200,000 spam comments for me. Not sure when I switched to WordPress, but in any case, that's a lot of spam I've been blissfully unaware of, and no CAPTCHA required. And for those of you who aren't regular readers, my opinion of [...]

Crossing the Digital Line

I went and saw a movie (Yes Man – it was good) tonight for the first time in a long time.  The Dark Knight (also good) was the last, and before that Spiderman 3 (decent) and then Return of the King (good again), but I can't say for sure.  Lots of reasons to not go: [...]

I'm Speaking at CFUNITED

Just got official word from Liz that I'll be speaking at CFUNITED this year on Groovy and CFML integration.  Joe Rinehart was originally slated to speak on this topic, but we're splitting the topic into two sessions.  He'll be speaking on backing Flex with Groovy and I'll be speaking about the CFML side.