Be Consistent
The current project I'm working on centers around a 175+ line query that I wrote (don't knock it, it runs fast). Without revealing anything critical, the query produces a table full of data that is customized for each of our clients by ranking items which they have available to them with a scoring system I concocted. I tried to account for inability to generate a score by defaulting to 0 and stupidly -1 later on down in the query. Given a few items that the query was choosing against, it was flip-flopping the items on back to back runs. Not good. That stupid little oops cost me a couple of hours of grief.
Comments(0)