I Don’t Need 3G on Kindle

Initially I wanted to buy a WiFi-only Kindle, but a friend encouraged me to buy the 3G version – why not spend $50 for life-time free 3G? It seemed so attractive, that I was convinced by him and chose the 3G version.

A year has passed since I got the 3G Kindle. How often did I use 3G on it? I think the total time I had 3G turned on must be less than one hour. Most times I turned the wireless network off so that the battery could last a little longer. When I have to access the network, I was always in a location with Wi-Fi wireless. Maybe that’s because I don’t travel a lot.

Many people are fond of the browser built in with Kindle and they think they get an unlimited data plan for free! But the browser has always been marked as “experimental” and it seems Amazon has no plan to make it usable in “production”. It’s by nature limited by the E-Ink display. Web pages must be specifically designed to make them readable in Kindle but few web sites are doing this. And free 3G web browsing is only available on Kindle 3. With the latest generation of Kindle (no keyboards), “Experimental web browsing (outside of Wikipedia) on Kindle Touch 3G is only available over Wi-Fi.

If you buy a book from Amazon (even if it costs you $0, free), it can be downloaded via 3G. But if you email a document to Amazon, it won’t be downloaded via 3G unless you pay the data fee.

Actually Wi-Fi is ubiquitous today. If I’m going to get another Kindle, I won’t buy the 3G version. But for people who will stay in a special area where Wi-Fi is not available but there is cellular network coverage, 3G is desirable.

Django prepopulated_fields not working?

Note – Just skip to the end of this article if you’re eager to find out the reason.

Yesterday I found that Django even had a special field SlugField for post slugs. I’m just starting with Django so there’s a lot I don’t know yet. It’s cool that they also designed a “prepopulated_fields” property in the admin module.

class ArticleAdmin(admin.ModelAdmin):
    prepopulated_fields = {"slug": ("title",)}

Continue reading Django prepopulated_fields not working?

Writing Greasemonkey User Scripts for Firefox and Chrome

Greasemonkey was initially only a Firefox extention but due to its popularity it’s quickly adopted by major browsers. Since Opera takes a very small market share, here on the topic of cross browser user scripts, I’m only going to talk about Chrome and Firefox. As for Internet Explorer, I just don’t like it.

Now Chrome doesn’t need an extension to enable user scripts. It had the functionality built in. But the way it handles the scripts is quite different from Firefox’s. At first when I wanted to test if my Greasemonkey script worked in Chrome, I tried to figure out where it stored the script. That’s the way I always do in Firefox – just right click on a user script and edit, save and refresh to see it in effect right away.

Continue reading Writing Greasemonkey User Scripts for Firefox and Chrome

“Google Reader Unread Count in Gmail” Script Again

After Google unveiled its “plus” social network to combat Facebook, its whole product line got an interface update and my “Google Reader Unread Count in Gmail” Greasemonkey script no longer worked. So it’s time to update it again.

Install latest version.

Google Reader Unread Count in Gmail

Now it seems Google hides Reader link in the “more” drop down. Or at least it’s the situation in my account. Anyway, If that’s the case, my script will swap it with the last one in the menu bar.

What’s more, It now supports Chrome! Day by day I’m getting more used to Chrome and discarding Firefox. And looking at the market share data, Chrome is also making great progress.

Google Reader and Readability, Kindle

Readability has browser extensions for reading current page or sending current web page to Kindle, but I read a lot in Google Reader where many articles are on the same page. It seems that Readability staff considered this feature and did investigate on that. But until now I didn’t find a mechanism for Reader’s native send to feature to work with Readability. So I spent several hours writing this Greasemonkey script, so far very happy with it.

Click here to install. It supports both Chrome and Firefox. After it’s installed, open Google Reader and view any entry, you’ll find Readability’s button on the right of the actions bar below the entry content. Like this:

Google Reader Readability Send To Kindle

If you don’t already know Readability, you should try it. After clicking the button, the article is saved to your reading list in your Readability account, and Readability sends (after some processing to make it “readable”) it to [your name]@free.kindle.com. Then when you connect your Kindle to a WIFI spot, the articles are automatically downloaded.

Basically I utilized the JavaScript from Readability’s publisher tool. Luckily they didn’t obfuscate the code and it indeed has good readability :) Anyway I think Readability should develop a page which can be used in Google Reader’s native send to popup. That would be easy and better than my script, since I have to update it every time Google Reader interface changes or Readability updates their JavaScript library.

A minor issue of readability is that it doesn’t extract the redirected URL so all the articles from blogs using feedburner’s service will seem to be from feedproxy.google.com and in readability’s account you’ll see feedburner’s favicon displaying before most items.

Using ImageMagick for WordPress Thumbnail Generation

When you upload an image in WordPress, the blogging software tries to generate several scaled versions of the images uploaded. So after it’s done, WordPress provides 4 different sizes of the image for you to insert into the post – thumbnail, small, large, original.

I noticed that for my WordPress install, only the original image was available and the other options were disabled. The reason is that the PHP on my server was compiled by me myself and I didn’t compile many of the extensions. WordPress uses GD extension for thumbnail generation. But this time I didn’t recompile PHP with GD (I didn’t know how to compile GD alone as an extension). Instead I used ImageMagick and here’s the whole process.

Continue reading Using ImageMagick for WordPress Thumbnail Generation