Aarrgghh!!

One guy's take on the web, programming, cigars, politics, Philadelphia, and whatever else comes to mind.

Web Development Archives

cf.Objective 2008 - Postscript

It's over and few things need stating:

  • cf.Objective repeated its performance as the awesomest conference ever
  • The entire steering committee out did themselves in terms of content and speakers.
  • Once again, the cf.Objective not only delivers great lectures from the experts, but the ability to actually interact with them.

Almost everything this year was better:

  • Room scheduling - I saw no ad hoc room changes due to audience size.
  • Power distribution - there were many outlets available in every room
  • Venue - I thought the rooms and facilities were just as good as last year, but the staff was much more helpful.

On the con side:

  • Wireless was terrible.
  • The food was hit or miss.

Neither of those two facts was, in any way, a real problem for me. Put another way, if I traveled back in time to tell me that the wireless services and food would suck at cf.Objective 2009, I would still go. Then I would be very mad that I wasted time travel on that.

As with last year, I find myself building a list of things that I will challenge myself to adopt over the next year, after absorbing all of the geek radiation at cf.O. Last year's list was about starting things: starting local development; starting to use ColdSpring. I think this is more about refining things I have used before, and getting the most out of them.

My cf.Objective 2009 ToDo list:

  • Perfect my build process
    • Move all of my projects over to "perfect one step builds"
    • Utilize Subversion correctly with tags and branches
  • Adopt an MVC framework
    • I'm leaning towards Model-Glue 3
  • Start using AOP in ColdSpring
  • Come up with a topic to speak again
    • I like talking about soft skills within technical areas, to that end I have a few ideas
      • Formal Code Reviews
      • Influence Techniques for Geeks
      • Hiring Effective Developers
      • Selling Professional Development to the Resistant Shop 2: Rise of the Uniformed
    • I might need to come up with some technical presentations,
      • Writing Boilerplate Code
      • Writing Code for Team Reuse
  • Gain traction on the rumor that Mark Mandel has a marsupial pouch
  • Collaborate more with people in the community
    • Contribute to someone else's open source project
    • Work with someone just for fun
    • Team up with somebody for a side project

So that's my list. I challenge everyone to coming up with their own, and posting it on their respective blogs.

May 5, 2008 Posted by Terrence Ryan at 4:03 PM

ColdFusion, Web Development,

cf.Objective 2008 Day 3

It was with great sadness and dehydration with which I faced the final day at cf.Objective 2008.

Due to my state of "sadness" I didn't really start taking in new information until Joe Rinehart's talk on Model-Glue 3: Back to its Roots. Model-Glue 2 broke me of my resistance to frameworks, it made me willing to use them. Model-Glue 3 just makes me want to use Model-Glue 3. I really like seeing things being brought in from the RoR writing process. (Ask for something, a shell gets created, then modify it.) I can't wait until it's more documented and ready to go, as I can't consider myself an expert Model-Glue user.

Then I wandered into Mike Brunt's session on Clustering and Distributing ColdFusion Applications. I really wanted to hear Mike talk, because he is one of the few public voices on server administration in the community. I admit, I think my brain is full. But I can't really think it, because my brain is full. I did like the tip to use the default install of ColdFusion in multiserver as an admin node.

Despite that, I went to Jason Delmore's Building Hybrid Applications with ColdFusion and Java. I got a lot out of this session when he gave it a few years ago at MAX. It's definitely geeky stuff for people who want to know how things are running under the covers. But this type of knowledge is really great to have when you are trying to figure out what's going on when your application misbehaves. The part about String buffers was worth the entire session. If you deal with large string operations, take a longer look at this if the presentation comes out. I need to implement this stuff immediately.

Finally the closing section was a nice ending beat to the conference. It impresses me just how much passion the people in the room have to this niche of the professional world.

May 4, 2008 Posted by Terrence Ryan at 10:12 PM

ColdFusion, Web Development,

Always Accept Compliments

This is one of those things that's probably a pet peeve of mine because I use to do it myself, but I figured I would share what I was told during my performance days.

I've seen this phenomenon a bunch, a performer or presenter gets done, an audience member comes up and says something along the lines of "Great job," the complimented responds with something like:

  • "Oh I totally screwed up"
  • "No, I didn't really do anything"
  • "No, I thought it went awfully"

Invariably there are two things that drive this:

1. The presenter/performer is so caught up in their own self examination, that they are being hyper critical and sharing it with the complementer.

2. The presenter/performer is concerned about the appearance of humility.

Both ignore a greater truth in the interaction: Someone has said something nice to you, and you are immediately telling them they are wrong! Even if they don't directly perceive this, it can leave them with a bad taste in their mouth.

So what do you do? Say "Thank you," that's it. Leave the self examination stuff where it belongs, in your head. If you are concerned with your ego, accept and expand the compliment: "Thank you; I have to say the audience was really great, you guys asked really great questions."

It's a silly little thing, but it can have a big impact on how you are perceived.

