Friday, October 04, 2013

Team CF Advance

I recently threw my hat in the ring along with 60 other ColdFusion developers to be part of a "Team CF Advance". Initiated by Denard Springle, we hope to further Open Source ColdFusion/CFML projects.

The CFML language, which runs on Adobe's ColdFusion Server ( as well as Railo and Open BlueDragon), is suffering a bit. I think the community doesn't feel strong these days, and many fingers seem to be pointed at Adobe for lack of marketing. Years ago, ColdFusion felt groundbreaking - now, there are many alternatives to help developers get applications up and running quickly, and many are Open Source.

I'm looking forward to some great discussions, ideas, and I hope to contribute time and code to the cause. Regardless of its place in the market, CFML is a great language, is versatile, and is incredibly easy to learn.

For more information, head to Denard's blog post about Team CF Advance

Wednesday, September 01, 2010

Took son to his first soccer gathering - turns out they don't have a coach. Guess who got roped into coach, asst coach, manager, etc...

Thursday, January 14, 2010

Response to criticism about Twitter

A friend (acquaintance) posted recently about how much he hated Twitter. Over the last few weeks I've jotted down some thoughts and I figured I'd share.

1 - You point to Twitter as 'a problem' with our society and finger spam as a sign. Why is Twitter the problem? It is blogging on a small scale, requiring less effort and therefore cost. Blog spam is huge too, that doesn't stop blogging.

Are you advocating an alternative, or hating on the microblogging concept? If the former, what is your suggested app? Should there be a forum for people to share short one-off thoughts and opinions? If the latter (hater), then it is people that are the problem, and the fact that anyone would care to tweet about mundane crap (and that others might listen).

2 - You call the 'follower' concept a joke. This is one huge benefit to Twitter - the connected friends/followers aspect. Even though weak in some ways, this is an improvement over web pages, blogs, etc. This means the system could morph into a model where it can rank trustworthy tweets based on closeness to your peer group.

Seems powerful to me.

And this 'follower' concept benefits greatly by the fact that it freely admits that you aren't friends with everyone you follow and vice versa. Followers also come and go at will. Let's be honest, the people with a million Facebook friends aren't really friends with each one. I prefer this honest definition of relationship from many angles, especially the security standpoint.

3 - You comment on the noise/spam/pointless comments on Twitter. There does seem to be very little difference between a valid tweet and spam sometimes. Makes it tough to distinguish signal and noise. Honestly, I find the whole web like that.

I think Twitter is fascinating. Odd, but fascinating.

What I do love about twitter is how it is more of a platform than an application. Whatever the mob wants, can be created, even if the mob is made up of bots and spammers/marketers.

Wednesday, December 23, 2009

Timezones in our CF app - ICU4J

I posted this recently to our Vancouver User Group blog, I thought I'd repost here. I'd love feedback!

In my main gig, we've been working on this particular enterprise application for almost two years.

Like any development team, we took the lessons that we learned from our previous applications. We were quite fortunate that we were able to start pretty much from the ground up, and tried to make wise decisons about things like:

  • Using a code framework
  • Integrating or building CMS functionality
  • Finding a balance between having processing in the database vs CF queries and objects
  • An approach to caching
  • Globalization

I thought I would focus on some challenges we faced with respect to globalization, in particular, timezones.

Our application is a what they call a multi-tenant application, where a single code base and database serves multiple client sites. We knew that globalization was an important aspect of the project.

As part of our efforts towards globalization, we made sure to store dates and times in UTC. This way, dates and times could be independant of the front end usage.

Now we needed to work out how to take those UTC dates and display them in a particular timezone.

We created a front end algorithm to determine a user's timezone. This is encapsulated into a function so that we can expand as required. For example, our application focuses much more on a single timezone for each site (as opposed to user specific settings), so early versions could focus on this simplified approach. We store a user's settings in the session scope.

As an aside, getting a visitor's timezone from their browser isn't as straightforward as one might expect. It is easy to get a number repesenting the offset from UTC, but this doesn't necessarily reveal their actual timezone or daylight savings settings.

Here's a link to a recent blog post about one method of determining a visitor's timezone at

Now that we had what we needed, it was time to present and retrieve data based on the required timezone.

