{"id":247,"date":"2006-09-15T13:44:04","date_gmt":"2006-09-15T04:44:04","guid":{"rendered":"https:\/\/regex.info\/blog\/2006-09-15\/247"},"modified":"2006-09-15T13:44:50","modified_gmt":"2006-09-15T04:44:50","slug":"source-of-the-famous-now-you-have-two-problems-quote","status":"publish","type":"post","link":"https:\/\/regex.info\/blog\/2006-09-15\/247","title":{"rendered":"Source of the famous &#8220;Now you have two problems&#8221; quote"},"content":{"rendered":"\n<p>\n\nAs I mentioned in my <a\nhref=\"\/blog\/2006-09-14\/246\">previous post<\/a>, my <a href='http:\/\/shop.oreilly.com\/product\/9780596528126.do'><i>Mastering Regular Expressions<\/i><\/a> book was\njust <a href=\"http:\/\/books.slashdot.org\/article.pl?sid=06\/09\/13\/147213\">reviewed\non Slashdot<\/a>. <span class='nobr'>One thing<\/span> that struck me in reading all the\nresulting comments was the (several different copies of an) apparently\nfamous quote that goes something like:<\/p>\n\n<div style='background-color: #444; border: solid 1px #CCCCCC; margin:20px 50px; padding: 15px'><b>\nSome people, when confronted with <span class='nobr'>a problem,<\/span> think\n<br\/>&#8220;I know, I'll use regular expressions.&#8221;\n&nbsp;&nbsp;Now they have two problems.\n<\/b><\/div>\n\n<p>It's apparently quite well known, so it floors me that this is the first\nI've seen it. Despite being <span class='nobr'>a manifestation<\/span> of the ignorance discussed in\nmy <a class='quiet' href=\"\/blog\/2006-09-14\/246\">previous\npost<\/a>, <span class='nobr'>I can certainly<\/span> appreciate it for its wit.<\/p>\n\n<p>This quote is generally attributed to <a\nhref=\"http:\/\/www.jwz.org\/\">Jamie Zawinski<\/a> (an early Netscape engineer) from\n<span class='nobr'>a post<\/span> on the <b>comp.lang.emacs<\/b> Usenet newsgroup. Unfortunately,\nthere's never been a <b>comp.lang.emacs<\/b> newsgroup, which renders the\nwhole attribution suspect. Oddly curious about it, <span class='nobr'>I did some<\/span>\ndigging...<\/p>\n\n<p>It turns out that the source of the mistaken comp.lang.emacs reference\nwas <span class='nobr'>a May<\/span> 1998 <b>comp.lang.python<\/b> <a\nhref=\"http:\/\/groups.google.com\/group\/comp.lang.python\/msg\/85d15c93e56c5236?hl=en\">post\nby Fredrik Lundh<\/a>, who used it as <span class='nobr'>a cute<\/span> quote in his <a\nhref=\"http:\/\/en.wikipedia.org\/wiki\/Signature_block\">sig<\/a>. <span class='nobr'>He's a prolific<\/span> writer so the sig appeard wide and far, and many people picked up on it and started using it\nthemselves, and the fame of the quote (along with an incorrect attribution)\nspread.<\/p>\n\n<p>But it was indeed Jamie Zawinski who first said it, in <span class='nobr'>a Usenet<\/span> post on\n<span class='nobr'>August 12,<\/span> 1997. Unfortunately, it seems that Google Groups, which holds <span class='nobr'>a\nrepository<\/span> of Usenet postings going back <span class='nobr'>a thousand<\/span> years, does not have\nthis particular post in its database.\n<span class='nobr'>If it would<\/span>, the post would be at the\nend of this <a\nhref=\"http:\/\/groups.google.com\/group\/alt.religion.emacs\/msg\/b59f4a602fb68f0a?hl=en\"\nrel='nofollow'>broken link<\/a>.<\/p>\n\n<p>[<b>UPDATE Feb 2013:<\/b> it seems now that the link is no longer broken; Jamie's original post is there]<\/p>\n\n<p>[<b>UPDATE Jan 2007:<\/b> Jamie Zawinski <a href=\"\/blog\/2006-09-15\/247#comment-3085\">added <span class='nobr'>a comment<\/span><\/a> to this post]<\/p>\n\n<p>Actually, it seems that none of Jamie Zawinski's posts in the threads\nthat spawned from this initial post are in Google's database. This is quite\nodd. <span class='nobr'>I have been<\/span> able to find parts of his posts quoted in the replies of\nothers. <span class='nobr'>It was a<\/span> heated thread, so there's plenty to go on.<\/p>\n\n<p>There was <a\nhref=\"http:\/\/groups.google.com\/group\/comp.emacs.xemacs\/browse_frm\/thread\/b21dbf075be84ab\/989698966fb25e7a?hl=en#989698966fb25e7a\"><span class='nobr'>a\nthread<\/span><\/a> in <b>comp.emacs.xemacs<\/b> and <b>alt.religion.emacs<\/b> in\nwhich the idea of embedding Perl into Emacs was proposed. (My first-thoughts\ncomment on this idea is that it's fairly silly, since Emacs already has <span class='nobr'>a\npowerful<\/span> lisp interpreter in it. Lisp is odd, though, in that it's <span class='nobr'>a vastly<\/span>\nmore regular language than Perl, yet arguably less readable. <span class='nobr'>But I digress<\/span>...).<\/p>\n\n<p>The main goal of the guy making the original suggestion was to get\nbetter regular-expression handling into Emacs. Perl treats regular\nexpressions as first-class language features, making them <span class='nobr'>a breeze<\/span> to work\nwith. They're not that hard to work with in Emacs Lisp, but in any case,\nEmacs's regular expressions are much less powerful and have <span class='nobr'>a syntax<\/span> that's\neven less readable than that of Perl's, if that's possible. (If you look up\n&#8220;toothpicks, scattered&#8221; in the index of my book, it brings you to <span class='nobr'>a page<\/span>\nabout Emacs regular-expression syntax. :-))<\/p>\n\n<p>Two things must be understood about Jamie Zawinski when evaluating his\ncomments about this idea: he despised Perl, and he spent <span class='nobr'>a nontrivial<\/span> chunk\nof his life tending to Emacs and its lisp system, to the point that he <a\nhref=\"http:\/\/www.jwz.org\/hacks\/\">considered it <span class='nobr'>a religion<\/span><\/a>. <span class='nobr'>I can understand<\/span> and appreciate having that kind of passion about something. <span class='nobr'>In any case<\/span>, talk about embedding Perl into Emacs would be heresy of the\nhighest order.<\/p>\n\n\n<p>It seems that during the course of this thread, Jamie referenced <span class='nobr'>a\nthree<\/span>-month-old <a\nhref=\"http:\/\/groups.google.com\/group\/comp.lang.functional\/msg\/84763c6d9185178b?dmode=source&amp;hl=en\">post\nby Kelly Murray<\/a> in which Kelly sarcastically suggests something even\nmore outlandishly silly (treating all data simply as <span class='nobr'>a stream<\/span> of bytes).\nApparently, Jamie didn't realize that it was meant to be humorous or\nsarcastic. Combining this with the idea of embedding Perl into Emacs just\nfor its regular-expression handling, and it was enough to put him over the\nedge, and Jamie lashed out:<\/p>\n\n<div class='q'>\n<b>Jamie Zawinski &lt;jwz@netscape.com&gt; wrote on Tue, 12 Aug 1997 13:16:22 -0700:<\/b>\n<div style='padding-left:5px; border-left: #447 solid medium; margin-top: 3px; padding-top: 0'>\n<pre style='margin-top:0; padding-top:0'>You are trying to shoehorn your existing preconceptions of how one\nshould program onto a vastly different (and older, and more internally\nconsistent) model.  I suggest your time would be better spent learning\nand understanding that other model, and learn to use it properly, and\nlearn what it can and cannot do, rather than infecting it with this new\ncancer out of ignorance.\n\nThe notion that everything is a stream of bytes is utterly braindead.\nThe notion that regexps are the solution to all problems is equally\nbraindead.\n\nJust like Perl.\n\nSome people, when confronted with a problem, think &#8220;I know,\nI'll use regular expressions.&#8221;  Now they have two problems.\n<\/pre><\/div><\/div>\n\n<p>Jamie really disliked Perl, and in the ensuing discussion had <span class='nobr'>a few<\/span>\nother comments about it. In this <a\nhref=\"http:\/\/groups.google.com\/group\/comp.emacs.xemacs\/msg\/3cd6d41ace570ac9?hl=en&amp;\">snippet<\/a>\nhe responds to a &#8220;what's wrong with Perl?&#8221; question:<\/p>\n\n<div class='q'><div style='padding-left:5px; border-left: #447 solid medium'>\n<pre>&gt; What's wrong with perl?\n\nIt combines all the worst aspects of C and Lisp: a billion different\nsublanguages in one monolithic executable.  It combines the power of\nC with the readability of PostScript.\n<\/pre><\/div><\/div>\n\n<p>(I also appreciate that last sentence for its wit.)<\/p>\n\n<p>A few days later it <a\nhref=\"http:\/\/groups.google.com\/group\/alt.religion.emacs\/msg\/991308e21103bb76?utoken=y6jr3TIAAAAHNAhXg1IfVuilpJeccStLGAmrE6vypPa-ZuYI0HTVtv3oCXeNlLzgllDXfF-UfC4p_tUz1V7g4RazWzRxYDBn\">became\nclear<\/a> that it's not only Perl itself, that he's upset with, but how he\nperceives it's often used:<\/p>\n\n<div  class='q'><div style='padding-left:5px; border-left: #447 solid medium'>\n<pre>Perl's nature encourages the use of regular expressions almost to the\nexclusion of all other techniques; they are far and away the most\n&#8220;obvious&#8221; (at least, to people who don't know any better) way to get\nfrom point A to point B.\n<\/pre><\/div><\/div>\n\n<p>Mind you, he's keeping a fair mind about himself, allowing that Perl has some merit:<\/p>\n\n<div  class='q'><div style='padding-left:5px; border-left: #447 solid medium'>\n<pre>Perl is not *all* bad; just mostly\n<\/pre><\/div><\/div>\n\n<p>I find that the next statement is quite telling:<\/p>\n\n<div  class='q'><div style='padding-left:5px; border-left: #447 solid medium'>\n<pre>Maybe Java will save the day, once someone straps a Java front end onto\nthe gcc back end.\n<\/pre><\/div><\/div>\n\n<p>Later, <a href=\"http:\/\/groups.google.com\/group\/comp.emacs.xemacs\/msg\/2d0462d725c19d16?hl=en\">he says<\/a>:<\/p>\n\n<div  class='q'><div style='padding-left:5px; border-left: #447 solid medium'>\n<pre>The heavy use of regexps in Perl is due to them being far and\naway the most obvious hammer in the box.\n\nThe heavy use of regexps in Emacs is due almost entirely to\nperformance issues: because of implementation details, Emacs\ncode that uses regexps will almost always run faster than\ncode that uses more traditional control structures.\n\nBased solely on how lame the syntax is, and how generally\nunmaintainable regexp-based code is, Perl would be very close\nto the bottom of my list of choices for most tasks.\n<\/pre><\/div><\/div>\n\n<p>I'd agree with that first paragraph if the &#8220;most obvious\nhammer&#8221; phrase were changed to &#8220;most appropriate hammer&#8221;,\nbecause Perl is often used for advanced text processing, and that's exactly\nwhere regular expressions shine. That being said, I've written plenty of\nsystem tools in Perl that are mostly or completely devoid of regular\nexpressions. <span class='nobr'>I use them<\/span> when they're the best tool, and don't when they're\nnot.<\/p>\n\n<p>Anyway, it was a colossal waste of time for me to track this all down\n(and for you to read this far :-)), but once <span class='nobr'>I got<\/span> on the trail it was hard\nto get off.<\/p>\n\n<p>As cute as the &#8220;now you have two problems&#8221; quote is, it seems that Jamie wasn't the first to come up with the idea. <span class='nobr'>The same quote<\/span> (but with <b>AWK<\/b> rather than <b>regular expressions<\/b> as the punch line) shows up in the sig\nof <a href=\"http:\/\/groups.google.com\/group\/comp.sys.ibm.pc.rt\/msg\/8c9ba376ae1c250c?hl=en\">John Myers post from 1988<\/a>,\nwhere he credits a &#8220;D. Tilbrook&#8221; for it:<\/p>\n\n<div style='background-color: #444; border: solid 1px #CCCCCC; margin:20px 50px; padding: 15px'><b>\n&#8220;Whenever faced with <span class='nobr'>a problem,<\/span> some people say `Lets use AWK.'\n<br\/>&nbsp;&nbsp;Now, they have two problems.&#8221; -- D. Tilbrook\n<\/b><\/div>\n\n<p>I've also seen the AWK quote credited to a &#8220;Zalman Stern&#8221;\n(in this 1993 <a\nhref=\"http:\/\/groups.google.com\/group\/alt.quotations\/msg\/dcee3d3682dd0470?hl=en\">post\nof quotations<\/a> on <b>alt.quotations<\/b>). <b>[Update Dec 2020<\/b>: <a href='#update-3'>see below<\/a> for more on <span class='QO'>&#8220;<\/span>D. Tilbrook<span class='QC'>&#8221;<\/span> and <span class='QO'>&#8220;<\/span>Zalman Stern<span class='QC'>&#8221;<\/span><b>]<\/b><\/p>\n\n\n\n<p> <span class='nobr'>As Mark Bessey<\/span> notes in a <a\nhref=\"http:\/\/codemines.blogspot.com\/2006\/08\/now-they-have-two-problems.html\">post\non his blog<\/a>, it's an all-purpose joke. <span class='nobr'>I can imagine<\/span> that it was first used in by servicemen during WW2, along the\nlines of &#8220;Some people think `Let's ask the officers'....&#8221;.\n\n<\/p>\n\n<div style='padding-top:20px; padding-bottom:10px'><div style='padding:\n10px; border: solid 2px #833'><p><b>UPDATES:<\/b><\/p><p><b>January 10th, 2007<\/b>: this post made\nit high enough on <a href=\"http:\/\/reddit.com\/\">reddit<\/a> that it made my\npageview jump by <span class='nobr'>a factor<\/span> of 10, and in doing so, brought in comments with\nmore details on the history of the phrase than <span class='nobr'>I had<\/span> been able to unearth\nmyself. Excellent! <span class='nobr'>See the comment<\/span> section for details.\n\n<\/p>\n\n<hr align='left' width='30%'\/>\n\n\n<p>\n\n<b>January 15th, 2007<\/b>: Jamie Zawinski himself <a href=\"\/blog\/2006-09-15\/247#comment-3085\">commented<\/a> on this post.<\/p>\n\n<hr align='left' width='30%'\/>\n\n<p><b id='update-3'>December 16th, 2020<\/b>:  This post was referenced on <a href='https:\/\/news.ycombinator.com\/item?id=25415441'>Hacker News<\/a>, and in those comments\nusers <a href='https:\/\/news.ycombinator.com\/user?id=JimWestergren'>Jim Westergren<\/a>\nand <a href='https:\/\/news.ycombinator.com\/user?id=dang'>dang<\/a> referenced other times this post has come up and resulted in interesting\ncomments (in <a href=' https:\/\/news.ycombinator.com\/item?id=1195704'>2010<\/a>, <a href=' https:\/\/news.ycombinator.com\/item?id=5187686'>2013<\/a>,\nand <a href='https:\/\/news.ycombinator.com\/item?id=10083420'>2015<\/a>). <span class='nobr'>The middle<\/span> reference was supplemented with a <span class='QO'>&#8220;<\/span>with <span class='nobr'>a great<\/span> top comment<span class='QC'>&#8221;<\/span>\nnote, so <span class='nobr'>I took<\/span> <span class='nobr'>a look<\/span> and indeed the <a href='https:\/\/news.ycombinator.com\/item?id=5188060'>top comment<\/a> by <a href='https:\/\/news.ycombinator.com\/user?id=raldi'>Mike Schiraldi<\/a> is interesting:<\/p>\n\n<div style='margin-left:2em; padding-left:1em; padding-right:1em;border: solid #888 1px; background-color: #222'>\n                  <p>There's actually a little more to the story than that. On 2007-01-09, <span class='nobr'>I wrote<\/span> to David Tilbrook:<\/p><pre><code>    Hi David .. I came across a web page\n    (https:\/\/regex.info\/blog\/2006-09-15\/247) investigating the source of the\n    following quotation:\n\n        \"Whenever faced with a problem, some people say `Lets use _____.'\n        Now, they have two problems.\"\n\n    The author of the site seems to have gone through a lot of trouble to\n    hunt down the original author of the quote. The best he was able to do\n    was discover a Usenet sig from 1988 attributed to \"D. Tilbrook.\"\n\n    I was wondering if this was you -- if so, I think you should contact the\n    author to set the record straight. His post was recently linked from the\n    news aggregator site Reddit, at\n    http:\/\/programming.reddit.com\/info\/xlov\/comments and quite a few people\n    have been reading the story and discussing the quote.\n  <\/code><\/pre>\n<p>He wrote back:<\/p><pre><code>    I can lay claim to being the author, but I cannot remember when or where\n    I first used it.\n\n    Zalman Stern worked for me at CMU so may have quoted me, hence the\n    attribution to him.\n\n    Actually one of the funnier incidents regarding my \"famous\" quotes was:\n\n        \"Software is the only business in which adding extra lanes to the\n        Golden Gate bridge would be called maintenance\" -- David Tilbrook -\n        circa 1981\n\n    I was at a meeting when the speaker used this quote and attributed it to\n    David Parnas -- I was appropriately indignant.\n\n    -- david\n\n    P.S.: Do we know each other?\n  <\/code><\/pre>\n<p>The answer to his postscript was no. \ud83d\ude42<\/p>\n<p>And he later replied again to add:<\/p><pre><code>    By the way, I think I coined the phrase at a European conference in\n    Dublin circa 1985.\n\n    I was talking about the difficulty maintaining portable software when\n    supposedly \"standard\" tools (e.g., awk(1)) differed from system to\n    system.\n\n    Then later someone pointed out to me that it was appearing in various\n    signature lines which I suppose led to its being spread.\n  <\/code><\/pre>\n\n<p>I forwarded it all to Jeffrey Friedl (the author of the linked post), but <span class='nobr'>I\nguess<\/span> he figured the comments already did <span class='nobr'>a good<\/span> job covering the story, or\nmaybe he wanted to get explicit permission from David to repost the emails\nbut never got it. <span class='nobr'>But I think<\/span> David's reply is interesting and compuhistoric\nenough that <span class='nobr'>I don't<\/span> want it to die in my GMail archives -- and so I'm\nposting it again here.<\/p>\n<\/div>\n\n<p>My initial reaction to reading this comment in 2020, 13 years after it was written, was that <span class='nobr'>I must<\/span> not have received that email,\nbut there it is in my archives, with permission from Mike to repost it here. <span class='nobr'>I guess<\/span> <span class='nobr'>I didn't<\/span> get around to it then, doh!\nUh, better late than never?<\/p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<\/div><\/div>\n\n<style type=\"text\/css\">\n  #post247 div.q { background-color: #333; padding: 10px 0px 5px 15px; margin: 10px 0 }\n<\/style>\n\n\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p> As I mentioned in my previous post, my Mastering Regular Expressions book was just reviewed on Slashdot. One thing that struck me in reading all the resulting comments was the (several different copies of an) apparently famous quote that goes something like:<\/p> <p>It's apparently quite well known, so it floors me that this is the first I've seen it. Despite being a manifestation of the ignorance discussed in my previous post, I can certainly appreciate it for its wit.<\/p> <p>This quote is generally attributed to Jamie Zawinski (an early Netscape engineer) from a post on the <b>comp.lang.emacs<\/b> Usenet newsgroup. [...]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/posts\/247"}],"collection":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/comments?post=247"}],"version-history":[{"count":0,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/posts\/247\/revisions"}],"wp:attachment":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/media?parent=247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/categories?post=247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/tags?post=247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}