Blog

ColdFusion UDF: Calculate A Number's Divisors

Posted by Brad Wood
Aug 14, 2009 23:24:00 UTC
Here's another UDF I was tinkering with last week. I wanted to be able to count all of the numbers that divided evenly into a given integer. I couldn't find a ColdFusion implementation, so after getting some advice from Stack Overflow I created my own.

Calculate Prime Numbers: Sieve of Eratosthenes

Posted by Brad Wood
Aug 13, 2009 23:34:00 UTC
Ahh... the quintessential math problem-- finding prime numbers. Last week while tinkering with a math challenge I needed to find all of the primes up to a given number. There was a version on cflib.org, but I thought I could do it in less code, so I dug in myself.

Bit By ANSI_NULLS- Are Your Nulls Antsy Too?

Posted by Brad Wood
Aug 05, 2009 00:39:00 UTC
I had one of those (all-too common) moments today that I spent scratching my head at a page of SQL code that was failing for no apparent reason. What's worse is the EXACT same code worked in another window. After a good deal of poking and prodding I figured out what was wrong and it involved my ANSI_NULLS setting

Bolt, Centuar, Flash Catalyst, and Gumbo features

Posted by Brad Wood
Jun 19, 2009 23:56:00 UTC
This Wednesday Adobe's Kevin Hoyt spoke in Kansas City to a captive audience of about 75 people including ColdFusion programmers, HTML/CSS builders, and designers. The meeting was great. It also included Jack Stack BBQ and shwag from Uhlig, Emfluence, and Tek Systems to name a few. Kevin didn't drop any bombs I hadn't heard about yet, but there were definitely a few things I learned about Adobe's up-and-coming products. Here's a quick overview of my notes:

Adobe's Kevin Hoyt is coming to Kansas City!

Posted by Brad Wood
Jun 15, 2009 16:55:00 UTC
If you live in or around Kansas City, Kevin Hoyt is coming to speak about ColdFusion, Bolt, Flex, and Flash Catalyst this Wednesday. I am pretty excited. First of all, to receive some local attention from Adobe. Secondly, to get to hear Kevin (Adobe Platform Evangalist). Thirdly, they are promising BBQ. What else could be better?

New Flex 4 Tutorials Available

Posted by Brad Wood
Jun 01, 2009 07:34:00 UTC
Flex 4 (Gumbo) is now in Beta and new training tutorials are available from Trilemetry. There a handful of new articles you can read on Adobe's site and follow along with to learn Flex 4 with ColdFusion!

Should Optional Method Parameters Be Defaulted To Blank, Or Left Undefined?

Posted by Brad Wood
May 30, 2009 22:51:00 UTC
Today I offer you a question of preference. Should optional method parameters be defaulted to blank and assumed to exist, or should they only be defined if you intend to use them? In the name of code reusability I will find myself writing generic service methods such as userService.loadUser() which have a large list of optional parameters such as lastName, firstName, userName, companyID, userID, password etc. I will reuse this method any time I want to load a user or a list of users. The question is this: is it more correct to default all of the arguments or check for their existence?

SQL Server Temp Tables: When Do I Create My Indexes?

Posted by Brad Wood
May 13, 2009 00:31:00 UTC
My last blog post was originally the start of this one, but I got so carried away talking about the different types of temp tables I split it off. Today's topic is when to create indexes on SQL temp tables-- before or after you add the data. Many people out there seem to hold the same opinion on the subject. I don't like taking other people's word and I also like doing things the hard way. Therefore I created a series of tests to see which way really was fastest.

SQL Temp Tables

Posted by Brad Wood
May 03, 2009 00:05:00 UTC
Here's a quick note about SQL temp tables. In SQL Server, there are three kinds of temporary tables you can use. The first kind (my favorite) are known as table variables. They only exist in memory and are not written to disk (unless your OS is low on RAM and starts swapping). Table variable names start with an "@" just like other T-SQL variables and the syntax for one is like so:

CFML Advisory Committee Update and ColdBox

Posted by Brad Wood
Apr 11, 2009 00:25:00 UTC
Just a couple things I wanted to mention... The first is that the CFML Advisory Committee has been at work drafting their first version of the CFML language spec. Also, while looking through www.opencfml.org I noticed they are using CodexWiki which runs on ColdBox which is pretty cool. Speaking of ColdBox...

Site Updates

Entries Search