jeffcoughlin.com

Amazon Security Policies Lax?

This may be nothing, but I thought it was worth blogging in case anyone thought otherwise.

I read a lot of books. A few months ago some stuff changed at work where I thought it would be easier to listen to audio books. So I re-enabled my old Audible account. Audible was recently purchased by Amazon, so after I logged in they wanted to merge my Audible account with my Amazon account. The process was pretty painless and I was on my way listening to some audio books.

A few months pass and I realize I'm just not listening to enough books to justify the account type I purchased (I now had way too many credits built up). So I logged into their site and learned that I could put my account on hiatus for a few months (meaning, I won't get billed, nor will I receive any new credits. But I'll be able to use my account and existing credits to purchase audio books). There was no option to do it in the settings screen though. After starting up a chat session with a representative I learned that only a representative could do it for me. Okay, works for me.

All they need to do is verify some security settings. What were those? My Amazon login (email address), my name, and my billing address. Yes, sir. That was it. That's all the info you need to start modifying someone's Amazon account info.

At this point I was very upset with the representative (sorry, Jessica. I know it's not your fault. I should have been nicer) and let her know how upsetting this was. I then asked her if she could update my credit card info, billing, or password. After a short pause she assured me that she could only update my Audible membership plan. Was she just telling me what I wanted to hear, or covering up a very large issue... I don't know (yet). I'm tempted to try again tomorrow with another representative and see if they can update any of those other fields of data.

But here's my question to anyone who cares: Even if they can only update my Audible membership data, is that not a valid reason to complain? I mean, this is Amazon. I get that they purchased this company and that it takes time to change policies, code, and [unfortunately] staff when you do a takeover, but hasn't it been long enough that Amazon would have taken care of any account security concerns before merging Audible's accounts with Amazon's accounts?

Perhaps I'm just getting upset over nothing and this is all just a moot learning experience.


CF Dev Week 2012 Videos

Last week Adobe ran the ColdFusion Developer Week 2012. I was honored to be asked to give my presentation on Scheduling Services in ColdFusion 10 (which I had made some slight improvements from my previous talk on it at cf.objective() based on audience feedback).

You can now see the video as well as all the videos from last week on their website at http://www.adobe.com/go/cfdevweek.

Update: You can download the sample files from GitHub: https://github.com/jeffcoughlin/preso_cf10scheduler

For my own convenience, I have made a copy of the recording and cleaned up the audio a little and posted it on Vimeo. Enjoy :) https://vimeo.com/43959682.

Preso: Scheduling Services in ColdFusion 10 from Jeff Coughlin on Vimeo.


cfObjective 2012 Presentation: Scheduling Services in ColdFusion 10

About a week ago I gave my presentation at cf.Objective() 2012 on the scheduling services in ColdFusion 10 (details). As promised here are my presentation slides and code samples.

https://github.com/jeffcoughlin/preso_cf10scheduler

A special thanks to Guust Nieuwenhuis for giving me a couple tips to consolidate some ideas into simpler demos (he had done a similar presentation and deserves credit for some concepts used here) and also Sean Coyne for some jQuery assistance when I thought I'd run into a brick wall :).

Thank you to all who attended my session on Saturday morning (especially after two days of intense sessions).

I'll be giving this presentation again next Friday at the Adobe ColdFusion Developer Week 2012 (http://adobe.ly/cfdevweek2012). This is a remote session that you can watch for free and ask questions. If interested, please signup on that page (I believe registration is required).


FarCry Solr Pro Plugin

We've launched a new FarCry plugin called FarCry Solr Pro. It's got a ton of features (too many to list here).

Go checkout the plugin's website for more info and download links: http://jeffcoughlin.github.com/farcrysolrpro

Special thanks to the private beta testers over the past month.

Dev team includes:
Sean Coyne and Jeff Coughlin

Minimum requirements are:

  • ColdFusion 9, Railo 3.3
  • FarCry 6.2, 6.1.4, 6.0.19
  • Solr 3.5 (optionally included)


Adobe MAX 2011 CF Unconference Presenation: Advanced Solr - Going Beyond the Basics of cfsearch

For those who attended my session on Monday and wanted to download the sample code, you can download it here (2.4MB zip file).

The code is ready to go (requires CF9 or better if you want to run it out of the box without having to download Solr on your own). Make sure to glance at the readme.txt file before you start. It also has some troubleshooting tips in case you can't get the code running right away.

I've separated each of the samples into include files (demo1.cfm, demo2.cfm, etc) to make it easy to follow. And I've also included a ton of really helpful notes at the top of each demo file that walks you through exactly what I discussed in my session.

