Wednesday, August 21st, 2013

Web logs, dealing with bots, and an AutoHotKey tip

I've written about my site’s log files before, noting some strange activity and popular search terms. Every time I check my log I find attempts to break into an admin area on my site or to post something, even though I don’t allow comments on my blog. Sometimes I take time to add offending IP addresses to a blacklist, although that’s like trying to plug a leak in a dike.

One such log entry that caught my eye today was one from someone looking for the page “/blog/tag-Whining Goto: Forum List "Attach a file ..." illumination&ct=clnk.” I do have a Whining blog tag but there’s no place on my website where people can attach files. This entry came from 192.69.90.198, which belongs to volumedrive.com, which seems to host a lot of spambots.

Another log entry was from 192.119.154.162, an Avante Hosting Services address assigned to Ryan Wilson. This entry had POST data for a spammy comment (“Me and my neighbor were just preparing to do a little research about this. We got a grab a book from our area library however I think I found out more clear from this post.”). I won’t include the URL but will mention that it was for a domain that is not even registered. Perhaps this spammer was just testing to see if a comment would go through, although a quick glance at this site would show that there are no comments.

Another set of interesting log entries were from IP addresses 95.160.18.178 and 95.160.105.174, both of which belong to the Polish cable company Vectra. Someone from Poland wanted to log into my website’s WordPress admin page but wasn’t able to. If you’d like to try, visit http://www.davidlauri.com/wp-login.php. Why don’t I care if you try to get into WordPress on my site? Because WordPress isn’t installed on my site. I do have a WordPress login page, but it’s just a dummy page I set up after I realized people were trying to hack into WordPress here. I don’t doubt that there are hackers who could get into WordPress if I had it installed, which is why they look for it, but it’s not really here to be found.

I used to block unwanted IP addresses using my site’s .htaccess with rewrite lines like:

RewriteCond %{REMOTE_ADDR} 192\.119\.154\.162
RewriteRule .* - [F]

but a couple years ago I switched my site’s DNS to CloudFlare, which blocks a lot of abusive bots and crawlers automatically and also makes it much easier to block additional IP addresses, either individually or by entire ranges (e.g., 95.160.18.0/24). CloudFlare offers free and paid accounts, but the free account’s been sufficient for my needs and has drastically reduced the amount of hits on my site from bots, although some, like the ones mentioned above, do still get through.