May 4, 2008 Posted by Terrence Ryan at 11:52 AM

ColdFusion, Web Development,

cf.Objective 2008 - Day 2

My first presentation was my own. I thought it went really well, but I over pruned and ran a little short. I might have been talking fast too, but through the magic of twitter, I got instant feedback.

Neurotic Terrance Ryan - the ultimate manipulator! ;) from im

brandonmoser B. Arthur wrestlign a velociraptor is a great visual...awesome from twhirl

Neurotic I love Terrence's slides.. I really need better pictures for slides! from im

Neurotic Terrance Ryan's Professional Development in a Hostile Shop is really good! from im

seancorfield "patrick" and "john"... yeah, right... terrence nearly slipped up and used the real names :) from twhirl

brandonmoser In Terrance Ryan's talk on "Hostile Dev" at @cfobjective, so far a great talk from twhirl

seancorfield brilliant illustrative images in terrence's talk! from twhirl

sharondio Nice use of Simpson's imagery for "hostility" in Terry Ryan's talk. from im

seancorfield "resistance is not hostility" :) from twhirl

Woo hoo.

Next I went to Peter Farrell's Using ANT : Make Your Development Life More Productive. Peter hit the standard stuff, but he also hit on some other ideas, like using running a var scope checker, or documentation building from Ant. Another cool point is that he pointed out things in Ant terminology as equivalent to Coldfusion terms. A lot of the tips and tricks were really useful; I'll have to download the presentation.

I have to admit I was kinda high for the rest of the day after my presentation. I floated through Matt Woodward's Michael Collins' and Mark Mandel's presentations. I got things out of them, but I have nothing to offer on the presentations. That's not a reflection on the presenters. I was just too jazzed up. I'll report more tomorrow.

Meanwhile I struggled with and won getting automatic tagging via ant to work on my machine. I have to say, I've really drunk the KoolAid about it, John Paul Ashenfelter is my new hero.

May 3, 2008 Posted by Terrence Ryan at 6:31 PM

ColdFusion, Web Development,

Selling Professional Development Techniques...

My presentation from this morning is now available on my site. Get it from the side bar or from:

Selling Professional Development Techniques at a Hostile Shop

Update:

According to his comments, Ryan Stewart doesn't know what this "powerpoint thing" is ,and I need to use share before he could see this presentation.

May 3, 2008 Posted by Terrence Ryan at 11:51 AM

ColdFusion, Web Development,

cf.Objective 2008 Day 1

The keynote certainly started with a bang, as Jason Delmore pulled a Mary Hart. So the keynote was cut a little short. That was disappointing, but thankfully, no permanent damage was done. Jason was just on the cusp of announcing that ColdFusion was going to an open process for development, getting a public bug tracker among other things. This is very promising!

I wandered into Kurt Wiersma's presentation on Setting up a Solid Level Local Development Environment. I have to admit, I was mostly going to check up on what he recommended, because I had written an article in Fusion Authority Quarterly about the same subject. I had the fear that I was completely wrong or something. Good news for me, Kurt's presentation recommended similar things where we overlapped. His presentation was really solid, with really good recommendations on how to setup your environment. I'm not just saying that because I agree with him, but because he gave really good tips and pointers for configuring your environment. Definitely pull down the presentation if he puts it online.

I skipped the second morning session to work on my presentation.

After lunch I went to Agile Bootcamp by John Paul Ashenfelter. This was a session that I was especially looking forward and it didn't disappoint. John's a great speaker. If I got nothing else out of it, I finally understand tags versus trunks in Subversion now. Additionally, in 20 minutes he did more to help me learn Selenium then I had after a week of trying to do it on my own. In total even if you knew some of this stuff ahead of time, it was extremely worthwhile.

I finished up my day torn between a few great presenters, but decided that I have never had a chance to hear Peter Bell speak and wanted to, so I went to his Software Product Lines lecture. He's definitely a great speaker. Although to a certain extent, Peter's blogging bandwidth is so high that if you read him, you'll recognize most of what he had to say.

May 3, 2008 Posted by Terrence Ryan at 3:25 AM

ColdFusion, Web Development,

Humor in Speaking

I owe a fair deal of success to my various experiences working with Avish Parashar.

He's doing a free teleseminar about using developing and using humor in speaking. I haven't heard this particular talk before, I will be listening to it, but I can attest to his expertise on this matter. Anyone who has a vested interest in… let's say… enhancing a technical presentation to make it more interesting, would benefit greatly from what Avish has to say.

I figure it's important to note, that he's not about adding a joke or two to your presentations. He's talking adding appropriate and topical humor to presentations. He's also about teaching you to think on your feet, and respond to your audience with in-the-moment humor.

The seminar will be held Thursday, April 17th from 1:00PM EST to 2:30PM.

Find out more at Avish's various sites:

April 8, 2008 Posted by Terrence Ryan at 11:45 PM

ColdFusion, Personal, Random, Web Development,

New Blog for Export Reports

