Archive for December, 2009

Is Google trying to start a haunting legend?

Saturday, December 26th, 2009

I recently wanted to find out how long a nearby walking trail is, so I pulled up Google maps and put in directions from the approximate start to the approximate end. Although the trail “7th Ave”, the walking directions call it “Haunted Trail”:

Haunted?

I’ve lived in San Diego my whole life but I’ve never heard it called this. I wondered if I was missing out on some sort of thrilling ghost story, so I googled it, but all I got were results for the seasonal haunted house by the same name that takes place a few blocks further south in Balboa park. I’m not sure if Google somehow mixed these two up or if there’s a local legend I haven’t heard yet.

You can see for yourself here.

Io Saturnalia!

Friday, December 25th, 2009

I like this quote so much I’m going to break my vow of not acknowledging Christmas just to post it:

…every religion attaches some godly event to the solstice season. It’s why you’ll get a day off on Christmas, which means it was good for something. So just pause, bow your head, and think about Jesus. And reject him.

-“The reason for the season!” at Pharyngula

Happy Saturnalia everybody

Santa picture 2009

Thursday, December 24th, 2009

Today was the 12th annual Santa picture. For your enjoyment:
Santa = Batman

With that, my holiday season is now over. If your festivities are still ongoing, I hope they are happy or merry or jolly or otherwise enjoyable.

Random web updates

Saturday, December 19th, 2009

VeganWiki got spammed by some botnet a couple days ago. Each instance of spam was from a different IP. I reverted all the changes and blocked all the IPs, but I think it’s just as useless to block botnet IPs as it is to filter spammers’ e-mail addresses: there are always more out there. I briefly Googled blocking spam in MediaWiki, but I haven’t actually read the article yet. Here’s a link in case anybody gets curious.

I upgraded this blog to WordPress 2.9, as well as making minor template changes. My plugin appears to be working with the new version – as I expected it would.

On kjcoop.com, I’m threatening to retool my portfolio, but I’m finding it difficult to toe the line between, “Be thorough and honest” and “Don’t tell your life’s story.” Maybe I’ll just go ahead and tell my life’s story. It’s bound to be interesting since I’m such an interesting person.

Ambiguous date storage

Sunday, December 13th, 2009

I’ve often pondered how to record and work with ambiguous dates in software. I typically have one of two reasons:

  • Scheduling: an item that needs to be done next week or some time in February or a summer Saturday afternoon. The user can schedule it for Monday, or Feb. 1, then, at the end of every day it goes undone, reschedule it for the following qualifying day. This works, but the role software is to automate that sort of responsibility. If the user has to do something the computer could do just as well, the software is lacking.
  • Dating pictures: You kids today and your fancy digital cameras with your fancy exif data and your geotagging. In my day, you had to write the date on the back of the photo. By hand! Like they did in the dark ages. Some pictures from this era have complete or partial dates. Some dates were obviously written decades later. Others you could probably guess and be accurate within about 5 years. In addition to storing a date, each part of the date (day, month, year) may have differing levels of accuracy, and it would be nice to be able to store its certainty with it.

I usually work with MySQL for my application’s data storage, so I’m going to assume that’s the tool we’re storing ambiguous dates in. It’s native Timestamp/Datetime format is YYYY-MM-DD hh:mm:ss. I usually store dates this way. In some contexts I might simplify my life by storing the Unix timestamp instead, but I like the dates to easily human-readable straight out of the database. Any ambiguous date storage system must consider all six pieces of information (year, month, day, hour, minute, second). An obvious table to store this sort of information might be:
create table ambiguous_dates(
    id int unsigned not null auto-increment
        primary key,
    year int(4) unsigned,
    month int(2) unsigned,
    day int(2) unsigned,
    hour int(2) unsigned,
    minute int(2) unsigned,
    second int(2) unsigned
);

Regarding the inclusion of all six pieces of information: while a system for cataloging decades-old pictures won’t have any use for the time of day portion, the idea here is to develop the most complex version I’m likely to need, then scale it back for individual projects if necessary.

