How to Fix the Dilbert.com RSS Feed

Dilbert.com Hates Its Users

Dilbert.com recently messed up their web comic RSS feed that I use to read the comic every day. They did this so that you have to click through to the website to read each and every comic. All you can see is what’s to the right here.

Penny-Arcade did this quite a while back too, and I’ve been using someone’s Yahoo Pipe that fixes this same problem. It just pulls the comic strip images from the page and displays it instead. I never dug into how it worked or Yahoo Pipes at all.

Yahoo Pipes is pretty awesome. It lets you just drag and drop things and connect them to arrange a workflow. I’m a developer, but I don’t think you have to be to use Pipes.

Using the Penny-Arcade one as an example, I rigged up two versions of the Dilbert.com feed.

  • Large Image Version

    This version looks great, especially on high DPI devices, as I’ve set the style to width: auto; max-width: 100%. If your reader supports it, like TheOldReader (which I highly recommend and here’s my profile), then it will display beautiful, large-resolution images and scale appropriately.
    • Pipe Link (so you can see how it works and edit it)
    • RSS Link (what you need to add the subscription in your reader)
  • Regular Image Version

    This version also scales using width: auto; max-width: 100%, but it uses the smaller image (but larger than the original feed’s “print” image size).
    • Pipe Link (so you can see how it works and edit it)
    • RSS Link (what you need to add the subscription in your reader)
  • Clone of Original Feed

    This version should be a clone of the original feed. It includes no link, no CSS styling, and it uses the original “print” image size. It just contains <img src="http://www.dilbert.com/path/to/image.strip.print.gif"/> as the RSS item description.
    • Pipe Link (so you can see how it works and edit it)
    • RSS Link (what you need to add the subscription in your reader)

What It Looks Like Now With These Pipes

By the way: I’m using a great Blue User Style in Chrome. I like the blue a lot better than TheOldReader’s default sea green.

Now you get Dilbert back the way it used to be and don’t have to link out to the site to read it. I still left each image as a link to the post’s page on Dilbert.com.


Pebble Watch

Meet Pebble

I got the Pebble Smart Watch a couple of weeks ago, and I’m really enjoying it. It’s a watch that connects to your smart phone and lets you get your notifications like text, emails, and phone calls on your wrist without digging out your phone.

It lasts a really long time, about 9 days before I had to recharge it, and it charges with a little magnetic connector. It has lots of watch faces and apps already, thanks to its SDK and developer community. I’m really partial to the calendar face pictured below.

I haven’t worn a watch since 2006, but I’m already used to it again, for what it provides me. Check out the additional pictures below. I changed out the default rubber strap for a NATO strap.

More Pictures


New Website and Host

Site

My last post was in April 2012, so it’s probably time for an update. I successfully imported my blog into a static HTML generating tool called PieCrust. It creates the files serving this site now.

As part of the move, I totally redid the site’s design and functionality at the same time. I had a lot of help (personal and technological). You can read more about it in the about the site section, linked at the bottom of every page.

Host

I love the new host, which was recommended to me by Juan. I’m hosted at Digital Ocean now. I got a great deal by getting 2 months free by using code SSDTWEET. That code should work through June 2013, and if it’s past then when you read this, just google another coupon code.

What you get with Digital Ocean is pretty amazing. You get to pick your Linux distribution, and they spin up the instance in under a minute. I was able to provide an SSH public key and they spun it up with no root password, with the key, so I was able to login securely. Setting everything else up has been a breeze, since I have full root access, and they even have console access (virtual KVM) in case I screw up the firewall rules.

I locked down the firewall, set up nginx (web server) with Google’s pagespeed module and php5-fpm, which is needed for a few dynamic things like the site search. I’ll be posting more about that later.

I get all that for $5/month, and I emailed their support a question about DNS and got a quick reply back. So far, I’m very happy with their lowest end instance.

Old Site

This is what the old site looked like:

Old Site Screenshot
Old Site Screenshot


Successful Unlock of Two AT&T iPhones (iPhone 3G and iPhone 4S)

