Blog

Phone Plan Matchup: SQL Brute Force Method

Posted by Brad Wood
Sep 07, 2009 17:54:00 UTC
A few days ago on CF-Talk Greg Morphis asked for a method to find the cheapest combination of phone plans that satisfy a customer's requirements for the number of lines being used and the amount of minutes to share between the plans. At first, I thought the answer could be derived directly, but since the plans and their relative price/minute values are essentially random, they create different price breaks that change as you add minutes and lines. This means one combination of plans might be the cheapest for 500 minutes, but once you increase that to 600 minutes, a completely different set of plans might come into play that are now the cheapest.

MVC Question: What Should The Controller Pass The View?

Posted by Brad Wood
Sep 05, 2009 07:08:00 UTC
I think the bane of development planning can be those conversations where you personify your framework and start debating about what a service should "know", whose "job" a particular operation is, or what the handler should "care" about. This is one of those sort of questions, but I'll keep it brief since I'm more interested in your opinions than my ramblings.

SQL Server 2000 NULL Bug When Left Outer Joining A Nested View

Posted by Brad Wood
Aug 21, 2009 08:37:00 UTC
I found a very interesting behavior today with SQL Server 2000 SP4 that I'm most certain is a bug. I Googled for a while and found a couple old threads bringing up similar issues but they were without confirmation nor resolution. My actual use case was fairly complicated and confusing. I thought long and hard and came up with a simple example of the problem that still made a shred of sense.

ColdFusion UDF: Calculate A Number's Divisors

Posted by Brad Wood
Aug 15, 2009 06: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 14, 2009 06: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 07: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 20, 2009 06: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 23: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 14: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 31, 2009 05: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?

Site Updates

Entries Search