Javascript textarea counter

I’ve been thinking more about the textarea counter issue that I mentioned in my previous post (“Users Paste Differently“).

First of all, I noticed that some of the textarea counter scripts date back to at least 2000, so this has been a problem that developers have been looking to solve for 8 years. I checked the HTML 5 specification and found that in HTML 5, the textarea element has a maxlength attribute. Presumably user agents will build in the most elegant solution.

But what is the current most elegant solution? Continue reading Javascript textarea counter

Users Paste Differently

Paste
Paste!
I’ve been using a relatively generic Javascript textarea counter for several years to restrict the input length on form textareas. I’m not sure where the specific version I’m using came from, but you can find dozens like it on Google.

Almost all of them rely on the onKeyDown and onKeyUp events to trigger the script. However, some users still manage to submit text that exceeded the limits, even though the application required Javascript. I could not for the life of me reproduce this issue…until today.
Continue reading Users Paste Differently

Testing Tools

A couple of useful testing tools I thought I’d share:

The latter seems a little buggy, but still easier to use than removing and installing different Flash versions yourself.

Code Reviews

I recently attended a code review at Wharton. We’ve put together some code reviews at my job, but I know that Wharton has been doing formal code reviews for years and I wanted to check out their process to compare notes. For this particular code review they were looking at a small ColdFusion application developed using Squidhead.
Continue reading Code Reviews

Generating iCal files with ColdFusion

I’ve been using ColdFusion to generate and mail iCal (*.ics) files. This should be a cinch, as they are really pretty simple text files. However, when I receive the file in Microsoft Outlook 2007, I have no options to add it to my calendar and I see the following message: “As the meeting organizer, you do not need to respond to the meeting.”

This is peculiar, as my address is not the organizer specified in the iCal file, it is only the recipient of the iCal attachment. I’m going to keep looking into it, but I thought I’d mention it here in case anyone else is running into the same issue.

The two functions I’ve found online to assist in generating iCal files are:

Secure/nonsecure messages in MovableType 4.2

I have been lately working with a Movable Type install on an SSL-enabled server. In IE, I keep getting pesky warning messages:

This page contains both secure and nonsecure items. Do you want to display the nonsecure items?

I disabled Javascript and the error messages are gone, so I figured the culprit must lie somewhere in the Javascript. One particular file, JavaScriptFlashGateway.js, contained
flashTag += 'codebase="http://download.macromedia.com ... ';

I’m going to see if updating that will address the issue, but I have a feeling there may be other issues. Has anyone else run into this? My Google searches have been coming up empty.

Time Tracking Software

The development team where I work is going to start tracking the time spent working on each project. Although in some ways this feels like a bureaucratic hassle, it will be useful as far as justifying our existence and provide some ammo for why we shouldn’t tackle every suggestion that crosses our desks (e.g. the “trivial tweak” that actually take 12 hours to implement).
Clock
Continue reading Time Tracking Software

Adobe AIR and digital certificate password length

I’ve received several e-mail messages over the past couple months letting me know that the desktop magic eight ball application I created for a beta version of Adobe AIR no longer worked.

Naturally, it wasn’t the highest priority on my to-do list, but I finally decided to get around to it. But I kept getting an error message: “no such file C:\air\eightball\in”
Continue reading Adobe AIR and digital certificate password length

SEO and title tag density

How does keyword density in the title tag affect search engine placement? On Facts about Title Keyword Density, it says that Live.com rewards high keyword density in a title tag, whereas Google.com punishes high keyword density in a title tag.

I don’t really care about search engines other than Google. I’ve heard SEO experts claim that Yahoo! and MSN/Live still contribute a fair number of clicks, but that’s not true according to my server stats. I’d like to find out if Google really does punish keyword density in a title tag.

I created 3 similar pages for a fictional person, whose name currently return zero results in Google. Using the name as the search term, there are 3 different keyword weights.

  1. Test A (100%)
  2. Test B (50%)
  3. Test C (9%)

This may not be the best test methodology, but at least it’s a start. In a few days, I’ll see how Google ranks them. Any opinions on how the pages will rank?

The Greater-Than Gator

I lost a lot of time yesterday thanks to tracking down an alligator in an import utility. There was one itsy-bitsy little function that wreaked big havoc, thanks to a confused gator that didn’t know which way to look.
Greater Than Alligator
That’s right, there was a < when there should have been a >. (Or since it was ColdFusion code, there was a LT where there should have been a GT.)

The import utility was developed by a guy with a masters degree in computer science, so it just goes to show you that no amount of expertise can prevent such an error (or, quite possibly in this case, a typo).

It was an easy fix, of course, but fixing all the data that had been incorrectly imported in the past took a bit longer. It cost me a few hours, but that’s better than causing a credit crisis. Either way, it reinforced in my mind the idea that we could use some unit testing around here. Sure, it might take a little extra time to write the tests, but probably less than the amount of time I spent hunting down the pesky little gator and fixing the mess it left in its wake.