This is where ICU4J came in. ICU4J is a java library for International Components for Unicode, for Java, and can be found at Obviously, since it is in Java the library integrates well with ColdFusion.

So we connected ColdFusion to the jar by instantiating the timezone component in the application scope. We created helper functions to display dates and times in the correct formats and timezones. By sitting atop functions like the ICU4J CastFromUTC, we were now able convert properly.

There is a great blog about globalization in ColdFusion at

So we thought all was well. We were wrong.

In our application we had a particular balance of database stored procedures and CF business logic. Many queries required date comparisons, for example reporting. We began passing converted dates into the queries and stored procedures, converting them to UTC before using them at the database level.

Sometimes it felt like a hack, but it worked.

Or maybe not everytime. In one place we generated a large calendar from the database. This calendar had to look at each day, but each day was defined based on the timezone settings of the user. Passing a timezone in wasn't always enough - consider months where the timezone offset changes due to daylight savings.

The database needed to have some of this timezone information available. We obviously needed to have some sort of timezone intellegence on the database side. However, depending on your database of choice, there might not be much in the way of timezone functionality built in.

So we began to consider ICU4J integration. It turns out that for our database platform, this had already been done.

Article at

So using the ICU4J libraries, we can generate and update tables to store all the information we might need about timezones, offsets and daylight savings boundaries. Powerful stuff.

There are some real benefits to this usage, including:

  • Consistency - we're using the same library on both ends
  • Maintenance - we need to stay on top of updates for one library only (ICU4J)
  • Flexibility - we can play to the strengths of CF vs DB and select the best environment for any particular task.

That's the path we're working towards. So far it was been much more work than we expected but it has also been rewarding. We take it step by step, and keep each piece modular so that we can expand over time. We have a stong feeling that we are headed in the right direction - at very least we are trying to carefully consider our options at each phase.

Tuesday, August 18, 2009

CFUnited 2009 - Day Four

I'm a bit late with my last day post - the lack of sleep caught up with me and I have a bit of work backlog to deal with.

I didn't get a lot of sleep the last night of the conference, so I struggled to get up and checkout of the hotel. I decided when I got to the conference that I would try to attend the sessions that were put on by the major speakers.

I snuck into Ben Nadel's "Extending Custom Tags" function, and was pleasantly surprised. He's a great presenter, and I love that he talks about solutions that are practical. There aren't many other developers that would base a whole session on Custom Tags, since they are sometimes seen as one of the older features of ColdFusion, but Ben showed reminded us of how much we can actually do with them.

He touched on:
  • Recursion
  • Looping and workflow logic
  • The GetBaseTagData() function
Ben also showed us how we could use Custom Tags to call CFCs, allowing us a little more portability in our code and even how to execute components as Custom Tags. A really interesting presentation.

I also attended Peter Bell's "Estimating Requirements" session. He is also a great presenter, and I was again surprised at the amount of new tips that I took away from his speech.

He focused on three types of projects:
  • Configuration - small, common projects where the price can include the spec
  • Customization - medium sized projects
  • Exploration - larger projects that require some research and often require fairly open specs
Peter suggested that in order to get a handle on projects, we should look at these elements:
  • Business intent - WHY is the project being done
  • Audiences and functional roles
  • Objectives - what does the audience want
  • User stories - "as an X, I want X, so that X"
  • Use cases - screens, actions, steps, and alternate and error paths
Some other highlights of the session:
  • For small projects, sometimes the writing of the spec can be part of the development
  • Capturing requirements using Intent Driven Design
  • Focussing on "why" a project is being done, breaking too many intentions into separate projects
  • Use cases are especially important for "fixed bid" projects
  • How to handle "dark matter" - the unexpected things that come up
  • Ways in which you can ensure that if it is not in the spec it is NOT included
  • Agile approaches like Scrum, Lean, Emergent Design, etc
  • The importance of minimizing 'work in progress' - there is no such thing as 90% done
It was a good session.

No better way to end the morning than with another jQuery session by Ray Camden. I thought I had heard all he had to say about Ajax and JavaScript, but at least I knew it would be interesting. Considering I don't know jQuery that well, it was really quite informative. It was nice starting with the basics (selectors) and moving quicking into chaining, matching and filtering. I enjoyed hearing more about the $(document).ready function and a summary of his favourite jQuery plugins.

