Apache Restart Error In OS X

I know quite a few of you are using OS X for your ColdFusion development so I thought I would post this in case anyone else has run into it.
On My new iMac, I was making a few changes to the apache config and issued a restart using the apachtctl restart command. I was greeted promptly with the following error:

/usr/sbin/apachectl: line 82: ulimit open files: cannot modify limit: Invalid  argument

Now I know this works, I had been using it on my MacBook Pro to restart apache. So I did a little digging and apparently in the OS X 10.6.5 update, the apachectl script was updated and a bug was introduced. Luckily its a simple fix, head to line 64 of the /usr/sbin/apachectl file and change the following line:

ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"

to this:


Save the file and your apachectl script should work without issue.

CFWheels Eclipse Dictionary Updated

A while back I created a dictionary file for Eclipse based editors that would provide code insight and code completion for the CFWheels methods. This works in both ColdFusion Builder and CFEclipse. Well, I finally got around to updating it for the CFWheels 1.1 release.
So if your using Eclipse and CFWheels, you can grab the update on GitHub.

ColdFusion Builder Contest Winner

Let me start by saying how thankful I am to be a part of this community. I want to thank everyone who sponsored my ride for the National MS Society as well as all of you who blogged about the contest and sent out re-tweets, etc. Thanks so much again to Adam Lehman and Adobe for donating the copy of ColdFusion Builder for me to give away to help in my fundraising efforts! I raised a total of $558 for the MS Society which for my first time riding in this event I think is awesome!
So after the random drawing, the winner is:
Jeff Borisch!!
Congratulations Jeff! I will be contacting you via email with the information on your ColdFusion Builder license.
Thanks again to everyone for your support!
The ride is this weekend and I will be posting updates to Twitter and Facebook about every 10 miles using my CycleComputer software so feel free to follow along if you dont have anything better to do.

ColdFusion Builder Contest Update

With the ride coming up this weekend, Im having to adjust my schedule somewhat. I will not be around at all on Friday to do the drawing so Im going to move the deadline and drawing up to today. If you are interested in a chance to win a copy of ColdFusion Builder, you have until 2pm EST to enter. I will be doing the drawing shortly after 2pm EST and announcing the winner here and on Twitter.
You can donate to the ride here, and remember, you get one entry in the contest drawing for each $5.00 that you donate.
A few updates on the progress of fundraising for the ride. So far, I have raised $558 dollars for the National MS Society. I havent reached my goal but $1000 might have been pretty ambitious for my first year. I received an email update from the North Florida MS chapter that is holding the ride yesterday and so far we have over 2300 riders and have raised over $1M dollars for MS from this one ride! Thats amazing!
The weather doesnt look like its going to hold out this weekend so I may end up riding 150 miles in the rain, but no matter. My goal is to finish it no matter what!
If you are interested in seeing the routes we will be riding this weekend. Here are links to day 1 and day 2.
Day 1
Day 2
Thanks for all of you help and support!

Win A Copy Of CFBuilder

After nearly 12 years of coding in ColdFusion, I have watched my weight climb as I spend more and more time behind a desk. Gone are the days when I could spend hours in the gym working to increase my 1 rep max when I used to powerlift. Yeah, I gave that up years ago. So in an effort to get some exercise I took up bike riding. After spending several hundred dollars on a decent mountain bike, I quickly realized that if you weigh more than 200 pounds, those seats are just not meant for you. Not even with padded shorts! Ouch!
So I went looking for a new option. I came across a recumbent trike that looked really comfortable. So I tracked down a dealer and took the hour and a half drive to go test drive one. It was like peddling a reclining lawn chair. Super comfortable! Needless to say, I bought 2 of them so my wife could ride along with me.
We wanted to set a goal for ourselves but not just some verbal goal that we could easily get out of. We needed to be committed to something so we had accountability. So we found out about the National Multiple Sclerosis Societies MS150 fundraisers. These are bike rides held all over the country that normally span 2 days and about 150 miles. There are options for 1 day events as well for more beginning riders but no-way was I going to take the easy way out! Im going for the whole deal. This gave us something to be accountable for. When you sign up you agree to raise a minimum of $200 via sponsors or you pay the $200 yourself. This was great, we were helping to raise money for a great cause and we had a goal to achieve.
Our riding is going good, we are doing 30+ miles a day on the weekends already and feeling pretty good afterwards so Im confident we will be ready come October 2nd when the ride takes place. I have lost nearly 30 lbs already as well which is a great side bonus.
Now, here is my problem. When we signed up, we had a friendly competition going about who could raise the most money for the ride. She works in the emergency room of a local hospital and the doctors there are all going crazy signing up on her sponsorship sheet. She is kicking my tail!!
I need some help in fundraising so I decided to give a copy of ColdFusion Builder away to a random person who donates $5 or more to my ride. I set a goal of $1000 in fundraising which is completely reachable considering there are individuals now who already have over $5000 raised and we still have 8 weeks to go!

