Tech Archives, page 31

All things technology. Very popular here on Justinsomnia.

Searching for Google

Last Friday I saw the traffic to my site spike to previously unheard of levels, surpassing even the Joel Spolsky Effect. And it wasn’t because of my nonexistent OSCON blogging.

I had noticed previously that when you search for “google” using Google’s image search engine, an image I’d borrowed from the web for a long tail thinkpiece turned up in the fourth page of results, contributing on average about 20 hits/day.

screenshot of google images results for google as the search query

Well at some point last week, the image started showing up in the first page of results, and I started getting several thousand hits a day from people searching for images of Google using Google. Here’s a graph of the number of hits to my site from people searching for “google” using Google over the last two months.

graph of hits referred from google images searchs for google

The question remains, why are so many people searching Google for Google?

Update: I decided to whip up a graph showing the number of times Google makes it hard… has been requested versus all other requests. It’s astounding that it’s represented 50% of my requests since early August.

graph of requests of google makes it hard post

Update: The image that was netting all the requests for “Google Makes it Hard” post dropped out of the results sometime between October 7th and 9th. Since then my overall page requests have come back down out of the stratosphere.

graph of requests of google makes it hard post

Reading is a joy with Gmail, writing not so much

Since moving to California two months ago, I began using my Gmail account for personal correspondence, and I’ve come to two conclusions.

Reading email with Gmail is a joy

It groups back and forth emails into single conversations—solving, in my opinion, the email overload problem. It searches my email in a heartbeat. Even the act of adding labels or using the star feature seems unnecessary in the face of full text search. I must admit, though, that the omission of a “trash” button does come across as a heavy-handed attempt at behavior modification. Hello Gmail Delete Button.

Writing email with Gmail is not a joy

Recently I’ve noticed I have a very subtle distaste when it comes to responding to email. As a result, email that I should enjoy replying to remains unanswered in my inbox for intervals longer than I’d prefer. I think part of the reason for this is Gmail’s user-interface.

Prior to switching over to Gmail, I checked and wrote all my email using Pine running on a university server via SSH. Here’s a screenshot of the Pine interface.

pine user-interface

The yellow highlighting is intended to demonstrate the relative area of the composition space as compared to the rest of the user-interface. Now take a look at the Gmail interface (which I’ve edited only to remove personally identifying information).

gmail user-interface

Many of us spend a good deal of our lives in HTML textareas, but what struck me is how “cluttered” or loaded up the Gmail interface is, as compared to Pine. I think for this reason, my enjoyment in responding to emails within that tiny textarea surrounded by so much clutter is considerably diminished.

And I’m not even touching the scrollbar next to scrollbar usability snafu—other than to say the Gmail team might be best served to create an interface that never triggers the browser’s vertical scrollbar (a la Google Maps).

I must say though, worst of all, my beloved resizeable textarea extension does not operate on textareas that have been manipulated with JavaScript. So I can’t even resize my email writing space.

Writing Specifications is Hard

I got to say, this post, Undecipherable Specification Error, by Sam Ruby is brilliant, and a terrific look into the moment by moment minutia of a technology in motion that may just well touch everything.

This post first appeared on From the Belly of the Beasts, a weblog from some of the people who build O’Reilly websites.

why is blogger adding empty divs to my posts?

what is up with blogger? blogger has always been this great free service, and they should be credited with bootstrapping the whole self-publishing phenomenom and making it easy for people to host their blog with minimal technical background required.

and then pyra was bought by google. and then evan williams left and went on to start odeo.

and then for some reason last thursday, june 23, they began injecting some html into my posts that wasn’t originally in my very custom template—the template that allows me to include my blogger-powered neatlinks sidebar into my wordpress-powered blog. it wasn’t a big problem, just a minor annoyance that forced me to remove the little pound sign links to my permalinks.

what they’re doing is adding divs to the beginning and end of each post in order to prevent weird layout problems that might occur between posts as a result of images and floats.

<div style="clear:both;"></div>
post content here, blah di blah di blah…
<div style="clear:both; padding-bottom: 0.25em;"></div>

this is cool, but this is a change that should occur at the template level, and not by adulterating my post content. which means you and i don’t have any control whether that html shows up or not. so if you want to import your blogger posts into wordpress—as someone i helped today did after blogger’s change borked his blog—guess what, those empty divs get imported too.

this was a crap call on their part, and guess what, my support request to them has gone unanswered, as every previous thing i’ve sent to them has.

how to search and replace within a column

let’s say you’ve got a text or varchar column in mysql and you want to replace some portion of the field with new text.

for instance maybe you want to change all instances of the word “colour” with “color”.

column before becomes column after
a purple colour a purple color
colour green color green
bluish colour bluish color

last week at work we got just such a request, that in the past i’d probably solved with a gui search and replace interface (like Microsoft Access) or a small php program that looped through the table rows, modifying and updating each individual field value.

but it seemed like there should be a way to accomplish single column search and replace in one fell swoop, using a single SQL statement. the challenge was on! after quite a bit of “i can’t believe i’ve never written a query to do that before” and thus wondering if such a query even exists, we figured out the solution.

UPDATE table
SET column = REPLACE(column, "from string", "to string")
WHERE column LIKE "%from string%";