"It should be pretty simp--" David M cut himself off. He learned his lesson. Nothing at his new job was Pretty Simple.

Earlier that day, David decided to pick up a task from back log called the "Search For Location" feature. He figured it'd be a quick thirty minutes of coding: use the existing Location class, write a new stored procedure for the search, add a sproc-wrapper in the data provider layer, and leverage the existing Data-to-Object mapper code. Then he'd just have to write a new web service method -- SearchForLocationByName(string location) -- to call the DataProvider, reconcile with the LocationMapper, and chuck out the returned collection. Easy, right? There was just one problem: David could not find the "Location" table.

David always dreading having to ask his coworkers about the system. No matter what the question was, no matter how easy it seemed, they always responded in the same manner: smacking their hand to their forehead, sighing, and then saying in an apologetic tone: "that's right, you haven't seen that module yet; you better sit down for this one." Rarely did their explanation disappoint.

As David's coworker explained how Locations were managed in the system, David thought back to a bug he once noticed in the Capability Search module. It was designed to show what services a particular agent could perform, but for some reason was always showing "Saudi Arabia" as a capability. Though another developer fixed the bug, David wondered what could have caused it and simply figured that it must have meant the dialect of Arabic spoken in Saudi Arabia. Early on, those kind of justifications helped him remain sane.

Of course, the real reason that Saudi Arabia was returned in a capability search was because the system stored Locations in the tCapability table: a table designed to show a hierarchy of capabilities. When he opened it up to see how the data was modeled, he saw these particularly disburbing columns:

lLongitude
lLatitude
lDefaultRadial
lCountryID

The "l" stood for "long" but was really just an INT column in SQL Server. At that point, David decided that the "Search For Location" could wait another day... and certainly for another developer. After seeing the rest of the columns in the table, I don't blame him.

lID
lCapabilityTypeID
sName
bActive
bSelectable
lParentID
lOldParentID
lTreeID
lRightID
lOldTreeID
lSelectableTreeParentID
lOldSelectableTreeParentID
lIndentLevel
bLevel1
bLevel2
bCore
dtEnteredOn
dtUpdatedOn
bSynonym
lSelectableParentID
lOrigIdentityID
bLevelable
lOldSelectableParentID
sSelectableParentName
lCapabilityCount
bParseable
lEZAStatus
sEZAName
sSector
lLongitude
lLatitude
lDefaultRadial
lCountryID
sDescription
sCustodianName
sCapabilityDefenitionSource
sSupportingInformation
dtUserDefined1
dtUserDefined2
dtUserDefined3
sUserDefined1
sUserDefined2
sUserDefined3
bUserDefined1
bUserDefined2
bUserDefined3
lUserDefined1
lUserDefined2
lUserDefined3
[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!