Thursday, November 4, 2010

The horror, oh the horror part duh

Was given this method



Watch that. Numb your brain to it. Allow it to consume you. Enjoy the logical impossibilities of else if (hardForecastList.Last().Id == hardForecast.Id || softForecastList.Count() == 0) inside of a nested foreach loop that iterates across softForecastList in the outer layer. Enjoy, as you quickly come to realize that the only difference between these blocks of code are that 0s are getting set in certain places.



When I asked about the logic inside of the code, the response:


"The logic is behind that method is to display a hard and soft forecast as a single record that has the same dd, site, os, cycle and memory type.


So basically, you have a single list containing elements that need to be combined based upon a specified predicate. Algorithmically similar to a merge sort. This was the approach taken.



Some people code like this. Cry.



I turned it into this:





Which I know is still wrong. There's a 1-2 line solution in LINQ using Joins and the such out there. Curious, I asked on StackOverflow, trying to simplify the problem domain to the real thing I don't understand. But I'm not sure I like those solutions as much, either.

Monday, November 1, 2010

On the development of an automated privacy management scheme for relational database management systems

We can develop a methodology for automatically improving privacy protection in systems that store personal information by:

  • developing attributes/extensions into existing information systems that allow attributes(individual columns) to be marked as "personally identifiable"
  • developing triggers/stored procedures that log every access and modification of that information
  • developing triggers/stored procedures that check/verify proper access to that data
  • developing automated batch queries/scripts/jobs that remove personally identifiable stale information (hasn't been CRU for x amount of time) from a database
  • Adopting the "Convention over Configuration" approach to automatically apply this to certain types of records (i.e. Customer, User, Patient)