Please note, new blog at

It always pays to explain yourself

I must have been working on the same piece of code for 1/2 a day yesterday -- trying to figure out why a certain method was not returning the correct results. I eventually went to a coworker of mine and started to explain the problem I was having. I went through the hierarchy of method calls that lead to the offending method, and then it hit me.... I was calling a method like this: methodName(argumentName=sUsername) That method I was calling was a wrapper method for another component's method, and it looked like this: <cffunction name="methodName"> <cfreturn oAnotherComponent.methodName(arguments=arguments)> </cffunction> Spot the error? Yup, should have been argumentCollection=arguments. I must have looked at that code dozens of times, but it didn't click until I explained the problem to someone else. Moral of the story - if you're having a problem, explain it to someone else. It always seems to work better if you not at your computer and at their computer.. Go figure.

» Post a Comment


» Create a Link