I will enter all the names of those who sponsor me for $5.00 or more into a db table and throw together a quick ColdFusion template that will randomly select one of them. That person will receive a copy of ColdFusion Builder which includes Flash Builder 4 Standard.
*** UPDATE ***
After talking someone about this and getting a little more insight, Im changing the rules just a bit. For every $5.00 that you donate, your name will get entered into the database. So if you donated $20.00, your name would be entered into the database 4 times, essentially giving you 4 chances to win.
Donations must me received before October 2nd when the ride takes place in order to win.
You can donate online via the MS Society’s site and my personal fundraising page here. You must use this link to donate online so I get credit for the donation.
Im linking a few sites below if you are interested in reading a bit more about the National MS Society or the “Cycle to the Shore” event.
National MS Society, North Florida Chapter
BikeMS Cycle To The Shore Event
Feel free to comment with any questions.

ColdFusion Wallpaper – Revolution

I was doing an image search on Google last night when I came across an image of the old ColdFusion logo from the Allaire days. I started feeling a bit nostalgic and the creative inspiration took over. I have been wanting to spend some time playing around with and investigating Illustrator and Photoshop CS4 so this gave me a good excuse. After a few hours of tinkering, I came up with a new wallpaper and was pretty happy with it so I figured someone else might be interested in using it.
I have created several widescreen versions and an iPhone version as well. Hope you like it.

iPhone Version


Using Partials In CFWheels To Keep DRY

One of the things I like about CFWheels is that its based on sensible conventions. If you follow these conventions, they can really save you a ton of time writing boiler-plate code as well as configuration. Working synergistically with these conventions are a lot of helper methods that will also reduce the amount of code you have to write as well as keeping your application DRY (Dont Repeat Yourself).
I am working on some new features for SplashCMS and ran into a situation that helped clean up quite a bit of code in some of my views and I thought it warranted a little example to show how nice this feature really is.
I have several places where I want to display a list of snippets in this application. Normally you would just write this code in each of the views that display the listing:

Snippets.cfc (controller)





Not really a big deal I know. Pretty simple code to display a small list in a table. But consider this, if you do this 2 or 3 times for each different type of list you have, that could really start to get unruly in a hurry. So to help us keep our views as DRY as possible, we can leverage a feature in CFWheels called partials.
Partials can best be described as CFINCLUDE on steroids. They work exactly like a CFINCLUDE in their simplest form but, are pretty cool in the fact that they can be as simple or complex in functionality as you need. In order to keep things as simple as possible for this post we will simply look at how using a Wheels Partial over a CFINCLUDE is beneficial for our situation and will delve further into some of their more powerful features in another post.
So, in order to keep from repeating ourselves and having as little code as possible in our app, lets look at how we can simplify this. Since we know we are outputting a list of snippets thats returned in our query, we can strip out the code thats used in each view and place it into a partial named the same as our query. By doing this, we are going to take advantage of one of the features of partials that allows us to automatically handle data being passed into it.
First lets look at the code that makes this happen and then I will explain it further.






