<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Ted Dziuba</title>
    <link rel="alternate" type="text/html" href="http://teddziuba.com/" />
    <link rel="self" type="application/atom+xml" href="http://teddziuba.com/atom.xml" />
    <id>tag:teddziuba.com,2010-02-28://1</id>
    <updated>2010-02-12T23:00:30Z</updated>
    <subtitle>Ted Dziuba&apos;s blog: writing, programming &amp; automotive repair.</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 5.01</generator>

<entry>
    <title>Eventlet: Asynchronous I/O for Grownups</title>
    <link rel="alternate" type="text/html" href="http://teddziuba.com/2010/02/eventlet-asynchronous-io-for-g.html" />
    <id>tag:teddziuba.com,2010://1.99</id>

    <published>2010-02-12T07:01:20Z</published>
    <updated>2010-02-12T23:00:30Z</updated>

    <summary><![CDATA[Event-driven asynchronous I/O is the newest chatter at the Silicon Valley High Abercrombie table. &nbsp;Threading, the mode of parallelism we all thought we were so smart for understanding, isn't cool anymore. Everybody who is anybody is using asynchronous I/O, and...]]></summary>
    <author>
        <name>Ted Dziuba</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://teddziuba.com/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="lose-an-argument-like-a-man-say--well-i-guess-ill-just-go-fuck-myself-then.jpg" src="http://teddziuba.com/2010/02/12/lose-an-argument-like-a-man-say--well-i-guess-ill-just-go-fuck-myself-then.jpg" width="250" height="188" class="mt-image-right" style="float: right; margin: 0 0 20px 20px;" /></span>Event-driven asynchronous I/O is the newest chatter at the Silicon Valley High Abercrombie table. &nbsp;Threading, the mode of parallelism we all thought we were so smart for understanding, isn't cool anymore. Everybody who is anybody is using asynchronous I/O, and of course, there are different opinions on how it should be done. This being the software world, you can count on those opinions being vehement.<div><br /></div><div>If you look at the benchmarks, all of the major async libraries for Python are basically on the same operating plane. There's Twisted, Tornado, gevent, and a handful of others, but the one that really stands out in the group is <a href="http://eventlet.net/">Eventlet</a>. Why is that? Two reasons:</div><div><br /></div><div>1. <b>You don't need to get balls deep in theory to be productive with Eventlet.</b></div><div>2. <b>You need to modify very little pre-existing code to adapt a program to be event-driven.<br /><br /></b></div><div>Eventlet's approach is that <i>asynchronous code should look like synchronous code</i>. Why? Because it's easy for people to understand synchronous code. &nbsp;Thinking about callbacks and schedulers is unnecessary, after all, we have work to do. What's more, not only does asynchronous code with Eventlet <i>look</i> synchronous, it can also <i>run</i> synchronously.</div><div><br /></div><div>Look at this Python snippet:</div><div><br /></div>

<div class="highlight"><pre><span class="k">def</span> <span class="nf">fetch_and_parse</span><span class="p">(</span><span class="n">url</span><span class="p">):</span>
    <span class="n">contents</span> <span class="o">=</span> <span class="n">urllib2</span><span class="o">.</span><span class="n">urlopen</span><span class="p">(</span><span class="n">url</span><span class="p">)</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
    <span class="n">tree</span> <span class="o">=</span> <span class="n">lxml</span><span class="o">.</span><span class="n">html</span><span class="o">.</span><span class="n">fromstring</span><span class="p">(</span><span class="n">contents</span><span class="p">)</span>
    <span class="c"># Do some parsing on the ElementTree</span>
    <span class="k">return</span> <span class="n">value</span>
</pre></div>

It looks like regular synchronous code, and ostensibly it is. The output of the URL fetch is the input to the HTML parser. However, if you have a ton of URLs to do this to, how would you parallelize it? Threads are an option, but so is Eventlet:<div><br /></div><div><div>
<div class="highlight"><pre><span class="kn">import</span> <span class="nn">eventlet</span>
<span class="kn">from</span> <span class="nn">eventlet.green</span> <span class="kn">import</span> <span class="n">urllib2</span>

<span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
    <span class="n">green_pool</span> <span class="o">=</span> <span class="n">eventlet</span><span class="o">.</span><span class="n">GreenPool</span><span class="p">(</span><span class="n">size</span> <span class="o">=</span> <span class="mi">10</span><span class="p">)</span>
    <span class="n">results</span> <span class="o">=</span> <span class="p">[]</span>
    <span class="k">for</span> <span class="n">result</span> <span class="ow">in</span> <span class="n">green_pool</span><span class="o">.</span><span class="n">imap</span><span class="p">(</span><span class="n">fetch_and_parse</span><span class="p">,</span> <span class="n">urls</span><span class="p">):</span>
        <span class="n">results</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</pre></div></div></div>

This is interesting because all I've done to make a seemingly synchronous piece of code run asynchronously is to patch the library it needs for I/O and give it a driver method. That driver class could have easily been a series of threads all reading from a Queue, and importing the standard library's version of urllib2.<div><br /></div><div>Now hold on a second. This is a painfully contrived example, but it's such a key point: The asynchronous code looks synchronous. It can even function synchronously. All I did to make it use event-driven I/O is <b>change the driver and patch a library</b>. Now this is podracing!</div><div><br /></div><div>That sort of integration has such a massive business value that I will easily disregard any pissing-contest performance gains that Twisted or Tornado may offer. I know that when you have code written in the "old" style, and the powers that be hand down the "new" style, there is an itch to re-write it, but rewriting known-working code is the worst thing you can do for your project.</div><div><br /></div><div>The Eventlet developers have gone further than this, providing a facility to monkey-patch the existing system libraries at invocation time. For example, let's say you have a web app that does some Memcached I/O and some database I/O.</div><div><br /></div>

<div class="highlight"><pre><span class="kn">from</span> <span class="nn">eventlet</span> <span class="kn">import</span> <span class="n">patcher</span>
<span class="n">patcher</span><span class="o">.</span><span class="n">monkey_patch</span><span class="p">(</span><span class="nb">all</span> <span class="o">=</span> <span class="bp">True</span><span class="p">)</span>
</pre></div>

Oh look. Your application is now using asynchronous I/O. This call patches Python's socket module and a few others to make it all "just work" with Eventlet's internal coroutine switching mechanism. (Caveat: MySQLdb, which uses C-land sockets, needs a little bit of extra treatment, but it's only a couple of lines)<div><br /></div><div>This all sounds great in theory, but I have actually made a large I/O bound program work using monkey patching and changing the driver. It is a piece of software that reads jobs from a queue and processes them, putting the result in memcached. For esoteric reasons I will not go into, the job processors could not thread the work, they had to fork. Using this setup, one production box with 8GB of RAM was consistently 7.5GB full. After a less than 5 line code change to the driver, that same production box uses only around 1GB of RAM consistently, and can handle 5 to 10x the throughput of the old system.</div><div><br /></div><div>Now compare this to Twisted or Tornado. Twisted tries so damn hard to be Java that it really offends me personally. Those developers strike me as the alpha-programmer types who see no reason <i>not</i> to rewrite an existing codebase for a 20% performance gain. &nbsp;Tornado on the other hand is significantly less Jersey Shore douchebaggy, but they still miss the point: we are programmers who need to get stuff done. Inventing your own HTTP client class, when Python's builtin works just fine if not better is the type of hubris that gets hotshot programmers fired in their first month.</div><div><br /></div><div>There's also gevent, which appears to be a fork of Eventlet, but is not as well documented. Partial credit.</div><div><br /></div><div>It's hard to find a performance or scaling related open source library that values my time. Eventlet is one of those rare few.</div><div><br /></div><div><a href="http://eventlet.net/">http://eventlet.net</a><br /><div><br /></div></div>]]>
        
    </content>
</entry>

<entry>
    <title>Break My Concentration and I Break Your Kneecaps</title>
    <link rel="alternate" type="text/html" href="http://teddziuba.com/2010/01/break-my-concentration-and-i-b.html" />
    <id>tag:teddziuba.com,2010://1.98</id>

    <published>2010-01-24T21:04:40Z</published>
    <updated>2010-01-25T00:58:13Z</updated>

    <summary><![CDATA[ I own a good set of headphones that fully enclose my ears. I am not an audiophile, I just don't like to hear other people talk at me. &nbsp;When I am staring at my Emacs windows with headphones on,...]]></summary>
    <author>
        <name>Ted Dziuba</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://teddziuba.com/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="a-handgun-is-like-an-atm-machine-and-convincing-argument-all-in-one.jpg" src="http://teddziuba.com/2010/01/24/a-handgun-is-like-an-atm-machine-and-convincing-argument-all-in-one.jpg" class="mt-image-right" style="margin: 0pt 0pt 20px 20px; float: right;" width="279" height="279" /></span> <div>I own a good set of headphones that fully enclose my ears. I am not an audiophile, I just don't like to hear other people talk at me. &nbsp;When I am staring at my Emacs windows with headphones on, it generally isn't a physical cue that I am looking for conversation. In fact, when I am that deep into thinking out a problem and I get interrupted, I think about the anti-workplace-violence clause in the employee handbook, and how a poorly lit parking lot probably doesn't qualify as "company property".<br /><br />Interrupting a thinking programmer is a sucker punch to productivity's kidney. Of course it's still important to keep open communication channels, especially in a small team. I don't mind answering questions and helping out, so long as it's not an immediate context switch for me, i.e. I'll help you if I don't have to speak.<br /><br />Instant messaging is a decent first attempt, but it's only person-to-person communication. (And no, group-IM <i>never</i> fucking works right) Programming teams need group chat.&nbsp; White-label Twitter clones like Yammer are okay, but I feel icky using a product that is hailed as a technological advance for supporting the ability to identify topics by prefixing a word with a pound sign. That, and I want to keep an eye on the conversation as I work, and my attention isn't on my IM client or browser when I'm coding. It's on Emacs. <br /><br />The answer, of course is IRC.<br /><br />My team recently grew, and four of us need to communicate constantly. I set up an IRC server and brought people in. One non-programmer who needed to be in the loop had never used IRC, but caught on quickly. Productivity is up, as is communication. The developer chat channel is right in front of me as I work, as a window in Emacs:<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="at-the-crunchies-i-got-drunk-and-started-heckling-people-who-used-to-be-important.png" src="http://teddziuba.com/2010/01/24/at-the-crunchies-i-got-drunk-and-started-heckling-people-who-used-to-be-important.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" width="576" height="317" /></span>Think of developer communication like I/O. There's blocking and nonblocking. When somebody talks to me as I work, my programming train of thought needs to block. With inline chat like you see above, I can answer questions when I have spare cycles. Since the conversation is integrated into my development environment, I don't need to look around at other applications, and there's no popup notification bouncing around like a Jack Russell terrier who got into my Adderall supply. Also since it's Emacs, it's not vim. If you use vim, /quit #life.<br /><br />Collaboration technology doesn't need to be re-invented every six years. The stuff we had in the eighties works just fine.<br /></div><div><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>Options for Parallel Compression</title>
    <link rel="alternate" type="text/html" href="http://teddziuba.com/2010/01/options-for-parallel-compressi.html" />
    <id>tag:teddziuba.com,2010://1.97</id>

    <published>2010-01-16T05:37:45Z</published>
    <updated>2010-01-16T06:00:21Z</updated>

    <summary>At Milo, I pretty frequently need to pull data down from production to my workstation to test some new code. That&apos;s what happens when you raise a Series A round - you can&apos;t live-edit production data anymore. I think it&apos;s...</summary>
    <author>
        <name>Ted Dziuba</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://teddziuba.com/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="when-a-couple-gets-a-dog-its-like-saying-we-want-a-baby-but-dont-want-to-go-to-jail-if-it-dies-by-accident.jpg" src="http://teddziuba.com/2010/01/15/when-a-couple-gets-a-dog-its-like-saying-we-want-a-baby-but-dont-want-to-go-to-jail-if-it-dies-by-accident.jpg" class="mt-image-right" style="margin: 0pt 0pt 20px 20px; float: right;" height="255" width="288" /></span>At Milo, I pretty frequently need to pull data down from production to my workstation to test some new code. That's what happens when you raise a Series A round - you can't live-edit production data anymore. I think it's in the term sheet somewhere.<br /><br />Anyhow, I was pulling down a 14GB MySQL database dump today. Trying to compress it through plain Jane gzip was pretty slow, so I looked for some parallel options. The server I was pulling from has 16 cores, so I figured I could make use of them.&nbsp; Anyhow, here's what I found:<br /><br /><ul><li><a href="http://compression.ca/pbzip2/">pbzip2 - Parallel BZIP2</a>: Parallel implementation of BZIP2. BZIP2 is well known for being balls slow, so speed it up using multiple CPUs.</li><li><a href="http://www.zlib.net/pigz/">pigz - Parallel GZIP</a>: Parallel implementation of GZIP written by Mark Adler (guy who co-authored zlib and gzip, so you can be reasonably confident he has his shit together).</li></ul>On the 14GB database dump, both are faster than vanilla GZIP. Because Hacker News and Reddit both love this shit, here are the timing stats:<br /><br /><ul><li>Plain gzip, default compression level: 11 minutes, 58 seconds. Resultant file is 2.3GB.</li><li>pbzip2, default compression level: 8 minutes, 48 seconds. Resultant file is 1.7GB.</li><li>pigz, default compression level: 1 minute, 33 seconds. Resultant file is 2.3GB.</li></ul>Again this was on a 14GB database dump file, on a 16-core machine, with Intel solid state disks.<br /><br />If any readers know of other parallel compression schemes I can try, e-mail me and let me know. I will post stats here.<br /> <div><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>I Love the GPL (Except When it Applies to Me)</title>
    <link rel="alternate" type="text/html" href="http://teddziuba.com/2010/01/i-love-the-gpl-except-when-it.html" />
    <id>tag:teddziuba.com,2010://1.95</id>

    <published>2010-01-02T21:37:40Z</published>
    <updated>2010-01-03T00:46:11Z</updated>

    <summary> Boy do I love free software. It is usually pretty high quality, I don&apos;t have to pay for it, and I feel completely justified in criticizing the maintainers on public mailing lists for not supporting the exact features I...</summary>
    <author>
        <name>Ted Dziuba</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://teddziuba.com/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="if-red-wine-and-hybrid-cars-were-made-from-animals-there-would-be-no-more-vegans.jpg" src="http://teddziuba.com/2010/01/02/if-red-wine-and-hybrid-cars-were-made-from-animals-there-would-be-no-more-vegans.jpg" class="mt-image-right" style="margin: 0pt 0pt 20px 20px; float: right;" height="360" width="263" /></span> <div>Boy do I love free software. It is usually pretty high quality, I don't have to pay for it, and I feel completely justified in criticizing the maintainers on public mailing lists for not supporting the exact features I need.&nbsp; Of course I'm not going to send patches back, because it's just way easier to bitch and moan. <br /><br />Also, since my software product is a web service, I have exactly zero obligation to contribute anything back to the community, ever. Sure, I may use some GPLed software, but shit, actually following the spirit of the copyleft? Don't they know this is a business, not a charity? Fuck that noise.<br /><br />I came up in the salad days of Slashdot, when the cast of villains and henchmen included Microsoft, SCO, and anyone else who wanted to turn a dime from software. We believed in the GPL, that a viral copyleft clause was good for humanity. That is, until we left academia and had to pay the rent.<br /><br />Since the world appears to be moving toward software as a service (against my sage advice, mind you), it is blisteringly easy to be a champion of the ideals behind open source and free software, but still pussyfoot around when it comes to execution.&nbsp; What I'm talking about is the loophole in the GPL that exempts application service providers from having to release their derivative works under the same license as the libraries.<br /><br />The pedantic reader who is going to talk shit will point out the difference between <i>open source</i> and <i>free</i> software. So, before you write a blog post that nobody's going to read, allow me to demonstrate.<br /><br /><b>Open Source</b>: I want to let others use my code in whatever manner they please, and not be bound by an anti-commercial license.<br /><br /><b>Free Software</b>: I found a loophole in my student loan documentation that lets me defer payments for decades, so long as I stay in the Ph.D. program!<br /><br />If anything good comes out of Web 2.0, it's the malignant tumor on the GPL's kidney, still wrongly diagnosed as a urinary tract infection.<br /><br />Back in the Slashdot days, we all thought that the fate of free software would be decided by a landmark court decision, that if the ideals of the GPL were to die, they would wind up meeting a ceremonious end like the cabinet members of a government overthrown in a military coup. But no - the free software ideal will die by the hands of a thousand poseurs, all who want the notoriety of contributing to open source, but none who are convicted enough to release any of their business's core code under a free license.<br /><br />The copyleft will share the same fate as the hippie movement, now only a shell of its former self supported by college age kids who hang out in the Haight-Ashbury and smoke pot all day, and at night, drive their Lexuses over the Golden Gate, back to Marin County. But you will take off that damn Che Guevara shirt before you come back into my house, young man.<br /><br />Look at all of the open source software in modern use. The vast majority of it is licensed under terms without a copyleft clause. The BSD license, Apache license, MIT license, and a handful of others are the most prevalent. In some places, the GPL still kicks around, but since we are application service providers, we are all free to ignore it. <br /><br />The Affero General Public License, a version of the GPL that closes the service-provider loophole, is almost nowhere to be found. The only new-hotness software I know of that is licensed under Affero is MongoDB, and even they have a chickenshit implementation - they have structured the code such that the 99% case of a web application using Mongo is effectively bound by the Apache license.<br /><br />Affero-licensing your project is a fatal defect if you want it to be used. Since the current flow of the software industry has effectively neutered the GPL, the only serious chance the copyleft has is the Affero license, and that sure-as-shit ain't gonna happen.<br /><br />The toll on the Golden Gate Bridge is now six dollars.<br /><br /><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>How I Spot Valuable Engineers</title>
    <link rel="alternate" type="text/html" href="http://teddziuba.com/2009/12/how-i-spot-valuable-engineers.html" />
    <id>tag:teddziuba.com,2009://1.94</id>

    <published>2009-12-16T06:07:21Z</published>
    <updated>2009-12-16T06:05:51Z</updated>

    <summary> Goofy stuff happens when your company announces a funding round. We&apos;ve gotten walk-in solicitors who try to sell us networking equipment, pitches for I-can&apos;t-quite-see-the-scam-but-I&apos;m-sure-it&apos;s-there-somewhere stock exchange programs, and phone calls from slick Oracle salesmen who have their get-past-the-secretary sneak...</summary>
    <author>
        <name>Ted Dziuba</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://teddziuba.com/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="hire-women-at-a-startup-because-an-office-full-of-young-men-will-live-in-their-own-filth-until-an-investor-shows-up-for-a-tour.jpg" src="http://teddziuba.com/2009/12/14/hire-women-at-a-startup-because-an-office-full-of-young-men-will-live-in-their-own-filth-until-an-investor-shows-up-for-a-tour.jpg" class="mt-image-right" style="margin: 0pt 0pt 20px 20px; float: right;" height="379" width="325" /></span> <div>Goofy stuff happens when your company announces a funding round. We've gotten walk-in solicitors who try to sell us networking equipment, pitches for I-can't-quite-see-the-scam-but-I'm-sure-it's-there-somewhere stock exchange programs, and phone calls from slick Oracle salesmen who have their get-past-the-secretary sneak perfected so well that they could probably make better livings as industrial spies.<br /><br />But most frequently, there are resumès that land in my inbox. Yes Milo is hiring, and a lot of people contact me directly instead of the "jobs" address, which I can sympathize with because I've always had this feeling that "jobs@" e-mail addresses are black holes where career dreams get sent to die.<br /><br />Our general workflow for hiring engineers is to send the person our "engineering challenge" programming question and see how they do on it. If that looks good, they come in for interviews. I don't like doing interviews because I've always got enough stuff to do, but sometimes it's a good break. Necessary evil, I guess. Like Katy Perry. Have you <i>heard</i> a live performance? Ph33r. <br /><br />Anyhow, when I interview a candidate, I'm trying to determine how <b>valuable</b> the candidate is, not just how smart he or she is.&nbsp; Because I love English semantics:<br /><br />A <b>smart</b> candidate will do well on the engineering challenge problem.<br />A <b>productive</b> candidate will be able to explain past projects in detail.<br />A <b>valuable</b> candidate is smart and productive, but also has useful knowledge gained from experience.<br /><br />To tell if a candidate is valuable, you need to piss them off. (By the way, does it make you feel icky that <i>they</i> can be used with a singular antecedent? This derelict language is put together with duct tape and baling wire, I swear.)&nbsp; A valuable candidate will likely have been personally offended by some sequence of bullshit thrown from a programming language, tool, library, or problem in past work. This is the kind of bullshit-train I'm talking about.<br /><br />Need to parse XML with Python → SGMLlib feels like a kids toy → Implement it with BeautifulSoup → Fuck me, Soup is too slow → Re-implement with LXML → LXML works great for months → LXML segfaults the Python interpreter when used in a threaded environment under heavy load → <br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="hey-look-another-4chan-meme-that-reddit-has-bludgeoned-with-the-bat-of-unoriginality.JPG" src="http://teddziuba.com/2009/12/15/hey-look-another-4chan-meme-that-reddit-has-bludgeoned-with-the-bat-of-unoriginality.JPG" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" height="116" width="154" /></span><br /></div>
Any developer who has been around enough to accumulate valuable experience will have his personal collection of stories that have mad him rage. I have been burned by bugs in programming language implementations, bugs I call "coding slurs". I have gotten the shaft more times than I can count from pathological character set issues that make me want to run for Congress on the platform of requiring licenses before people are allowed to use computers.&nbsp; If you really want to find the value in a job candidate - find out what pisses him off.<br /><br />The easiest way I have found of doing this is to ask a candidate <i>"what don't you like about your favorite programming language?"</i> You can grade their experience with the response. For example:<br /><br /><i>What don't you like about Java?</i><br /><b>Out-of-college answer:</b> "Java is too verbose"<br /><br /><b>Battle-hardened developer answer:</b> "Object storage is aligned on a 64-bit boundary, at least in Sun's JVM, so if you need to allocate a lot of small storage, you really need to know JVM internals so you don't run out of memory."<br /><br /><i>What don't you like about Python?</i><br /><b>Answer from a candidate who will write frameworks for solving problems instead of getting shit done:</b> "Dynamic typing means you need to rely more on your tests and less on the interpreter to make sure your code is correct"<br /><br /><b>Answer from Gunnery Sergeant Hartman, your senior drill instructor:</b> "Independent object cycles where one of the objects has a __del__ method don't get garbage collected."<br /><br />People think I hate programming. Nope. What I hate is fording endless rivers of horseshit that are in the way of seemingly simple tasks. And I hate it even more when I have to explain to a non-programmer what I am doing, "building LXML against a different version of libiconv because I think it might be the source of a crash". <br /><br />"But all I asked you to do was parse some documents."<br /><br />Good times. <br />]]>
        
    </content>
</entry>

<entry>
    <title>Introducing Milo</title>
    <link rel="alternate" type="text/html" href="http://teddziuba.com/2009/11/introducing-milo.html" />
    <id>tag:teddziuba.com,2009://1.92</id>

    <published>2009-11-24T16:44:28Z</published>
    <updated>2009-11-24T17:19:39Z</updated>

    <summary><![CDATA[I had mentioned a couple of months ago that I had my head down into a new project. It's been an open secret that the project is Milo.com, an online local comparison shopping engine.&nbsp; We index the inventory of stores...]]></summary>
    <author>
        <name>Ted Dziuba</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://teddziuba.com/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="oh-good-lord-i-hope-the-servers-stay-up-today.jpg" src="http://teddziuba.com/2009/11/24/oh-good-lord-i-hope-the-servers-stay-up-today.jpg" class="mt-image-right" style="margin: 0pt 0pt 20px 20px; float: right;" height="301" width="394" /></span>I had mentioned a couple of months ago that I had my head down into a new project. It's been an open secret that the project is <a href="http://milo.com/">Milo.com</a>, an online local comparison shopping engine.&nbsp; We index the inventory of stores nationwide and show you real-time, what is available around you. From an engineering perspective it's a cool problem because there is a lot of data to store and manage, as well as a lot of integration work to deal with the particular temperament of various retailers' inventory systems. Of course if it were easy, someone would have done it already.<br /><br />From a business perspective, I like it a lot. The online comparison shopping world is very crowded, and we didn't want to be just another me-too AdWords arbitrage/affiliate marketing site. When I got into this business, I thought that online shopping was like the Stairway to Heaven of Internet business, but with the local inventory lookup, I think we really have distinguished ourselves from the others out there.<br /><br />Today I'm happy to announce that we've closed a $4 million Series A investment round, led by True Ventures, with other investors such as Ron Conway, Aaron Patzer, and Jeff Clavier also participating.&nbsp; As a side note, I was really impressed by the True team, and am happy to be working with them. There were ups and downs to the Series A process, and I have to say that pitching the True partners was a definite up.<br /><br />Oh, right. We also have a mascot. His name is Milo, of course. Here he is attacking me at my desk:<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="what-is-it-about-dogs-and-face-licking.jpg" src="http://teddziuba.com/2009/11/24/what-is-it-about-dogs-and-face-licking.jpg" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" height="320" width="240" /></span><br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><br /></span><div><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>Hey Lets Bitch About SEO Again</title>
    <link rel="alternate" type="text/html" href="http://teddziuba.com/2009/10/hey-lets-bitch-about-seo-again.html" />
    <id>tag:teddziuba.com,2009://1.91</id>

    <published>2009-10-14T05:21:25Z</published>
    <updated>2009-10-14T05:51:13Z</updated>

    <summary><![CDATA[ Hey I have an awesome idea. Let's take a field of business that many people work in to make a legitimate living, and tear it down for being immoral and accuse it of fraud. &nbsp;And when it comes to...]]></summary>
    <author>
        <name>Ted Dziuba</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://teddziuba.com/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="cant-we-go-back-to-debating-if-google-is-evil-for-doing-business-in-china.jpg" src="http://teddziuba.com/2009/10/13/cant-we-go-back-to-debating-if-google-is-evil-for-doing-business-in-china.jpg" width="281" height="375" class="mt-image-right" style="float: right; margin: 0 0 20px 20px;" /></span> <div>Hey I have an awesome idea. Let's take a field of business that many people work in to make a legitimate living, and tear it down for being immoral and accuse it of fraud. &nbsp;And when it comes to solving the actual problem that this business works on, apply a nice helping of sunshine-up-your-ass, and everything's just fine.</div><div><br /></div><div>Better yet, let's do this every six to eight months, because collectively we have the attention span of a fruit fly.</div><div><br /></div><div>Well, it's been a solid eight months, and somebody kicked the hornet's nest. Is SEO good or evil? &nbsp;It's good. It's great. I &lt;3 SEO.</div><div><br /></div><div>When you hire a legitimate white hat SEO, you are paying for domain knowledge. Is it better to use dashes or underscores to separate keywords in a URL? I know the answer, but I've spent some time researching SEO. If I were, say, an online publisher, it would be worth money to hire somebody who knows the answer to this question and a pop-quiz full of other questions that isn't in your average web developer's job description.</div><div><br /></div><div>Every hit on SEO eventually ends with the same solution. "Just write good content or make a good web app, and the traffic will come." &nbsp;Oh really, it's just that simple, eh? How many unpublished novelists are there out there? How many film students whose reels go unwatched? Google is the greatest media distribution channel that there has ever been, and you expect people not to look for every advantage they can get?</div><div><br /></div><div>Here's the failure with the "make a good app, people will come" argument. Let's say you are making an application whose target market is one person in ten. That's a&nbsp;respectably sized market. &nbsp;You tell your friends, your family, people you know through the internet. You write on your personal blog about it. &nbsp;Let's say you reach 1,000 people, generously. &nbsp;If your hit rate within that market is 50%, that's 50 people you've got who haven't immediately dumped your app. Do they care enough about it to do your marketing for you? &nbsp;With that small of a user base, you don't have statistically significant feedback to improve the site, you've got to gun it on intuition, which is frequently wrong.</div><div><br /></div><div>So there you are, with your 50 users, and since you don't have to spend any time or money on distributing your app (remember these 50 people will do it for you), then you can continue to develop the app, making it "better", as you see it, in a vacuum. &nbsp;</div><div><br /></div><div>And let's just count on those 50 people bringing in 10 million of their closest friends in the next month or so.</div><div><br /></div><div>Hell no. This is the internet, son. Kill or be killed. &nbsp;If you can spend some money on a good SEO who will bring a steady flow of traffic to your site, then you have a way better chance than with that initial set of 50. &nbsp;With search engine traffic, even if you're only getting a handful of traffic every day, it's a different handful. &nbsp;If you have built something of value, some percentage of users will recognize this, and maybe tell a friend, maybe they'll come back to your site, and maybe they'll link to you, but you have a continuous stream of people to try it out on.</div><div><br /></div><div>Obviously there are shysters in SEO. &nbsp;Going to an SEO who guarantees that you'll rank in the top 10 for mesothelioma is like taking your car to the dealership to get fixed. Of <i>course</i>&nbsp;you're going to get scammed. Buyer beware, and all that.</div><div><br /></div><div>Anyway, keep debating on whether or not SEO is evil. The rest of us have to find ways to handle our traffic growth.</div>]]>
        
    </content>
</entry>

<entry>
    <title>I Don&apos;t Code in my Free Time</title>
    <link rel="alternate" type="text/html" href="http://teddziuba.com/2009/10/i-dont-code-in-my-free-time.html" />
    <id>tag:teddziuba.com,2009://1.89</id>

    <published>2009-10-10T14:25:15Z</published>
    <updated>2009-10-10T15:19:54Z</updated>

    <summary><![CDATA[ Why would you ever hire a programmer who doesn't program in his free time? &nbsp;I mean, a person who doesn't compile recreationally is probably useless on the job. &nbsp;You might as well hire somebody ... old. And who wants...]]></summary>
    <author>
        <name>Ted Dziuba</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://teddziuba.com/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="obama-winning-the-nobel-proves-that-white-guilt-is-one-of-the-most-awesome-powers-on-earth.jpg" src="http://teddziuba.com/2009/10/10/obama-winning-the-nobel-proves-that-white-guilt-is-one-of-the-most-awesome-powers-on-earth.jpg" width="210" height="840" class="mt-image-right" style="float: right; margin: 0 0 20px 20px;" /></span> <div>Why would you ever hire a programmer who doesn't program in his free time? &nbsp;I mean, a person who doesn't compile recreationally is probably useless on the job. &nbsp;You might as well hire somebody ... <i>old</i>. And who wants a bunch of people around the office who whine about things like <i>healthcare benefits</i>? Just don't get sick, duh.</div><div><br /></div><div>I love it when twenty-something engineers take such a hard-line position on something they have so little experience with, like hiring. &nbsp;Saying that you wouldn't hire somebody for a programming job because they don't program in their spare time is blissfully naive. Yeah, I remember the days when my greatest responsibility to another human being was making rent on the first of the month.</div><div><br /></div><div>If I am going to hire somebody for a programming job, I don't really give a shit <i>what</i> they do in their spare time, so long as that person is very good at the task at hand. &nbsp;I don't ask questions about what a person does in their free time in job interviews because I don't care, and because that can sometimes open the door to an illegal conversation. (What's that? There are laws about what you can ask somebody in a job interview? Who thought that up, Republicans?)</div><div><br /></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">Me, I can count on one hand the number of times I've programmed outside of work or a class. &nbsp;There was only once when I actually enjoyed it, though. I was in college, and shared a common wall with a girl from Spain who was painfully unaware that her computer had a volume control knob. She would stay up late on AOL instant messenger, and I couldn't sleep. &nbsp;So, I rigged up a Python script to play AOL instant messenger sounds randomly every 5 to 10 seconds, turned up my speakers, pointed them at the wall, and went on vacation for a week. &nbsp;And thus, the asshole you all know and love is born.</span></div><div><br /></div><div>I don't enjoy programming so much as I enjoy the satisfaction I get from cracking hard problems.<span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">&nbsp;In that case, computer code is a means to an end, but so is my Craftsman socket set. &nbsp;I like to spend free time wrenching on a car or a bike, but I don't set out on Saturday morning and say "I'm going to learn how to use a torque wrench today, because those things are the future of tools". &nbsp;</span></div><div><br /></div><div>I would not want to work for a company that wouldn't hire me because I don't code in my spare time. Professional development? Working at a startup, I get a heaping helping of that on the job. &nbsp;Keeping up with new technology? Yeah, I read reddit, and again, startup. &nbsp;You know what's more awesome than spending my Saturday afternoon learning Haskell by hacking away at a few Project Euler problems? Fuck, ANYTHING.</div><div><br /></div><div>Really, why should I bother spending time with my family and taking an active role in my kids' development when there's a dead-beaten math puzzle that doesn't have a good answer in Clojure? &nbsp;"I won't hire someone who doesn't code in their free time" is Siliconvallese for "I don't want to hire any grownups because they remind me of my parents".</div>]]>
        
    </content>
</entry>

<entry>
    <title>Twisted vs. Tornado: You&apos;re Both Idiots</title>
    <link rel="alternate" type="text/html" href="http://teddziuba.com/2009/09/twisted-vs-tornado-youre-both.html" />
    <id>tag:teddziuba.com,2009://1.88</id>

    <published>2009-09-18T13:11:42Z</published>
    <updated>2009-09-18T13:46:41Z</updated>

    <summary> First, a message to bloggers. If you&apos;ve got the bright idea to try some new kind of benchmark that pits Twisted against Tornado, take pause. Turn off your computer, step into a public area, and reconsider your life&apos;s goals....</summary>
    <author>
        <name>Ted Dziuba</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://teddziuba.com/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="plucking-you-unibrow-is-the-most-undignified-type-of-grooming.jpg" src="http://teddziuba.com/2009/09/18/plucking-you-unibrow-is-the-most-undignified-type-of-grooming.jpg" class="mt-image-right" style="margin: 0pt 0pt 20px 20px; float: right;" height="268" width="390" /></span> <div>First, a message to bloggers. If you've got the bright idea to try some new kind of benchmark that pits Twisted against Tornado, take pause. Turn off your computer, step into a public area, and reconsider your life's goals. The internet does not need another pointless network performance graph.<br /><br />With that out of the way, it's become clear that the Pissing Contest of the Day, Twisted.web vs. Friendfeed's Tornado web framework, reveals that neither side of the argument is particularly right, but both sides are particularly stupid.<br /><br />First, Twisted. Now, my company uses Twisted for a small piece of functionality because it was the easiest way that we found to send traffic over different network interfaces on a Linux machine. We never have any problems with it. The only reason I ever need to touch it is to see how something works.&nbsp; <br /><br />However, Twisted is probably the douchiest programming library out there. Every time I open up that code, I feel like I've wandered into a late-night bar on the Jersey Shore where everybody's drinking Jager-bombs, and nobody is wearing a shirt.&nbsp; Twisted is a cool network library, but not cool enough to be named "Twisted".&nbsp; It's the Python programmer's version of Ed Hardy clothing and a baseball cap with the tag still hanging off the side.&nbsp; When I'm digging around in this code and my co-workers ask me what's up, the only appropriate response is "NOT NOW CHIEF. I'M STARTIN' THE FUCKIN' REACTOR."<br /><br />Now you can see why there's so buttsore over Tornado.<br /><br />Even though I <a href="http://teddziuba.com/2009/06/startups-keep-it-in-your-pants.html">advised</a> <a href="http://teddziuba.com/2008/04/im-going-to-scale-my-foot-up-y.html">against</a> things like Tornado, Friendfeed still built it. From the graphs I've seen, Tornado is just marginally faster than Twisted at serving concurrent requests. Marginally. Evidently Friendfeed figured that tiny margin was enough justification to waste their time writing something that's been re-written by every developer that gets bored on the job.&nbsp; A Python web framework? My mercy how original. I think that's one of the ending exercises of "Learn Python in 24 Hours".<br /><br />Friendfeed spent a lot of time trying to optimize the queries per second graph, but maybe they should have spent more time optimizing this graph instead:<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="intuit-didnt-buy-mint-they-bought-a-license-to-stagnate.png" src="http://teddziuba.com/2009/09/18/intuit-didnt-buy-mint-they-bought-a-license-to-stagnate.png" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" height="186" width="561" /></span>Anyway, when it comes to Twisted vs. Tornado for a Python web framework, I use Django. Why? Because it works, and my time is valuable.</div>]]>
        
    </content>
</entry>

<entry>
    <title>30 Helens Agree: You Can&apos;t Win Without Failing</title>
    <link rel="alternate" type="text/html" href="http://teddziuba.com/2009/09/i-read-fred-wilsons-blog.html" />
    <id>tag:teddziuba.com,2009://1.87</id>

    <published>2009-09-10T03:31:27Z</published>
    <updated>2009-09-10T04:24:09Z</updated>

    <summary><![CDATA[I read Fred Wilson's blog post on failure today, and after I was finished being impressed by his three letter domain name, it really made me think about what I learned from my last failed startup.&nbsp;There's the usual Reddit material:...]]></summary>
    <author>
        <name>Ted Dziuba</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://teddziuba.com/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="an-infant-is-a-function-whose-inputs-are-sight-sound-smell-touch-and-taste-and-whose-outputs-are-bodily-fluids.jpg" src="http://teddziuba.com/2009/09/09/an-infant-is-a-function-whose-inputs-are-sight-sound-smell-touch-and-taste-and-whose-outputs-are-bodily-fluids.jpg" class="mt-image-right" style="margin: 0pt 0pt 20px 20px; float: right;" height="270" width="360" /></span>I read <a href="http://www.avc.com/a_vc/2009/09/failure.html">Fred Wilson's blog post on failure</a> today, and after I was finished being impressed by his three letter domain name, it really made me think about what I learned from my last failed startup.<br /><br />&nbsp;There's the usual Reddit material: don't write your own database, concentrate on the UI, put your users first, other such horse-beaten realities that green engineers understand after being in the field for a few years.&nbsp; A true failure is one that changes your life's philosophy, not one that changes your unit testing strategy.<br /><br />What I really learned from the fall of Pressflip is that <b>arrogance is more dangerous than incompetence</b>.&nbsp; I believed that raw engineering prowess could make up for the complete lack of business experience, a product that really only appealed to the people who build the technology behind it, and an addressable market that could easily be mistaken for roundoff error. Couple that with the youthfully cute thought that Silicon Valley is a meritocracy, and it was only a matter of time. We had build some neat technology behind the scenes, and I was very proud of a few key parts of the system, but in the end, the users just did not come.<br /><br />The trouble with this lesson is that it can only be learned the hard way. Arrogant people don't listen to criticism, they just run themselves into the wall.&nbsp; Incompetent people can usually be led in the right direction, even though they may execute their way into the dirt.&nbsp; Arrogance doesn't listen to reason, it only listens to itself.<br /><br />For example, an arrogant motorcyclist will ride on the highway at twice the speed of traffic, and no matter how many times he gets pulled over, and he'll keep doing it until he crashes.&nbsp; An incompetent motorcyclist will drop his bike in a U-turn in front of his house, cracking a mirror.<br /><br />This failure made me saltier. I now understand why old men have no patience for the modern world.&nbsp; However, it did not let me keep thinking that superior code is the solution to any conceivable problem. I've hunkered down a bit, concentrating on a new project that I really believe will be a winner, and started learning the business realities of a cruel Valley.<br /><br />So now, if an investor asks me what I learned from past failures, I won't put him to sleep talking about schema-less versus SQL databases. Instead, I've got a good answer.<br /> ]]>
        
    </content>
</entry>

<entry>
    <title>A Happy Life Without the Whining</title>
    <link rel="alternate" type="text/html" href="http://teddziuba.com/2009/08/a-happy-life-without-the-whini.html" />
    <id>tag:teddziuba.com,2009://1.86</id>

    <published>2009-08-30T04:53:31Z</published>
    <updated>2009-08-30T04:14:08Z</updated>

    <summary><![CDATA[ There's no better way to waste your time than to talk about politics.&nbsp; For as good as educated people are at acting intellectual, we love to bitch and moan about one side versus the other. Politics are potato chips...]]></summary>
    <author>
        <name>Ted Dziuba</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://teddziuba.com/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="is-there-a-word-for-the-feeling-you-get-when-you-realize-three-quarters-of-your-twitter-followers-are-spammers.gif" src="http://teddziuba.com/2009/08/28/is-there-a-word-for-the-feeling-you-get-when-you-realize-three-quarters-of-your-twitter-followers-are-spammers.gif" class="mt-image-right" style="margin: 0pt 0pt 20px 20px; float: right;" height="311" width="208" /></span> <div>There's no better way to waste your time than to talk about politics.&nbsp; For as good as educated people are at acting intellectual, we love to bitch and moan about one side versus the other. <br /><br />Politics are potato chips for the enlightened mind.<br /><br />I grew up in Connecticut. New Englanders are generally pretty educated people. We keep to ourselves. We vote. We donate money to causes, and for the most part, <i>we shut the fuck up</i>.&nbsp; Personally, I'm registered to one of the two major parties in the US. (If you tried to guess, you'd probably guess wrong.)&nbsp; I don't get into political arguments because I've got better shit to do. I don't blog about politics because I know that nobody cares what I think. You know what? It's a good life.<br /><br />Lately, I've been hearing a lot about this Glenn Beck fellow. I don't know who he is or what he said to get everyone so sore-assed, but I sure as shit don't care. I don't watch CNN or Fox News. I don't have cable TV. I get all my news from my local news channel over the air. No talking heads, no shouting matches, no six-second-attention-span scrolling tickers on the bottom of the screen. In 30 morning minutes, I get a brief summary of what the president said at such and such a meeting the other day, a look at the traffic and weather for the day, and some feel-good community segment. <br /><br />The last thing I need on a 40 mile motorcycle ride to work is a head full of piss, thanks to Bill O'Reilly or Keith Olbermann.<br /><br />But I can tell you that from the inside, generating butthurt is big business. Every time I've knocked an article out of the park for The Register, there's been a decent troll element to it. Not all trolls succeed, but the ones that hit a nerve really bring in the page views and comments. That's just the IT world. If I could get a job trolling politics, I'd be damn sure to demand a page view bonus. I can't knock the hustle.<br /><br />The news networks aren't stupid. They know that viewership increases when people are pissed off.&nbsp; Walter Cronkite delivered facts, but was a crusty old book report of a man for it.&nbsp; I'm sure that all else equal, if national media never figured out how much fucking money there is to be made in keeping people salty, the news would still be a puff of dry air.<br /><br />So I don't watch network TV. I don't blog about politics. It's a calm life. I have informed opinions on most issues, but I know that nobody cares what I think, so I keep to myself.&nbsp; Maybe that's why I still have trouble "getting" Twitter.<br /><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>Stop Using the Word &apos;We&apos;</title>
    <link rel="alternate" type="text/html" href="http://teddziuba.com/2009/08/stop-using-the-word-we.html" />
    <id>tag:teddziuba.com,2009://1.85</id>

    <published>2009-08-21T05:20:31Z</published>
    <updated>2009-08-21T05:45:43Z</updated>

    <summary><![CDATA[ Yesterday, I spearheaded a new movement at the office. I stopped using the word "we", and started to say what I really meant to say.&nbsp; For example, instead of "We should fix that bug", I say, "You should fix...]]></summary>
    <author>
        <name>Ted Dziuba</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://teddziuba.com/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="theres-something-about-lane-splitting-through-marijuana-smoke-on-a-motorcycle-thats-so-unsettling.jpg" src="http://teddziuba.com/2009/08/20/theres-something-about-lane-splitting-through-marijuana-smoke-on-a-motorcycle-thats-so-unsettling.jpg" class="mt-image-right" style="margin: 0pt 0pt 20px 20px; float: right;" height="240" width="320" /></span> <div>Yesterday, I spearheaded a new movement at the office. I stopped using the word "we", and started to say what I really meant to say.&nbsp; For example, instead of "<i>We</i> should fix that bug", I say, "<i>You</i> should fix that bug", and good God is it satisfying.<br /><br />There are a couple of motivations for this. Firstly, one of the key things I've learned being a for-pay writer is to show some conviction. Secondly, the passive discussions about defects and delegation and responsibility really started to irritate me. Why not just tell it like it is?<br /><br />When I worked at Google, I picked up on a really annoying trend in the software industry (or maybe just in Silicon Valley) that I call "fuck-you with a smile".&nbsp; You never want to outright blame somebody or something, rather, it's best to state the existence of an issue and then ask "the team" to fix it.&nbsp; We should really move that icon ten pixels to the left. We definitely need to fix that concurrency bug. We should probably have that all done before lunch.<br /><br /><i>Well then, Mr. Manager, you had better get cracking, because I've got some YouTube videos to watch.</i><br /><br />I learned that the goal of institutional business is to keep from angrying up the blood at all costs.&nbsp; A productive employee is one whose personality has been bleached out to a yellow tinge.&nbsp; Always non-confrontational, never suggesting that any one person fucked up.<br /><br />The best part about working at a startup is that I'm free to suggest that yes, you fucked this up. Yes, it's your fault, and yes, you need to fix it. Delegate! Don't waste time listing out action items, spend time telling people what to do. Everyone you work with should be a grown up, and can handle it. The other side of that is owning up to your mistakes. Instead of "There is memory leak in the code, we should prioritize it over other defects", say, "I introduced a memory leak in the code. I am going to fix it as soon as possible."<br /><br />Anyway, I'm going to keep this up until somebody openly calls me an asshole. You should try it too.&nbsp; You don't have to be a prick about it, just be assertive. Your co-workers will be impressed at your new found confidence. It might even get you laid.&nbsp; <br /><br />Well, probably not, but you won't be wondering when a meeting is going to end if you grab it by the balls.<br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>Context Switches are Bad, but Stack Traces are Worse</title>
    <link rel="alternate" type="text/html" href="http://teddziuba.com/2009/08/context-switches-are-bad-but-s.html" />
    <id>tag:teddziuba.com,2009://1.84</id>

    <published>2009-08-18T02:31:49Z</published>
    <updated>2009-08-18T03:45:38Z</updated>

    <summary> Every programmer works in silent fear of a manager sneaking up on him and asking him to drop everything he is doing and work on an unrelated task. Context switches like this cost us time and energy, but managers...</summary>
    <author>
        <name>Ted Dziuba</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://teddziuba.com/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="never-trust-a-person-who-wears-a-tie-who-asks-you-how-to-query-the-database.png" src="http://teddziuba.com/2009/08/17/never-trust-a-person-who-wears-a-tie-who-asks-you-how-to-query-the-database.png" class="mt-image-right" style="margin: 0pt 0pt 20px 20px; float: right;" height="317" width="290" /></span> <div>Every programmer works in silent fear of a manager sneaking up on him and asking him to drop everything he is doing and work on an unrelated task. Context switches like this cost us time and energy, but managers are beginning to figure out that a programmer isn't a machine that can be switched on and off, no, they're understanding that a programmer is a machine that needs a warm up phase. <br /><br />I guess you could call that progress.<br /><br />I'm fortunate enough to work with a company that understands engineering, but I have worked with my fair share of nontechnical managers, and I have to say that categorically that the most expensive question a manager can ask is "What are you working on?"<br /><br />The danger here is when you're six or seven levels deep into yak-shaving, and your manager wants to know what you're doing and why. You need to give the manager a complete stack trace from your current frame all the way up to the original task. Each jump up the call stack is a context switch of its own, where you need to remember exactly why you made the decision that you did, and justify it as the best course of action. <br /><br />"I'm compiling a new version of libxml, so I can get the Python parser working.&nbsp; I need to do that because LXML, the Python binding, would crash under heavy load when I used the system default version of libxml. I am using LXML because BeautifulSoup doesn't have support for XPath. I need to do XPath transforms against the input because the legacy system we interact with doesn't send well-formed XML. We tried to get the vendor to fix it but they said 6 to 8 weeks for a patch, and our project deadline is sooner than that. I need to interface with the legacy system because even though the DBAs have ported things over to Oracle, they're still sorting things out and it's not reliable enough for me to make any meaningful progress. Fortunately, I've thought this through and abstracted the data subsystem well enough that I can drop-in replace Oracle when it's ready, so long as the database sends some decent form of XML. Once I get this data subsystem done, I can finish the business logic, which attaches to the nonfunctional demo you love so much.<br /><br />So yeah, I'm working on the new asset tracking system."<br /><br />Stack trace, all the way up to the main method.&nbsp; It's not always that simple. I know I have trouble keeping that many stack frames in my head. I can't remember why I chose to go down the path that I did, other than "there was a good reason for it". After all, I'm not slogging my way though compilation bullshit for my health. When a manager demands a full stack trace like this, it sets your progress back, because you need to go over decisions that you already made, examine the circumstances, and make the same decisions again. You lose your original frame of reference, and your manager thinks you're just fiddledicking around instead of doing work.<br /><br />So what's there to do? If you're awesome like me and work for a manager who understands why programming is hard, chances are you can just leave the answer to "what are you doing?" at the innermost stack frame.&nbsp; Everybody wins. However, if your manager is nontechnical, your goal is to get him off your ass as soon as possible, because you want to minimize the damage he does to your productivity. My recommended course of action, when asked "What are you working on?" is to slap the manager in the face and yell "<i>YOU DON'T END A SENTENCE WITH A PREPOSITION UP IN THIS BITCH. THIS IS MY HOUSE."</i> Thump your chest with a clenched fist and say <i>"yeah what's now, fool"</i> under your breath.<br /><br />Failing the battery charge, the key phrase is "I explored every option".&nbsp; Beyond this, there's really no way out, because your manager doesn't trust you. You're basically fucked. Quit your job and come work with me.<br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>This Is America, Take Your Unicode Somewhere Else</title>
    <link rel="alternate" type="text/html" href="http://teddziuba.com/2009/07/this-is-america-take-your-unic.html" />
    <id>tag:teddziuba.com,2009://1.83</id>

    <published>2009-07-04T16:06:04Z</published>
    <updated>2009-10-01T19:48:39Z</updated>

    <summary><![CDATA[There's a question that comes up on Stack Overflow every couple of months: "How do I strip diacritic marks from Unicode characters?".&nbsp; Popular variants include "How do I remove special characters" and "How do I convert Unicode to ASCII", but...]]></summary>
    <author>
        <name>Ted Dziuba</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://teddziuba.com/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="i-only-listen-to-NPR-so-i-can-keep-an-eye-on-what-educated-people-are-up-to-its-merely-an-early-warning-system.jpg" src="http://teddziuba.com/2009/07/04/i-only-listen-to-NPR-so-i-can-keep-an-eye-on-what-educated-people-are-up-to-its-merely-an-early-warning-system.jpg" class="mt-image-right" style="margin: 0pt 0pt 20px 20px; float: right;" height="245" width="320" /></span>There's a question that comes up on Stack Overflow every couple of months: "How do I strip diacritic marks from Unicode characters?".&nbsp; Popular variants include "How do I remove special characters" and "How do I convert Unicode to ASCII", but the underlying motivation is the same: characters that don't have their own key on an American keyboard have no place in modern web software. <div><br />Before you go all apeshit on me and call me a bigot and whatnot, read my story.&nbsp; When I was in college, Google hired me for a summer internship.&nbsp; One of my projects that summer was to write Google's employee directory search.&nbsp; Google, as I'm sure you could imagine, is a very multicultural employer.&nbsp; Googlers in general are very accepting of different cultures, customs, and languages.&nbsp; (Well, sort of.&nbsp; Googlers are accepting of multicultural differences like sushi, Diwali parties, and the word <i>namaste</i>.&nbsp; They're not accepting of cultural differences like Old English 800, 22 inch rims, and the word <i>juicy</i>. The general rule I figured out as a Googler is that you should welcome diversity so long as it doesn't make you feel guilty for making ten times as much money.)<br /><br />Anyhow, as a result of pulling in a lot of foreign talent, my employee directory search had to handle UTF-8 properly.&nbsp; A lot of peoples' names had umlauts, tildes, and other such little nuggets that love to appear as diamonds with question marks in them. I figured, just make the database UTF-8, page encoding UTF-8, and everything should work fine, right?&nbsp; Well it did, in theory.&nbsp; But when the first super-tolerant Googler typed his colleague's name into my search engine, it didn't come up.&nbsp; There was an o with an umlaut in the name, but our hero of race relations simply typed "o".<br /><br />And that came through to me as a bug report.&nbsp; "Strip funny characters." So I did, and how the searches flowed.&nbsp; See if you can guess how many people would input diacritic marks into the search box.<br /><br />Googlers are some of the most understanding people out there, and if they can't be bothered to type Alt-148 for an o with an umlaut, then what hope does the rest of the software industry have?&nbsp; None.&nbsp; That's why I want to systematically dismantle Unicode, and have a good answer to the question "How do I strip diacritic marks?".&nbsp; Not because handling multibyte character sets is too hard (although that asspain is what prompted me to think about this in the first place), but rather because only a small minority of people actually care about it, and an even smaller minority will whine when their umlauts disappear.<br /><br />(To satisfy the pedants, clearly if you're writing software whose job it is to handle and store UTF-8, this advice isn't for you.&nbsp; I'm talking about web services with user input here.)<br /><br />Now, you can feel free to take an idealist approach to this problem.&nbsp; Yes, Americans should be more accepting of other cultures and not passively destroy intricate details of pronunciation.&nbsp; Well, feel free to enjoy your floating-point market share.&nbsp; Nobody cares but you.<br /><br /><b>End Note</b><br />I found two decent implementations of Unicode transliteration, one in Python and one in Perl. If you know of good implementations in other languages, e-mail me and I'll add them to this list, with SEO-friendly anchor text goodness.<br /><br /><ul><li><a href="http://www.tablix.org/%7Eavian/blog/archives/2009/01/unicode_transliteration_in_python/">Strip diacritic marks in Python</a></li><li><a href="http://search.cpan.org/%7Esburke/Text-Unidecode-0.04/lib/Text/Unidecode.pm">Strip diacritic marks in Perl</a></li><li><a href="http://www.rgagnon.com/javadetails/java-0456.html">Strip diacritic marks in Java</a> (thanks to Simon Lieschke)<br /></li><li><a href="http://dev.alt.textdrive.com/browser/HTTP/Unidecode.lua">Strip diacritic marks in Lua</a> (for all 8 of you who use it. Thanks to Petite Abeille)</li><li><a href="http://blargh.tommymontgomery.com/2009/08/transliteration-in-php/">Strip diacritic marks in PHP</a> (thanks to Tommy Montgomery)</li></ul></div>]]>
        
    </content>
</entry>

<entry>
    <title>Print Isn&apos;t Dying, Serious Journalism Is</title>
    <link rel="alternate" type="text/html" href="http://teddziuba.com/2009/06/print-isnt-dying-serious-journ.html" />
    <id>tag:teddziuba.com,2009://1.82</id>

    <published>2009-06-24T16:00:56Z</published>
    <updated>2009-06-25T04:07:09Z</updated>

    <summary><![CDATA[ It's a tired Silicon Valley drum beat: print is dying, blogs and Twitter are the future of news.&nbsp; Many in the business of blogging like to think that print ad revenues are declining and subscriber bases are shrinking because...]]></summary>
    <author>
        <name>Ted Dziuba</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://teddziuba.com/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="when-techcrunch-pays-writers-six-figures-then-arrington-can-talk-about-success.jpg" src="http://teddziuba.com/2009/06/22/when-techcrunch-pays-writers-six-figures-then-arrington-can-talk-about-success.jpg" class="mt-image-right" style="margin: 0pt 0pt 20px 20px; float: right;" height="278" width="200" /></span> <div>It's a tired Silicon Valley drum beat: print is dying, blogs and Twitter are the future of news.&nbsp; Many in the business of blogging like to think that print ad revenues are declining and subscriber bases are shrinking because online media is vastly superior to those dinosaurs.&nbsp; This is one area where the evidence actually seems to suggest that the bloggers are justified.<br /><br />However, if you're not so full of yourself that "citizen journalism" seems like a revolution, you can understand the real reason that print is dying: <i>newspapers' shit is all retarded</i>.&nbsp; <br /><br />Too many big words, articles that are way too long, and boring stuff like researched facts.&nbsp; Fuck all that shit, I want my news as it happens, and I don't care how true it is.&nbsp; Bloggers call this process journalism...whatever.&nbsp; That's just writers trying to convince themselves that they're serious when they know deep down that their readership is only interested in sensational titles and text no longer than 300 words.&nbsp; Any more than that, well, shit's all retarded.<br /><br />The only satisfying part of journalism turning into shinythings.com is watching intellectuals whine about it.&nbsp; See, I probably should be an intellectual.&nbsp; I've got a degree in mathematics, I'm a computer programmer by trade, but every time I've knocked an article out of the park for The Register, it's been a great troll.&nbsp; That's the only way to get by in online media, and even the New York Times knows this.<br /><br />Take for example, NYT columnist Paul Krugman.&nbsp; He won a Nobel Prize in economics, and has been writing the same op-ed column for NYT for the past 8 years: "Republicans are the cause of all the world's ills."&nbsp; Someone who's shit is arguably all retarded has been reduced to trolling to get page views.&nbsp; And it really works.<br /><br />If, as a blogger, you're above trolling, then the only other way to be popular is by printing blatant falsehoods.&nbsp; In 2008, people actually started to pay attention to CNN's iReport because somebody wrote that Steve Jobs had a heart attack. Apple lost 10% of its market capitalization in 10 minutes.&nbsp; Now <i>that's</i> fucking power.&nbsp; TechCrunch's Michael Arrington, showing an obvious tell of a manic depressive, keeps going off on Last.FM with lies about them giving data away to the recording industry.&nbsp; None of it is true, but it brings readers.<br /><br />It certainly doesn't hurt that TechCrunch shies away from words longer than eight letters.<br /><br />Print media isn't hurting because it's an outdated business model, print media is hurting because it's boring.&nbsp; Blogs and Twitter are succeeding because their shit is clearly not retarded.&nbsp; And you know what?&nbsp; I love it.&nbsp; Intellectualism is dying, and the news is now anything we want it to be. <br /><br />I just can't wait until 4chan figures that out.<br /><br /><br /></div>]]>
        
    </content>
</entry>

</feed>
