I have decided that it is time to make a slight change in the way I code my ColdFusion code. For the longest time, I have written certain ColdFusion tag attributes in upper case. Here are some examples:
- CFFile Action (ex. <cffile action="UPLOAD" />)
- CFHttp Method (ex. <cfhttp method="GET" />
- CFHttpParam Type (ex. <cfhttpparam type="CGI" />)
- CFImage (ex. <cfimage action="READ" />)
Those are just a few that pop into mind at this moment. I am sure there are other places where I am doing this. I am not sure why I got into this habit, but I know that it is totally inconsistent. Why do some ColdFusion tag attributes have to be upper case while most do not? They don't! It was a poor programming choice and it's time to remedy the situation.
The exception to the rule (sort of) is going to be the ColdFusion query data types:
- ... etc....
I feel that these are OK as being uppercase because they feel more like constants than they do variables... of course, I may look up tomorrow and realize that there is no need to have ANY exceptions. After all, I already lowercase all my CGI variables (ex. CGI.http_user_agent), why keep my database types uppercase?
Exactly! Good point!
Ok, stream of consciousness... I will start making my database types lowercase as well. No more inconsistencies! No more poor programming (well, poorer than it has to be). From now on, all tag attribute values will be lowercase (unless they are variable names, in which case they should match the case of the original variable declaration).
Now, I know what some of you might be thinking: Why would I even waste my time caring about this... To which I would respond, Waste my time trying to write the most consistent code possible?.... Why aren't YOU wasting your time thinking about stuff like this :)