Archive for April, 2008

More CF lovin’

The code…

<cfset aList="12, 14, 15">
<cfif ListContains(aList, 2)>
    Yeah!
</cfif>

The assumption…
The number 2 is not present in the list.

The reality…
The character “2″ is present in the list since ListContains() does a substring search.

The reaction…
Grrrrrrr!

(Apparently I should have been using ListFind)

Comments (1)

Verbose languages

AKA Why I *don’t* love ColdFusion

I don’t know if it’s because CF is a tag based language, but it’s so bloody verbose.

Consider the following…

<cfset aList = ListAppend(aList, 5)>

Functional languages I have no problem with. I’m used to OOP, so aList.append(5) seems more natural to me, but I could happily deal with ListAppend(aList, 5) So why do I have to repeat the name of the list twice using cfset?

Comments

Misbehaving Data

AKA: The fallacies of assumption
AKA: Damn users not dong what they are supposed to do!

I’m working on an app that attributes various roles to users on a given document. EG: user A authored document B. User C is a stakeholder, but not an author, on document B, etc.

Now the assumption, which I was told should be reliable (famous last words?), was that all employees had unique email addresses. So I built the db around that assumption.

Now it turns out that quite a few users, for whatever reason, just haven’t gotten around to applying for their own email addresses, and share an email address with various people in the department. Or better still, IT has gone and allowed generic email addresses to be set up which go to several recipients.

How the hell am I supposed to build a robust app if the bloody users don’t do what they are supposed to? Don’t they know about the procedures?

Comments (2)