Images used in AutoHotKey macro
I visit CloudFlare about once a week to block some more IP addresses. That’s often enough that I wrote an AutoHotKey macro so that I can press F1 on CloudFlare’s threat control page to activate the IP address field and then F1 again to click on the block button. If you have AutoHotKey, you can copy the macro below (click on the to expand it). You’ll also need to copy the two images to the right.


 myImageSearch(ByRef X, ByRef Y, X1, Y1, X2, Y2, options, image) {
Wednesday, July 31st, 2013

Cleaning up a cluttered web page

Today’s post falls under both the tag Web design (bad) and the tag Computer tips. I’m going to show you a web site that has rather cluttered pages and tell you what you can do to fix it.

I’m going to pick on Andy Towle, whose website Towleroad (“a site with homosexual tendencies”) is a popular website for gay news. I’m picking on Towleroad not because I dislike it—indeed, I find it invaluable and visit it often—but
Some things I found annoying about
Towleroad’s design
because I do visit it often enough that some things about it have finally annoyed me so much I decided to fix them.

What things? Let’s look at the Towleroad article I opened today that pushed me over the edge, “Gay Priest Addresses Pope’s and Cardinal Dolan’s Remarks on Gays.” You can see a screenshot of the page to the right.

The floating icons for Facebook and email and Twitter and more, the ones on the left side directly over the text of the article, were what pushed me over the edge. Yes, Towle earns his living as a blogger, and encouraging his readers to share his articles means more readers and potentially more money. I get why he wants to encourage sharing. I do not get, however, why he wants to cover up part of what he’s written.

Perhaps Towle is unaware that the sharing icons on his site cover his article text. If you open one of his site’s pages in a wider window, there’s a bigger left margin and the sharing icons just float there. But web designers have to be aware that not everyone has huge monitors, that not everyone maximizes their web browsers’ windows, and that some people zoom in to increase the font size. Your site should accommodate all those possibilities.

However, even if the sharing icons didn’t obscure the article, they’re still visually annoying, at least to me. These sharing icons remain visible even as you scroll down the page. “Please share!” they shout. “It’s more important that you share this article than that you read it.” Scroll down far enough and a “Share to Facebook” box pops up in the lower right corner (you can add this annoying feature to your site by visiting addthis.com). Okay, okay, I get it—Towle wants me to share his articles.

Sorry, but I don’t want to see these annoying share buttons, and luckily I have the tools to make Towleroad do what I want. Those tools are Customize Your Web and Adblock Plus. (Another tool about which I’ve written before is Greasemonkey, but I didn’t use Greasemonkey to fix Towleroad.)

Customize Your Web is an addon for Firefox that lets you do stuff such as removing elements from web pages and changing elements’ appearance as well as automating forms. All of that can be done with Greasemonkey, but Customize Your Web doesn’t require any knowledge of Javascript, so sometimes it’s a better choice.

A frequent task I use Customize Your Web for is entering my name and password on sites I visit frequently. Yes, you can tell your web browser to remember your login and password, but some banking sites disapprove of that so much they take steps to prevent your browser from doing that. (The design of banking websites could be another “Web design (bad)” blog post.)

 


Right-click on an offending element and choose “Remove”
For Towleroad, however, I just wanted to hide those annoying share buttons, and while I was at it, also hide some other annoying elements including the Facebook thumbs up at the bottom—which also obscures article text, the extra share buttons at the top—which don’t obscure anything but are ugly, and the scrolling news widget—which distracts me—I just want to read the damned article!

To invoke Customize Your Web so that you can choose elements to be removed, press <F10>. An “edit script” window will appear, and when you move your mouse over elements on the web page, the elements will be highlighted as you pass over them. Hover over an offending item, right-click, and choose “Remove.” Another dialog box will appear; check ”Target is optional in page”
My Customize Your Web script for Towleroad
(if you don’t do this and the element is ever missing when the page loads, the script will fail), and then click “OK.” Repeat for each element you want to remove.

After you have done this for all the offending elements, you’ll have a list of actions in the script editor. But wait! Before you click “Save,” there are a few things you need to do first. One is to double-click on the page’s URL in the “URL Patterns” box, and edit the URL so that instead of referring to a specific page, it refers to all pages on the domain—in this example, we want “http://www.towleroad.com/*”. (For some tasks such as automating forms, you do want to leave it referring to a specific URL.) Then, click on “Settings” and change “Time when script should run” to “After page is fully loaded”—elements are sometimes added to pages after the DOM content is loaded and thus cannot be removed until the entire page is shown.

When you click “Save,” Customize Your Web closes the script and then reloads the page you were on, running its script after the page loads. If you did everything right, all the offending elements will show as the page loads and disappear afterwards.

Unfortunately I had two minor problems with Towleroad which Customize Your Web could not fix. The first was that it wasn’t removing the scrolling news feed. If I’d played around some more I might have gotten removing that to work. The second problem was that Customize Your Web wouldn’t remove the Facebook “Recommend” button because that came from an IFRAME from another site (http://www.facebook.com/plugins/recommendations_bar.php).


Click on “Block” above a Flash element to have Adblock Plus remove it
However, Adblock Plus, the second tool I mentioned above, handily resolved both these problems. If you have Adblock Plus installed, when a flash element shows up on your page, a convenient “Block…” tab appears above it; click on it and you can have Adblock Plus block that Flash element. Then, to remove the “Recommend” button I right-clicked on its IFRAME and choose “Adblock Plus: block iframe” from the context menu.


What Towleroad looks like
after I removed annoying elements
To the left you can see what Towleroad looks like now that I’ve removed all the elements that annoyed me.

No sharing buttons or thumbs up icons obscuring article text. No scrolling news widget updating as I read the article.




Just a few of the very many external sites Towleroad calls for scripts
There was something about Towleroad that I could not fix, however, and that was the site’s load time. Load a page on Towleroad and wait as the page contacts a dozen external sites for various items. “Waiting for m.addthisedge.com…” “Connecting to static.crowdscience.com…” “Connecting to s16.sitemeter.com…” Towleroad loads scripts from crowdscience.com, scorecardresearch.com, chartbeat.com, crwdcntrl.net, popfeedback.com, cloudfront.net, onswipe.com, addthis.com, googletagmanager.com, blogads.com, widgetserver.com, technorati.com, quantserve.com, sitemeter.com, reinvigorate.net, and visualdna.com. Oh my fucking God, no wonder Towleroad pages take so long to load!

Now don’t get me wrong—I value Towleroad as a great source for LGBT news, and I don’t begrudge Andy Towle’s doing what he thinks is necessary to earn a living.

Well I guess I begrudge it enough that I do have Adblock Plus installed, so you could argue that I’m stealing from Towle by viewing his pages without ads. However, the way I usually read Towleroad is via Google Reader Feedly, visiting the actual website only if I want to see other readers’ comments. Towleroad includes the full text of their articles in their RSS feed, so if they really minded my not seeing their ads, they would either close their RSS feed or change it, as other sites do, to include previews only, requiring readers instead to click through to the website to read full articles (and to see ads).

Nonetheless it’s Andy Towle’s site and he can do what he wants. Yet he might want to consider whether he’s balancing the interests of his readers (avoiding annoying tactics, having quickly loading pages) enough with the necessary interests of earning money (getting readers to share articles to increase readership, using external tools for sharing and tracking). A difficult balance, I know, one that fortunately I don’t have to attempt.

Thursday, May 2nd, 2013

Annoying popups on NationalMemo.com

A friend posted a link to an article on NationalMemo.com. I went ahead and clicked the link because I was interested in the article, even though I absolutely hate NationalMemo.com’s website.


If you go to NationalMemo.com, you’ll encounter one of their annoying popups (click to embiggen)
Why do I hate NationalMemo.com? Because of their stupid popups.

I might be more inclined to sign one of National Memo’s petitions if there were a link to it in a box next to the article, but by completely obscuring the web page, I am not only disinclined to sign their petition but I’m also disinclined to even visit their poorly thought out website at all.

And I’m not the only person who thinks this.

If you’re not a web developer, or if you think National Memo’s just not worth the bother, the solution is just that—no longer clicking on links going to NationalMemo.com.

However, tools are available to make NationalMemo.com stop its rude behavior, and doing so really doesn’t take long.

What do you need? Greasemonkey, an add-on for Mozilla Firefox that allows you to add your own bits of JavaScript to any web page you visit, in order to change its appearance or behavior.

If you use Google Chrome, you can try TamperMonkey; it’s supposed to be Greasemonkey UserScript-compatible, but I’ve not tried it myself. If you use Microsoft IE, you can try IE7Pro, but why are you using IE? (Yes, my NationalMemo.com screenshot was done with IE, but that’s because I have Adblock Plus (Firefox) / Adblock Plus (Chrome) installed in the browsers I regularly use, and so the popup National Memo tries to force on me is just blank in those browsers.)

Then you just need to create a quick UserScript for NationalMemo.com. Looking at the source of a NationalMemo.com page, you can see that they have a JavaScript function named lbx_show_lightbox_custom() that displays their popup (which they call a “lightbox”). With the power of Greasemonkey, we can replace NationalMemo.com’s lbx_show_lightbox_custom() function and no longer see their stupid popup.

To figure out how to do this, I googled around some for replacing javascript using Greasemonkey, and I found this very helpful page by Squak Mountain Consulting that explained how to do exactly what I wanted.

Using Squak’s example, I came up with the following UserScript:

// ==UserScript==
// @name DisableNationalMemo_lightbox
// @namespace http://www.davidlauri.com/
// @description Turn off the annoying lightbox that National Memo displays
// @include http://www.nationalmemo.com/*
// @version 1
// ==/UserScript==

// set up the javascript function we want to replace
var scriptCode = new Array();
scriptCode.push('function lbx_show_lightbox_custom(){');
scriptCode.push(' return false;');
scriptCode.push('}');

// put the script in a new script element into the DOM
var script = document.createElement('script'); // create the script element
script.innerHTML = scriptCode.join('\n'); // add the script code to it
scriptCode.length = 0; // recover the memory we used to build the script

// find the first <head> tag on the page and then add the new script just below it
document.getElementsByTagName('head')[0].appendChild(script);

A hint for testing this script on NationalMemo.com is that you should find and delete your NationalMemo.com cookies. They only do their stupid popup once (per day? per week? I don’t know), so if you visit their site first and then set up the UserScript, you won’t actually know if it’s their site deciding that you’ve already seen their stupid popup or if it’s your UserScript disabling their lightbox function.

Was it really worth the time it took to deal with NationalMemo.com’s stupid popup? Probably not, but I had fun finding a solution.

Wednesday, May 23rd, 2012

How to improve a government form website (part 5)


The Greene County Recorder website (click to embiggen) is a marvel of intriguing web design
Today’s government form that can be improved (see earlier improvable government forms) is actually not a form but rather a website, specifically the Greene County Recorder website, a site so rife with intriguing design choices that one might hardly know where to begin.

The document search page on the Greene County Recorder website, before and after
a tweak with Greasemonkey:

Before (with grey labels):

(click to embiggen)

After (with bold green ones):

(click to embiggen)

However, I do know where to begin, namely with the Document Search page. A co-worker came to me because he had a hard time seeing some of the result page’s labels, specifically those that are in light grey on a white background. This intriguing design choice isn’t just a matter of taste; it’s really rather difficult to read light grey on white.

Luckily the Interwebs offer us the ability to override web designers’s choices which we find “intriguing” (or with which we simply disagree). The tool that comes to mind for this job is Greasemonkey, an add-on originally for Firefox that allows web surfers to install or write scripts that change the look or behavior of a web page. Do you prefer Google Chrome? Greasemonkey user scripts are supported directly in Chrome. (Do you prefer IE? Why?! If you insist you can try this.)

You can find lots of Greasemonkey user scripts already written for popular websites, but I didn’t bother trying to find one for the Greene County Recorder website because, already having extensive experience with Javascript and CSS, I have no trouble rolling my own Greasemonkey scripts. This blog post is not intended to cover that topic fully (Google is your friend if you want to learn how) but rather is just to report on what I did about the Greene County Recorder website’s stupid choice of grey text on white.

An easy option for using Greasemonkey to change a web page’s appearance is to inject some custom CSS that overrides how certain elements appear. Luckily one smart thing the Greene County Recorder’s web designer did was to enclose each of the offensive grey labels in a SPAN tag tied to a particular CSS class: <span class="style1">. So all we have to do is change the CSS applied to the “style1” class. (Actually after I first tested this, I realized there was also one DIV with the “style1” class.)

So here’s a user script that changes all the style1 class SPANs and DIVs from light grey to bold and green (honoring the Greene County Recorder’s web designer’s overall choice of colors):

// ==UserScript==
// @name Fix grey labels on Greene County Recorder website
// @namespace http://www.davidlauri.com
// @description Change formatting of style1 class SPANs on Greene County Recorder website
// @include https://www.co.greene.oh.us/recorders/*
// @include https://co.greene.oh.us/recorders/*
// ==/UserScript==


(function () {
//EDIT ME

var newstyle = "span.style1, div.style1 { color: #006400 ! important; font-weight: 900 ! important; font-size: 105% ! important; } ";

//END EDIT ME

var ss = document.createElement("style");
var t = document.createTextNode(newstyle);

var root = (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]);
ss.appendChild(t);
root.appendChild(ss);
})();

If you too use the Greene County Recorder website and dislike their grey labels, you can install this Greasemonkey user script on your computer. If you”d prefer the grey labels be some color other than green or formatted in some other way, you can copy the script above and modify the line between the lines that say “EDIT ME” and “END EDIT ME.”

Monday, November 28th, 2011
Why I love my Kindle Fire (part 4) or  I’ll pick my own wallpaper, thank you very much

The stupid bookshelf UI that default Kindle Fire users get
The default user interface that comes with the Kindle Fire is this bookshelf, with all your stuff jumbled together
If you’ve been following my posts about my Kindle Fire, you know that I rooted it and sideloaded some apps that Amazon thought I didn’t need, like Gmail (see part 1 and part 2 for more info). I’ve also ditched Amazon’s stupid bookshelf UI for an alternate launcher, and I’ve taken control and chosen my own wallpaper — no, Jeff Bezos, you do not get to decide what I look at when I turn on my Kindle Fire!

The default bookshelf UI is fine if you want to browse the content on your Kindle Fire or if you want to see what books or videos you’ve read or watched recently or—and this is why Amazon makes it the default UI—if you want to browse Amazon’s store for new content to buy, and I do still sometimes use the default bookshelf (if you look at the screenshot of my replacement launcher, you’ll see an icon in the upper left for “Launcher”—this is my shortcut to Amazon’s default bookshelf UI).

The Go Launcher on my Kindle with my own custom wallpaper and icons where I want them
Instead, I use the GO Launcher, and I use a wallpaper of my own choosing.
However, if you want to launch a particular app quickly or use widgets that you’re familiar with from your Android phone, the bookshelf UI doesn’t cut it, which is why so many techies have ditched the bookshelf for an alternate launcher. If you look at the default screen on my Fire, you’ll see I wanted quick access to The New Yorker app (see part 3 to understand why), to Gmail (and not Amazon’s lame email app), to Dolphin (and not Amazon’s silky default browser), to a real Facebook app (and not Amazon’s less than helpful shortcut to Facebook Mobile), and to some other apps I use frequently. The launcher I’ve chosen is a popular one, the GO Launcher EX, but basically any launcher that lets you place icons where you want them would have worked for me.

If you do decide to go with an alternate launcher, something that will quickly drive you crazy is that Amazon in their Apple-like wisdom changes the wallpaper on your Kindle Fire to one of 21 fun different photographs each and every time you turn on your device. If you’re using their default bookshelf UI, you see that wallpaper only on the unlock screen and so not being able to customize it wouldn’t be the end of the world, but if you use an alternate launcher, you see the wallpaper every time you go back home, and some of Amazon’s choices just do not work well as backgrounds to put icons on top of. You can override the wallpaper, but that’s only temporary—the next time your Fire goes to sleep you’ll be back to a default Amazon-chosen wallpaper as soon as you hit the power button, unless you jump through some more hoops to impose your own will on the hardware you’ve purchased.

APK MultiTool screenshot
APK Multi-Tool runs from the command line, but that shouldn’t scare you
Luckily, someone at XDA-Developers came up with the steps you need to follow to choose your own wallpapers for your Kindle Fire—actually these instructions are laid out more clearly on this page from Samsung-Tablets.com. If you haven’t rooted your Kindle Fire, you can’t change your wallpapers, and also you’ll need the APK Multi-Tool. I say “wallpapers” plural because you have no choice but to have 21 wallpapers for My Kindle Fire's unlock screen now has my contact info on it
My Kindle Fire’s unlock screen now has my contact info on it
the Fire to choose from each time it awakens, but I actually just used the same exact image 21 times, all of which had to be named exactly what the Fire expects: wallpaper_01_2422.jpg, wallpaper_02_1953.jpg, etc.—see the instructions pages above for the exact names.

I had two goals for a wallpaper for my Kindle Fire, and I was able to meet both of them. I wanted my contact information on my wallpaper. I don’t think that I’ll ever set my Kindle Fire down someplace and forget it, but if I do, I want my name and contact info to appear when someone turns it on. And I wanted a nice neutral background that wouldn’t interfere with the icons for my apps. I got what I wanted, despite Jeff Bezos’s Steve Jobs-like insistence that he knew best for how I use his product, and that’s another reason I love my Kindle Fire.

Friday, November 25th, 2011
Why I love my Kindle Fire (part 3) — New Yorker edition

New Yorker app on my Kindle Fire
New Yorker app on my Kindle Fire
New Yorker app on my Kindle Fire
The New Yorker on the Kindle Fire is optimized for its screen size and includes icons for extras such as audio and video.
One of the things I’m loving about my Kindle Fire is the New Yorker app, and I’ve also found that when it came to the New Yorker app my newfound experience sideloading apps from my Droid to my Fire came in handy in reverse.

I’ve been a long-time reader of The New Yorker and a subscriber for several years now. My uncle Bill always gave me his copies of The New Yorker after he was done with them, and after he died, I got my own subscription to the print edition. It’s a great magazine, useful, of course, for planning trips to New York City, but also containing great reporting and great fiction writing. Part of what makes a subscription so valuable is that in addition to getting current issues you also get online access to every issue they’ve ever published. The web version of their archived magazines is clunky, but you can view every page just as it was printed. [I dislike their unwieldly Flash-based archives website so much that when I access it, I do so only to print the pages of an issue to PDF, and then I just view the magazine at my leisure in Adobe Acrobat Reader.]

If you’ve read The New Yorker in the last year or so, you’ve probably noticed them touting their wonderful iPad edition. New Yorker app not available on Droid
Sorry, the Android version of the New Yorker app, isn’t available on the Droid (or is it?—see below)
And then earlier this year the Intertubes were abuzz with the news that Condé Nast was releasing an Android version of their New Yorker app. That made me excited because I had a Droid, but alas, as The New Yorker’s apps page points out, their tablet editions are available only on iPad, Galaxy Tab and now on Kindle Fire. So no New Yorker app for me, until now.

I didn’t buy a Kindle Fire only for the New Yorker app, but it was one of the reasons, and the app is quite nice. At no extra cost over your print subscription you get all the article in the print edition but formatted nicely Example of a poem on New Yorker app on Kindle Fire with icon for audio of poem being read aloud for the Fire’s screen. You can swipe left and right to switch between articles, and in an article you can swipe down and up to advance in an article or go back to previous parts of the article. And a bonus of the New Yorker app is that you often come across icons for special features—for example, when viewing a poem, you can often listen to its author read it aloud.

The staff of The New Yorker seems to be taking special care to lay out the magazine especially for its tablet editions. In addition to the articles being specially formatted for viewing on tablets so too are the ads. I noticed because I happened to have the hard copy of the November 21 edition beside me as I started exploring the Kindle Fire version, and I saw that the ads from that issue for Banana Republic and Buick were similar but different in print versus on the Fire. Having a somewhat different Buick ad made sense because in the print edition it was a two-page spread, which would have to be adjusted for a tablet, but even though the Banana Republic ad would have fit with some cropping, the tablet version, although it features the same models, uses a completely different image (click images below to embiggen):
Print edition of the Buick Enclave ad
Print edition of the Buick Enclave ad
Kindle Fire edition of the Buick Enclave ad
Kindle Fire edition of the Buick Enclave ad
Print edition of the Banana Republic ad
Print edition of the Banana Republic ad
Kindle Fire edition of the Banana Republic ad
Kindle Fire edition of the Banana Republic ad

So I learned when I first got my Kindle Fire how to sideload apps onto it (see part 1 and part 2 for more info), and today I thought, hmm, Condé Nast doesn’t want me to use their New Yorker app on my Droid 3, do they? Well, let’s just see about that, shall we? And it turns out that the same process to back up an app (such as Twitter) on my Droid and then install it on my Fire worked for backing up the New Yorker app on my Fire and then installing it on my Droid. When I fired up the New Yorker app on my Droid, it did require me to install Adobe Air (that makes sense) and the Amazon Appstore (why does it care about this?).
Installing New Yorker app on my Droid 3
Installing New Yorker app on my Droid 3
The New Yorker app won't run without the Amazon Appstore being installed
The New Yorker app won't run without the Amazon Appstore being installed
New Yorker app running on my Droid 3
New Yorker app running on my Droid 3

I understand why Condé Nast doesn’t really want people running their New Yorker app on smartphones as opposed to tablets. The text is a bit small, although I still found it legible, and the app is a bit slow on my Droid 3 compared to my Kindle Fire, although it was okay. I won’t be doing the majority of my New Yorker reading on my Droid because it’s so much nicer to read it on my Fire’s larger screen, but it’s nice to have options. Although I often have my Fire with me, I don’t always carry it, but I always have my Droid with me no matter where I am.

Saturday, November 19th, 2011
Why I love my Kindle Fire (part 2) or How Amazon drives me a bit mad

So if you read yesterday’s post, you know that I like my Kindle Fire because of the freedom I have with it. That freedom comes in part because Amazon didn’t batten down the hatches so tightly on the Fire that adventurous geeks couldn’t sideload apps on it or root it. It does drive me a bit mad that Amazon decided to go all Apple-like, trying to tell Kindle Fire users what was best for us in terms of which apps we should and shouldn’t have access to Why does Amazon hate Gmail and Twitter? (No Gmail app, Amazon? Really?! No Twitter app?), but if you can follow instructions you can get around Amazon’s strange paternalism and put what you want on the Fire.

If you buy a smartphone or a tablet running the Android operating system (made by Google), it wouldn’t be unreasonable for you to expect that it would include the app for Gmail (also made by Google). But if you’ve read about the Kindle Fire, you know that while it runs a version of Android, the version of Android that it runs has been customized by Amazon for various reasons. One of Amazon’s customizations is that the Kindle Fire does not come with a Gmail app. Just a sucky generic email app through which you can download email from Gmail, but without all the cool features (like labels and archiving) that Gmail users have come to expect. Why, Amazon, why? (Greg Knieriemen of The Register was so dismayed by this that he wrote an open letter to Jeff Bezos about it.)

Luckily since I followed the steps to root my Kindle Fire (see yesterday’s post), today I was prepared to jump the hurdles placed in front of me by Amazon and get the Google apps that should come with any Android device installed on my Kindle Fire. XDA-Developers.com has step-by-step instructions for installing the Gmail app on my Kindle Fire
Fuck you, Jeff Bezos—I’ve got the Gmail app on my Kindle Fire despite you!
GoogleServicesFramework.apk, the regular Android Market, and the standard Google apps that you want including Gmail and Google Books and Google Maps (and even Google+ — does anyone actually use Google+?).

Another app, in addition to the standard Google ones, that I wanted on my Kindle Fire but that Amazon doesn’t seem to want me to have is the Twitter app. Even though you can find the official Twitter app for Android Amazon claims that the Twitter app is incompatible with the Kindle Fire
Amazon claims that the Twitter app is incompatible with the Kindle Fire
for free in the Amazon Appstore for Android, if you try to install it that way on your Fire, you’ll be greeted with Amazon’s fuck you message that says, “Twitter is incompatible with your device.” Oh, really, Amazon?

The side loading of apps that I wrote about yesterday came in handy in proving Amazon wrong about this.

First, I went to ASTRO File Manager on my Droid 3 and backed up the Twitter app that runs perfectly fine there:
Backing up Twitter app on my Droid 3 using the ASTRO File Manager

Then the Samba Filesharing that I’d installed on my Droid 3 and on my Kindle Fire made it very simple to copy the backed up Twitter app APK from my Droid 3 to my Kindle Fire:
Copying Twitter APK from my phone Copying Twitter APK to my Kindle Fire

Then a tap on the Twitter APK on my Fire let me install it, and presto! I had the official Twitter app for Android on my Kindle Fire, despite Amazon’s having claimed that it wasn’t compatible. What does Amazon have against Twitter? Why not just let us install the app, since it clearly does work?
Installing Twitter APK on my Kindle Fire Twitter App running on my Kindle Fire

But that’s the beauty of the Kindle Fire. Even though it may seem that Amazon wants to be Apple and dictate to its customers what we may put on the hardware we’ve purchased, Amazon used Android as the basis of its Kindle Fire, and thus all the techie types who buy Kindle Fires can make them do what we want. We can even replace Amazon’s stupid bookshelf UI with an alternate launcher (but that will be another blog post).

Friday, November 18th, 2011
Why I love my Kindle Fire (part 1)

Kindle Fire I have joined the Amazon Kindle Fire craze. I’m not opposed to Apple iPads—if you have an iPad and like it, good for you—but I’ve had my Kindle Fire for a few days now and am loving it. One reason I like it is because of the freedom I have with it.

I like that right out of the box the Kindle Fire can be connected to a PC via a USB cable and is then accessible as a external drive. No fancy iTunes needed—just drag and drop stuff.

I also like that you can sideload apps on the Kindle Fire fairly easily. Yes, by not including out of the box access to the Android Market, Amazon did take a page from the Apple playbook and tried to limit what can be installed to those apps that are found in Amazon’s Appstore for Android, but without even rooting your Kindle Fire, you can sideload apps on it (i.e., install applications not found in the Amazon Appstore). Laptop Mag has a decent page that explains how to sideload apps. PC Mag has a page that explains not only sideloading but how to make backups of apps from your Android phone to install on your Kindle Fire.

Dolphin Browser is one app that I sideloaded. Amazon Silk, the new browser by Amazon pre-installed on the Kindle Fire that uses split architecture to let Amazon’s servers pre-process web pages, is nice enough, but I’m used to Dolphin on my Droid 3 and wanted the option to use it too on my Fire.

It’s also cool that the Kindle Fire has been rooted so quickly. I’ve already rooted mine, using these instructions. Your mom won’t be rooting her Kindle Fire (unless she’s a techie), but she doesn’t really need to, but I wanted to because some apps I run on my Droid 3 require root access.

One app that I really like that I have running on my Droid 3 and now also on my Kindle Fire is Samba Filesharing. (If you didn’t already know, Samba is the Windows network file system.) With Samba on my phone and now on my Kindle they just appear as servers on my LAN. I don’t have to use a cable to copy photos off my phone to my PC or to copy videos to my Kindle Fire. So much easier!

ShootMe, which I also have running on both my Droid 3 and my Kindle Fire, is another app I like. It lets you make a screenshot by shaking your phone (or Fire). I wouldn’t have been able to do the screenshot of my Fire with Samba running on it that you see above if I couldn’t do screen shots on it. (The developer of ShootMe pulled the ADK from Amazon Market, but you can find it if you google for it.)

RockPlayer Lite is another app that I sideloaded right away (this did not require rooting). I have some AVI videos that the video player pre-installed on the Kindle Fire could not handle, but with RockPlayer Lite I can watch any video I have.

I have not yet gone through the steps it will take to get Google’s apps such as Gmail installed on my Kindle Fire. The email client pre-installed on the Kindle Fire sucks, and I do miss Gmail. But I love that it won’t be all that difficult for me to configure my Kindle Fire exactly the way I want it, and not the way that Amazon thinks I should want it. I’ll be blogging more about my Kindle Fire as I make more changes to it.

Monday, November 23, 2009

A friend e-mailed a link to a New York Times article she liked and said she’d have posted it to Facebook, if only she knew how. Posting links on Facebook isn’t particularly intuitive, but it’s also not particularly difficult once you know the tricks:

Step 1: The icon for attaching a link doesn’t show up until after you click in the “What’s on your mind?" box:
Screen shot of step 1

Step 2: Now that you’ve gotten the stupid attach link icon to show up, click on it:
Screen shot of step 2

Step 3: Finally Facebook gives you a box in which you can paste a URL (the address, starting with “http://” of a page on the Intertubes):
Screen shot of step 3

Step 4: Many times Facebook is pretty smart about determining an appropriate title, introductory text and preview thumbnail image for a page, but sometimes it gets one or all of these wrong. Luckily you can edit the title and introduction and choose which preview image (or no preview image at all):
Screen shot of step 4

Step 5: You can also say why you’re bothering to post the link — what about the webpage whose link you’re posting makes it worth your Facebook friends’ time to read it?:
Screen shot of step 5

Another trick is that you can simply paste a URL directly into the “What’s on your mind?” box, and Facebook will figure out that you’ve attached a link, but that’s not nearly as pretty. Whatever works for you, though.

Once you’ve mastered linking on Facebook, you can set up endless Internet loops, with links on your Facebook to your blog, and links on your blog back to your Facebook links, which link back to your blog, which …

Saturday, May 30th, 2009

Grantability
I had to make a custom Readability script for Granta

Before

After
Earlier this month I wrote about a bookmarklet I like very much called Readability. Today I adapted it further to work better with a magazine I read from time to time, Granta. Because of how Granta’s HTML is written, the Readability script wouldn’t grab the entire text of an article, but it was easy enough to change arc90’s javascript to do so. Actually, it makes for a much simpler script, although one that works only on articles on Granta.com, because instead of having to figure out which <div> contains the article’s text, it just grabs the contents of all of the class “gntml_centreDocument” <div>’s. If you’re interested, you can view the javascript.

Earlier this month I also posted what I’d written a year ago after my uncle Bill’s sudden death, and reading Granta is something I picked up from him. He kept every copy of Granta from its re-launching in 1979, and, as a “magazine of new writing,” every issue of Granta is still worth reading, even after the writing in an issue is no longer new. Now Granta subscribers have access on Granta.com to the magazine’s archives, and, especially with my fancy new Grantability script, I don’t mind reading on my computer, but there are also plenty of times when it’s relaxing to sit down with a hardcopy issue, whether it’s one that’s just shown up in my mailbox or one from my uncle’s archives.

Tuesday, May 5th, 2009

You may have heard of bookmarklets, bookmarks that don’t bring up webpages for you but rather run some javascript (hence another name for them, javascriptlets) for you on whatever page you’re already on.

For example, one that I use often, made up of this javascript:

javascript:void(location.href=location.href.substring(0,location.href.substring(0,location.href.length-1).lastIndexOf('/')+1))
brings me up a level at whatever website I’m at. That is, if I’m at http://www.davidlauri.com/blog and access that bookmarklet, I’ll find myself at http://www.davidlauri.com.

A bookmarklet I really like:

by
I recently discovered a great bookmarklet called Readability by a web development firm called arc90. What it does is take a page that looks like this:

and turn it into a page that looks like this:
,
in other words making it much more readable. Absolutely fabulous!

Of course to do what it does takes more than a single line of javascript, and if you go to the Readability page to get the bookmarklet for yourself, you’ll see that what the bookmarklet does is call a bunch of javascript stored in a file on arc90’s server that then strips the existing styles from whatever webpage you’re on and applies a new CSS stylesheet also stored on arc90’s server.

Also, if you try Readability for yourself on the page I used for my example above, you won’t get the exact same results; instead you’ll see icons for three tools at the upper left of the page and the Readability and arc90 logos at the bottom of the page. I didn’t like seeing the icons or the logos, nor did I like running a bookmarklet that goes to arc90.com every time I want to make a page Readable, so I adapted their stylesheet and javascript for my own use, something you too can do if you have any javascript and CSS experience and if you have access to your own web server. Otherwise, you can make do with arc90’s originals and will still find reading things online a lot more pleasant.

Monday, July 30th, 2007
Kyocera KPC650 EVDO modem
A solution with a problem
You may know, because I've written about it before, that I have a Kyocera KPC650 card which I use on Verizon's EVDO network. Today I was reminded about something I don't like about it, so I figured I'd mention again the workaround I normally use.

At the office, of course, I don't have to bring my own Internet access, but I put my KPC650 in my computer bag whenever I leave the house just in case, and this morning, with the cable modem out at work, is such a case. I pop in my KPC650, start my dialup networking connection, and I have Internet when the rest of the office doesn't. I go to Microsoft Outlook to check e-mail, and then my computer freezes, for several minutes.

D-Link DIR-450 WiFi EVDO router
A solution for the problem
In the couple of months since I've been using my DIR-450 router, I'd forgotten this annoying and repeatable problem — random freeze-ups with Microsoft Office and Windows (Firefox works fine even when Office and the start menu are frozen solid) whenever I have my KPC650 plugged directly into my notebook. If I use the KPC650 in my DIR-450 router, I don't have these freeze-ups. So the workaround is, if you've had freeze-up problems with the KPC650 and you don't have a WiFi EVDO-capable router, get one.

Now if I were nice, I'd not only drop my KPC650 in my bag each morning, but I'd also pack my DIR-450 and share my Internet with the entire office, but it's not worth that much trouble given how infrequently Time Warner is out. I did bring the DIR-450 a month or so ago to New Orleans, where it was useful in avoiding excessive hotel Internet charges.
Saturday, May 19th, 2007

Okay, today I'll take a break from Microsoft bashing but stick with the topic of new technology I'm slightly behind the curve on, in this case EVDO, Kyocera and D-Link.

Actually EVDO I wasn't behind the curve on but was a fairly early adopter. EVDO, if you don't know, is (fairly) high speed wireless broadband offered by cellphone companies like Verizon and Sprint. The idea of having Internet access wherever you go (and not just where there's WiFi) excites geeks. Back when I was rich and worked in corporate America (and before there was WiFi even) I paid a high monthly fee ($75/month, if I remember) to a company called OmniSky for CDPD service on my iPaq Pocket PC. That service was only 19.2Kbps and unreliable, not really worth the money, but my EVDO is about 412Kbps down/128Kbps up (EVDO Rev. A promises to be even faster), fairly reliable, and a money saver: $60/month (less than OmniSky), and I don't pay for DSL or a cable modem, nor do I have to pay for WiFi when I travel (a double bonus because many hotels that do charge for WiFi nevertheless don't have good access in all their rooms).

The card I use for EVDO is Kyocera's KPC650 card on Verizon's network. If you're a later adopter than I am, a tip for you is not to use Verizon's crappy VZAccess Manager software; just set up a dial-up networking connection — the user name is your EVDO card's phone number@vzw3g.com (e.g. 9375551212@vzw3g.com), your password is vzw, and the phone number to dial is #777.

As I said, it's been fairly reliable, but my connection sometimes drops, sometimes after 30 minutes or so, sometimes after an hour, sometimes less, but also (rarely) sometimes not until a few hours have passed. A tip I read to keep the connection going is to do a "ping -t" (or better yet run a batch file with a loop with sleeps between some pings) in a DOS window in the background. At any rate, my wireless broadband experience has been positive for the most part.

However, I did notice that I've had to reboot my notebook more often when I use EVDO. In the office plugged into the net via an Ethernet cable I never have to reboot my computer. With the KPC650 card in, though, after the 2nd or 3rd or 4th disconnect, I find that Network Connections shows me as still connected but I have no signal. Sometimes pulling up Safely Remove Hardware (another tip: type "C:\WINDOWS\SYSTEM32\RUNDLL32.EXE SHELL32.DLL Control_RunDLL hotplug.dll" in Start->Run to bring this up quickly), stopping the card and then reinserting it does the trick. More often than not I have to reboot.

 

Besides their EVDO PC Card, Kyocera also makes a WiFi router, the KR1, which lets you use an EVDO PC Card to provide Internet access to a small group of people. At home I mainly use only one computer at a time, so paying $300 for a KR1 didn't make sense.

But the thought crossed my mind more than once that by having an EVDO WiFi router, I could avoid having to reboot my computer due to EVDO disconnects. Worst case, power cycle the router. So I did some checking and Kyocera's retail price for KR1s has dropped to $229, and they seem to be going for about $150 on eBay. And since the KR1 first came out, D-Link came out with an EVDO WiFi router too, the DIR-450, which goes for about $120 on eBay. So I did some bidding and got myself one for $100 plus shipping.

I'm very pleased with the DIR-450. It was fairly easy to set up (tip: don't use the same user name for both admin and user profiles; the DIR-450 will think you're a user and not admin). Since I've had it, I no longer have to reboot my computer because of problems with the KPC650. I do still get disconnected sometimes (although it seems to be less frequent). When that happens, I have to log into the DIR-450, tell it to disconnect the KPC650 and then tell it to reconnect. Or I can just power cycle the DIR-450. The former is probably better for the DIR-450 but the latter's less hassle.

Wednesday, April 11th, 2007

If you've visited my classes page lately, you'll have noticed that I'm taking Hebrew this quarter.

Although it's not part of the class, I've spent some time figuring out how to set up my computer to type Hebrew. It wasn't all that difficult — you have to go to the Languages tab on the Regional and Language Options control panel, check "Install files for complex script and right-to-left languages," and then click "Details" where you can "Add" the "Hebrew" keyboard layout. You need your Windows XP installation CD. After a reboot, you'll see a new Language taskbar, and you'll be all set to type in Hebrew.

Before you reboot, though, you might want to activate some keyboard shortcuts to make switching between languages easier. You do that on "Key Settings" in the dialog box where you add keyboard layouts. Check "Switch input languages" and then choose whether you want to use CTRL + SHIFT or Left ALT + SHIFT to switch languages. If you don't do this when you first set up language support, or if you want to change this afterwards, you have to reboot for the changes to take effect (ugh @ Microsoft).

Language bar
Click on
this every
time I want
to switch
languages?
No!
When I started I ended up with CTRL + SHIFT as the hotkey for switching languages, and I repeatedly found myself in Firefox with Hebrew turned on when I didn't want it. Finally I realized that's because CTRL + SHIFT + TAB is Firefox's shortcut for switching to the prior (next one to the left) tab, something I do all the time.

So I brought up language settings again, switched the hot key to Left ALT + SHIFT, rebooted, and was happier. But not completely happy. I don't think ALT + SHIFT is part of any other shortcut I use, but I still would find myself suddenly with Hebrew as the active keyboard layout when I hadn't intended for it to be. Not a horrible big deal. Look down at the language bar, confirm that yes, HE is showing, press Left ALT + SHIFT, see it switch to EN, backspace over stuff and start typing again.

But today, after a couple weeks of it, I figured I couldn't be the only person annoyed by it. One solution is simply to turn the hotkey off for switching languages, but that would mean having to use the mouse when I did want to type in Hebrew, not something I find acceptable (I really, really like being able to use the keyboard to do things). Luckily, after some determined Googling, I found that in fact Mike Matsnev (a student or a professor in the Computational Mathematics and Cybernetics department at Moscow State University) was so annoyed by all this that he wrote a utility that lets you set up any key to be the hotkey to toggle languages. I went one more time to language settings, turned off the hotkey, rebooted and then typed "lswitch 19", and presto, my Pause key, a key I never use for anything ever and won't accidentally hit, switches me between English and Hebrew. Beautiful!

Of course just because it's easy to switch between English and Hebrew keyboard layouts doesn't mean that it's easy to type in Hebrew. Besides the fact that I'm learning a whole new alphabet (alefbet)...

Sorry, while I'm on the subject of the Hebrew alefbet, if you're not familiar with it, you may have heard that it has only 22 letters. The English alphabet has 26 letters, you might say to yourself, how hard can it be to learn the Hebrew alefbet? Well whoever says Hebrew has only 22 letters is misleading you. First there are 5 letters that have a different form if they fall at the end of a word. Then there are 3 letters whose pronunciation changes if a dot is added to them. That makes 30 letters by my count. But these are just consonants. Modern Hebrew omits vowels. But if you're learning Hebrew, in particular Biblical Hebrew, which includes vowels, you have to learn additional "letters" or "points" (Niquid) for the vowels. There are over 16 combinations of those points for vowels. So by my count the alefbet has over 46 letters.

But that's not all. Just as some letters in English appear differently when printed as opposed to when written in cursive handwriting, so does Hebrew. To my mind (just now grappling with learning Hebrew), the differences between Hebrew printing and handwriting affect just about every letter, so that's almost double what I have to learn.

... I have to learn the Israeli keyboard layout, which is designed for the convenience of native speakers and typers of Hebrew, not for American English speakers. (For example, to type a Bet including its Dagesh dot, I have to type [with caps lock on] SHIFT-C SHIFT-=.) There are some helpful sites that have charts of how to type Hebrew, but I didn't find any that had everything. Plus I found a font for Hebrew handwriting, Shalom, which lets me prepare cheat sheets, etc., as they'd appear if I'd written them out. The deal with Shalom, however, is that it's mapped differently than the Israeli keyboard, with letters mapped to keys based on how they sound (to type a Daled in Shalom you press "d" instead of the "s" you'd press in the Israeli layout).

So I created a handy-dandy chart of my own that lists all the letters both typed and handwritten along with the English letters I have to type on my keyboard to get either print or handwriting. And the last column has the sound each letter makes. Nifty, huh?
Friday, April 21st, 2006
Well I just discovered that Firefox 1.06 for MacOS doesn't have the <RIGHT COMMAND>-arrow key problem for switching between tabs. You can actually hit <CTRL>-right arrow or -left arrow to switch tabs. Yay!
Wednesday, April 19th, 2006
Mac users are chained to their mice

I'm taking one class this quarter at Wright State, and it meets in Allyn Hall, which has one of the university's few Apple Macintosh labs. I get to class fairly early, mainly because of parking but also to give myself some time to check e-mail and read.

Many people these days have never used a Mac, but I used Mac even before Windows, having worked at a publishing company when the original Mac came out. I even touted the advantages of Macintosh to my friend Jimmy when he was editor and I assistant editor of Rightfully Proud (a trashy bar rag that was Dayton's premiere gay newspaper at the time). Microsoft's Windows was a poor imitation of Apple's MacOS, made up of copied and stolen features.

I've been using Windows for a long time now, however, and having revisited MacOS in the lab in Allyn, I have to say there are some things Apple should copy from Microsoft now, and enabling keyboard users is probably the biggest thing! I'm on my computer (a fantastic Dell Inspiron 9300 widescreen notebook) all the time for work, school and other projects, and I can do tons of stuff using only the keyboard, in less time than it would take to put my hand on the mouse, much less move it and click. Sitting in front of an OS X Mac, I get frustrated because so many things I can do easily on Windows using the keyboard * simply cannot be done without a mouse on Macintosh!
  • Select a menu, any menu: On Windows, sure there are special accelerator keys defined for certain items, just as on Mac, but you can get to any item even if it doesn't have an accelerator key by pressing <ALT> and the appropriate keys. On Mac, there are a lot of accelerator keys defined (a lot! — who can remember them all?), but if there's a function that doesn't have an accelerator key defined, you're shit out of luck.
  • Jumping to the next word, the previous word, the beginning of the line, the end of the line: On Windows <CTRL> plus left or right arrow keys will jump forward or back a word and with <SHIFT> down will select text; <HOME> and <END> will do the same to the beginning and end of lines. Office programs such as Word on MacOS work similarly (thanks Microsoft!), but try to do the same in say, the address bar or a form field in Safari, and you get nothing.
  • Speaking of form fields, on Firefox and IE in Windows, you can <TAB> to the next field, including radio buttons and checkboxes, which you can then select with the <SPACE> bar. On Macintosh even in Firefox, you can <TAB> between text input fields, but it skips blindly past checkboxes, which you can't check without a mouse.
  • Apple can't claim to be too good to copy from Microsoft since they did implement <COMMAND>-<TAB> to switch between running programs, but their implementation of that Windows 3.1 feature has broken the ability to insert a tab character within a table cell in Microsoft Word. You do this with <CTRL>-<TAB> on Windows, but on MacOS neither <COMMAND>-<TAB> nor <CTRL>-<TAB> works (yes, Mac keyboards have <CTRL> keys, something the original Mac's clunky keyboard lacked, but MacOS doesn't make much use of them). I ended up copying and pasting a tab from another cell.
  • MacOS does have the latest version of Firefox, a great browser whose fame comes in large part from its tabbed browsing experience, but if you want to switch easily between tabs in Firefox on MacOS, don't try <CTRL>- or even <COMMAND>-<PAGEUP> or <PAGEDN>. The blame for this falls not on Apple but on the Firefox developers, but the great shortcut chosen to switch tabs is <RIGHT COMMAND> plus right or left arrow. That's the <RIGHT COMMAND> button only, not the <LEFT COMMAND> button — what contortionist thought of that? Clearly a Mac user who prefers the mouse.
  • Googling around I did hear tell of a MacOS feature called Univeral Access, through which I'm supposed to be able to press <CTRL>-<F2> to access menus, like <ALT> in Windows (so I guess Apple wasn't too proud to copy from Microsoft yet again), but I couldn't get it to work on the iMac at school, even after pressing <CTRL>-<F1> to turn it on and even after digging up the Universal Access control panel. Accessing menus with the keyboard is something so special that it can't be turned on by default, co-existing with mouse access?
Now I don't hate Apple, and I don't think Microsoft or Windows is perfect, and of course I do use the mouse (or trackpad in my case), but Windows seems much more user-friendly in this area, which given the reputations of Microsoft and Apple is really surprising.

*Most of the functionality I use on Windows but find lacking in MacOS is built into Windows, but I do use two great utilities that make my keyboarding even more powerful: WinKey and AutoIt. WinKey is by Copernic but is no longer supported, though you can still find it various places online. AutoIt is a great freeware automation (scripting) language. With the two I can press a key combination and do things like instantly move and resize windows or quickly enter logins and passwords. They're great alone and even better together!
Wednesday, October 20th, 2004

My blog now uses permanent URLs

If you're not geekish, you probably won't find this interesting, and if you're über-geekish, you'll probably think I'm slow, but otherwise there's a chance you'll find it interesting that I've set up permanent URLs for my blog pages. I'd come across an article some time ago on alistapart.com that explains why it's important to have permanent URLs, but I'd never gotten around to changing my site. This week I came across another article (both articles are a few years old, but hey, I already said I was slow) that suggested a slightly different way of implementing permanent URLs.

What kind of URLs did it use before?

In case you're wondering, my blog's non-permanent URLs used a querystring to tell my PHP script what month to display. These URLs would be something like /blog/index.php?month=200410. Bill Humphries, in the first article I read, points out that such URLs don't get indexed by some search engines (although Google has always indexed my blog despite that) and that such URLs make it apparent what kind of architecture the site is on (I already told you, but the ".php" suffix tells you I'm using PHP scripts).

What's a permanent URL?

The new permanent URLs for this blog don't use a query string but use the month as the last part of the URL. For example, this month's permanent URL is /blog/2004-10. Humphries explains what to put in the .htaccess file to transform "/blog/2004-10" to "/blog/index.php?month=200410". The lines I used are:
RewriteRule ^blog/(200[2-9])/([0-1][0-9])(/)?$ /blog/$1-$2 [NC,R]
RewriteRule ^blog/(200[2-9])-([0-1][0-9])(/)?$ /blog/index.php [NC]
If that makes any sense to you, you'll notice that you could actually get to this month's blog with the URL /blog/2004/10/ (with or without the trailing slash). If you use slashes to separate the year from the month, though, your browser will get redirected (that's what the [R] option to RewriteRule does) and display the URL with a hyphen. (Before I did that, the pictures didn't show because the server thought the page was one directory level deeper, probably something I could fix a better way, but using the hyphen avoided that.)

You may notice that my .htaccess statements don't actually turn the permanent URL into a URL with a querystring. That's because Till Quack in the second article suggests having the PHP script do the work of parsing the URL instead of doing all the work in .htaccess, and that appealed to me. The PHP script has to deal with validating dates anyway. I did set up my .htaccess so that it doesn't bother to redirect for years before 2002, which is when I started blogging, but then my PHP script makes sure that the requested date has blog entries, redirecting to my 404 error page if not.

Why does it matter?

What made me look at all this again is that until now my current blog page has always been just "index.php". Google does index my site, and I do get some visitors, but it takes a while after a month ends before Google notices that the content that used to be on the main "index.php" page can be accessed only through a "index.php?month=x" page. That meant that, for example, at the beginning of September people searching for items on Chris Harbinson (who, by the way, loudly proclaims [protesting too much?] that he is not gay) would be directed to "index.php" instead of "index.php?month=200408", the page for August on which he is mentioned. Now, as you'll notice if you look at the top of your screen, the current month's blog is referred to by its fancy new permanent URL, which doesn't change at the end of the month, making Google have to do less work and making sure that visitors to the blog get the page they searched for. Woo hoo!
Thursday, September 16th, 2004
I've had the Mozilla Firefox web browser installed on my computer for some time but had stubbornly continued to use Microsoft Internet Explorer 6.0 for the most part, starting Firefox only once in while to see how my site looked in it. Today however I've finally made the switch to using Firefox as my default web browser.

The thing that clenched it for me was that for the past week or so IE has been locking up sporadically. Before you say it was something wrong with my computer and not IE let me tell you that it also happened at school too. And near as I can tell it wasn't just with one site, although there are of course a set of sites I visit regularly. It wasn't enough of a problem to keep me from doing what I wanted to do, but it was annoying, and today I decided it was annoying enough to make me switch.

However, Firefox also has some nice features not in IE. I really like the tabbed browsing instead of having multiple windows, although if you prefer multiple windows, Firefox of course lets you do that too. I like Firefox's built-in pop-up blocking (yes, I know that SP2 is supposed to add that to IE), which works better than the free version of Pop-Up Stopper I'd been using. Firefox's find feature is much more nifty than that of IE (speaking of which, doing a find for "it's" in IE always seems to make IE crash, at least for me). I'm sure I'll discover other nice features.

There were a few things on my site that either displayed differently or just didn't work right in Firefox (or for that matter in Opera, another browser I have installed), but some of that was due to ignorance on my part about CSS. For example, the menu on this page is an unordered list (<UL>) that displays as colored boxes because of CSS. IE didn't display the bullets that a normal unstyled list gets, but Firefox did until I figured out I had to add "list-style: none" to the CSS entry for <LI> (I'd had it on the id tag but not specifically on the <LI> for that id tag). Also my JavaScript in my galleries page wasn't cross-browser compatible until recently.

One last geeky thing is that Firefox's use of <ALT>-B for the "Bookmarks" menu as opposed to <ALT>-A for the "Favorites" menu in IE was driving me crazy (since I'm a big keyboard shortcut user), but I found a terrific page that explains step-by-step how to find and modify the browser.dtd file to change the names and accesskeys of menu items, so now my Firefox has a "Favorites" menu instead of a "Bookmarks" menu, along with the IE-compatible "Add favorite" and "Organize favorites" items. Yeah, I could have just gotten used to Firefox's key choices, but it was more fun to figure out how to change them.
Wednesday, August 11th, 2004
One of the benefits of running this site on a web host instead of just putting it on my ISP's server is that I have access to the web logs, giving me some information about my site's visitors and what pages they're looking at. (Earthlink, my ISP, offers Urchin, which reports basic info such as number of visitors and number of hits. Urchin also has lots of enticing links promising info such as referrals and browser types, but these links all lead to a page asking you to upgrade to Earthlink's web hosting package. While Earthlink is fine as an ISP, I wouldn't recommend them as a web host.)

At any rate, what I've found is that by far the most popular page on my web site is my blog from October 2003. I've also found that the reason for this is Google's image search. Last month I had 541 hits from it, mainly from images.google.com but also from images.google.ca, images.google.com.au, images.google.fr and from several other countries. Of those 541 hits, 386 of them were for the October 2003 blog page. August isn't even over, and I've had 389 hits from Google's image search, of which 243 were for the October 2003 page.

What were these people searching for, you may ask. Nudity! of course. There were some other search entries such as "brown," but most people want to see nude pictures, and Google Images directs them to my site, which really isn't the best place on the net to find nude pictures. There is a little bit of nudity on the October 2003 page, a butt shot of a drunken guy in a limo, but his hands cover most of his buttocks and I used PhotoShop to blur the bit between them. If I were using Google to find something to get myself excited and that was the best it could come up with, I'd be disappointed.

My bandwidth usage was also markedly higher for these two months, although, luckily, not so high as to cost me any extra money. Nevertheless I did what I should have done when I first set up my site, which was to set up hotlink protection. Of course I don't mind people looking at my pictures, but I'd rather they see them in context. However, Google's image search still shows the whole page if someone clicks on one of the thumbnails returned by Google. I decided to hone my PHP skills a bit and came up with a way to redirect visitors from images.google.* landing on my October 2003 page to a special message.

You might also ask why I've posted links in this entry to Earthlink, AffordableHost and Google but not to the October 2003 page that all this is about. Well I figured that page gets enough hits already. If you really want to see Todd's butt and read about why he showed it, use the month navigation links on this page.
Friday, July 25th, 2003
Last Saturday I swapped out my cable box for one of TimeWarner's DVR boxes, which are actually Explorer 8000 Home Entertainment Servers made by They're the ones who really make the box in questionScientificAtlanta. It took two calls (short ones though) and a couple of reboots Saturday morning to get it working, but once it was working it was really fun. Perhaps not as good as a Tivo (certainly not if you believe everything on the web by Tivo owners) but integrated with digital cable and good enough, especially when you consider that Tivo costs $249 up front plus $12.95/month and TimeWarner's DVR costs $9.95/month (or $5.95/month if you have a premium channel). I recorded Bewitched and Match Game and Queer Eye for the Straight Guy and movies and all sorts of stuff. More stuff than I could possibly watch if I weren't off school right now.

Your friendly conglomerate, ready to serve you I did have one complaint which was that the sound would sometimes go out for a few seconds, usually during bits with dialogue on top of music. Annoying but not unbearably so and certainly not to the point that I was motivated to wait on hold with customer service. I went into settings and reduced the sound level for recording, and that seemed to reduce, although not eliminate, the problem. I could live with it.

So tonight around 11 I get home, plop on the couch for a bit, press the "LIST" button, and I don't have any of the shows I'd told it to record this evening. Plus it's time for So Graham Norton and it's not recording that. I hit the "B" button to see scheduled recordings, and all the shows I told it to record, including So Graham Norton, are still there, even those whose times had passed. So I call Time Warner and wait on hold for 20 minutes, even though their Here's what an Explorer 8000 looks likerecording says that someone will be with me in just 1 minute, and the woman who answers, after hearing my problem, puts me on hold for another 5 minutes, perhaps while she reads up on DVR, comes back and asks if I'm sure I know how to record programs (well I'd been doing it for a week so I think I do), and tells me she'll have to send someone out, which she can't do until Thursday. Great. I'm paying for a DVR box I can't use. I ask her if she can reset the box remotely, she does, and I press the "LIST" button. The programs it missed are gone from the list, but Graham Norton, still in progress, is on the list showing that it's recording. So the symptom is fixed even if the cause is not.

I ask the woman if any other DVR customers have had this happen, and she says she's not aware of any and asks if I still want to schedule an appointment for a service person to come out. I tell her that I'll just call back if the problem happens again. And then I do a search on Google Groups and sure enough, this Time Warner customer service person may never have heard of this problem, but other Explorer 8000 users have had the problem and posted about it online, this one reporting that this recording problem happens after about 7-10 days. So either Time Warner's customer service people are ignorant or have been instructed to lie about the problem.

So we'll see what happens. While I have plenty of time to watch TV and to wait on hold with TimeWarner I'll probably keep the box. But when school starts again, my tolerance will decrease. I feel better having ranted though. I guess that's one reason to have a blog.

One more thing I found after posting this: there's a Yahoo! Group for the Explorer 8000. Lots of people have had various problems with the box. For now I'm going to take one tip I read there and reboot the box periodically. Luckily from another tip, I can reboot the box myself (on the front of the box press Volume + and Volume - and Info all at the same time) without having to wait on hold for customer service.
 
Blog tools
Tags
Computer tips (20)
AJ Wagner (2)
Amazon Kindle Fire (4)
Amazon.com (2)
American Express (2)
American Family Association (3)
Amy Grant (2)
Berlin (4)
Books (15)
Candi Cushman (1)
ChMS (3)
Christianists (16)
Christianity (21)
Christmas (2)
COM101 (4)
Conservatives (6)
Cross Creek Community Church (28)
Cute actors (4)
Dan Savage (3)
David Esrati (9)
Dayton (52)
Dayton Art Institute (3)
Dayton Christian High School (2)
Dayton City Paper (5)
Dayton Daily News (16)
Dayton Dialogue on Race Relations (4)
Dayton Gay Mens Chorus (11)
Dean Lovelace (3)
Derek (9)
Dick Chema (2)
Diversity Dayton (2)
Driving (4)
Drunkenness (6)
English (2)
Epiphany Lutheran Church (3)
Exodus (2)
Facebook (13)
Fairborn High School (6)
False prophets (2)
Feeding Friends (2)
Firefox (2)
Flash (2)
Frankfurt (3)
French films (3)
Gary Leitzell (11)
Gay (85)
Gay bars (2)
Geekiness (5)
German (3)
Germany (34)
Good Friday (3)
Google (2)
Government forms (6)
Grafton Hill (4)
Greasemonkey (2)
Greek Orthodox Church (2)
Hamburg (2)
Hebrew (3)
Issue 1 (5)
Joey D. Williams (2)
Köln (3)
Ken Blackwell (2)
Kiva (1)
Lüneburg (20)
Library (2)
München (2)
Mark Luedtke (1)
Marriage (23)
Mary Cheney (2)
Mazer (4)
MeetFred (3)
Microsoft (10)
Mike Turner (3)
Movies (14)
MVFHC (3)
My stupidity (5)
Nan Whaley (1)
Natalie Barney (1)
Neon Movies (10)
Occupy Dayton (4)
Ohio (2)
Olive (2)
Oregon District (4)
Panera (7)
Park Layne (3)
Parking (5)
Parties (2)
Paul Noah (1)
Paul Pyle (4)
Photos (49)
Politics (36)
Proposition 8 (2)
Racism (3)
Remembering (34)
Republicans (4)
Reviews (9)
Scams (5)
Sean Harris (1)
Sirius (1)
Snow (6)
SPAM (5)
Stivers (2)
Teaching (6)
Telemarketing (3)
Tomatoes (2)
Travel (12)
TV Guide (2)
Typing (6)
Uncle Bill (10)
Verizon (5)
Web design (bad) (17)
Web hosts (4)
Whining (61)
Wright State University (6)
Writing (5)
Yellow Springs (2)
Months
Email
david@davidlauri.com