Crazy About Constants

Mar 28

Crazy About Constants

Enterprise SQL: This gets more and more absurd the more I look at it. I can’t imagine working on this app — when did SQL become evil? I really want to know what’s in the snipped section.

I think we need constants for the English langauge:

define('A', 'A');
define('B', 'B');

Steve McConnell is big on constants, and I wrote him once to see if I should break table and column names into constants. I think he said no, but I can’t remember.

With a good O-R mapper, that stuff gets less relevant anyway.


Comments

by Joseph Scott,   March 29, 2006 12:55 AM  

This is classic! I've looked at some abusive SQL code before but this takes the cake.


by Matt Smith,   March 29, 2006 1:16 AM  

I agree about using a good O-R mapper


by Deane,   March 29, 2006 8:03 AM  

Yeah, good O-R mappers are really handy.



Comments are Closed

Thanks to all who participated.

Want to advertise on this site? Contact FM.