My Journey Through cf.Objective() 2009 (And My Raffle Winner!)

Posted May 22, 2009 at 2:34 PM

Tags: ColdFusion

cf.Objective() 2009 was an unbelievable conference. This was my second year there and it seems to be getting better each time. If you want to read about my experience, checkout my review on Fusion Authority (teaser below):


In The Magic of Thinking Big, Dr. David Schwartz tells us that to improve ourselves and our ability to think creatively, we need to surround ourselves with people of the highest caliber. I believe in this concept 100%. I believe that to become smarter, we must communicate with the smartest people; to reach our full potential, we must spend time with those who are the most accomplished; and, to become better, we must be around people that actively encourage us to break the boundaries of mediocrity and strive for improvement. I found that cf.Objective() helped me with all of these aspirations.

In the best meaning of the term, cf.Objective() overwhelmed me; it was all at once intimidating and invigorating, exhausting and energizing. Sitting there, listening to the brightest minds in our community, I felt both completely inadequate and yet, at the same time, full of more potential than ever. With each passing session, all I could think about was how badly I wanted to get home and start applying the ideas that were just presented. Each talk seemed to symbolize another milestone - each concept, another stop on my travels from journeyman to master. The conference not only presented the vast body of knowledge that I want to build, it laid the foundations upon which to build it.

Read full review on Fusion Authority ยป


As many of you know, in addition to just attending the conference, I was also hosting a photo raffle in which the winner of a Flip Mino HD video recorder would be selected from the pool of people with whom I was lucky enough to take a photo. I met a lot of great people and took some great photos and now, it's time to select a random winner! To keep things interesting, I decided to leverage Twitter's search API to help me pick a random number (drum roll please):

 
 
 
 
 
 
 
 
 
 

Congratulations to Luis Majano!! For any of you who don't know Luis, he is the creator of the ColdBox framework, and uber documenter, and all around brilliant guy.

I'd love to do the same exact thing at the upcoming CFUNITED conference in August. So, if you see me there, come get a photo!

And, if any of you care to see the code I executed above, here it is:

 Launch code in new window » Download code as text file »

  • <!--- Get the min and max photo indexes. --->
  • <cfset intMinPhotoIndex = 57 />
  • <cfset intMaxPhotoIndex = 96 />
  •  
  • <!--- Build a query to get all digits. --->
  • <cfset strQuery = (
  • "q=" &
  • "0+OR+" &
  • "1+OR+" &
  • "2+OR+" &
  • "3+OR+" &
  • "4+OR+" &
  • "5+OR+" &
  • "6+OR+" &
  • "7+OR+" &
  • "8+OR+" &
  • "9&" &
  • "rpp=#RandRange( 10, 100 )#&" &
  • "page=" & RandRange( 1, 5 )
  • ) />
  •  
  • <!--- Get statuses that have digits. --->
  • <cfhttp
  • result="objGet"
  • method="get"
  • url="http://search.twitter.com/search.json?#strQuery#"
  • useragent="bot.bennadel.com"
  • />
  •  
  • <!--- Desearilize the JSON response. --->
  • <cfset arrStatuses = DeserializeJSON( objGet.FileContent ).Results />
  •  
  •  
  • <!---
  • Get a running total - we are going to grab every number
  • out of the given result set.
  • --->
  • <cfset intTotal = 0 />
  •  
  • <!--- Loop over the results. --->
  • <cfloop
  • index="objStatus"
  • array="#arrStatuses#">
  •  
  • <!--- Grab all numbers out of this status text. --->
  • <cfset arrNumbers = REMatch( "\d{1,5}", objStatus.Text ) />
  •  
  • <!---
  • Sum the numbers and add them to our running total. Wrap
  • this in a try/catch because it might have extended
  • characters that could trip us up.
  • --->
  • <cftry>
  • <cfset intTotal += ArraySum( arrNumbers ) />
  •  
  • <cfcatch>
  • <!--- Nothing to do here. --->
  • </cfcatch>
  • </cftry>
  •  
  • </cfloop>
  •  
  •  
  • <!---
  • Now that we have our running total, let's use that to pick
  • a random number between our photos (using MOD).
  • --->
  • <cfset intPhotoIndex = (
  • intMinPhotoIndex +
  • (intTotal MOD (intMaxPhotoIndex - intMinPhotoIndex + 1))
  • ) />
  •  
  • <!--- Output the link to the randomly selected photo. --->
  • <cfoutput>
  •  
  • <p>
  • And the winner is:
  • <a
  • href="http://www.bennadel.com?site-photo=#intPhotoIndex#"
  • target="bennadel"
  • >#intPhotoIndex#</a>
  • </p>
  •  
  • </cfoutput>

