Browse > Home / Archive by category 'Technology'

| Subcribe via RSS

mod_speling Breaks Flash Forms in ColdFusion

February 12th, 2009 | No Comments | Posted in ColdFusion, Linux, Technology, Work

We were setting up a new server for our ecommerce site, and we knew that the code was primarily used in Windows environments. Having wrestled with apps built by developers who think “case sensitve” means not buying animal skin luggage, we decided to be preemptive and configure mod_speling to make Apache case-insensitive on Linux.

The ColdFusion 8 installer creates an alias on Linux systems from cfide to CFIDE so that either will work. Flash forms need to call the scripts folder in CFIDE in order to load their various components. On this server, Flash 10 on Safari would show the “Initializing” message and fill the loading bar, then stop. No error, nothing. Firefox on OS X would show the loading window, then throw an error “RSL Load Failed” and stop at 40%. Googling this problem led us to believe that it couldn’t find the .swf or even the scripts folder.

I suspected mod_speling fairly early on, and disabled it. No luck. Reinstall CF, build a completely new server, lots of time wasted. I never could get the debug version of Flash Player 10 on OS X to work and dump a trace, and there aren’t any instructions for this specific version that I found. None of the log files were any help, no error messages, nothing. The best we could do was look at the network activity on the client and see what the page was trying to load. It looked like it was finding all of the files.

Finally, I checked the SSL config that was included in the Apache config on the server. Spellcheck was turned on there as well, and we had missed it. Turned it off, and suddently Flash forms work again. We still don’t know exactly why they failed, but it obviously has something to do with redirects and aliases for the CFIDE and/or scripts folder.

ADDENDUM: Turns out the CheckSpelling directive works in .htaccess files. So we have case sensitivity and flash forms coexisting, for now. This fellow found a rather unique solution too, but I haven’t tested it.

 

Obligatory Application List

February 5th, 2009 | No Comments | Posted in Technology, Work

I was reconfiguring yet another portable for work and meetings and thought it might be useful to me and interesting to others to post a standard “applications I use” list. These are the ones that I use most often and I try to put on any system I’ll be taking to meetings. Some things like Photoshop are missing because I don’t use them enough to install on every system I use.

There are many more applications that I use in specific circumstances, but they aren’t on my essentials list.

 

I Just Want a Phone

January 14th, 2009 | 1 Comment | Posted in Opinion, Technology, Work

My Razr is finally dying, and I’m casting about for a new cell phone. I have an iPod Touch, and really like it, but I don’t always need a portable computer. It’s also not small, and I can’t really see carrying a phone that large. So I just want a phone.

I don’t want a camera, PDA, “web enabled device”, portable music player, video conferencing device nor even a full address book. I carry a phone to make and receive phone calls, occasionally a text message. I can handle phone keys for entering text, and I really don’t like downloading pictures and video on my phone. I don’t watch much TV, so zero need for that on a device.

I want the smallest, lightest, thinnest phone I can get, with excellent reception and call quality. I tried the Sony Ericsson W580i for a while, and it’s not bad. I couldn’t figure out how to turn off the face buttons, and I don’t need the music stuff. What really aggravated me was the proprietary charger. The Razr uses mini-USB, just like my kid’s Nintendos and my PlayStation controllers and my portable hard drives. I have those cables everywhere. I really hate having yet another cable to carry around or keep in multiple locations. Also, mini-USB can charge from the computer.

So, small, thin, light; excellent reception and call quality, no extraneous features, USB charging. I wonder if such a beast exists. All of the “simple” phones I’ve seen so far have been, frankly, ugly as hell. They’re not thin or light or small. I bet if they took most of the crap out of the new Razr it would be half the size and just what I want. Not likely though. I guess I’ll keep looking.

 

Loading a byte-length delimited text file in MySQL and CF

May 10th, 2008 | No Comments | Posted in ColdFusion, MySQL, Technology

I’ve had a few projects that require loading large text files with byte-length fields into MySQL. That means that there are no delimiters for the fields, they’re just always a certain number of characters. As far as I can tell, the MySQL tools need field delimiters in order to use load_data_infile or the import tool. Therefore my current solution was to read each line, parse it, insert it, and repeat. In each case I also had to do some transformations on the data before it was final, like converting ISBN from short to long formats.
I’ve always know this was slow, particularly with 500,000 records in a file to parse. I’m thinking of two alternatives, and I’m going to test to see which is faster. One would be mysqlimport the file into a temp table where each line is a single field. Then I would wither use CF or SQL to parse the longer fields one at a time. I’m not sure that this removes the multiple insert bottleneck, I expect it wouldn’t be much better. The second would be to read and parse each line and then write it back to a text file with proper delimiters and all the data converted. Then I’d mysqlimport the text file. The question here is which is faster – multiple inserts or appending lines to a large text file?
Update – I figured loading the file would be faster than all those queries, but the difference was pretty stark. I thought the benefit of the bulk import might be offset by writing so many lines to a text file. Seems not so much. The old way took over 90 seconds on 66,000 lines. The append-bulk import method took about 9 seconds. Now I get to rewrite a few import routines.

  Last modified: June 6, 2008 @ 6:40 am

Not Learning a Framework

September 15th, 2007 | No Comments | Posted in ColdFusion, Technology, Work

Yeah, so after some digging and trying and working and reading I decided that I’m not going down the framework route in CF. I want to learn more Python, maybe go back to the Objective C stuff I was doing in XCode. There have been a couple of recent posts on CF blogs about the over-complication of a language that was designed to remove complexity for the purpose of building web applications. I have to agree. So I’m focusing on the principles, reuse, encapsulation, readability and not on someone else’s specific pattern and methodology.

  Last modified: November 5, 2007 @ 9:35 am