LVL3 CFer LFJ and LFH

If you're not following my tweets, on Monday I joined the trendy new subculture know as "the unemployed". I've always had a note that I'm available for projects, but now I'm officially Looking for Job (LFJ). If you've got a project that could use an certified advanced CF developer with 3 years experiance, I'd love to hear about it :)

Additionally, my current predicament leaves me Looking For Hosting (LFH) for both this blog and my Father's photograph website. I had been receiving free hosting from my previous employer, but thats going to run out in really short order. If you have a recommendation for cheap hosting, I'd love to hear about that too.

 

Using Event Bubbling to Your Advantage

Its happened to everyone working with Javascript: you build your test app that handles clicks on elements to do really neat things and everything's going great. You move it live, and as the data starts coming in your app gets slower and slower until finally the system starts to become unusable. Whats the problem? In testing you had maybe five or ten clickables, but your app has been growing, and you've now got 20, 60, 120 or more, and the time it takes to bind all of your click events is skyrocketing. What if you could just use a single handler for all of them?

 

Preventing Multiple Submissions with Prototype and jQuery

If there is one problem that plagues me across applications, its users that are too antsy to wait for the page to come back after hitting submit on a form. Even worse, some people just instinctually double and triple click. How do you keep these pesky users from duplicating records or charging themselves three times for that item in your e-shop? Click "more" to see how I do it in Prototype and jQuery.

 

ColdFusion Instance Issues, Round 2

ColdFusion LogoAs some of you might know, my work place is no stranger to odd server problems, such as instances just wanting to return 503 errors. Today I have a new one: one of our applications refuses to run at full speed if its in anything other than the default instance.

 

Using ColdFusion to Zip Individual Files

I ran into an interesting situation this morning that didn't have an obvious answer. I needed to create a zip with a few specific files out of a directory with lots of possible files. The problem is that <cfzip /> is designed to work against whole directories, so at first I kept thinking that I'd have to make a temporary directory, move the files to it, and then zip the directory, but a little more persistence found the right answer.

 

Javascript Gerundization

Ever needed to "gerudize" a word? No? I needed to today to convert links and button labels like "Save" and "Submit" into their gerund equivalents: "Saving" and "Submitting". I found a set of rules on how to convert a verb into a noun here, and put together a simple Javascript implementation. I might do a ColdFusion one later to match my Pluralize() and Singularize() utility functions.

function gerundize (word) {
    if ( word.match( /[^aeiou]e$/i ) ) {
        word = word.slice(0, word.length-1);
    } else if ( word.match( /[^aeiou][aeiou][^aeiou]$/i ) ) {
        word = word + word.slice(word.length-1, word.length);
    }

    return word + 'ing';
}

And the test code:

document.write(gerundize('Think'));
document.write('<br />');
document.write(gerundize('Submit'));
document.write('<br />');
document.write(gerundize('Hit'));
document.write('<br />');
document.write(gerundize('Take'));
document.write('<br />');
document.write(gerundize('Create'));
document.write('<br />');
document.write(gerundize('Save'));
document.write('<br />');

 

More Entries

Jon Hartmann, July 2011

I'm Jon Hartmann and I'm a Javascript fanatic, UX/UI evangelist and former ColdFusion master. I blog about mysterious error messages, user interface design questions, and all things baffling and irksome about programming for the web.

Learn more about me on LinkedIn.