I gave this same session at CF.Objective() 2011 earlier this year. So for those who already downloaded that code there isn't anything new for you (sorry). But I did update the live session with more helpful specifics based on feedback from CF.Objective().

Download and enjoy!


How I Got Started in ColdFusion

Before I was developing in ColdFusion I was a senior network engineer. Before that I started out as a computer repair technician in the very early 1990's. Then in college (around 1994-95) I was a student worker working in the IT department repairing computers. I was training other people while at the same time studying for a bunch of different certifications. First A+ certification (when it was actually difficult and stood for something), then later a ton of Microsoft certifications so that I could quickly get myself to MCSE status.

In 1997 I quit college as a full time student (still taking night classes and finishing my degree years later) and became a senior network engineer for a company that I really enjoyed. During those years I continued to study for more certifications which seemed to become my only goal for some reason. I was studying to become a Novell Engineer (NCE), Cisco Engineer (CCNE), and a plethora of others (as well as renewing existing certs that were expiring).

By 1999 I was a senior network engineer, but I wasn't having any fun anymore. I felt like I just needed "one more cert" all the time. I know, weird. However, in late 1998 I started playing around with ColdFusion after a friend's suggestion who loved working in it. It was to solve a need (I was making a gaming news website for a friend). During 1999 I wrote tons of code in ColdFusion and was working on several websites. I even wrote my own framework (not a very exciting one, but a framework nonetheless). I didn't realize I was writing one (not having any previous programming experience). I just knew that I needed to simplify things.