In between sessions it was also nice running into Jose in the morning, and getting to thank him again for helping me get to downtown DC. I had lunch with him at a table with a bunch of great presenters (Lisa, Dee, Jason, Ben, Simon and more) so it was nice to be able to say thanks and goodbye to these funny and hardworking folks as I headed off to the airport.

I left a lot of time to get to the airport, and just took the trip home slowly, enjoying as much as I could the downtime. The flights were long, but it was great to get home. It was certainly a great conference and wonderful experience.

(Image from afagen on Flickr)

Saturday, August 15, 2009

CFUnited 2009 - Day Three

... And the conference only gets better.

It was another day of free coffee, a great lunch and better company. The vibe at day three of CFUnited was a bit different today, since quite a few people seemed be headed out while a new batch of people were arriving for the weekend session.

Paul and I managed to bump into Sam Farmer and Ben Nadel and a whole bunch of other exciting members of the community. I'm really struck by how some people come to the conference and DON'T network - this community is so exciting, but would be even more so if people took a moment and the risk (it's really no risk) to introduce themselves!!

My first session was with Simon Free listening to him talk about Facebook apps in ColdFusion. There wasn't much here that I didn't know, but his talk certainly demystified FBML for me. He had good tips about:
  • How to handle the bug with the FORM field name fb_sig in CF8 (due to auto form validation)
  • How Facebook processes the pages you create
  • How some features (CFFORM, CFDUMP) won't work within FB pages
  • What "proxied_email" is and why it's there
  • How the new extended privacy policy affects app developers
He was very positive about Facebook without being a fanboy - the platform has it's problems but it is a very valuable tool for reaching many people. His code examples were clean and realistic.

I attended his session on Developing APIs later in the day (man, this guy is busy!), which was another really good one. He described RESTful concepts well, and talked about the problems in creating an API:
  • It takes a lot of planning
  • They might be used/consumed by people in many different languages and environments
  • You have to be careful about scopes (esp cookies and sessions)
  • APIs require good documentation
  • Security is an immediate issue
Simon gave good examples using Apache rewrite and mentioned the code snipped 'GetPageContext().GetOut().ClearBuffer()' as a tool in handling excess whitespace. I loved how he made a template for API method documentation available - good stuff!

I attended Terry and Dip's session about the new Microsoft tools available in CF9. Although I wasn't blown away, there were a couple good things about the session. It was really easy to use the CFEXCHANGE tag, the Sharepoint integration was interesting, and Terry made a great point about how the ability to convert stuff to PDF opens up a whole new world to CF developers due to the amazing PDF functions - extracting text, images, thumbnails, etc.

Mr Ray Camden was hilarious as always in his Ajax CF/911 session. He sold the audience on Firebug and ColdFire (which we already use) and pointed out a few "gotchas" that trip up developers using Ajax:
  • Whitespace
  • How debugging works in Adobe ColdFusion
  • Cross domain concerns and JSONP
  • onRequest in Application.cfc blocking Ajax requests

I attended a session by Selene at RiteTech. It wasn't really for me, but it's interesting hearing someone's thoughts about "build vs. buy" when it comes to e-commerce. I've built many different types of e-commerce applications and I agree with her that the "build" option is not very compelling. Unfortunately, I thought she missed a whole type of solutions - hosted solutions that are developer friendly, like GoodBarry and Shopify. Some hosted options have gotten much more advanced than Miva. I would have also LOVED to see a mention of FoxyCart, one of my new best friends.

My last session of the day was INTENSE - Marc Esher took us on a crazy ride through his development techniques where he avoids "monkeywork", makes the computer the slave and works more productively. He introduced snippets, Launchy, Ant and JMeter and talked about how developers need to avoid the noise - best quote of the session:

Developers accept noise graciously, thus Twitter

Good point Marc.

Man this guy was excited and passionate. Whoever he works for is LUCKY - based on how fast the guy talks and works, he probably gets more done in his 9-5 than some do in a week. A very inspiring session.

The day ended (other than my DC adventure) with a round of great demos by the CF community and a hilarious video. There are some awesome projects out there. Thanks to the CFUnited team and the entire community for bringing us a THIRD day of inspiration. One more day left.