If you are interested in my new venture ExportReports, we now have a blog you can follow what's going on and give feedback.

March 28, 2008 Posted by Terrence Ryan at 10:21 AM

Basecamp CFC, ColdFusion, Meta Blogging, Web Development,

5 Reasons to go to cf.Objective

Cf.Objective is in just a few weeks now. Are you going? Here's why you should:

  1. The content is the absolute best ColdFusion content around. I'm not just saying that because I'm presenting. No introductory stuff, no "Getting started with CFC's," just really stellar content.
  2. The price is right. I think the whole thing, including air fare, hotel, taxis, and food cost me under $1300 last year. That's less than many local training courses, but provides so much more.
  3. Access to the experts. Want to ask Ray Camden, Sean Corfield, Joe Rinehart, Mark Mandel, Mark Drew or one of the other experts something? Well they're usually just hanging out in the halls. They don't bite… Except for one of the Mark's. I'm not saying which, but I think you'll find it a pleasant surprise.
  4. Everyone is a student. What are the instructors doing between their talks? Most of them are in other people sessions. I don't know why this strikes me as so cool, but I guess it just feels so much more… collaborative than authoritarian. You're not learning from experts, you're an expert by being there, and sharing in the experience. Or I dunno, maybe that's too granola for you all, but I like it.
  5. If you don't go Sean Corfield will hunt you down. You will be Ice-T in his home movie version of Surviving the Game. It's true.

March 24, 2008 Posted by Terrence Ryan at 11:54 PM

ColdFusion, Web Development,

WebManiacs Early Bird Pricing Ends Today

That's right, today is your last day to get reduced prices for the WebManiacs conference. After today, the only way to get a reduced price is to take a picture of you flashing your gams, send it in, and hope the guys and gals at Fig Leaf approve.*

Of course, you want to go, and see me speak about Air and SQLite, so sign up and get that reduced pricing.

* Actually, I'm fairly certain that won't work. And gams are legs, for those of you who didn't grow up during the Great Depression.

March 14, 2008 Posted by Terrence Ryan at 11:22 AM

Air, ColdFusion, Web Development,

I'm in Your IPOD!

Or I would be if you are subscribed to the ColdFusion Weekly Podcast.

I got to participate in the CF_Rountable, a new format for the show where a bunch of ColdFusion community members talk about various geeky topic fodder. This week's group was:

This is in addition to the hosts:

It was a tremendously fun to participate. It was also impressive to see the amount of work and effort that Matt and Peter put into the podcast. They deserve a lot of credit for making it look effortless.

If you get a chance to participate, or see a call for participation, do it. You won't regret it.

Come to think about it, you should probably listen to it too. You won't regret that easier.

March 11, 2008 Posted by Terrence Ryan at 11:45 PM

ColdFusion, Web Development,

Yawn, Blue Dragon Goes Open Source

The ColdFusion community is aflutter with news that Blue Dragon has gone open source. Many other voices have chimed in on this. But I feel like I have something different to say.

Regardless of the any business gains that Blue Dragon gets from doing this, I don't think the community will get a tremendous benefit from this.

Continue reading "Yawn, Blue Dragon Goes Open Source"

March 11, 2008 Posted by Terrence Ryan at 12:35 AM

ColdFusion, Web Development,

ExportReports.com

I'm pleased to announce that I've teamed up with Mark Phillips and the guys at Vertabase to publicly release ExportReports.com.

What is ExportReports.com, you ask?

ExportsReports.com is a site that enables users of the 37signals product Basecamp to export copies of their projects to a PDF file. Before ExportReports, a Basecamp user could request a backup of their site, and receive an XML dump of their project. Now, through our site, a user can ask for PDF exports at will. It's perfect for either ongoing status reports, or an end of project knowledge dump to a client.

We do charge a small fee, but for the first month, we are running at reduced rates.

Technology

ExportReports was written with Adobe ColdFusion, and uses the Basecamp API's provided by 37signals. Three factors led to us choosing ColdFusion:

  1. We needed to consume webservices, and ColdFusion makes this really easy.
  2. We needed to work with PDF's and ColdFusion pretty much rocks the PDF.
  3. Let's face it, I think ColdFusion rocks.

So, wish me luck on this commercial endeavor. If you're a Basecamp user, I hope you like it. If not, become one, it's a fantastic product. Then use ExportReports.com.

March 7, 2008 Posted by Terrence Ryan at 11:01 PM

Basecamp CFC, ColdFusion, Web Development,

About Time - An Air and SQLite Application

abouttime

I few days ago I came across this post at Signal vs. Noise. The first item is about a clock that tells you the approximate time - for example 11:59 is "Nearly Twelve", 12:30 is Half Past Twelve, etc. etc. The idea is, "Do you really need to know it is 12:53?" This clock gives you the amount of precision that you actually need when dealing with time.

I thought it was kinda cool, but I would never buy one. However when I thought about it, I realized it would make a good AIR application.

