Full Script ColdFusion Component Syntax Highlighting on GitHub

Update

GitHub uses an open source library, pygments for syntax highlighting. This is issue #756 on Bitbucket.


I’ve been primarily using full script components instead of tag components for the last year or so. In an MVC application this works out very well. The controllers and models are scripted while the views are html and cfml tags. Developers can write application logic quickly and see it clearly in script. Designers work with the tag based markup they are used to. Win – Win.

One of the things that has bugged me about script components when pushed to GitHub is lack of syntax highlighting. It is quite difficult to quickly scan the code of a collaborator or with the popularity of Gists, example code on many popular blogs. Here is an example of a ColdFusion component Gist:

Ew – the above example is hard to follow. So now I just add <cfscript> to all of my full script components even though not required by the language specification. Then all of our GitHub repositories and Gists pick up proper syntax highlighting:

Much better. So there you have it. You may not find the annoyance enough to include <cfscript> at the top of your Gists or .cfc files. In our case we scan and share on GitHub frequently so it is beneficial to have some syntax highlighting for full script ColdFusion components

Current Project Philosophy Explained

“I have fun building data driven, emotionally binding experiences that grow active and measurable audiences”

That is a mouthful. It sounds like jargon and a personal marketing gimmick. However that phrase is founded on some seriously thought out values in how I carry out professional projects.

  1. Have fun. If I or anyone I’m working with isn’t enjoying themselves then why am I working on the project? I don’t expect every moment to be the cat’s pajamas but if long term anxiety or frustration start kicking in I figure out why. Otherwise the project and end user will suffer.
  2. Make data driven decisions. A good decision – at least in business – needs quantifiable reasoning. Whenever there are surveys, analytics, or data to support a decision, I use it. If there isn’t I figure out how to obtain facts to support project decisions. If making updates to an existing project, most of this data comes from #4, measuring existing audiences.
  3. Build emotionally binding experiences. Every time you enjoy something, it is moreso an emotional reaction than a methodical logical response. If you got good service at a restaurant it made you feel good. If something is pretty it makes you feel good. If something is bug free and works better than expected it makes you feel good. Great customer service makes you feel good. Clients or customers start tying outstanding experiences to your brand and that is how your product or service is going to win in a competitive marketplace. I do everything I can to make a customer experience “emotionally binding” in a way that is going to make them feel great.
  4. Grow active, measurable audiences. Performing #2 and #3 if performed correctly should start garnering an active audience. The only way you are going to have the data to support proper decisions, is to measure your audience. Feedback is crucial. What features, techniques, products, services, etc is your audience pleased about? Not? This is the path to proper decisions and ultimately to create emotionally binding experiences.