I have three issues with this implementation:

  1. Day of the week. The only way to deal with hat is to add another column, but that introduces the possibility that parts of the date will conflict with one another (ie, the YYYY-MM-DD portion is given as 1962-03-23, which was a Friday, but the day_of_week column claims Wednesday.)
  2. Certainty of each field. This is especially important if the parts of the date can conflict with on another as in the example above. We could add another six fields for year_certainty, etc, but that feels heavy-handed to me; I suspect there’s a better way.
  3. According to this article, it just reinvents functionality already built in to MySQL.


create table ambiguous_dates(
    id int unsigned not null auto-increment
        primary key,
    year int(4) unsigned,
    month int(2) unsigned,
    day int(2) unsigned,
    day_of_week int(1) unsigned,
    hour int(2) unsigned,
    minute int(2) unsigned,
    second int(2) unsigned
);
 
create table ambiguous_dates_certainty(
    date_id int not null,
    field varchar(11) not null default '',
    certainty int(1) not null default 0,
);

This is closer to what I want, but it doesn’t join gracefully with the above table (you sure can join, but you’ll get up to seven rows of results for one date, which is awkward), so you risk having to run a second query, which is expensive in terms of processing time, and still gives you two sort of awkward sets of data. Additionally, I’m not sure I like just having an int for certainty. If it’s am multi-user application, one person’s seven may be another person’s three. Also, unless very explicitly programmed otherwise, some users may see 1 as very certain and others may think of 9 as the most certain. And even then, since when do users take the time to read the whole prompt when they think they have the gist of it?

We could add a text column indicating the source of each portion of the date so that we’d know whether it was from a reliable source or somebody’s best guess half a century after the picture was taken, but that also feels excessive to me. What would the corresponding interface for that look like? Is it fair to expect to enter each portion of the date separately, then add meta information about each portion? Especially when they’re likely to be (as in the example of the picture catalog) cataloging dozens or hundreds of ambiguous dates? Eventually, whether programmer or user, you have to accept that some data will always get lost to the sands of time, even if it means never knowing how old grandma was in that picture of her with her dogs.

A compromise might be to just have one column for notes in the ambiguous_dates table. If programming for my own use/enjoyment, I don’t think I’d take that compromise. My usual MO is to try to retain as much information as possible because once forgotten, it can’t be brought back, whereas if it’s retained needlessly, it’s easy to ignore.

I don’t think I’ve made any particularly good suggestions, but it is a starting point. I googled the topic and found very little written on it (but I did find this thread about another kind of ambiguous date), although I may not be using the best terminology. I’d be interested in hearing what the good people of the Internet have to say.

Dr. Carhart to take over Dr. Tiller’s spot as target of pro-life harrassment

Monday, December 7th, 2009

Dr. Carhart, who briefly took over Dr. Tiller’s practice after Dr. Tiller was murdered in May, is now taking his place as primary target of abortion protester harassment.

Until Dr. Tiller‘s murder, I shared the common misconception that a late-term abortion was the result of a late-term change of plans – after six or eight months of pregnancy, the parent-to-be simply changed their mind. After reading lots of stories from people who’d undergone a late-term abortion, I realized that a late-term abortion is typically pursued after the discovery of devastating fetal deformities, and the loss deeply mourned.

One comment (which I can’t find now) described watching Dr. Tiller get out of his armored car, flanked by body guards, in front of his clinic stepping into a mob of protesters shouting about murder. That image, more than any of the tear-jerking stories from people who had to end much-wanted pregnancies, solidified my enormous respect for Dr. Tiller. The courage it must have taken him to face that mob and risk his life every day, after decades of threats and actual violence, makes him a hero.

They say Dr. Tiller was considered a saint within reproductive health circles, and based on what I’ve read, I’m inclined to agree. I don’t doubt that Dr. Carhart is just as exceptional. As one of two late-term abortion providers in the United States, Dr. Carhart no doubt faces all the same threats and takes the same precautions.

I’m sure each doctors knew that he could switch to a less controversial specialty and simplify his life a great deal. But at the same time, I suspect they can’t. I don’t think a person can dedicate so much of their lives so passionately to something and then just walk away. Although should Dr. Carhart chose to do precisely that, I wouldn’t blame him in the least. He’s doing important work at huge cost to his personal liberty and sense of safety, I don’t think anyone could fault him for trying to claim some of that back.

Review: Four Hour Work Week