iTunes Unlock Confirmation
iTunes Unlock Confirmation

Summary (TL;DR)

This is a bit long but the short and sweet is that you have to:

  1. Get AT&T to go to a separate “iPhone Unlock” page before they send the unlocking email. The email is not connected to your IMEI unlock in any way. It’s just instructions.
  2. Put a non-AT&T SIM into the iPhone. T-Mobile prepaid works great for this
  3. Wait for iPhone to display “Needs Activation” message after it finds the foreign network
  4. Connect to iTunes (twice for me) to get the “Congratulations” message. I got an error the first time on each phone after inserting the foreign SIM.
  5. No backup/restore is necessary, contradictory to AT&T instructions.

I was able to get a 3G and 4S unlocked.

The Good News

Last Friday, AT&T announced that they would begin unlocking iPhones that met any of the following conditions if the account was in good standing:

  • iPhone is out of contract (24 months since purchase)
  • iPhone has been upgraded to a new phone with AT&T upgrade
  • iPhone has been purchased with no-commitment pricing
  • iPhone contract has been terminated and ETF has been paid

I have two phones that meet those conditions. One is an iPhone 3G I got when I signed up for AT&T. I then upgraded to an iPhone 4 when it came out in June 2010. I sold the iPhone 4 to an individual on Craigslist and then purchased an iPhone 4S from an individual on Craigslist who represented to me that it was not connected to any contract (no commitment pricing). Therefore, my 3G and 4S should be eligible.

First Try

I contacted AT&T Sunday morning to request an unlock on both. As I expected, they thought I was crazy and told me AT&T doesn’t unlock iPhones. I requested that they check with a supervisor or check online documentation. After a brief hold, they confirmed they were unlocking iPhones, but they’d have to connect me to another department. After waiting on hold with me for about an hour across two times they hung up on me, I got the second department.

They took my IMEIs (the number that identifies a device on a GSM network) to verify eligibility. My 3G passed. My 4S, I was told, would not be eligible since I didn’t have a receipt and it wasn’t connected to any contract on my account. I appealed this and they spoke with a supervisor. AT&T was able to verify the 4S was not connected to any contract and therefore was eligible. The representative sent me a link to this PDF to explain the rest of the unlock and told me that both phones were unlocked.

The gist of the PDF is that you must backup and restore the iPhone to get it to unlock in iTunes. I knew this was not the normal procedure for other countries that do iPhone unlocking, but I didn’t have enough information to question it yet.

I tried with both iPhones, backing up and restoring, and got no message in iTunes confirming an unlock, like other people from other countries have been getting for years. I thought maybe it was unlocked and I just didn’t know, so on Monday, I paid $10 for a T-Mobile pre-paid MicroSIM so I could test it. Both phones said “Activation Required” and when I plugged them into iTunes, it reported that they were unsupported SIMs. In other words, the phones were not unlocked.

Second Try

Peeved, I called AT&T around 8:30pm on Monday night. I had to start over, and the tier 2 person at AT&T this time had no idea what unlocking meant and kept going to her supervisor who informed me I needed to jailbreak to use it on T-Mobile. I eventually got to this supervisor around 10:50pm (yes, those times are right; the hold to get to tier 2 and 3 was excruciating; they kept wanting me to hang up and call back but I refused), he reiterated the thing about T-Mobile and jailbreaking. I told him this is not how GSM unlocking works.

What I kept explaining is that the previous representative read to me from her AT&T system that “After the ASR has verified the IMEI eligibility and submitted it for unlock”, to go to this other page to send me the previously linked PDF. The PDF is not in any way linked to my IMEI. So I kept telling everyone I spoke to that they were missing a step: in order to unlock the phone, they had to give Apple permission to unlock it, and that’s the part that they weren’t doing. The email itself did nothing other than tell me what would happen if they did unlock it.

Resolution

After arguing for about 15 minutes, since he didn’t understand unlocking but was genuinely trying to help me, Johnathan finally found a link in his system for a separate page that was titled “iPhone Unlock”, hosted by Apple. He put my 3G IMEI into this page after logging in and confirmed the IMEI with me.

