nanovivid

Saturday Morning Surprise

July 20th, 2008Randomness1 Comment

I had a bit of an odd experience this morning. I was sitting on the couch enjoying Act III of Dr. Horrible’s Sing Along Blog when the doorbell rang. I was a bit disoriented because, hello, who rings doorbells at 10:30 on a Saturday morning? At the door I found a woman who was probably in her forties and a girl who was probably 10 or so and I guess was her daughter.

As soon as I saw them, I had a gut feeling that I was about to get “witnessed” at, and was I ever right. Unfortunately, it wasn’t as entertaining as you might think. It was mostly awkward, since she just handed me a tract titled “What Hope for Dead Loved Ones?” and then, for some reason, felt compelled to read 2 Timothy 3:16 to me (which was rather confusing, considering that it has nothing to do with the subject of the tract). Her daughter just stood there the whole time, looking like she’d rather be somewhere else.

If it had gone on for longer than about a minute, I might have figured out some way to get rid of her, but she apparently just wanted to read a random bit of the Bible to me and give me a tract about dead people. It was really rather surreal.

Frankmusik - In Step

Thanks for Listening, Netflix

June 30th, 2008RandomnessComments?

It turns out that after freaking me out with the news that profiles were being removed, Netflix has changed their tune. It’s nice to know that they’re listening to their customers, and I’m glad that I’ll be able to keep all my ratings and my queue!

MGMT - Electric Feel (Justice Remix)

A Pennsylvania Weekend

June 23rd, 2008Friends / Pictures / Shopping / Travel1 Comment

I’m a little late on getting around to this, but whatever. The weekend before last, we took a trip to Pennsylvania for Bryan’s sister’s wedding. The wedding was lovely, the food was amazing, and the hotel was… odd. We stayed at the Golden Plough Inn in very country Peddler’s Village. Our room had a lovely farm animal theme, complete with a wood cutout of pigs suckling. Confusingly, even though we were in room 108, there were two flights of stairs required to reach the actual quarters. Even though the accommodations were a bit strange, it was a nice time. Since Bryan was in the wedding, I took a bunch of pictures with his fancy camera which he’s going to post at some point. However, the camera was apparently in the wrong autofocus mode, so a lot of them didn’t turn out so well. Here they are anyway. Oh, and there was a massive thunderstorm during the outdoor reception, so that was exciting.

After the wedding (and breakfast at the Cock ‘n Bull… no, seriously), we drove on to visit Dave and Olivia. They already posted a nice summary of our activities and some pictures, so be sure to check those out. It was great to see them again and to finally get to experience firsthand the amazing work they’ve done to their house (even if the fact that it’s a row house lead Bryan to remark that their neighborhood was “like The Wire”).

Dave and OliviaCool LightingHello WorldCinCin

We also took the opportunity to visit IKEA, where I picked up some white DIODER lights for my desk, replacing the halogens I had previously. Even though the LEDs are a little flourescent-ish, they put out barely any heat and are wonderfully diminutive.

The trip was very enjoyable and I definitely want to get back to Philly at some point in the future. Due to poor planning and research, we missed out on all the museums, so that’s at least one reason arrange another visit. I could probably pass on a second Peddler’s Village experience though.

Sigur Rós - Inní Mér Syngur Vitleysingur

Links for June 20th

June 20th, 2008LinklogComments?

Thanks for Nothing, Netflix

June 18th, 2008RandomnessComments?

Tonight we got an email from Netflix saying that they’re eliminating account profiles so they can “continue to improve the Netflix website for all our customers.” How considerate of them. This means that I’m losing all my ratings that I’ve spent time building, and Bryan and I can no longer have our own separate queues. Up until today, I’ve always been very impressed with Netflix and pleased with their service, but I am not a happy camper right now.

Update: It’s hit Hacking Netflix now, and there’s a Netflix Community thread.

Massivivid - God Away

WordPress Tip: Force All Feeds to Use Atom Atomatically

June 5th, 2008Code / SiteComments?

While migrating my site to WordPress, I got annoyed that WordPress uses RSS feeds by default with no way to change to Atom. Not that there’s a big difference or anything, but if you’re anal-retentive like me and want WordPress to use Atom but still have pretty feed URLs (http://nanovivid.com/feed/ instead of http://nanovivid.com/feed/?feed=atom), you can do it with one .htaccess RewriteRule:

RewriteRule (.*)/feed/?$ $1?feed=atom [L]

This simply takes any URL ending in /feed and invisibly appends ?feed=atom to it. Instant Atom feeds for everything!Î

Gotye - Heart's A Mess (Lull's Radio Edit)

Links for June 5th

June 5th, 2008LinklogComments?

  • IKEA DIODER LED Lights
    I really want a set of these, but IKEA is being stupid and won't let you order them online.
  • bomomo
    Fun little drawing toy that uses moving particles (Safari/Firefox only).

jQuery Is Sorcery

June 1st, 2008Code / Geeking Out2 Comments

Geeky content warning: Feel free to skip this post if “JavaScript” makes you think of writing a play at a coffeehouse. Otherwise you may be confused and/or bored to tears.

Lately I’ve been using the jQuery JavaScript framework quite a bit, and I consistently find myself surprised by how close to magic it seems. Being able to simply write $("#id").hide(); and have the element disappear is a bit shocking if you’re used to writing “traditional” JavaScript. jQuery encourages a massive reduction in the amount of code required to do just about anything.

For example, the collapsable yearly archive in the footer of the site is based on the Flexo Archives Widget. The original JavaScript is about 220 lines of code, including comments and whitespace. Here’s the code ported to jQuery:

jQuery(function(){
    jQuery(".flexo-link").each(function() {
        // Add a hint to each expandable link
        jQuery(this).attr("title", jQuery(this).attr("title") + " (Click to expand)");

        // Hide each list of months
        jQuery(this).parents("li:first").children("ul").hide();

    }).bind("click", function() {
        // Show or hide a list when the user clicks
        jQuery(this).parents("li:first").children("ul").slideToggle("fast");
        return false;
    });
});

That took the code from ~220 lines to ~15, which I’d say is pretty magical. Now, to be fair, jQuery is a 14 kb framework (when compressed), while the original Flexo code is only 4 kb compressed. In my case, I was already using jQuery for other functionality, so it made sense to go ahead and shrink the JavaScript for the archives. I also added scrolling to make sure the content stays on screen as it’s expanded and a few other tweaks. Even with those new features, my code only reached about 35 lines.

This is only a small taste of what jQuery can do. In addition to the core functionality, there’s the very impressive jQuery UI and all kinds of plugins. If you’re writing JavaScript, I’d highly recommend taking a look at jQuery. Then you can feel like a wizard too.

Sigur Rós - Gobbledigook

Title and Registration

May 22nd, 2008Goodies / Site

The other day, John Gruber posted some nice code for converting text to title case. It was quickly ported to Python and JavaScript. I decided it would be useful to have a PHP version as well, so here’s my contribution.

I’ve already added one edge case that the original ignores, just because I had a title that needed the fix. One of my old posts is titled “More Scaper-ing.” Before the fix, it would get converted to “More Scaper-Ing,” which just looks wrong. So I dropped in a special case for it.

Let me know if you find the plugin useful or find any bugs.

Comments closed on this post. Please leave any bug reports or comments on the plugin’s page.

Lykke Li - I'm Good, I'm Gone (Fred Falke Remix)

Links for May 20th

May 20th, 2008LinklogComments?

  • Flugtag
    "We're going to figure this out eventually!"