After thinking about I decided to do it because:

  • It's a simple thing to write
  • It could use a database
  • I have a Air and SQLite presentation to prepare

All of these things added up to me writing the thing in about a day. Here's what I did:

  • Filled a SQLite database with times and descriptions
    • 1 = Just After
    • 15 = Exactly Quarter Past
    • 59 = Nearly (Next hour)
  • Used HTML, JavaScript, and an Image to build the UI
  • Got rid of the default Chrome
  • Used Air Methods to query the database.
  • Placed taskbar items that allow you to:
    • Close
    • Force app Always on Top

The amazing thing to me was how easy it was to do. The actual app worked relatively quickly, most of my time was spent getting the details like icons, and text placement correct.

Download About Time

So if you want to know about what time it is, download your copy of About Time.

Disclaimer: This totally is "an Air app that didn't really need to be". I get that. I figured someone else might like it, or at least want to look at the source.

March 7, 2008 Posted by Terrence Ryan at 3:59 PM

Air, ColdFusion, Web Development,

Posting Form to Itself

I'm working on someone else's code base, and found that they were posting forms to themselves. However they had hard coded the form template names into the code for the form. Like the following:

<cfform action="index.cfm" method="post">

This is a bit of a pet peeve of mine because it tends to make the code very un-portable. What happens if you rename the file "dosomethingelse.cfm." Now you have to go back and change the file name and the reference.

It was a quick proof of concept application, so I don't fault the author. But they just aren't lazy enough.

I prefer doing it this way:

<cfform action="#cgi.script_name#" method="post">

It's highly cut and paste-able, and you never have to worry when you rename your templates. If you aren't using cfform, you can still do it, just wrap the form element in a <cfoutput>.

Now, I imagine that I will get a comment that says something about not trusting cgi variables. It works with every flavor of IIS and Apache that I have ever worked with. Anybody see any gotcha's doing that.

March 1, 2008 Posted by Terrence Ryan at 5:45 PM

ColdFusion, Web Development,

Wharton Interviews Woz

Knowledge@Wharton got themselves an interview with Steve Wozniak.

It's a good interview that takes you across several facets of his life. He even has words of praise for Microsoft in it!

Steve Wozniak on Apple, Steve Jobs and the Value of a Good Prank

February 21, 2008 Posted by Terrence Ryan at 11:36 AM

ColdFusion, Web Development,

Using ColdFusion and SVN to Create Release Notes

I was talking last week about using XML to act as an intermediate step in building your documentation (Automating Documentation and Automating Documentation Part 2). It dawned on me that I could also share my technique for building release notes.

I use Subversion. I've gotten positively anal about commenting when I make changes. So if you were to take the history of my SVN commits, they make pretty decent release notes. The trick is to grab them and automatically turn them into documentation.

SVN makes this pretty easy. It takes one command to grab all of the changes. It takes one switch to make the change export as XML. Once that is done, manipulating the content in ColdFusion is a breeze. I do it using <cfexecute> and svn.exe, below is my code:

<cfset svn.wc = "[path to svn working copy]" />

<cfset svn.exe = "[path to svn executable]" />

<!--- -v = verbose --xml outputs it as xml --->

<cfset svn.arg = "log #svn.wc# -v --xml" />

<!--- get contents of SVN history --->

<cfexecute name="#svn.exe#"

arguments="#svn.arg#"

timeout="30"

variable="changes" />

<cfset changes = XMLParse(changes) />

<cfoutput>

<cfloop index="i" from="1"

to="#arrayLen(changes.log.logEntry)#">

<!--- lxml = LoopLocalXML (shorted for display) --->

<cfset lXML = changes.log.logEntry[i] />

<dl>

<dt>#lXML.XmlAttributes.revision#</st>

<dd>

<ul>

<li>#lXML.author.XMLText#</li>

<li>#lXML.date.XMLText#</li>

<li>#ParagraphFormat(lXML.msg.XMLText)#</li>

</ul>

<p>Files Effected</p>

<ul>

<cfloop index="j" from="1"

to="#arraylen(lXML.paths.path)#">

<!--- lPaths = LoopLocalpaths --->

<cfset lPaths = lXML.paths.path[j] />

<li>

#lPaths.xmltext#

