Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
I am the chief technical officer at InVision App, Inc - a prototyping and collaboration platform for designers, built by designers. I also rock out in JavaScript and ColdFusion 24x7.
Meanwhile on Twitter
Loading latest tweet...
Ben Nadel at cf.Objective() 2014 (Bloomington, MN) with: Joel Hill and Matt Vickers and Shawn Grigson and Jonathan Rowny and Jonathan Dowdle and Christian Ready and Oscar Arevalo and Jeff McDowell and Steve 'Cutter' Blades

My Compromise On ColdFusion Code Snippet Color Coding

By Ben Nadel on
Tags: ColdFusion

That title is a mouth-full!

I have been battling with color-coding my ColdFusion blog entry code snippets. In my blog, all of my code is organized in unordered lists with a div wrapper. I love using lists for code layout because it give me greater control over the layout, the inline "framing" for scroll bars, and the way the code lines wrap. I have seen PRE tag usage all over the place and the code always looks junky to me. It wraps, the tabbing is poop, and the readability is non-existent for anything long.

Now, my DIV / UL combo makes color coding very hard. I have tried to go down that route and it is just a headache. BUT, color coding does add a ton of readability to the code. I have come up with a compromise: inline, I will continue to use the DIV / UL solution. However, at the beginning of every code snippet I am adding a link (at run time) that will allow you to pop the code snippet up into a new window. The code in this new window will use the PRE method with proper color coding.

I would love some feedback on how this solutions works for people. I think it leaves the main blog much more readable but gives the option to make a view of the code much more readable.

Reader Comments