{"id":66,"date":"2008-09-25T23:07:36","date_gmt":"2008-09-25T19:07:36","guid":{"rendered":"http:\/\/www.jrtwine.com\/blog\/?p=66"},"modified":"2012-02-20T06:07:58","modified_gmt":"2012-02-20T02:07:58","slug":"assumption-is-the-mother-of-all-fuckups","status":"publish","type":"post","link":"https:\/\/jrtwine.com\/blog\/assumption-is-the-mother-of-all-fuckups\/","title":{"rendered":"Assumption is the mother of all Fuckups&#8230;"},"content":{"rendered":"<p>So I find myself in the middle of a posting frenzy regarding a story on The Daily WTF: <a href=\"http:\/\/thedailywtf.com\/Comments\/A-Problem-at-the-Personal-Level--More.aspx\">http:\/\/thedailywtf.com\/Comments\/A-Problem-at-the-Personal-Level&#8211;More.aspx<\/a>.<\/p>\n<p>The point of my posts was that by withholding the assumptions made by the interviewer with his &#8220;one right answer&#8221;-kind of question, you put the interviewee in a bad position.  (The link above explains the scenario.)  IME, in the absence of specific details, one is likely to draw upon their experience to formulate a solution.  <\/p>\n<p>So when I read that according to the interviewer, the <em>one right answer<\/em> was to use a move operation to relocate the complete data file to where the watcher was looking for it.  Of course, my first question was if the move was atomic or not.  Far too many posters claimed that it always(!) was, other more intelligent ones indicated that it <em>should<\/em> be.  <\/p>\n<p>So my first post there was asking about different filesystems.  For example, the average Linux filesystem can support many different filesystem types: ext2, ext3, ffs, UFS, RiserFS, FAT32, NTFS, etc., and can have filesystem locations on different partitions, drives, and even network locations&#8230;  So what if the source and destination locations are not on the same device\/partition?  Are the moves still atomic?  My experience with both Linux and Win32 filesystem driver code tells me no, so that is what I posted, indicating that the <em>assumption<\/em> that everything is on one filesystem\/partition must be known.<\/p>\n<p>This post started to draw out lots of interesting people&#8230; One started talking about how the POSIX specification states that renames (and moves?) must be atomic, but did not know enough to realize that some systems may play fast-and-loose with the specification (<em>Hello<\/em>, Windows!).  Another started talking about how the <strong>rename(&#8230;)<\/strong> syscall (the <strong><em>syscall<\/em><\/strong>!) is atomic.  Well duh &#8211; most C-style functions are&#8230; it may <em>return<\/em> to the caller only after the rename (or move) is complete, but that does not mean that the behind-the-scenes action is atomic to an outside (filesystem) observer.<\/p>\n<p>It amazes me how so many people just do not &#8220;get it.&#8221;  Maybe I am not just a good communicator&#8230;<\/p>\n<p>Or maybe these people really should stay away from a keyboard as much as possible&#8230; \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How would you move a file in an atomic fashion?  What?  Not enough detail for you?  Do not worry &#8211; I have made some assumptions regarding the scenario, that I just pulled outta my ASS, and you better get the same asnwer I did!!!<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,6,11],"tags":[],"class_list":["post-66","post","type-post","status-publish","format-standard","hentry","category-developing","category-james","category-rants"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"How would you move a file in an atomic fashion? What? Not enough detail for you? Do not worry - I have made some assumptions regarding the scenario, that I just pulled outta my ASS, and you better get the same asnwer I did!!!\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"James R. Twine\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/jrtwine.com\/blog\/assumption-is-the-mother-of-all-fuckups\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"James R Twine Blog -\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Assumption is the mother of all Fuckups\u2026 - James R Twine Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"How would you move a file in an atomic fashion? What? Not enough detail for you? Do not worry - I have made some assumptions regarding the scenario, that I just pulled outta my ASS, and you better get the same asnwer I did!!!\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/jrtwine.com\/blog\/assumption-is-the-mother-of-all-fuckups\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2008-09-25T19:07:36+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2012-02-20T02:07:58+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Assumption is the mother of all Fuckups\u2026 - James R Twine Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"How would you move a file in an atomic fashion? What? Not enough detail for you? Do not worry - I have made some assumptions regarding the scenario, that I just pulled outta my ASS, and you better get the same asnwer I did!!!\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/assumption-is-the-mother-of-all-fuckups\\\/#blogposting\",\"name\":\"Assumption is the mother of all Fuckups\\u2026 - James R Twine Blog\",\"headline\":\"Assumption is the mother of all Fuckups&#8230;\",\"author\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/author\\\/jtwine\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/#organization\"},\"datePublished\":\"2008-09-25T23:07:36+00:00\",\"dateModified\":\"2012-02-20T06:07:58+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/assumption-is-the-mother-of-all-fuckups\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/assumption-is-the-mother-of-all-fuckups\\\/#webpage\"},\"articleSection\":\"Developing, James - Himself, Rants\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/assumption-is-the-mother-of-all-fuckups\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/category\\\/developing\\\/#listItem\",\"name\":\"Developing\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/category\\\/developing\\\/#listItem\",\"position\":2,\"name\":\"Developing\",\"item\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/category\\\/developing\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/assumption-is-the-mother-of-all-fuckups\\\/#listItem\",\"name\":\"Assumption is the mother of all Fuckups&#8230;\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/assumption-is-the-mother-of-all-fuckups\\\/#listItem\",\"position\":3,\"name\":\"Assumption is the mother of all Fuckups&#8230;\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/category\\\/developing\\\/#listItem\",\"name\":\"Developing\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/#organization\",\"name\":\"James R Twine Blog\",\"url\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/author\\\/jtwine\\\/#author\",\"url\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/author\\\/jtwine\\\/\",\"name\":\"James R. Twine\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/assumption-is-the-mother-of-all-fuckups\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/77d36362e353ec1c88adc48b48055faee96497898a208d3a6a05897d4902e552?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"James R. Twine\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/assumption-is-the-mother-of-all-fuckups\\\/#webpage\",\"url\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/assumption-is-the-mother-of-all-fuckups\\\/\",\"name\":\"Assumption is the mother of all Fuckups\\u2026 - James R Twine Blog\",\"description\":\"How would you move a file in an atomic fashion? What? Not enough detail for you? Do not worry - I have made some assumptions regarding the scenario, that I just pulled outta my ASS, and you better get the same asnwer I did!!!\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/assumption-is-the-mother-of-all-fuckups\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/author\\\/jtwine\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/author\\\/jtwine\\\/#author\"},\"datePublished\":\"2008-09-25T23:07:36+00:00\",\"dateModified\":\"2012-02-20T06:07:58+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/\",\"name\":\"James R Twine Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/jrtwine.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Assumption is the mother of all Fuckups\u2026 - James R Twine Blog","description":"How would you move a file in an atomic fashion? What? Not enough detail for you? Do not worry - I have made some assumptions regarding the scenario, that I just pulled outta my ASS, and you better get the same asnwer I did!!!","canonical_url":"https:\/\/jrtwine.com\/blog\/assumption-is-the-mother-of-all-fuckups\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/jrtwine.com\/blog\/assumption-is-the-mother-of-all-fuckups\/#blogposting","name":"Assumption is the mother of all Fuckups\u2026 - James R Twine Blog","headline":"Assumption is the mother of all Fuckups&#8230;","author":{"@id":"https:\/\/jrtwine.com\/blog\/author\/jtwine\/#author"},"publisher":{"@id":"https:\/\/jrtwine.com\/blog\/#organization"},"datePublished":"2008-09-25T23:07:36+00:00","dateModified":"2012-02-20T06:07:58+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/jrtwine.com\/blog\/assumption-is-the-mother-of-all-fuckups\/#webpage"},"isPartOf":{"@id":"https:\/\/jrtwine.com\/blog\/assumption-is-the-mother-of-all-fuckups\/#webpage"},"articleSection":"Developing, James - Himself, Rants"},{"@type":"BreadcrumbList","@id":"https:\/\/jrtwine.com\/blog\/assumption-is-the-mother-of-all-fuckups\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/jrtwine.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/jrtwine.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/jrtwine.com\/blog\/category\/developing\/#listItem","name":"Developing"}},{"@type":"ListItem","@id":"https:\/\/jrtwine.com\/blog\/category\/developing\/#listItem","position":2,"name":"Developing","item":"https:\/\/jrtwine.com\/blog\/category\/developing\/","nextItem":{"@type":"ListItem","@id":"https:\/\/jrtwine.com\/blog\/assumption-is-the-mother-of-all-fuckups\/#listItem","name":"Assumption is the mother of all Fuckups&#8230;"},"previousItem":{"@type":"ListItem","@id":"https:\/\/jrtwine.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/jrtwine.com\/blog\/assumption-is-the-mother-of-all-fuckups\/#listItem","position":3,"name":"Assumption is the mother of all Fuckups&#8230;","previousItem":{"@type":"ListItem","@id":"https:\/\/jrtwine.com\/blog\/category\/developing\/#listItem","name":"Developing"}}]},{"@type":"Organization","@id":"https:\/\/jrtwine.com\/blog\/#organization","name":"James R Twine Blog","url":"https:\/\/jrtwine.com\/blog\/"},{"@type":"Person","@id":"https:\/\/jrtwine.com\/blog\/author\/jtwine\/#author","url":"https:\/\/jrtwine.com\/blog\/author\/jtwine\/","name":"James R. Twine","image":{"@type":"ImageObject","@id":"https:\/\/jrtwine.com\/blog\/assumption-is-the-mother-of-all-fuckups\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/77d36362e353ec1c88adc48b48055faee96497898a208d3a6a05897d4902e552?s=96&d=mm&r=g","width":96,"height":96,"caption":"James R. Twine"}},{"@type":"WebPage","@id":"https:\/\/jrtwine.com\/blog\/assumption-is-the-mother-of-all-fuckups\/#webpage","url":"https:\/\/jrtwine.com\/blog\/assumption-is-the-mother-of-all-fuckups\/","name":"Assumption is the mother of all Fuckups\u2026 - James R Twine Blog","description":"How would you move a file in an atomic fashion? What? Not enough detail for you? Do not worry - I have made some assumptions regarding the scenario, that I just pulled outta my ASS, and you better get the same asnwer I did!!!","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/jrtwine.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/jrtwine.com\/blog\/assumption-is-the-mother-of-all-fuckups\/#breadcrumblist"},"author":{"@id":"https:\/\/jrtwine.com\/blog\/author\/jtwine\/#author"},"creator":{"@id":"https:\/\/jrtwine.com\/blog\/author\/jtwine\/#author"},"datePublished":"2008-09-25T23:07:36+00:00","dateModified":"2012-02-20T06:07:58+00:00"},{"@type":"WebSite","@id":"https:\/\/jrtwine.com\/blog\/#website","url":"https:\/\/jrtwine.com\/blog\/","name":"James R Twine Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/jrtwine.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"James R Twine Blog -","og:type":"article","og:title":"Assumption is the mother of all Fuckups\u2026 - James R Twine Blog","og:description":"How would you move a file in an atomic fashion? What? Not enough detail for you? Do not worry - I have made some assumptions regarding the scenario, that I just pulled outta my ASS, and you better get the same asnwer I did!!!","og:url":"https:\/\/jrtwine.com\/blog\/assumption-is-the-mother-of-all-fuckups\/","article:published_time":"2008-09-25T19:07:36+00:00","article:modified_time":"2012-02-20T02:07:58+00:00","twitter:card":"summary_large_image","twitter:title":"Assumption is the mother of all Fuckups\u2026 - James R Twine Blog","twitter:description":"How would you move a file in an atomic fashion? What? Not enough detail for you? Do not worry - I have made some assumptions regarding the scenario, that I just pulled outta my ASS, and you better get the same asnwer I did!!!"},"aioseo_meta_data":{"post_id":"66","title":null,"description":null,"keywords":null,"keyphrases":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_image_url":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null,"created":"2026-09-17 06:50:56","updated":"2026-09-17 06:50:56"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/jrtwine.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/jrtwine.com\/blog\/category\/developing\/\" title=\"Developing\">Developing<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tAssumption is the mother of all Fuckups\u2026\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/jrtwine.com\/blog\/"},{"label":"Developing","link":"https:\/\/jrtwine.com\/blog\/category\/developing\/"},{"label":"Assumption is the mother of all Fuckups&#8230;","link":"https:\/\/jrtwine.com\/blog\/assumption-is-the-mother-of-all-fuckups\/"}],"_links":{"self":[{"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/posts\/66","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/comments?post=66"}],"version-history":[{"count":1,"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/posts\/66\/revisions"}],"predecessor-version":[{"id":121,"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/posts\/66\/revisions\/121"}],"wp:attachment":[{"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/media?parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/categories?post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jrtwine.com\/blog\/wp-json\/wp\/v2\/tags?post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}