January 28, 2012   

Recent Blog Entries


Adobe MAX 2011 CF Unconference Presenation: Advanced Solr - Going Beyond the Basics of cfsearch
October 3, 2011
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!

comments(2)



How I Got Started in ColdFusion
August 1, 2011
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.

comments(2)



cfObjective 2011 Presenation: Advanced Solr - Going Beyond the Basics of cfsearch
June 6, 2011
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.

comments(3)



Running ColdFusion Solr on a 64-bit JVM
October 13, 2010
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

comments(6)



Convert VirtualBox (vdi) to VMWare (vmdk)
August 27, 2010
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). /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).

comments(1)