{"id":1832,"date":"2009-02-18T17:17:00","date_gmt":"2009-02-18T22:17:00","guid":{"rendered":"http:\/\/www.starkeith.net\/coredump\/2009\/02\/18\/to-delete-or-not-to-delete\/"},"modified":"2009-02-28T16:30:17","modified_gmt":"2009-02-28T21:30:17","slug":"to-delete-or-not-to-delete","status":"publish","type":"post","link":"https:\/\/www.starkeith.net\/coredump\/2009\/02\/18\/to-delete-or-not-to-delete\/","title":{"rendered":"To Delete, or Not to Delete"},"content":{"rendered":"<p>Lately I\u2019ve been doing some work on a desktop application that uses a database to store things, and I\u2019ve run up against an age-old question:<\/p>\n<p align=\"center\"><strong>To Delete, or Not to Delete?<\/strong><\/p>\n<p>There is a school of thought that says if you\u2019re going to store things in a database, don\u2019t ever delete them \u2013 just flag them as \u201cdeleted\u201d or \u201chidden\u201d and don\u2019t show them unless you do something special. After all, disk space is cheap and that way you can save yourself from embarrassing accidents where you accidentally delete something you didn\u2019t mean to (even the recycle bin can\u2019t save you from every accidental deletion, after all).<\/p>\n<p>Then there is a different school of thought that says if you\u2019re going to delete something \u2013 really delete it! Don\u2019t lie to the user and \u201chide\u201d it and make the user pay the penalty of the disk space\/performance overhead\/etc. for things they think they\u2019ve gotten rid of permanently. (There\u2019s also an issue of data privacy to consider here as well \u2013 if you don\u2019t delete things, and those things contain sensitive information \u2013 say, passwords, social security numbers, etc. &#8211; is that \u201cright?\u201d)<\/p>\n<p>I\u2019m mostly in the 2nd camp \u2013 if I want things to stick around after I\u2019ve deleted them, I\u2019ll explicitly allow for it, though either a backup system (<a href=\"http:\/\/www.mozy.com\">Mozy<\/a>) or version control (<a href=\"http:\/\/subversion.tigris.org\/\">Subversion<\/a>). Otherwise, when I delete something, I expect it to be really deleted!<\/p>\n<p>Of course, in keeping with the idea of \u201c<a href=\"http:\/\/www.codinghorror.com\/blog\/archives\/001124.html\">strong opinions, weakly held<\/a>,\u201d I do have to consider the possibility of going the other way. And honestly, it\u2019s a hard decision to make. There is no \u201cright\u201d answer \u2013 there are trade-offs on both ends. <\/p>\n<p>Which camp are <em>you<\/em> in \u2013 the \u201ckeep everything\u201d camp or the \u201cdeleted means deleted\u201d camp?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To delete or not to delete? That is the (programming) question I&#8217;m trying to answer.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"webmentions_disabled_pings":false,"webmentions_disabled":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_post_was_ever_published":false},"categories":[199,201],"tags":[107,210],"class_list":["post-1832","post","type-post","status-publish","format-standard","hentry","category-my-opinion","category-software-technology","tag-programming","tag-software-design","entry"],"jetpack_shortlink":"https:\/\/wp.me\/pimUj-ty","jetpack-related-posts":[{"id":2994,"url":"https:\/\/www.starkeith.net\/coredump\/2010\/03\/16\/registry-cleaners-just-say-no\/","url_meta":{"origin":1832,"position":0},"title":"Registry Cleaners: Just Say &#8216;NO!&#8217;","author":"Keith Survell","date":"March 16, 2010","format":false,"excerpt":"Explaining why so-called \"registry cleaners\" are not needed anymore (if they ever were needed in the first place).","rel":"","context":"In &quot;My Opinion&quot;","block_context":{"text":"My Opinion","link":"https:\/\/www.starkeith.net\/coredump\/category\/personal\/my-opinion\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.starkeith.net\/coredump\/wp-content\/uploads\/\/2010\/03\/blockdevice.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2557,"url":"https:\/\/www.starkeith.net\/coredump\/2009\/05\/18\/how-to-move-your-windows-user-profile-to-another-drive\/","url_meta":{"origin":1832,"position":1},"title":"How to Move your Windows User Profile to another Drive (Updated)","author":"Keith Survell","date":"May 18, 2009","format":false,"excerpt":"How to seamlessly move (or redirect) your entire Windows user profile to a different drive (or location) using NTFS junction points instead of other, less elegant methods.","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/www.starkeith.net\/coredump\/category\/technology\/software-technology\/"},"img":{"alt_text":"My \"Videos\" library, located on a different drive","src":"https:\/\/i0.wp.com\/www.starkeith.net\/coredump\/wp-content\/uploads\/\/2009\/05\/libraries.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1874,"url":"https:\/\/www.starkeith.net\/coredump\/2009\/03\/21\/computer-recovery-day\/","url_meta":{"origin":1832,"position":2},"title":"Computer Recovery Day","author":"Keith Survell","date":"March 21, 2009","format":false,"excerpt":"An agonizing tale of computer malfunction, data recovery, and pain.","rel":"","context":"In &quot;My Life&quot;","block_context":{"text":"My Life","link":"https:\/\/www.starkeith.net\/coredump\/category\/personal\/my-life\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1114,"url":"https:\/\/www.starkeith.net\/coredump\/2008\/05\/14\/really-annoying-flaw-in-ntfs-mount-points\/","url_meta":{"origin":1832,"position":3},"title":"Really Annoying Flaw in NTFS Mount Points","author":"Keith Survell","date":"May 14, 2008","format":false,"excerpt":"UPDATE: As some people have noted, this problem was fixed in Windows Vista, so \"it's not really a problem anymore.\" And with Windows 7 out now, and Windows XP slowly dying, there's no real reason to worry about this anymore. But I'm leaving this article here, just for the sake\u2026","rel":"","context":"In &quot;Rants&quot;","block_context":{"text":"Rants","link":"https:\/\/www.starkeith.net\/coredump\/category\/rants\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":999,"url":"https:\/\/www.starkeith.net\/coredump\/2007\/12\/06\/on-the-other-hand-or-dont-steal-the-focus-part-2\/","url_meta":{"origin":1832,"position":4},"title":"On The Other Hand &#8211; or, Don&#8217;t Steal the Focus: Part 2","author":"Keith Survell","date":"December 6, 2007","format":false,"excerpt":"Touching again on the whole topic of \"don't steal the focus,\" I thought I'd point out that the Microsoft Windows Vista User Experience Guidelines has an entire section just on Error Messages, and wouldn't you know... they advise you not to steal the focus from the user. Although they may\u2026","rel":"","context":"In &quot;tech&quot;","block_context":{"text":"tech","link":"https:\/\/www.starkeith.net\/coredump\/category\/technology\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1873,"url":"https:\/\/www.starkeith.net\/coredump\/2009\/03\/17\/i-upgraded-to-vista-but-for-all-the-wrong-reasons\/","url_meta":{"origin":1832,"position":5},"title":"I Upgraded to Vista &ndash; But for all the Wrong Reasons","author":"Keith Survell","date":"March 17, 2009","format":false,"excerpt":"Even though I swore I wouldn\u2019t upgrade to Vista, just recently I bit the bullet and did it anyway. But I did it for all the wrong reasons.","rel":"","context":"In &quot;My Life&quot;","block_context":{"text":"My Life","link":"https:\/\/www.starkeith.net\/coredump\/category\/personal\/my-life\/"},"img":{"alt_text":"vista","src":"https:\/\/i0.wp.com\/www.starkeith.net\/coredump\/wp-content\/uploads\/\/2009\/03\/vista-thumb.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/posts\/1832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/comments?post=1832"}],"version-history":[{"count":0,"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/posts\/1832\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/media?parent=1832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/categories?post=1832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/tags?post=1832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}