(#lPaths.xmlattributes.action#)

</li>

</cfloop>

</ul>

</dd>

</dl>

</cfloop>

</cfoutput>

In my build process, I use <cfsavecontent> and <cffile> to write the content to a file, and then use ANT to call the CFML page that creates the release notes - voila, release notes are now part of every build, with no extra work on my part.

February 19, 2008 Posted by Terrence Ryan at 10:53 AM

ColdFusion, Running a ColdFusion Shop, Web Development,

Shortcut Key for Commit in Subclipse

This had been driving me nuts for a little while. Maybe I can save someone else the hassle too.

To set a shortcut key for Subclipse commit:

  • Go to Windows → Preferences
  • Go to General → Keys
  • Check the box "Include unbound Commands"
  • Then in the "type filter text" box, type commit
  • Then assign it to whatever key combination you want

If you go through this, and commit and other SVN methods don't show up.

  • Go to Help → Software updates → Find and Install
  • Choose "Search for updates of currently installed features."
  • Go through the choices and update Subclipse.

February 18, 2008 Posted by Terrence Ryan at 11:50 AM

ColdFusion, Web Development,

ColdFusion and ODBC Agent

This sent a co-worker down a wrong path yesterday, so I thought I would blog it in case it tripped anyone else up.

There was a problem with one of our SQL servers yesterday. (It was down a long time during a routine patch and reboot due to extra stuff in a Microsoft Tuesday patch.) In trying to troubleshoot the issue, one of the administrators saw errors in the event logs coming from the ColdFusion ODBC Agent.

We are using default driver for Microsoft SQL Server in the drop down on the Data Sources page. Therefore, we were using JDBC driver and weren't impacted by the ODBC error. The error message was a red herring. It took focus away from the real problem, namely that the database server hadn't come back online yet.

Going further, as far as I can tell all of the defaults on that page are JDBC drivers, with the exceptions of "ODBC Socket" and "Microsoft Access". According to this Damon's comment on this blog post, the "Microsoft Access with Unicode" doesn't even need the ODBC driver. So I would say, unless you are doing coding against Access databases, or a known ODBC only product, you probably don't need to install the ODBC services; especially since you can always install them if you need them.

I'd be interested to know if anyone violently disagrees, or if this has been said authoritatively somewhere, and I just not up on my Google-Fu.

February 14, 2008 Posted by Terrence Ryan at 10:16 AM

ColdFusion, Running a ColdFusion Shop, Web Development,

Automating Documentation Part 2

This is a follow up to the post Automating Documentation. Jim Priest wanted to see example code, and I'm happy to oblige.

For this example, I am sharing the code for documenting "steps" in Squidhead. Steps are operations that do one thing, like generate stored procs, or ant scripts, or email developers. They are powered by cfm templates in a specific folder. Once there they can be referenced through in the project's config file. The documentation for them is included in the download for Squidhead, and can be viewed online (Squdihead - Steps).

So after the jump, here is the code for creating this documentation.

Continue reading "Automating Documentation Part 2"

February 8, 2008 Posted by Terrence Ryan at 12:09 PM

ColdFusion, Squidhead, Web Development,

Automating Documentation

One of the things that I've been doing lately is writing reference documentation for my projects. Squidhead has an extensive set of configuration options, and an internal project has a custom XML format. I thought I would share the method I've come up with to make it much easier for me to do.

The problem with this type of documentation is that is really easy to do once and then not keep up to date. When coming up with a solution, it had to be repeatable and additive. You could just read in all that information and recreate dynamically from scratch, but that means you can't manually alter the documentation. I was looking for something that would basically just remind/force me to document new options or files. With that in mind here is what I do:

  • Assume that I am documenting a set of configuration files
  • Create an XML file where each file to be documented is a node
  • Do a directory list of the files to be documented
  • Grab the name of each file
  • Check to see if a node currently exists in the XML for each file.
  • If not I add a node named after the file
  • Create blank sub nodes for "documentation," "notes," or "required" or whatever

When that pass is done:

  • I scan the XML
  • I check for blank sub nodes.
  • If any exit I throw an error

I then add this process to my ANT build for the project. Now every time I go to build the project, the documentation gets scanned, added to if needed, and I am prevented from moving forward until I document new changes.

This turned documentation for me from an incomplete mess of a task that takes two hours or so every few weeks to 5 minute maintenance step every time I build.

February 8, 2008 Posted by Terrence Ryan at 9:29 AM

ColdFusion, Web Development,

Basecamp API Update

First of all thanks to all of the people who have either promoted or contacted me about BasecampCFC. I am really excited about all of the interest. As of now it's been mentioned at:

I have to admit, getting it on 37Signals' radar was pretty cool.

Now on to the meat of this post, the latest update…

I've fixed a number of issues with both the basecamp.cfc and the demo app that goes along with it.

Basecamp.cfc

  • I added a debug setting to the init method. It adds extra information to the ColdFusion debugging output.
  • I added an authentication method. It allows you to tell the difference between
    • Authentication failure
    • API not being enabled
    • Basecamp project not existing
  • I made steps to ensure that all get methods would return consistent column lists for queries.

Demo application

  • Now tells you if you haven't enabled the API
  • Now gives directions on enabling API.
  • It's a bit more robust in handling blank records

Finally, if anyone is interested I added the unit tests to the SVN repository, if anyone wants to see how I'm testing the whole thing.

February 7, 2008 Posted by Terrence Ryan at 11:04 AM

Basecamp CFC, ColdFusion, Web Development,

How to convince yourself to Unit Test

I was talking with someone recently about unit testing. His dilemma boiled down to the idea that he knew unit testing was one of those mythical "Good Things" but he couldn't bring himself to do it; it seemed like such a large commitment in time. I've been thinking more and more about this, and I have come to the conclusion that the time factor in unit testing is actually a myth. Here's why I think so.

Do you write code, and declare it finished when you are done editing it? I hope not. No, you go to your application and test the page you just changed through your browser. If you're working on a CFC, maybe you go to a page named test.cfm, on which you have a few CFC calls and a CFDump. You then looked to see if the results you got conform to the results you expected. Did you do that? Then you just unit tested! The only difference between that and a formal unit test is that you throw away the test after you were done writing that piece of code.

I propose you formally unit test instead. Instead of throwing away that test code, put it in a formal testing framework. You'll probably have to change it a bit to get it to work with one of those frameworks, but the learning cost for doing it this way is much, much cheaper that TDD. Once you do that, you'll never have to worry about breaking code again because you hold on to every test you've ever written. Well, okay, you'll still worry, but you know as soon as you do it what code you've broken, which is a much better place to be at.

I think a big part of the underlying misconception comes from the fact that most discussions of unit testing include a description of Test-Driven Development (TDD). That is the system were you figure out how exactly your code should behave, write tests to check for that behavior, then write code that behaves in a way to pass all of your tests. That is going to change the amount of time you spend on development (at least up front, where we tend to myopically be focused.) More than just a hit in terms of development time, it's a hit when it comes to spending the time learning it. Mind you, I'm not saying that TDD is bad; it's just a paradigm shift, and a big one at that.

BUT that doesn't mean that unit testing IS Test-Driven Development; TDD relies on unit tests, not the other way around. Go ahead, write your unit tests after the fact. No one will know. In fact, many unit tests get written in response to bugs, even when you are doing TDD.

Another misconception is that you have to test everything you do. Some things work better with formal unit testing than others. Yes, with mock objects and development databases you can unit test anything, but that makes the learning curve even steeper. Screw that; don't make it harder for yourself. Small components with a limited range of functions are the easiest to start to work with. Examples usually include some sort of calculator, or other such item that I never use in actual code. So here are my recommendations for low hanging unit testing fruit.

  • Authentication code, specifically that which test usernames and passwords (as opposed to session management)
  • Utility code, like a phone number formatter, or custom date converter
  • Parsing code, like code that takes a custom XML format and converts it to a usable format
  • Problematic code, code that breaks every time you do an update.

So start moving your informal tests to a formal unit tester. Start with the small stuff and don't worry about testing everything. And for god's sake don't think you have to reach for TDD to be successful with unit testing. Somewhere between where you are and where you are heading is a much better place.

In case you want to know more about unit testing and ColdFusion, check out the ColdFusion unit testing frameworks:

Update: Someone pointed out to me that I had misspelled "TDD" as "TTD." Sorry. I'm dumb sometimes.

February 1, 2008 Posted by Terrence Ryan at 10:55 AM

ColdFusion, Web Development,

Yet Another Community Expert

Adobe Community Expert

I'm a little late to the party but I got word yesterday that I was selected as an Adobe Community Expert for ColdFusion. I'm a little humbled by the company in just this last round of Community Experts, let alone the whole group.

I'm sure it will be a bit before my information is up on the site, but I just couldn't contain my excitement.

Once I get the hang of this whole "being a dad thing" I'll be posting ColdFusion content regularly again.

Thanks for letting me in, Adobe.

January 23, 2008 Posted by Terrence Ryan at 10:01 AM

ColdFusion, Web Development,

Simple IT Success

Avish Parashar, a friend of mine, is starting a new business venture. It's a consulting and training company which is directed at teaching technical people non-technical skills. You know, those elusive "soft skills" you hear about from time to time.

I recommend Avish and his training in the strongest terms possible. I've worked with him in this capacity for eight years getting guidance on courage, creativity, communication, and influence along the way. I have definitely enjoyed the fruits of applying his philosophy and techniques to my regular working life.

Anyway, check out his site, simpleITSuccess.com, and if you are even considering it, drop him a line. You won't regret it.

January 21, 2008 Posted by Terrence Ryan at 4:32 PM

ColdFusion, Web Development,

cf.Objective Progress

Less than a year ago, I went to cf.Objective for the first time, and came back with a list of items that I wanted to see myself do, because I was introduced to them at the conference. I thought I would do a quick public coming clean about my progress.

To recap, my list was:

  • Start using Coldspring
  • Start using an ORM
  • Start using a real (UI) framework
  • Stop thinking about objects in terms of data
  • Start doing development on my local machine
  • Stop spreading rumors that the man saying he is Sean Corfield having the real Sean Corfield tied up in his hotel room.

My progress:

I started using ColdSpring for dependency injection in a few of my projects. I haven't reached by goal of using it for Aspect Oriented Programming yet. So that will go back on the list.

I refined Squidhead to work against multiple DBMS's and to understand foreign keys; making is a real solution for at least me.

I failed to start using a real UI framework. I would still like to, but I've been lazy. I need to be more disciplined. I really want to start using either Fusebox or ModelGlue.

I think I've switching from thinking about objects as objects first, and then going into the database to represent them, not the other way around. Could I do better? Sure. But I am much further ahead of myself a year ago.

I switched to local development solely. No more remote servers. Feels great, I never want to go back. Thank you, Mark Drew, your "car with a spike on the steering wheel" analogy changed my professional life.

I don't spread rumors about Sean's identity anymore. In part, Sean finally updated his picture. In part because I heard if you make any sort of fun of him, he will track you down, and shave a half dollar sized bald spot onto your head. That man is dedicated! And a Philadelphia winter is much, much colder with a mini-tonsure. Trust me.

So that's it. I'll hold off on making a new list until after cf.Objective 2008.

And if you aren't going, don't worry, every ColdFusion blog will be full of stories of how awesome it is. So, you know, that will be just like being there.

January 16, 2008 Posted by Terrence Ryan at 5:52 PM

ColdFusion, Web Development,

ColdFusion - Market Share vs. Profitability

There is a very interesting article over at Knowledge@Wharton about Market Share vs Profitability.

I skimmed it a few months back when it came out but never thought about it in terms of the ColdFusion community until I saw this link at Daring Fireball applying this phenomenon to Apple.

Basically the gist I get from it is that profitability is more conducive to long term health of a company than market share. It's not proven, but if it is true it puts the ColdFusion market into a particular light. If what is true for companies is true for products, it might not matter to ColdFusion's long term health if it steals market share from ASP.NET or PHP. ColdFusion's long term health might be in its profitability, which according to Adobe has been very good.

Market share is still important to us, as it helps determines availability of work. But this phenomenon might a good explanation for why what we see Adobe doing with ColdFusion doesn't always match up with what the community wishes it would do.

January 14, 2008 Posted by Terrence Ryan at 11:49 AM

ColdFusion, Web Development,

Speaking at cf.Objective() 2008

I got word tonight that I will be speaking at cf.Objective() 2008. Needless to say I am thrilled, excited, and a little intimidated. Cf.Objective, in my experience, has the most advanced content of any of the various ColdFusion world events. It's a lot to live up to, and almost everyone there blogs, so if you screw up big it's not like you can keep it under the radar.

My topic is "Selling Professional Development Techniques at a Hostile Shop."

Here's the abstract:

You've started using Subversion, you've drunk the frameworks Kool-Aid, and you go so far as to use an Ant script to launch CfEclipse. There's only one problem, your co-workers don't want to join you. Worse still, your boss doesn't see the big deal, and upper management starts an anti-framework club. You don't want to leave but you can't fathom staying at a workplace that doesn't embrace progress. What do you do?

You leave the technical behind, dust off those so called soft skills, and turn to politics to get the job done.

This session will help you to identify all of the players on the opposing team, figure out their issues, determine what techniques to use to change their minds, and avoid turning into Machiavelli in the process. By the end of the session, you should have a set of concrete tactics and strategies to go back to your organization and start converting the masses.

The basic gist of the session revolves around the question: What do you do when your co-workers or management reject your efforts to introduce "professional development techniques?" What are "professional development techniques?" For the purposes of this talk they include (but are not limited to):

  • Frameworks
  • Version Control
  • Code Reviews
  • Unit Testing
  • Company specific Best Practices
  • Automation
  • Code Generation

It's a question I've found myself asking from time to time over the past few years. I've had to make find my own answers for it. My hope is to help make it easier for others.

Obviously this isn't a technical presentation, but I hope to keep it practical instead of theoretical by providing concrete tactics and strategies to employ.

I have the outline mostly ready at this point, but if anyone has any specific problems or scenarios they would like advice on, please feel free to drop me a line either in the comments or through my contact form.

December 20, 2007 Posted by Terrence Ryan at 12:31 AM

ColdFusion, Web Development,

Speaking at WebManiacs 2008

I've been a little busy with the newest addition to my family, but I wanted to drop a line about an upcoming conference appearance.

I'll be speaking at a session at WebManiacs 2008 on AIR and SQLite. My session is on the first day of the conference, which runs from Monday May 19th until Friday the 23rd. It's shaping up to be a great conference, and I'm a bit humbled by some of the other names that will be appearing. I don't know how I got on the speaker's list, but however it happened; I'm very excited about it.

December 13, 2007 Posted by Terrence Ryan at 12:02 AM

ColdFusion, Web Development,

Squidhead Updates and New Features

It's been a little while since I've talked about new features of Squidhead, so I figured I would take the opportunity to blow my own horn.

New features:

  • Oracle Support
  • Linux Support
  • Linking table support
  • FKCrazy Application template
  • Rudimentary ColdSpring Support

Squidhead will run against Oracle 10g. It alters its model a bit to create stored procedures within packages, as this seemed to be in keeping with Oracle Best Practices.

Squidhead will run on Ubuntu. I haven't tried it in other flavors yet, but I can't tell why it wouldn't.

If you follow the convention of naming tables [table1]To[table2] and have the primary keys from table1 and table2 as foreign keys, Squidhead will recognize the table as a linking table. It will create stored procedures that pass queries through this linking table to create relationships between linked tables.

FKCrazy application will use the linking table information to automatically create interface that uses all of the foreign key relationships to add and delete child records. It can do this in a one to many relationship, or in a many to many relationship. Translation: If you've seen my Facebook in 17 minutes presentation - everything I did manually at the end now happens automatically. So if I did it today, it would be more like Facebook in 12 minutes.

Squidhead can create its own ColdSpring configuration files. Not earth shattering but makes integrating a Squidhead application with an application already in ColdSpring much easier.

So there you go, quite the update over the past few weeks.

November 21, 2007 Posted by Terrence Ryan at 12:31 AM

ColdFusion, Squidhead, Web Development,

Yet Another Update to CFAir

screenshot2

I made a little update to the CFAir compiler package. I tweaked the generated application to be a little more complicated, and CFAir still works on it. There's a screenshot to the right (If you're own my site.)

