Blog

16
January 2014

Gavin Pickin

TGIF - Take a little time for yourselves - Client Free Friday

Chit Chat, Client Free Friday

In a business like ours, we're almost always putting out fires, there are always deadlines, and new priorities, and when you have a couple hundred clients, there is always something to be done for someone. Thats pretty good, usually, except, its really hard to push yourself, and work on your own website, brand, marketing and social media, when you are so busy with everyone else's. 

At the start of this year, I decided to put into action, an idea that emulates some of the well known tech companies, and declare Fridays a "Client Free Friday." 

10
January 2014

Gavin Pickin

Conferences - New Conference - Into the Box - Day Before cf.Objective() - May 13, 2014

cfObjective, ColdBox, Conferences

It's Coming! The first ever Box focused conference.
May 13th, 2014 - 1 day before cf.Objective() 

Yes, thats right, cf.Objective() just got a little better, because the day before cf.Objective()Ortus Solutions, makers of ColdBox, ContentBox and everything *Box are hosting their own 1 day Conference with speakers from around the world... called Into the Box.

09
January 2014

Gavin Pickin

Unit Testing 05 - External Dependencies and Dependency Injection

Dependency Injection, Unit Testing

Our last post was an introduction into what is Mocking, and why we Mock in Unit Testing. We looked at Mocking an dependency of one function on another function internal to our CUT component under test. In this post, we're going to look at dependencies of our function on other objects and functions, and how we use Dependency Injection, or Inversion of Control to give our Website service object access to our WebsiteDAO.

08
January 2014

Gavin Pickin

Unit Testing 04 - Testing with Dependencies

Unit Testing

Welcome back to our Getting Started with Unit Testing - Unit Testing for Dummies you might say, and we're onto our fourth post. We have covered setting up our ColdFusion project (with files on Github) and added TestBox as our Testing FrameworkWe wrote a couple of TDD tests for our objects, and then wrote the objects to pass them.  Then we did some more TDD by writing a more complex test with 10+ assertions, and walked through building our object function to pass the test

Today we're going to look at methods / functions which have dependencies on other objects. Up to this point we have passed information into our methods / functions, which means it is easy to control the test of those methods / functions. Remember that one of the keys to Unit Testing is that we want to isolate each UNIT of code so it is independent of others Units. This obviously becomes more difficult when the code itself is obviously dependent on other components / objects, so we'll look at how to deal with that.

07
January 2014

Gavin Pickin

cfObejective 2014 - Relax, My Website was Not Hacked - Just Promoting cfObjective

cfObjective, Chit Chat

For those of you who might have noticed, a couple of new banners appears on my very PLAIN and DULL looking blog / website. I know hacking is a popular response to such oddities these days, so I wanted to make sure I posted to let you know it was not a hacker, it was me. I have been waiting for these badges to be releases, so I could show a little color, and pride, as I am a speaker at this years cfObjective in Bloomington MN.

02
January 2014

Gavin Pickin

Unit Testing 03 - More TDD - Building out our Component Objects

Unit Testing

The first couple of Unit Testing posts have got us setup with TestBox and we have written our first real tests for our components. Now it is time to build up our components even more, and in the TDD way, we'll create a few specs, create the tests, then build the methods in our components to pass the tests.

If you haven't followed along, you can go back to Unit Testing 01, and Unit Testing 02, and get the files from my github repo, and then follow along. Step 0 is our base, where we left off from last time, Step 1 is about to begin for blog post 03.

01
January 2014

Gavin Pickin

Deals and Steals - Books and Training - Review of OOP for CF and Ebook Sale Ending

Books and Training, Steals and Deals

Its the 1st of January, 2014, and its time for some resolutions, and decisions, and today, I'm reminding you of an important one. Leveling up your skills... Packt Publishing's $5 Ebook sale is ending Jan 3rd, so its your last chance to pick up some of those amazing books, for only $5, you just can't beat that deal.

Today I bought 10 books, some of them I discussed here in my first post on the Ebook-bonanza from Packt Publishing but I decided to look a little more and picked up a couple more. Today, I busted open the first one, one I have been meaning to read for a LONG time now, so I finally did. It was a good read, and actually finished it today. Matt Gifford's Object Oriented Programming for ColdFusion... so let me tell you what I thought about it.

27
December 2013

Gavin Pickin

To Init or Not to Init - CFC Component Init Function

CFML Language, Techie Gotchas

In a comment on my Unit Testing on TDDSean Corfield mentioned that I did not need to explicitly call .init() on my object creation when using the new syntax... because the new syntax called it implicitly for you, if it exists, and fails silently if it does not exist. I know I had heard this somewhere, but I knew there was a reason why I was used to putting .init() on all object creation calls, but I had forgotten. Getting older, that time of the year, not sure what the excuse is, so I decided I'd do a little testing and try and jog my memory.

24
December 2013

Gavin Pickin

Unit Testing 02 - TDD - Lets Write Tests for our Objects, then Build them to Pass the Tests

Unit Testing

So we're back for another post in my Getting Started with Unit Testing. In the first post, we got our Testing Environment Setup, so we could browse to our project, then to the first blog, and the first step in that blog, where we could see we had 2 Test Bundles (or Suites) with 1 dummy test in each, copied from the documentation. 

In this post, we're going to remove those dummy or sample tests, and actually write some tests for our new objects. Our objects are actually empty so far, so we'll write some tests, then test them, they'll fail, and then we'll add some code to our objects, to get them to pass. This all part of the Test Driven Development process. I will not explain the pros and cons here in detail, but in short, if you write your tests to cover your specifications, and edge cases, your code will always be better, you can maintain it easier because all of your tests are there, for any member of the team (whether they know the specs and or edge cases) and because your code has to be testable, it should be shorter, single function methods, and just more DRY in general.

22
December 2013

Gavin Pickin

Unit Testing 01 - Setting up my Testing Environment to Test Unit Testing

Unit Testing

Getting Started with Unit Testing is my new Series to help myself, and you, get started with Unit Testing. I am definitely not an expert, but as I go through this process, I'll try and learn and share my experiences, so we can add to the number of ColdFusion and CFML developers using Unit Testing, like they should. Today is the first in the series, so its not that exciting, just mainly a lot of setup.

Ok, so I'm going to start doing some Unit Testing, and I'm going to test my unit testing, with my Test Environment. In english, I'm going to setup a play site, so I can walk through setting up a site with the sole purpose of creating Unit Tests, and I'll install TestBox and play with MxUnit Compatible tests, and some BDD (Behavior Driven Development) test style too.

Blog Search