{"id":35233,"date":"2005-06-22T08:58:47","date_gmt":"2005-06-22T08:58:47","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2005\/06\/22\/why-does-the-run-dialog-autocorrect-but-not-the-run-key\/"},"modified":"2005-06-22T08:58:47","modified_gmt":"2005-06-22T08:58:47","slug":"why-does-the-run-dialog-autocorrect-but-not-the-run-key","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20050622-47\/?p=35233","title":{"rendered":"Why does the Run dialog autocorrect but not the Run key?"},"content":{"rendered":"<p><a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2004\/11\/18\/264217.aspx#266054\"> In an earlier comment<\/a>, Aswin Gunawan asked why the Run dialog does autocorrection but not the Run key?\n One is a programmatic interface and the other is an end-user control.\n End users are not expected to be understand how computers do things. They want, and even expect, the computer to help them out with what they&#8217;re typing. This means spell-checking, guessing missing information, and generally &#8220;doing what I mean&#8221;. For example, web browsers don&#8217;t require you to type &#8220;http:\/\/&#8221; or &#8220;ftp:\/\/&#8221; in front of web addresses any more; they guess whether you&#8217;re trying to connect to an FTP site or an HTTP site based on context. Of course, sometimes the computer guesses wrong&mdash;maybe you really wanted to use HTTP to connect to a site whose name begins with &#8220;ftp.&#8221;&mdash;in which case you can re-enter the command and provide more information so the computer won&#8217;t have to guess as much.\n Programming interfaces, on the other hand, are for people who <strong>do<\/strong> understand how computers do things. If a program makes an invalid request to a function, the expectation is that the function will return an error and not try to &#8220;guess&#8221; what the programmer &#8220;really meant to do&#8221;. Because a computer program can&#8217;t look at the &#8220;autocorrected&#8221; result and say, &#8220;No, that&#8217;s not quite what I meant,&#8221; and retry the operation with &#8220;a few more hints&#8221;. (Heck, if the program had &#8220;some more hints&#8221;, why not just pass the &#8220;fully hinted&#8221; version in the first place? Save you the trouble of calling the function twice.)\n Computer programs prefer predictability. Autocorrection and context-driven guessing are unpredictable. Imagine how much harder it would be to write code if a stretch of code changed it behavior based on fuzzy logic like &#8220;Well, there was a file in the directory that had a similar name, so I used that one instead&#8221;, or &#8220;This class doesn&#8217;t have a field called &#8216;current&#8217;, but the one over there does, so I&#8217;ll guess that you meant that one.&#8221;<\/p>\n<p> I&#8217;m sure some people will point out that the CreateProcess function breaks this rule of &#8220;don&#8217;t guess; just fail&#8221;. We&#8217;ll discuss this next time. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>In an earlier comment, Aswin Gunawan asked why the Run dialog does autocorrection but not the Run key? One is a programmatic interface and the other is an end-user control. End users are not expected to be understand how computers do things. They want, and even expect, the computer to help them out with what [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-35233","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>In an earlier comment, Aswin Gunawan asked why the Run dialog does autocorrection but not the Run key? One is a programmatic interface and the other is an end-user control. End users are not expected to be understand how computers do things. They want, and even expect, the computer to help them out with what [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/35233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=35233"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/35233\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=35233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=35233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=35233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}