1. 2009
    Aug
    03

    Wait, this doesn't make sense

    Have you seen Match.com’s advertising pitch? “If you don’t find someone in six months, we’ll give you six months free.” So basically, once you put up with the service for six months, having established that it doesn’t work, your compensation is six more months of the same thing? Well excuse me if I’m not jumping for my computer right away.

  2. 2009
    Jul
    29

    Anonymous comments are here!!

    My little post about how much data weighs has been getting a lot of attention ever since I posted it in a Slashdot comment. Well, not really a lot of attention, but it’s gotten over 100 hits this month, which puts it up in the top 5 pages on the site. In the course of investigating where all this traffic is coming from, I noticed a lot of requests in the logs for /blog/addcomment. Now, perhaps a lot of those are spam, but I figured I’ve held off on anonymous commenting long enough. Since there’s no way I’ll be able to do it properly anytime soon, I put in a bit of a hack that lets people post comments without authentication. This probably means I’ll have to go through the comment table to weed out spam posts, but whatever, at least it should be interesting…

  3. 2009
    Jul
    29

    Yet another fix to the Plasma network manager applet

    A couple of days ago I replaced Gentoo Linux with Kubuntu on my old laptop. I didn’t have the time, and the laptop probably didn’t have the power, to keep compiling every program I wanted to install. As a consequence of the switch, I got to use the nifty new KDE 4 which comes with a little network management applet that looks absolutely gorgeous, but unfortunately doesn’t work.

    Well, didn’t work. I fixed it, though, by following the suggestions at http://uncleham.wordpress.com/2009/07/11/kubuntu-904-wpapsk-nobroadcast/ — I would detail my procedure here but it’d just be a repeat of what you can find at that link, with a couple of notable differences: (1) my router broadcasts its SSID, and (2) “Connect automatically” works fine for me. No need to reenter the encryption key at every login.

    I actually have a hunch about why this worked, and I don’t think it had anything to do with using the “Connect to hidden network” button. When I clicked the button, I made a point of not filling in any configuration settings that I didn’t have to. Checking it over afterwards, the one obvious difference …

  4. 2009
    Jul
    28

    Plagiarizing quicksort?

    I found an interesting tidbit in one of Princeton’s old academic integrity handbooks that I wanted to share before throwing it out.

    They’re trying to demonstrate plagiarism in something other than the usual humanities-paper context. Which is a good goal, I suppose, but the execution leaves something to be desired. Here’s the “original” implementation of quicksort, from Bob Sedgewick’s Algorithms in C, as reproduced in the handbook:

    quicksort (int a[], int l, int r)
           {
             int v, i, j, t;
             if (r > l)
                {
                   v = a[r]; i = l-1; j = r;
                   for (;;)
                      {
                         while (a[++i] < v) ;
                         while (a[–j] > v);
                         if (i >= j) break;
                         t = a[i]; a[i] = a[r]; a[r] = t;
                      }
                   t = a[i]; a[i] = a[r]; a[r] = t
                   quicksort (a, l, i-1);
                   quicksort (a, i+1, r);
                }
          }
    And here’s their plagiarized example:
    #define Swap(A,B) {temp=(A); (A)=(B); (B)=(A); }
    void mysort (const int * data, int x, int y) {
       int temp;
       while (y > x) {
          int pivot = data[y];
          int i = x-1;
          int j = r;
          while (1) {
               while (data [++i] < pivot) { /*do nothing*/ }
               while (data [–j] > pivot) { /*do nothing*/ }
               if (i >= j) break;
               swap (data [i], data [y];
          }
          swap (data …

  5. 2009
    Jul
    27

    More Python voodoo: combination class/instance methods

    Here’s a neat tidbit from my website code: Let’s say you’re writing a class, and you want it to have some methods that can be called as either class or instance methods. Of course, you can do it by writing a class method, but if you want the method to be able to use instance attributes when it’s called on an instance, you can do it using a descriptor. Here’s how.

  6. 2009
    Jul
    20

    Switching to Google Apps

    This weekend I switched over from Postfix to Google Apps (standard edition) to handle @ellipsix.net email addresses. Very quick and easy, yay :-)

    Why’d I do it? Not for any particularly weighty reason — Postfix was doing just fine as an SMTP server. I just thought it’d be nicer to have a separate account for mail that comes through the website, and all Postfix could do was forward emails to my regular Gmail account — unless I were to set up an IMAP or POP server of my own, and even then I’d miss out on Gmail’s nifty UI.

    Plus, there is one feature I really like about Gmail that I haven’t seen in any other webmail system. Messages that I send from my laptop or phone through Gmail’s SMTP server show up as sent messages when I log in online. It’s tremendously useful not to be missing half of a conversation when I want to send emails from a public computer.

  7. 2009
    Jul
    11

    Bing vs. Google

    The New York Times is apparently in love with Microsoft’s new search engine. They have a review of Bing that touts it as better than Google… but I don’t get it. I’ve tried Bing a few times and as far as I can tell, it seems like just a Google clone with flashier background images. The search results certainly aren’t any better, in my experience, and the features that the NYT seems so trippy over aren’t actually that much to get excited about.

    For instance, displaying the first few paragraphs of each result in a popup box. As I recall, showing the initial paragraphs of the result page was one of the things Google dumped — Google was among the first to highlight the context of your search terms back in the old days when everybody else just displayed the first paragraphs of the page. Showing them in a popup box doesn’t make them any more useful, although to be fair it doesn’t really hurt.

    The new panel to the left of the search results is kind of nifty, but it’s really just a list of related searches. Google has been offering related …

  8. 2009
    Jun
    27

    First DMCA takedown notice (part 3)

    Over the past couple of days, I’ve been trying to work out a reasonable resolution to the DMCA problem with a representative of Rackspace (the parent company of Slicehost, my hosting provider). While they are resolute that the downloading of copyrighted material from my server was a violation of the terms of service, they don’t object to the Tor relay itself, so as long as I take some appropriate measures to prevent further downloading, I’m free to restart the relay. But apparently, port blocking is an appropriate measure… even though it doesn’t actually do very much to prevent BitTorrent downloading. So I guess it’s a question of appeasing the authorities — appearance over function.

  9. 2009
    Jun
    25

    First DMCA takedown notice (part 2)

    I’ve been doing some research on how to respond to the DMCA takedown notice I received a couple of days ago, including going right to the source: the DMCA itself, especially 17 U.S.C. § 512. It definitely seems that Tor falls under the limitations in that section, which means that Tor relay operators are not legally liable for the fact that copyright-infringing data happens to pass through their computers — at least, not directly under the DMCA. But there’s also the matter of the hosting provider’s terms of service, which can make operating a relay difficult even when the law would not.

  10. 2009
    Jun
    24

    First DMCA takedown notice, yay! (part 1)

    Last night I started operating a Tor relay on my Slicehost server. But I’ve run into trouble already, having received a DMCA takedown notice for a file that is most certainly not hosted on my server; and with it comes the possibility of being taken offline. What’s a law-abiding sysadmin to do to keep the server connected?