Notice in the view file (index.cfm) how we are calling the partial and instead of passing a file name, we are passing the actual query into the includePartial() method. By doing this, we are telling Wheels that we want it to find our partial named _snippet and loop over it once for each record in the query. Pretty nice, right? We are letting Wheels handle looping over the query and including our display code for us. This is much more portable now. Any place we want to display this list, we can simply call the partial and we have only one file with display code to manage the list. This helps to DRY up our code.
One thing to note. You will notice that Im passing a query named “snippets” plural. However the file Wheels will look for is “_snippet.cfm” singular. Partials are always named starting with an underscore “_” and when Wheels evaluates the query passed into it, it knows we are dealing with a Snippet model and our models are always singular, so the convention is to use singular names for the partials as well. Just think of it like this, the partial is always dealing with only one record at a time, thus its singular.
I hope this helps explain this really cool feature of partials a bit. In my next post we will expand on this example by demonstrating how CFWheels helps you to use grouping in this same partial.

My Take On The iPad

Yeah it sure created a stir alright, with Fanboys and haters alike! It seems the iPad is certainly dividing camps and Im not really sure why. Yeah I have to admit I was watching the live blogs during the event as I always do. Anticipating something that would be revolutionary. I have to admit though, my expectations were not super high. I have never been interested in a tablet PC. I owned a netbook for 2 months and hated the damn thing with a passion. So I was just watching hoping for something that would allow me to browse the internet while sitting on the couch without unhooking everything from my Macbook Pro in the office.
After seeing it, I thought like alot of people, “its just a big iPod Touch”. But after seeing the iWork demos, I started to think bigger. I still wasnt sold yet. Here are a few of my initial gripes, notice I said initial because after thinking on it a few days, some of them have changed.

  1. No iSight camera
  2. Runs the iPhone OS, really?
  3. $130 upcharge for 3G
  4. No Flash support
Now after thinking on this for a few days and reading plenty of other gripes about the iPad, I have changed my feelings on at least 2 of these.
First, I thought the idea of running the iPhone OS was just rediculous. How could a tablet be functional without a real operating system? How could I get any work done on it if I cant run Textmate or any of my other applications. But I started to realize, its not meant for work. Its not meant for people like us (developers) to replace our work machines. Steve Jobs stated at the beginning of his presentation that the device was to fit between the iPod and the laptop. Not replace the laptop. And given the fact that there are what, 7 million iPhone and iPod touch owners it just makes sense given the amount of apps out there already.
I think this move will make the iPad more accessible to more people this way. Again, this thing wasnt aimed at being our mobile development platform!
As far as no flash support, I know there are alot of people screaming about that right now and I admit every time I try to visit a flash enabled site on my iPhone Im further annoyed. However, let me make this point. Every time I load a page on the web that uses Flash, the CPU on my Macbook Pro spins up to 80% – 90% until I browse away from the page. I know Im not the only one since I have seen a few others ask about this on Twitter as well. Now if Flash Player does that to a 2.53GHz Core 2 Duo processor, whats it going to do to a 1GHz processor? Not to mention the battery power it would consume. I certainly wouldnt want this happening on my iPhone.
Now Im not saying any of that is the reason for lack of Flash support. There are even posts on MacRumors as well as a few others stating that Flash may be enabled on the iPad. None of us will know before 60 days unless Apple publicly states otherwise.
I will buy one. My kids are going crazy for the thing. However I learned a lesson from being an early adopter of the iPhone. I will not spend the big bucks for the high end model. Not yet. I will buy the cheaper one without 3G so we can play games on it and browse the web from the living room. But I suspect that we will see a second version following this one that will have the camera and alot of the other things people are complaining that is missing.
I think as being tech people though, we look at things from a skewed perspective. And thats the biggest reason that the iPad seems lacking at this point.

Pre-Conference Training at cf.Objective() 2010

If you are planning to attend cf.Objective() this year, you really should consider checking out some of the pre-conference training sessions. There are one and two day sessions listed and the trainers are all top-notch! Here is a list of the sessions that have been announced.
Building Secure CFML Applications (April 21) – Jason Dean and Pete Freitag
Coldbox:100 Training (April 21) – Luis Majano
Developing Applications with ColdFusion 9 Object Relational Mapping (ORM) (April 20-21) – Bob Silverberg and Mark Mandel
Getting Started with Flex and AIR Development with the Flex SDK (April 21) – John Mason
Mach-II and OOP from the Ground Up (April 20-21) – Kurt Weirsma, Peter Farrell and Matt Woodward
Rapid Development with Model-Glue 3 (April 20-21) – Dan Wilson and Ezra Parker