I connected the iPhone to iTunes; nothing. I backed it up and restored (no data on the 3G so this goes relatively fast); nothing. I put the T-Mobile SIM in, instead of an AT&T SIM and reconnected to iTunes. This time I got an error, and I forgot to take a screenshot, that said: “Unable to activate” or something like that.

iPhone 4s on T-Mobile Screenshot
iPhone 4s on T-Mobile

Success

I disconnected and reconnected, and suddenly I got the image at the top of this post, confirming activation. My iPhone 3G displayed T-Mobile at the top, and I got a text from T-Mobile welcoming me to the network.

Johnathan and I followed the same process with the iPhone 4S, and I got exactly the same results. I didn’t do a backup and restore at all on the 4S. I just put the T-Mobile SIM in after he submitted the unlock to Apple, waited for it to display Activation Required, connected it to iTunes, got that error message, disconnected, and reconnected. I immediately got the “Congratulations” again. A screenshot from the 4S is at the right.

I’m now very happy both phones are unlocked to work on any GSM carrier, even though it took a lot of my time and patience.


Zip File Classes Finally Available in .Net 4.5

Right now .Net 4.5 is still in beta, but I noticed something that will make developers who must interact with zip files happy: .Net 4.5 will have native support for dealing with zip files. Up until now, the System.IO.Compression namespace only had support for GZipStream and DeflateStream.

I, like many other developers, have been using the fantastic SharpZipLib library, but I don’t like to have dependencies in my projects if I don’t have to. In order to iterate through a zip file and list its contents while extracting the code looks something like this (SharpZipLib has a lot of one-liners to allow for extracting with events as well, but bear with me):

private static void ExtractSharp(string zipFile, string extractionLocationSharp)
{
    Console.WriteLine("Extracting with SharpZipLib");
    Console.WriteLine();

    using (var archive = new ZipFile(zipFile))
    {
        int readCount;
        byte[] buffer = new byte[4096];

        foreach (ZipEntry entry in archive)
        {
            Console.WriteLine("Name: {0}, Size: {1}", entry.Name, entry.Size);

            var extractedPath = Path.Combine(extractionLocationSharp, entry.Name);
            if (entry.IsDirectory)
            {
                Directory.CreateDirectory(extractedPath);
            }
            else if (entry.IsFile)
            {
                using (var zipStream = archive.GetInputStream(entry))
                {
                    using (var outputStream = new FileStream(extractedPath, FileMode.CreateNew))
                    {
                        while ((readCount = zipStream.Read(buffer, 0, buffer.Length)) > 0)
                        {
                            outputStream.Write(buffer, 0, readCount);
                        }
                    }
                }
            }
        }
    }

    Console.WriteLine();
}

I haven’t installed the .Net 4.5 beta on my work machine yet, but according to the MSDN documentation, it should look like this:

I don’t know if this compiles in .Net 4.5. I don’t have it installed yet.
private static void ExtractDotNet(string zipFile, string extractionLocationDotNet)
{
    Console.WriteLine("Extracting with .Net 4.5");
    Console.WriteLine();

    using (var archive = ZipFile.OpenRead(zipFile))
    {
        foreach (ZipArchiveEntry entry in archive.Entries)
        {
            Console.WriteLine("Name: {0}, Size: {1}", entry.FullName, entry.Length);

            var extractedPath = Path.Combine(extractionLocationDotNet, entry.FullName);

            // I'm not sure if it will create the directories or not.
            // There does not appear to be an IsDirectory or IsFile like in SharpZipLib
            entry.ExtractToFile(extractedPath);
        }
    }

    Console.WriteLine();
}

As you can see, it looks a bit cleaner, but the nice part is having it built into the framework instead of relying on yet another assembly.

As noted in the comments, I’m not sure how .Net 4.5 will handle the directory entries or if it ignores them as separate entries. I may be able to test the beta later, but feel free to comment if you know how this works.