November 21, 2007 Posted by Terrence Ryan at 12:04 AM

ColdFusion, Web Development, air,

Squidhead Presentation

I've posted my Squidhead Presentation that I gave last night at the Philly CFUG.

November 14, 2007 Posted by Terrence Ryan at 5:27 PM

ColdFusion, Squidhead, Web Development,

CFAIR Compiler Update

I made some changes to the CFAIR compiler project.

  • Added some documentation
  • Fixed a bug that caused the first run of the app to not create an air file.
  • Made sure that images referenced by ColdFusion CSS are imported

Additionally I added a screenshot of the image to the RIAForge site.

So check out CF Air Compiler, and please let me know what you think of it. Is this worth developing further? Or should I just wait for Centaur? Anybody have any suggestions or ideas on how to proceed?

November 14, 2007 Posted by Terrence Ryan at 1:43 AM

ColdFusion, Web Development, air,

MSSql vs MySQL vs Oracle, Stored Procedures, and Code Generation

Over the past two weeks I've been struggling with adding support for Oracle in Squidhead. (Expect a release early next week.) Oracle was more different from both Microsoft SQL and MySQL than they were from each other. It got me thinking about the three and their various pros and cons for code generation, and their pros and cons for me doing code generation with stored procedures. I figured it could make a good blog article. (Or someone could see my post and say "Hey you didn't have to do all that because of the blah command!")

