{"id":106407,"date":"2022-03-29T07:00:01","date_gmt":"2022-03-29T14:00:01","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/oldnewthing\/?p=106407"},"modified":"2022-03-29T07:27:49","modified_gmt":"2022-03-29T14:27:49","slug":"20220329-01","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20220329-01\/?p=106407","title":{"rendered":"How to become a Senior Detective, according to Murderville"},"content":{"rendered":"<p>One of my colleagues pointed out a screen shot from the Netflix documentary series\u00b9 <i>Murderville<\/i> as the Senior Detective introduces himself:<\/p>\n<div style=\"border: solid 1px black; background-color: black; color: white; width: 30em; font-family: Segoe UI; font-size: 17px; padding: 1px; line-height: normal;\">\n<div><tt>m_vecSockets.clear();<\/tt><\/div>\n<div>\u00a0<\/div>\n<div><tt>m_ButtonStartServer.SetCheck(BST_UNCHECKED);<\/tt><\/div>\n<div><tt>m_ButtonStartClient.SetCheck(BST_UNCHECKED);<\/tt><\/div>\n<div>\u00a0<\/div>\n<div><tt>EnabledControl();<\/tt><\/div>\n<div>\u00a0<\/div>\n<div><tt>m_wndCountPeople.SetWindowText(\"0 peop.\");<\/tt><\/div>\n<div><tt>SetWindowText(\"Error\");<\/tt><\/div>\n<div><tt>}<\/tt><\/div>\n<div>\u00a0<\/div>\n<div><tt>void CChatCppDlg::OnBnClickedButtonSend()<\/tt><\/div>\n<div><tt>{<\/tt><\/div>\n<div><tt>CString strChat;<\/tt><\/div>\n<div><tt>m_wndSend.GetWindowTxt(strChat);<\/tt><\/div>\n<div><tt>SendChat(strChat);<\/tt><\/div>\n<div>\u00a0<\/div>\n<div><tt>}<\/tt><\/div>\n<div>\u00a0<\/div>\n<div><tt>void CChatCppDl<\/tt><\/div>\n<\/div>\n<p>It looks to me like the Senior Detective is busy typing out the next method of <code>CChatCppDlg<\/code> at the bottom of the screen.<\/p>\n<p>It also appears that Senior Detectives believe indentation is superfluous, use MFC, and are very conscientious about wasting space, preferring to abbreviate &#8220;people&#8221; to just &#8220;peop.&#8221; to save one character. (But why not &#8220;ppl.&#8221;?)<\/p>\n<p>Another colleague was able to find out that this Senior Detective plagiarized his code from <a href=\"https:\/\/zinref.ru\/000_uchebniki\/02800_logika\/011_lekcii_raznie_34\/1451.htm\"> a Russian Web site<\/a>, which in turn appears to have been derived from <a href=\"https:\/\/github.com\/ProninaElizaveta\/clientchat\/blob\/436db158c7bdbd5d58d5c0c808e1f7c019a7b74e\/ChatCppDlg.cpp#L272\"> an MFC sample program<\/a>.<\/p>\n<p>So that&#8217;s how you become a Senior Detective: Find a Russian Web site, copy its code, including the odd indentation, but strip the comments, and translate the strings back to English. Instant promotion!<\/p>\n<p>\u00b9 No, <i>Murderville<\/i> is not actually a documentary. It&#8217;s a comedy. The running joke in all of these &#8220;How to\u2026 according to&#8221; posts is that I&#8217;m na\u00efve and think that all of television is real.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A little copy pasta will take you far.<\/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":[103],"class_list":["post-106407","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-non-computer"],"acf":[],"blog_post_summary":"<p>A little copy pasta will take you far.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/106407","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=106407"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/106407\/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=106407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=106407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=106407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}