Thursday, December 3rd, 2009

I viewed Four Hour Work Week by Tim Ferriss with skepticism I normally reserve for late night infomercials. I read it in spite of that because the library had a copy, so it cost me nothing to satisfy my curiosity. My usual book-review note is in effect.

The crux of the book is advises the reader to create a product that can be shipped straight from the factory to your buyer without any action on your part, so all you have to do is sit back and watch the money appear in your bank account.

I’m not convinced of the book’s thesis: that anyone who wants to can make a huge stack of cash doing very little work. Its methods for dealing with employers seemed rather optimistic, and I think the author overestimates the amount of time one can save by cutting the non-work activities out of your workday. Admittedly, the author’s done it, I haven’t, so that make him the expert, but I’m not convinced that because he was able to do it, anyone can.

Additionally, much of the plan hinges on concepts advertising and outsourcing. As I’ve said elsewhere, I don’t like advertising and I don’t have a great solution to or substitute for it. I don’t know how you’d get people to learn about, much less buy, your miracle product without some form of advertising. I don’t have an educated opinion on outsourcing, but I’ve heard enough controversy surrounding it that I would need to educate myself on the topic before being personally involved. Although the author does spend a couple cursory pages saying basically, “Outsourcing is fine, don’t worry so much”, it didn’t really address any issues about why outsourcing might not be fine, just that everyone does it. Which is fair: it’s not a book about social justice in the global economy.

The plan is a guide, not a recipe that must be followed under pain of death. If you don’t like an idea presented in the book, you don’t have to act on it. The book as a whole is still useful for the other strategies he provides for reducing the amount of time you need to spend at work. Each chapter ends with a list of relevant resources, mostly on the Internet.

Many sections end with a series of questions to the reader: what would you do with your days if money were no object? He spends some time expounding on the idea that a person’s quality of life is directly proportional to the number of uncomfortable conversations they’re willing to have, and encouraging readers to swallow those proverbial frogs. This is book’s most powerful aspect: putting the proverbial frogs in perspective by juxtaposing them with of the promise of readers’ wildest dreams.

It was timely reading material for me, being between jobs, because I’m not entirely convinced I want a new job exactly like my old job so I can do exact same thing for the next forty years, and this book did help me get a fresh look at my options. I enjoyed it, and were I not also between incomes, I might even buy a copy. In the initial draft of this review, I said I would hypothetically recommend it to a friend, but in the month that’s elapsed I’ve already recommended it to two. I don’t know if they’ll find it useful or educational, but I do anticipate they’ll find it thought provoking

Better than silent mode on the G1

Tuesday, December 1st, 2009

I killed my two biggest annoyances with my G1 with one stone: I recorded a couple seconds of silence and set that as my default ringtone.

  • Even if the volume control on the side of the phone gets pushed in my pocket, my phone will vibrate silently (but for the noise of the vibrator) when I receive a phone call.
  • The phone cannot by design mix silent and noisy alarms (all can be silent or all can be loud), I can now set the default to noisy, set mid-day alarms to vibrate while using the silent ringtone, and those alarms facing the formidable task of rousing me from a dead slumber can still blast at full volume.

I assume these points are also true for any other Android-based phone on the market.

Detailed instructions

Set silence your default ringtone.

  1. Download snd.ogg. You can also record your own silence if you want to be all proprietary about it, but the result should be about the same.
  2. Transfer the file from your computer the same way you would any other file. If you downloaded from your phone rather than your computer, I believe it will be automatically added to your music library.
  3. Go to the Music application on your phone. In the library, press the “artists” button. There is no artist/album data associated with the file, so Android files it under “Unknown artist” and album “Music”. Scroll down to the song snd. Hold your finger down over it until a context menu pops up. Select “Use as phone ringtone”. Your default ringtone is now silence
  4. If you’ve given people in your address book their own ringtones, those will still be audible. Either adjust those settings individually or learn to live with the shame of Hanna Montana announcing your mother’s every phone call.

Silence some alarms.

  1. Having followed the directions above, go to the Alarm Clock application. Tap the alarm you’d like to silence.
  2. Tap ringtone. In the ensuing menu, select snd. Tap OK.
  3. Make sure vibrate is checked to avoid making the alarm too subtle.