Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can I use delete flag as status flag so to trace consistency issue?

 
Jianping Wang
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Right now delete flag 0 means OK and 1 means deleted. If regard it as a status flag, I can add status 2 means intermediate result (dirty status). So when we update a row and suddenly server powers off, we can still tell which rows are in dirty status. Of cause when the update complete we reset it back to 0.

What do you think? After all dirty data cannot be used.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not required, so just don't do it. It will overcomplicate (and maybe clutter) your code. Easy, simple code is preferred above more complex code. You won't get extra credit for little extras you put in the application, you might only loose points because it might not be flawless
 
Cindy Carney
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree. I used to do stuff like that earlier in my career, but have since stopped. Though it seems to save time during development, those early gains are erased when it comes time to perform maintenance - you'll find yourself cursing those fields that have more than one use, like 'a combo delete-flag and status flag' or 'a combo delete-flag and last update date flag'. They make things confusing, fragile, and resistant to change.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic