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:



Learning ColdFusion 9 - ColdFusion 9 tutorials, samples, examples, demos

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,516 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 »
177 Comments

@markdrew: Luis is on twitter? @lmajano


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,516 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.


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
Nov 20, 2009 at 11:00 PM
Five Months Without Hungarian Notation And I'm Loving It
@Marcel, Yeah, I always err on the side of longer but more readable variable names. As for the camel casing of CF methods and the headless camel casing of custom items, I get around this by always ... read »
Nov 20, 2009 at 10:56 PM
Five Months Without Hungarian Notation And I'm Loving It
I use the following and love it: my.namespace.MyComponents.functionMethodsOrUDF() CONSTANT_VALUES_OR_PROPERTIES One thing I always try is to CamelCaseBuiltInColdFusionFunctions() so others can tell ... read »
Nov 20, 2009 at 5:38 PM
Learning ColdFusion 8: CFImage Part I - Reading And Writing Images
Hi Ben, Great article. I've been looking around to see if ColdFusion image engine can programatically create the following "wrap around" effect: http://www.creativepro.com/article/photoshop-s-she ... read »
Nov 20, 2009 at 5:35 PM
Maintaining ColdFusion Sessions Across SMS Text Message Requests Without Cookies
@Dave: I talked to Gert he suggested: <cfhttp method="get" url="http://{some cf website}" result="stuff" addtoken="yes" /> Note the addition of cfhttp attribute addtoken. That should persist y ... read »
Nov 20, 2009 at 5:23 PM
Maintaining ColdFusion Sessions Across SMS Text Message Requests Without Cookies
@Todd, Ahh, gotcha, yeah that makes sense. ... read »
Nov 20, 2009 at 5:17 PM
Maintaining ColdFusion Sessions Across SMS Text Message Requests Without Cookies
Ben, sorry if I didn't make this clear. You can make it work like that if you want, just put <cfset session.foo = 1> (and <cfset application.foo = 1>) in your OnRequestStart() and it reve ... read »
Nov 20, 2009 at 5:07 PM
Maintaining ColdFusion Sessions Across SMS Text Message Requests Without Cookies
@Todd, I have seen tidbits about the way Railo handles session. I can understand that it lazy-loads sessions, but I also think that I might make some things more complicated. For example, often tim ... read »
Nov 20, 2009 at 4:53 PM
Maintaining ColdFusion Sessions Across SMS Text Message Requests Without Cookies
Ben, you can ramp up the security by turning on J2EE session which gives you a third set of numbers other than CFID/CFTOKEN. There's a reason why ACF put this in place (other than just session replic ... read »