misc 14 July 2008
    "Django: Retrieving Backward Related Objects"

    Another one in the category of always-forget-how-to-do-this-so-noting-here:

    class Entry(models.Model):
        blog = models.ForeignKey(Blog)
    
    b = Blog.objects.get(id=1)
    b.entry_set.all() # Returns all Entry objects related to Blog.
    
    # b.entry_set is a Manager that returns QuerySets.
    b.entry_set.filter(headline__contains='Lennon')
    b.entry_set.count()
    

    Full docs here …

    More
    misc 14 July 2008
    "Gmail Magic Speed-up Button Found"

    This morning while trying to close a firefox tab I accidentally hit a button on Gmail that made it magically faster and better. I'll share it with you: look at the top right hand side of your gmail screen. Look for the link that says "Older version":

    Gmail - Older Version

    Click on this …

    More
    misc 14 July 2008
    "iPhone’s Weaknesses As a Business Phone"

    Still thinking about iPhone versus BlackBerry. The iPhone is great, but I prefer the BlackBerry for business use. The iPhone's weakest points:

    • The speakerphone is unusable. Volume is far too low, quality of sound is below par. Unusable.
    • There isn't a good way to carry the phone and/or stuff …

    More
    misc 13 July 2008
    "BlackBerry + Decent Browser = iPhone Killer"

    I'm a bit of an iPhone fanboy, it's true. However, Fred Wilson's post on mobile apps has me thinking - the main reason I carry an iPhone as well as a BlackBerry is the iPhone's browser. The rest of the stuff is great, but the killer app is the browser.

    And …

    More
    misc 11 July 2008
    "Marry A Virgin In The Morning…"

    Genie

    My brother-in-law bought Arabian Nights (aka 1001 nights) to read to his 2 year old daughter, thinking they'd be nice, quaint stories. He thought better of it and gave it to me, so I gave it a quick read.

    You probably know the general story: there's a cruel king that …

    More
    misc 11 July 2008
    "Windows/Eclipse/FireFox Slowdown Annoyance"

    Update: Gotta love it. Genius, I am. Turns out the laptop was on "Power Saver" mode.

    About 2 weeks ago my Vista laptop started slowing down. I don't know what caused it, but it started sometime after I updated to service pack 1, although I have no idea if that …

    More
    misc 08 July 2008
    "Black Nerds"

    Interesting essay from David Adewumi on Why Black Nerds Are Unpopular. My observation on nerdism and popularity, based on going to school in three different continents, is that "nerds" are an American invention. Popularity, or lack thereof, is of course universal, but being a social outcast due to intelligence is …

    More
    misc 08 July 2008
    "Cross-Language Data Serialization and Exchange"

    Interesting new open source release from Google called Protocol Buffers. Language neutral data serialization and exchange via protocol definition and generated code for C++, Java, and Python.

    Apparently Protocol Buffers are heavily used inside Google, so they look to be a robust implementation. Should be a good format for wire …

    More
    misc 08 July 2008
    "jQuery serializeArray: Why Not An Associative Array?"

    I'm trying to examine and modify form variables from jQuery by catching the submit event. jQuery has a serializeArray method that hands you the form variables in a nice array. For example:

        $('#someform').submit( function() {
            $.post("/some/url/", $(this).serializeArray(),
                function(data){
                    console.log(data);
                }, "json");
            return false;
         } );
    

    This is …

    More
    misc 08 July 2008
    "Shopping For Broadband Access Card / Service"

    Cell Tower

    I just cancelled my Verizon broadband account, mainly because the card was no longer working in my PC and the mac doesn't take PC cards. I was surprised at how little effort Verizon put in to keeping me; I've been paying the $80 per month for almost 2 years now …

    More
    In Bruges: Not Too Bad


    Watched In Bruges. Really not too bad. The British do good gangster movies - not shy about violence, but also layers of introspection and classical tragedy elements. I recommend it, worth seeing.

    Update: I've watched the movie a couple of times since writing this, it's quite good. See it.

    More
    misc 03 July 2008
    "Javascript Is The Guy With The Thing"

    Man with ShovelIn most programming languages (Java, C, Python, Perl) I'm generally thinking "I'll put this thing on this shelf here, then I'll do x, then I'll pick up that thing, do some work on it, put the result over here," and so forth.

    With Javascript, particularly when used correctly, which for …

    More
    misc 02 July 2008
    "Put A Queue In Your Standard Toolkit"

    Kids Queue

    A friend forwarded me an email about yet another group using a database to implement what's really a queue. Not surprisingly, performance is an issue.

    Queues are still not part of the average developer's standard set of tools. At least the Java world has a standard API and several good …

    More
    misc 02 July 2008
    "Stereotyping Germany"

    Watching the Euro 2008 games. Yes, many days late.

    The Germany-Turkey game was an interesting one. The entire time watching I was reminded of our European trip, oh, about 10 years ago.

    We spent a lot of time sharing trains with lots of people from lots of countries. Twice with …

    More
    misc 30 June 2008
    "Windows Should Include Virtual Machines For Virus Protection"

    I'm about buy a new laptop for my wife, and it has me thinking about how to keep computers for non-technical folks virus free.

    The best method I can think of is to have a virtual machine running on her machine. She can keep her important things on the core …

    More
    misc 27 June 2008
    "D Lazy Evaluation Prettyness"

    This is kind of pretty:

    void log(lazy char[] dg)
    {
        if (logging)
        fwritefln(logfile, dg());
    }
    
    void foo(int i)
    {
        log("Entering foo() with i set to " ~ toString(i));
    }
    

    Note the lazy keyword in the definition of the log function, which tells D to only evaluate the value if needed (ie …

    More
    misc 27 June 2008
    "The Performance Penalty of Virtualization"

    If you've spent any time with virtualized environments you know how effective and productive they are. The process of expanding capacity for FaceDouble, for example, became significantly simpler once they moved to depolying virtual servers, and SmugMug has been singing the praises of Amazon's EC2 with a clever system to …

    More
    misc 26 June 2008
    "OpenID for Email Verification?"

    I have a need to verify user email addresses, which I've been doing the traditional way - sending an email with a secret to the user's address and having them reply or click on a URL.

    Unfortunately this is not optimal - emails tend to not make it to the user, go …

    More
    misc 23 June 2008
    "Time Warner Discontinues Usenet"

    Looks like Time Warner has dicontinued usenet service:

    Time Warner Ends Usenet

    A good reason to leave Time Warner. I currently have the majority of my services through them (cable, phone, web), I'll be looking for alternatives.

    More
    misc 22 June 2008
    "Russia Wins!"

    Just finished watching Russia vs. Netherlands. Most of it anyway - I'd only DVR'd the main match, missed most of the extra time.

    What a fantastic game. Arshavin is the real deal, looking forward to seeing more of him. Sorry to all my Dutch buddies, but Russia really looked like they …

    More

« Page 6 / 13 »