Microsoft SQL

This was the first one I started with, so the others are being compared to it. It comes with the built in stored procedure sp_help, which is absolutely brilliant. It gave more information for tables than I ever needed. It also gives most of the information for a stored procedure that I need. Although there are a few things lacking which made me have to resort to using sp_helptext, and then parsing the actual stored procedure. I had to do this to get the number of result sets that a stored procedure returns. (Because if a stored procedure returns more than one record set, Squidhead writes the method to return a structure of queries instead of just a query. ) Also I had to do this to get the metadata of the arguments being passed to a stored procedure.

MySql

Of the three this was the easiest to do. I had a flash one night ("just implement sp_help's queries in MqSQL") and it took me less than 24 hours to add it. Nonetheless I still had to query a lot of system tables directly to get the results I wanted.

There are few other limitations that bug me, but they aren't related to code generation. Things like stored procedures not being able to take default values in their inputs, and views not being able to contain subqueries. I'm sure as those features mature though, we'll see better results there.

Oracle

Finally, we reach Oracle. It took me a week of hair pulling, keyboard slamming and muttered curses to get it right. But finally I did.

What I didn't like:

One has to create a cursor to contain output recordsets for a stored procedure. That's so different than the other systems that I wanted to kill someone. Although, I must confess it makes counting output record sets much easier.

That everything is limited to a name length of 30 characters. So I had to get creative with how to deal with stored procedures with names like usp_entryToComment_list_foreign_key_labels. The solution I came up with was to abbreviate them and rename them higher up in the Squdihead stack so that the functions have the "correct" names.

What I liked:

Packages. Packages are sort of like classes or CFC's for Oracle operations. The encapsulate code into discreet chunks. I basically create a package for every table so my stored procs have names like ENTRYPKG.READ which is better in my mind than usp_entry_read as that's just a way I use to group and sort stored procedures anyway.

The sheer amount of data in the various data dictionaries. I don't have to parse any code strings to get any metadata. That's much easier.

"CREATE OR REPLACE." Truly awesome. Cuts down on the amount of steps I have to do to recreate a stored proc or package. I wish I had known it exists for MySQL.

Conclusion

It's kinda funny, and it may be cognitive dissonance talking, but of the three, I really like Oracle the best for code creation and metadata. Overall, I still lean towards Microsoft Sql as it is the one I know the best. Also whatever your thoughts on Microsoft Sql Server Management Studio, it's so much better than SQL developer for Oracle. But that's a completely different topic.

November 3, 2007 Posted by Terrence Ryan at 7:10 PM