The networking company I was working at wanted to get into web development, so they had me write a few websites for some of their clients (mostly brochure websites with a few dynamic features and administration areas). Although I loved writing in ColdFusion, these specific sites weren't exactly very challenging and I found myself in a slump. Now I wasn't happy doing networking or my new found love ColdFusion development. I reluctantly left that place and took another networking job elsewhere (I felt bad because I really did like the people there (a very small company) and I was good friends with my boss too, but I just wasn't happy).

After job hopping a little bit in 1999 and 2000 my wife (girlfriend at the time) suggested I throw my name out there for web development (in ColdFusion). Although I was a novice at the time, it was the height of the DOT.COM bubble. I received phone calls almost immediately. I had an offer the next day and it paid a lot more as a novice CF developer than an experienced senior network engineer. How could I say no? And thus my journey began. I started work at my first CF job (Moore Medical) in late 2000.

When I took the job at Moore Medical it turned out that all of us were part of a new web department they'd created: 3 CF developers, 1 manager, 2 DBAs familiar with their system, and an existing employee who was very familiar with the company overall and helped us mold together. Their previous site was outsourced and they wanted to bring it in-house. What I didn't know at the time was they were planning to fire all of us shortly after the new website was launched =\ (it was far cheaper than hiring contractors for one year). Regardless, it was the best year I'd had in a long time (granted, Sept 11 that year was a sad time). I got to work with two very smart CF developers that helped me learn a lot. I soon surpassed them, but I am grateful for their experience, knowledge, and patience with me. We launched the site in mid October 2001. By Feb 2002 They were doing massive company layoffs due to bad quarter earnings (or so we were told. It turned out that our department was the only one that was in the black (and quite a lot too. We were averaging $18m/yr by that point for just web sales). A couple of the guys were kept-on and bled into other departments. Fortunately I was on good terms with the CTO and got a letter of recommendation from him for my next job.

My next job was about a month or so later. I worked for this real slimeball unfortunately who'd sell you the shirt off his back just to make a quick sale (he'd consistently sell services to clients that we didn't offer and then tell us to figure out how to make it work at 10% of the production value. Yeah fun). I got to work with some really great people there though. I'm still friends with many of them today and in fact work with one of them professionally on a daily basis. But I'm getting ahead of myself.

After a couple years the business started to go sour and the boss started letting people go one-by-one with different excuses. At first, it was the truth (we can't afford you with our current status), but then the excuses started to get lame (you're not producing enough, the clients don't like you, etc. Flat out lies. These were honest hard-working employees). At our peak we had maybe 9 or 10 people. By the time I left there were 2. I believe he now outsources all his work to India because it "costs him pennies" (his words, not mine). He let our graphic designer go a couple months before she was due to have her first baby. A couple months later he let me go 2 weeks before my wife was due with our first (yeah, I real slimeball).

But just when you'd think everything was going bad, it was just the opposite. I had a really good relationship with our clients. Most of them couldn't stand my boss (most of the stories I'd hear from them were how he'd lie through his teeth to sell them anything. I'd also get comments from many female clients on not-so-subtle sexual advances he'd make to them). Still, it turned out to be a good day for me. I'm not sure how they found out, but I wasn't even 5 minutes down the road in my car going home with my small box of personal items when I got a call from one of our clients. They wanted to hire me before someone else grabbed me (what? really?). I told them I had a no-compete clause. They told me they'd take care of it and would call me later. A half hour later I got a call back saying it was all set (they bought me out of that contract. Can you believe it?). My old boss was willing to lose a $200k/yr client for a few thousand bucks (yup. He was always one to take the quick buck). He treated everyone that way. I heard his wife and kids left him a couple years ago. Good for them (I really liked his family. They deserved better).

Anyway, so here I was in April 2004. The new client (Middlesex Hospital) didn't want to hire me full time. Instead they wanted to contract me for a year. I was more than fine with it. Not only was I getting a job back, I got a job I actually loved doing, had a great boss (me), and was getting paid very lucratively.

By 2005 I was doing very well as a contractor and started my company as an LLC (Versatile Internet Solutions, LLC). By this point I was doing jobs that I wanted to do and experimenting with new technologies on my terms. I was in absolute heaven. All my clients came to me by word of mouth (I've never solicited anyone to this day). As work started to pour in more and more I was hiring my own contractors to help with the bigger jobs (or sometimes delegate them to smaller jobs that they could work on their own).

Don't get me wrong. There have been a few rough patches. From mid 2007 until mid 2009 work was a little slim as my clients were hit with an economy slump (I'm still digging myself out of that hole :), but overall I've been very happy and work has picked up quite a lot since then.

I've been speaking at CF-related conferences since 2006 and have done probably close to 30 now including speaking at multiple user groups (sorry, I'm not actually keeping count. I have a feeling its a lot more than that if I include all the UG presentations).

Since mid-2006 I've been the Adobe User Group manager in Hartford CT and last year I became an Adobe Community Professional (ACP). I've met some really great people in the CF community over the years. What can I say about them? A great bunch of people. Very close-knit.

Who knows where I'll be in the future. It's been 12 years now in CF (10 professionally) and I plan to continue working in it. I may of course move to other technologies going forward, but one thing I'll say for sure is that there will never be another community like the one ColdFusion has. We may be a small family at just under a million (compared to similar languages), but we've been here longer and we're much stronger for it. I for one am proud to be a part of it and can't wait to see where the language takes us.


cfObjective 2011 Presentation: Advanced Solr - Going Beyond the Basics of cfsearch

Last month I gave my presentation on some advanced solr use with ColdFusion at cf.objective() 2011.

Sorry for posting my files so late. I always like to post detailed comments in each demo file (explaining what's going on and how I walked through my demonstrations). I just needed to find the time to sit down for a couple hours and write them up. I also cleaned up the code a little better (based on feedback from the audience afterward) and I also styled the pagination used in the last demo (as well as a few other minor styling touches here and there).

Make sure to view the readme.txt file in order to set it up correctly for use. Basically you just need to edit your solr.xml file and tell it where your collection files are (takes 2 min). Then after restarting solr the demo will start working. I explain this in more detail with troubleshooting tips as well in the readme.txt file.

Also please note that I purposefully used bad coding practices and tried to keep the code needed to review inside of each demo file so that it's easy to follow for all audiences (sorry, no frameworks here :).

Download the presentation demo files here (2.4MB zip file). I didn't bother with the slides since they pretty much just jump right into the demos.


Running ColdFusion Solr on a 64-bit JVM

One of my clients had the need for a lot of search collections and even more data to put in them (especially with massive archives of PDF files, xls, word docs, etc) for a very large intranet. So I tried to plan ahead by installing Solr on a separate server (Windows 2008 R2 64-bit with a decent chunk of RAM). You can find the separate installer on Adobe's website. For our initial tests it worked out great, but when we starting throwing more data at it, it quickly ran out of memory.

The first thing I did before I even created the first collection was to increase the memory for the JVM (to do this, edit the solr.lax file and change the default setting of -Xmx256m to your preferred max memory setting. I also prefer to set the min setting as well to the same value (see below)). What I quickly found was the the default version of the Solr install comes with a 32-bit version of Jetty. The 32-bit JVM maxes out at 1.5GB of RAM use. So even though we had enough RAM to use and were running on a 64-bit OS, the JVM wasn't being allowed to use the extra memory.

The solution ended up being very simple (even for a non-java person like myself). I downloaded a 64-bit JVM (in my case I just downloaded Sun's 64-bit JDK to test. I suggest the JRE though) and installed it on the box. I edited the solr.lax file and commented out the single line where Jetty calls javaw.exe (for Windows its that file, for other OS's it will be sloght different with a different path format) and instead pointed it to the new 64-bit JVM's javaw.exe file.

I then set the min and max memory settings to 3GB (-Xms3072m -Xmx3072m) and started Solr up. No more out of memory errors (no more java heap errors).

---

I didn't figure it out all on my own though. Several people helped me come to the final result that I'd like to thank (in order of me bugging them): Mark Mandel, Matt Woodward, and Sean Coyne


Convert VirtualBox (vdi) to VMWare (vmdk)

Recently I decided to switch from VMWare desktop to VirtualBox desktop VM software. I've heard great things about VirtualBox (speed and less-overhead being two very nice features). I did not need to migrate a VM because I wanted a fresh install of Win2008 R2 Enterprise and MSSQL 2008 R2 64-bit. I've been using VirtualBox for a few months now and for the most part it's worked out great, but there were certain things I missed from VMWare desktop. The reasons aren't really that important (I have nothing against VirtualBox and still think it's pretty awesome), but I thought I'd just share how I converted it.

I did a lot of research on the web and found many tutorials and walkthroughs for earlier versions of VirtualBox, but when I went to use those lengthy methods, I found that they weren't possible anymore (at least not the same way). The old way (which is still possible, but with a different utility) also required another program called qemu-img. You actually can still use the old method of converting the VM to raw format and then convert it again to VMWare's vmdk format using Quem-img (each conversion can take a while depending on the size of the VM). However, as of VirtualBox 3.1+ you can now do it all in one command line (and only have to do one conversion).

I'm on a Mac, so the example below is for Mac (using VMWare Fusion). But the same command line should work for Windows (you just need to substitute the paths and point to the vboxmanage.exe file instead of the contents in the app file as seen below). Also, the source and destination paths are custom in this case (I'm currently storing mine on an external storage device).

In the following example I'm calling my virtual machine filename windows.vdi for simplicity (most likely your filename is long and has spaces like mine. Thus I suggest wrapping your file locations in quotes).

view plain print about
1/Applications/VirtualBox.app/Contents/MacOS/Vboxmanage clonehd "/Volumes/Drobo/Virtual Machines/windows.vdi" "/Volumes/Drobo/Virtual Machines/windows.vmdk" -format VMDK -variant standard -type normal -remember

Note: It is VERY important to have the full paths to the source and destination files otherwise you'll get an ambiguous error message as I found out the hard way (with some google searching I was able to figure it out though). I believe this effects Windows users as well (not positive on that).

I wish I could give credit to the forum post that I dug most of this up in (I believe it was somewhere in the VirtualBox forums). Sorry to whomever I'm not giving proper credit.

After the conversion is complete, open VMWare and create a new virtual machine. Choose the option to open an existing VM.

I converted the VM with VirtualBox v3.2.8 and then opened the new file in VMWare Fusion 3.1.1. VMWare said the vmdk file was an older format and needed to be updated (I agreed of course). A few seconds later the VM opened successfully. As expected, new drivers were auto-detected and added (I believe I had to reboot the VM OS twice) and then I installed the latest VMWare Tools (followed by another reboot - all expected).

In all the process took about 30-40 minutes on a 50GB VM (about 10 minutes was the auto-update for drivers and the VMWare Tools install and reboot).


Hospital ER Wait Times

Last fall I helped a client of mine (Middlesex Hospital) release a new website to display their ER wait times for their three locations. It received national news. At the time they were one of only three hospitals (that we knew of) that were doing it in the nation. Since then many other hospitals have followed suit, but MHS still gets critical acclaim for it.

Two weeks ago we launched a new main hospital website for them (http://middlesexhospital.org) and placed the ER wait times on the homepage (as well a few key places on the website).

I've been getting a lot of questions lately asking how we did it. So I thought I'd walk through the process for those who might be interested. First the data itself comes from the hospital's clinical systems (specifically a system called Cerner). I don't know the process they use to get the actual numbers. Unfortunately Cerner isn't designed to distribute data (ie. web service, XML, or any other type of data feed), so we had to find a loop hole. One of the guys at MHS figured out a way to do it using Cerner's custom query system where he runs a custom query and outputs it to an ASCII-based file (text file) which is sort-of like a CSV format. It's very messy, but with a little Regex I'm able to clean it up to be pretty decent (but I'm getting ahead of myself :) ). Next they FTP the file every 5 minutes to the web server through the DMZ. Now it's in my domain and I get to use ColdFusion to do the rest.

Once on the server I have a ColdFusion directory watcher that detects the file and triggers a script to run. The script runs the regex to cleanup the data and allow the CSV file to be easily consumable. Then it consumes the data from that file into a DB. From there it queries the DB and outputs the data to a static XML file for which I have an API (Thanks to my friend Simon Free for the lessons on proper API coding and documentation). Why an API you ask? Because it allows us to use the data for other devices, systems, and apps (and an iPhone app that I believe is in development).

The final piece is to display the data. To do that I do it in two parts. Let's take the MHS homepage for example. Since we know the data gets updated every five minutes they wanted the data on the homepage to auto-update every five minutes. So, since we use jQuery quite heavily on that website I made a jQuery script (using jQuery's get() function to consume XML data) to grab and display the data every five minutes.

But what if the user doesn't have javascript enabled? No problem. I have a separate ColdFusion script that runs before jQuery has access to the DOM where it runs against a CFC to grab the data and display it in HTML with no help from javascript. That CFC script gets a little trickier since the client wanted the items returned in a different order than they appear in the XML. Sure I could have hit the XML three separate times per page load, but since this is the homepage (which gets more hits than any other page on the site) that would just be poor programming on my part. So I figured out a way to hit the XML feed once and sort the data in a desired fashion (and allow the client to change the order easily at any time).

What about the font? Did I use Flash? Nope :). At first I wrote the whole thing to work in sIFR which allows you to display custom fonts on a website using Flash. It worked great, but I wasn't really happy with it. For one, we don't use Flash anywhere else on the homepage, so why load it for just this one item? (note: we do use Flash elsewhere on the site for things like videos. Don't think I have anything against Flash like Mr. Jobs. In fact, I love Flash.). Okay, so how did I get a custom font on the website and get it to still work in things like the iPhone that doesn't support Flash? I used a feature called @font-face{} which allows you to have your clients browser download and use a custom font of your choosing in their browser. There is lots of documentation and how-to's on the web for implementing @font-face{}, but if you really want to jump in and play with it quickly I strongly suggest checking out fontsquirrel.com's font-face generator (you can use one of their free fonts or use their tool to upload one of your own). Not only do they convert your font into the appropriate format, they'll create sample code based on your font... pretty cool. Once you get your testing done though there are some things you need to be smart about, like cleaner code, small/condensed font size (try to keep the font size under 20k if possible. I try to shoot for 12k or better. There are tutorials on how to do this if you search the web), and a few other common sense developer things to keep in mind. Most importantly you want to make sure you have a fallback font (and font size) that will work well for those people with older browsers that don't support @font-face{}. Also, for legal reasons make sure you are allowed to use the font on your website (font licensing can get pretty expensive). I was lucky enough to find an open-source font that allowed us to use the font freely on the website.

Here's an interesting tidbit to know for @font-face{}. Of all the major browsers to support the feature, Firefox was the last one to the party (not supporting it until v3.5) and Microsoft's IE6 was the browser that actually first supported the feature (I know... weird). However, I have to give Mozilla props. They have a slightly better implementation for it where it allows you to offer FF browsers a much smaller/compact file size for the user to download (if you use the fontsquirrel @font-face generator mentioned above, it creates all of these files for you, including a pretty cool font just for the iPhone).

Side Note: When I created the XML files (I'll probably offer JSON soon as well if they ask for it) I decided to make the file static instead of dynamically created on each page hit. Normally you want to dynamically create the XML on each page load, however the reason I chose to statically save the XML file was because the hospital only sends the data to me once every five minutes. Since this data is requested a lot from many sources, it would be unwise programming to hit the database repeatedly for the same information. Sure I could have cached the query, but technically this uses less resources.


UPDATE: For those interested, I made a quick little video showing off a few of the features of the site. I tried to keep the video to one minute, so it only shows a small percentage of the site's features. It was a huge project that involved a lot of people. Thanks everyone who contributed. Your efforts are greatly appreciated. Special thanks go out to Sean Coyne and Marco Pace for their endless hours and dedication to get the project done on a tight deadline. With their help and the coding speed of a good CF framework we were able to release the website with a plethora of features beyond the client's expectations.

More Entries




BlogCFC 5.9.8.007 by Raymond Camden | RSS | Contact Blog Owner