{"id":62,"date":"2007-09-10T22:52:02","date_gmt":"2007-09-11T02:52:02","guid":{"rendered":"http:\/\/patorjk.com\/blog\/2007\/09\/10\/new-app-this-friday-programming-challenge\/"},"modified":"2014-01-25T18:06:51","modified_gmt":"2014-01-25T22:06:51","slug":"new-app-this-friday-programming-challenge","status":"publish","type":"post","link":"https:\/\/patorjk.com\/blog\/2007\/09\/10\/new-app-this-friday-programming-challenge\/","title":{"rendered":"New App This Friday \/ Programming Challenge"},"content":{"rendered":"<p>New App Coming<\/p>\n<p>On Sunday I sat down and programmed up a new online app. I might tweak it a bit between now and then, but as of right now it&#8217;s essentially done. I&#8217;ll post it up later this week &#8211; most likely Friday or Saturday. Since I wrote it in one day, you can assume it&#8217;s pretty small, it&#8217;ll be cool though! I actually really like it (and I don&#8217;t like everything I make). It was on my list of &#8220;stuff to do on a rainy day&#8221;. Sunday wasn&#8217;t actually rainy, but I was tired and I realized I hadn&#8217;t released anything here in a while, so I thought I&#8217;d take a stab at it.<\/p>\n<p>I had been working on another online app, which I&#8217;ve mentioned a few times here before, but it was a bit too ambitious and I&#8217;ve lost interest. So it&#8217;s offically been abandoned for the moment. I may come back to it later though.<\/p>\n<p>Programming Challenge<\/p>\n<p>While reading some more of <a href=\"http:\/\/steve.yegge.googlepages.com\/blog-rants\">Steve Yegge&#8217;s<\/a> blog entries, I ran across a very interesting programming question. It came from an entry Yegge wrote on doing phone interviews. He would always ask potential candidates the following question (or a variation of it):<\/p>\n<blockquote><p>Last year my team had to remove all the phone numbers from 50,000 Amazon web page templates, since many of the numbers were no longer in service, and we also wanted to route all customer contacts through a single page.<\/p>\n<p>Let&#8217;s say you&#8217;re on my team, and we have to identify the pages having probable U.S. phone numbers in them. To simplify the problem slightly, assume we have 50,000 HTML files in a Unix directory tree, under a directory called &#8220;\/website&#8221;. We have 2 days to get a list of file paths to the editorial staff. You need to give me a list of the .html files in this directory tree that appear to contain phone numbers in the following two formats: (xxx) xxx-xxxx and xxx-xxx-xxxx.<\/p>\n<p>How would you solve this problem? Keep in mind our team is on a short (2-day) timeline.<\/p><\/blockquote>\n<p>Aparently 25%-35% of the software developers he asked this question to could not solve it. So give yourself a pat on the back if you think you&#8217;ve got a solution. Once you&#8217;re sure on what you&#8217;d do, <a href=\"javascript:alert('You would use grep to search through the directory tree of files. To locate the phone numbers you would use a regular expression - you would input this into grep. This ends up equating to one line of code if you write a script file or type the command at the command prompt.');\">click here<\/a> to see what the best solution would be. I was actually estatic that I got it, though I&#8217;ve been using Unix a lot at work, and I&#8217;ve been reading up on regexes, so it&#8217;d be pretty bad if I didn&#8217;t get it. If you&#8217;re not a programmer, reading that solution will make no sense to you. <a href=\"http:\/\/steve.yegge.googlepages.com\/five-essential-phone-screen-questions\">This<\/a> is the blog entry it&#8217;s from. It&#8217;s basically an article on what you should know when you go into an interview for a software development position.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>New App Coming On Sunday I sat down and programmed up a new online app. I might tweak it a bit between now and then, but as of right now it&#8217;s essentially done. I&#8217;ll post it up later this week &#8211; most likely Friday or Saturday. Since I wrote it in one day, you can &hellip; <a href=\"https:\/\/patorjk.com\/blog\/2007\/09\/10\/new-app-this-friday-programming-challenge\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">New App This Friday \/ Programming Challenge<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-62","post","type-post","status-publish","format-standard","hentry","category-general-news","category-programming-examples"],"_links":{"self":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts\/62","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/comments?post=62"}],"version-history":[{"count":1,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts\/62\/revisions"}],"predecessor-version":[{"id":2780,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts\/62\/revisions\/2780"}],"wp:attachment":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/media?parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/categories?post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/tags?post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}