Great research article on TDD from Microsoft.
http://research.microsoft.com/en-us/news/features/nagappan-100609.aspx
Great research article on TDD from Microsoft.
http://research.microsoft.com/en-us/news/features/nagappan-100609.aspx
I had an interesting observation about datatype conversion in CF9 when dealing with an error in ORM. I was getting an error that said can't use double for an integer field type (something like that). Now, I know that ColdFusion is datatype "independent". So, all simple variables are of datatype "String". Given that, when we do:
ColdFusion's built in function getTimeZoneInfo() doesn't allow you to pass a date. It give you the server timezone info and offset as of "now" (as in, when the code is run).
If you need to find the timezone offset for a specific date, you can use the TimeZone class from java. Here is the code.
<cfset myDate = "11/01/09" />
<cfset timeZone = createObject("java","java.util.TimeZone") />
<cfset myTimeZone = timeZone.getTimeZone("America/New_York") />
<cfset myTimeZoneOffset = myTimeZone.getOffset(1,year(myDate),month(myDate),day(myDate),dayOfWeek(myDate),0) />
I'm slowly migrating to writing script style components. I really started loving it. It's lot faster to write code in script style.
Anyway, today in one of my component I wanted to define the type of a property as a custom class. Since you can't write any code above property definition, on a whim, I tried the import outside of the component declaration and I was pleasantly surprised that it worked as expected!
import someClassPath.*;
component {
property MyClassName myClass;
public void function init() {
return this;
}
}
Recently came across a really bizarre issue with CFHTTP. Look at the code below:
See anything wrong with it? No? Well, here is the output I get:
And no, both the URL's are valid and you can access them through browser or with CFHTTP outside of CFLOOP. Turns out it's a bug in CFHTTP. When CFHTTP is used inside CFLOOP you can't follow an "https" request with "http" request. Huh? Ya, that's what I thought...
I was ready to file a bug report, but before doing that tested it in CF 9 to see what happens and voila, it works!
So, whatever the bug was, it's fixed in CF 9.
Recent Comments