Wednesday, September 01, 2010
Thursday, January 14, 2010
Response to criticism about Twitter
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 blogs.windwardreports.com.
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 site.icu-project.org. 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 cfg11n.blogspot.com.
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 CodeProject.com.
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
- Recursion
- Looping and workflow logic
- The GetBaseTagData() function
- 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
- 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
- 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

Saturday, August 15, 2009
CFUnited 2009 - Day Three
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
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
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.
Friday, August 14, 2009
CFUnited 2009 - Day Three, DC edition
After the demos, I walked to the front of the Lansdowne resort. No other CFUnited attendees had responded to my tweet about heading into the city, so I was a bit torn. I'm not a traveller, and I feel so lost - I would be kicking myself if I didn't at least try to see the sights. The shuttle to the "Metro" (like a train or subway to DC) pulled up, and I hesitantly got on. I had no camera or anything from my hotel room, but this was my best chance to get there.
One other conference person got on and introduced himself as Jose. I mentioned my plan to head to the Smithsonian area by myself, and he gave me some tips. I was a bit worried, but he helped me figure it out. We chatted about DC, the US economy, health care, web development, all the light topics.
Just over 90 minutes later I reached my stop. I climbed the escalator to "The Mall". Wow.
It was a really warm night, and even as the sun set there were tourists and excited visitors everywhere. I had NO idea where I was, but I saw the familiar Washington Monument and so I started walking. It is a very strange feeling being in a strange place with no idea of direction or location - but it was a very cool place to be stranded.
An hour and a half later I managed to see the monument, World War II memorial and fountain, Lincoln's Memorial and the White House. The buzz from the tourists, even so late in the evening, was almost tangible, and staring up at some of the historic monuments I could almost feel where some of the Americans get their pride of their country. The sights at night were pretty much breathtaking.I grabbed a quick sandwich from a souvenir shop and hustled back to the train. I didn't make it to the train station in time (it closed early for repairs or something), but some tourists helped me find my way to the next station.
I got settled for the long ride back - after a train ride, a shuttle ride and a taxi ride, I managed to make it back after almost three hours. What a memorable adventure, even if the actual DC visit was short. Thanks to Jose, wherever you are, for being such a great help!
Photo by ehpien on Flickr