Share the love, even if it's just a blog post

Author: Steven Neiland

Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

This is not a technical entry and is really only tangentially about ColdFusion. What I want to share with you is a small practice I follow when I use code I find on the internet.

Today for example I had a need for a random password generator for system I am rewriting. Now I could have written one myself (its not rocket science after all), but I am a lazy developer. So instead I fired up firefox and googled the followed:

bennadel password generator coldfusion

As always Ben delivers with the following blog entry. I copy down his code, make a few changes to de-bennify the code formatting and wrap it up in a function and test it out.

Referencing where the code came from

Once I have the code tested and I am happy with everything I do these final three tasks:

  1. Leave a comment on the original blog post to thank Ben for do the work for me.
  2. Copy the url for the blog post into a comment block just above where I used the code in my app.
  3. Make reference to the same blog url in the source control commit message.

Why you should do this

So whats the big deal about doing this? Well if I'm honest, my motivations are not totally altruistic. Doing things this way actually benefits me as much as everyone else in the following ways:

  1. By keeping a link to the blog entry in the code comment and the source control commit history I now have a reference to point me back to the original article if I should come across a problem in the code later on. Chances are that if I found a problem somebody else did too and they have probably already posted a solution in the comments.
  2. Also by referencing the original article it serves as documentation for anybody coming along behind me, and when my trainee comes across it she now knows to go to Ben's site for ColdFusion questions (as if google wouldn't already have told her this lol).
  3. Finally and most importantly, by thanking Ben publicly he is more likely to continue blogging and solving problems for me. :-)

Reader Comments

Joey's Gravatar
Thursday, June 12, 2014 at 1:49:47 AM Coordinated Universal Time

100% agree, it's been very useful to know where original code came from in case you need to fix or look for an updated version. I think most my CF code is made up of Ben Nadel's & Ray Camden's code snippets. I'm sure everyone in the CF community has referenced them at least once!

  • Please keep comments on-topic.
  • Please do not post unrelated questions or large chunks of code.
  • Please do not engage in flaming/abusive behaviour.
  • Comments that contain advertisments or appear to be created for the purpose of link building, will not be published.

Archives Blog Listing