Download Code Snippet ZIP File

Post Comment  |  Ask Ben  |  Permalink  |  Print Page


You Might Also Be Interested In:




Reader Comments

May 22, 2009 at 2:47 PM // reply »
7 Comments

I am so sure Luis rigged that, even though he isn't even on twitter, I am sure he did something to the search results!

Trust me, he would have done it and written a 400 page document and training session :D

Na, just joking, well done Luis!


May 22, 2009 at 2:49 PM // reply »
6 Comments

I love it.
;-)

Congrats to Luis!


May 22, 2009 at 2:50 PM // reply »
6,371 Comments

@Mark,

One of the funniest moments at the conference was when Chris Scott and Mark Mandel were talking about possible additions to ColdSpring and Luis jumped in with the, "If you want that I can give it to you - ColdBox already does that."

Ha ha ha, hilarious!


May 22, 2009 at 3:07 PM // reply »
2 Comments

@Ben and fellow CFers,

I have to say to everyone else who sees this comment, that you and your blog is a true embodiment of the spirit of our community. A friendly smile, open arms and lots of great knowledge. I am personally looking forward to attending your first conference speaking engagement at CFUnited, it's long overdue!

Once again Ben it was great catching up with you during CF.Objective(), see you soon at CFUnited!

Cheers..


May 22, 2009 at 3:26 PM // reply »
165 Comments

@markdrew: Luis is on twitter? @lmajano


Luis Majano
May 22, 2009 at 4:48 PM // reply »
5 Comments

WOW!! Thanks Ben!! What a great surprise!! I knew that photo would bring me luck!!

@markdrew
I will have to document this prize and results!!

Thanks guys!


May 22, 2009 at 4:56 PM // reply »
6,371 Comments

@Phill,

Thanks so much the kind words. It was great catching up and having a few meals together; heck, even the airport burrito was a good time (not counting when Samer held us up at security and was almost strip searched).

@Luis,

I sent you and email a while ago - let me know if you did not get it.


May 22, 2009 at 6:25 PM // reply »
53 Comments

Ben, that is perfect! I can't think of anyone more deserving of winning, except maybe you.

I'm glad it went to someone who will put it to good use, as I have no doubt Luis will use it to help document ColdBox.


Luis Majano
May 22, 2009 at 6:46 PM // reply »
5 Comments

That is an excellent idea!!1 I will start creating more and more videos brought to you by Kinky Solutions!!


Post Comment  |  Ask Ben

Recent Blog Comments
Jill
Nov 7, 2009 at 7:58 AM
How To Unformat Your Code (Like A Pro)
LMAO - this was pretty funny! I have to admit - I also love to reformat code so I can read it. My boss used to tell me to leave my OCD at home. Now I don't feel so bad after reading everyone else' ... read »
Nov 6, 2009 at 10:10 PM
How To Unformat Your Code (Like A Pro)
The timing of this post is just uncanny. I spent the last 15-20 minutes manually un-formatting my "Ben Nadel" style code within a CFC of mine. I was really digging the readability a few weeks ago, bu ... read »
Roe
Nov 6, 2009 at 5:11 PM
Passing Arrays By Reference In ColdFusion - SWEEET!
ArraySort also reorders the results of these java obj's ... read »
Nov 6, 2009 at 4:53 PM
How To Unformat Your Code (Like A Pro)
I tried to go *back* the other way. Adding formatting is actually a much more complicated problem than removing formatting. Anyway, here is what I could put together with a minimal amount of time: ... read »
Asaf
Nov 6, 2009 at 2:35 PM
ColdFusion GetPageContext() Massive Exploration
Hi, I actually found this post useful. I recently acquired a SSL certificate for my website and when I switched over to HTTPS Internet Explorer would throw an error when trying to download a dynamic ... read »
Nov 6, 2009 at 2:19 PM
How To Unformat Your Code (Like A Pro)
@Chuck, @Nathan, Well, now I feel like it's a challenge.... I accept. ... read »
Nathan Stanford
Nov 6, 2009 at 2:06 PM
How To Unformat Your Code (Like A Pro)
@Chuck, I would love it as well. I was not joking I am very serious I love well formatted code. ... read »
Chuck
Nov 6, 2009 at 1:54 PM
How To Unformat Your Code (Like A Pro)
Ben great job, I happen to like your coding style and find it very easy to understand and follow. @Nathan, I totally agree, I (like the rest of you I assume) am pretty meticulous when it comes to c ... read »