Author Archive
Brief timing statistics of my vote this morning
I voted early this morning. I thought it might be better to go in today rather than on Tuesday. I wasn’t the only one. There was a long line of people at the early voting place this morning. (This isn’t the same place that they conduct regular elections on voting day.)
Many people saw the line and just decided to come back later (I hope). Anyway, the quantitative analyst geek that I am, I started timing how long it took. I started the timer on my wristwatch and started counting people as they left the polling place.
In 45 minutes, I counted 38 people. That’s 1 minute 11 seconds per person.
The process was as follows:
- Wait in line for about 50 minutes
- Wait at the door of the voting room until there’s an open spot at the table
- Go to the table and sign a little sheet of paper; hand it to the clerk
- The clerk at the table compares your signature to your photo ID and looks up your name in the database
- You are given a 4-digit access code by another clerk
- You wait for an available voting machine
- You punch in your access code into the machine
- You vote
- You confirm your votes, see a print-out scroll through a window confirming your votes
- You leave
There were 4 voting machines at the polling place. This number is likely a lower than would be there on election day, so it’s likely that things will get done quicker on election day. For example, if there were 8 machines, I’d imagine that they could process votes at a period of 36 seconds per person.
The clerks who had to sign me in and hand me the access code wasn’t a bottleneck at all. It took people longer to actually vote at the machines (4 at a time) than it took the clerk to process people coming in. But we can safely assume that there will be more people around on election day. Keeping the ratio of clerks to voting machines at 2:4 would be safe. So, to process 36 seconds per person, they would need two clerks and 8 voting machines. Let’s hope they have enough.
In total, it took me about an hour from when I got in line to when I was done voting.
Barack Obama is screwed | So is John McCain | But mostly the human mind
Disclaimer: I don’t intend to proclaim or disseminate my political views in public. Instead, I vote in private. I believe that both Barack Obama and John McCain are worthy candidates of the Presidency. John McCain is a national hero; the outcome of the election won’t change that.
I am recording my rambling thoughts on the psychological effects on the election. Your constructive feedback, as always, is welcome. No flames, please.
I started reading Kluge: The Haphazard Construction of the Human Mind yesterday. While Gary Marcus was going through the lists of cognitive errors to which the human mind is prone, I couldn’t help thinking of the election. It seemed at first that pretty much every error would go in John McCain’s favor. Namely:
- Memory Priming: There have been some pre-election associations with the name “Barack Obama” and the characterizations “Muslim” and “terrorist”.
- Attachment to the familiar: “If it’s in place, it must be working.” Evolution seems to have preferred sticking with the status quo rather than accepting change. This is especially true in stressful times (think credit crisis). Curiously, McCain’s attempt to disassociate himself with Bush might not be the best strategy. Obama seems to be trying to leverage this association, but it might not be in his best interest. Indeed, I think most people associate Bush with a present national crisis, but there is a irrational human tendency to stick with precedence (regardless of its flaws).
- Minority effect: voters tend to vote for candidates in the “majority” demographic rather than “minorities”. This prejudice includes voters in the minority.
The one thing that might curb all these effects is that I think the Barack Obama campaign understands these phenomena. They’re not relying on a seemingly large lead in the polls to materialize on election day.
Further inspection reveals that McCain is also susceptible to similar errors:
- Memory Priming: By associating McCain with Bush (and therefore a sad state of national affairs), the Obama campaign is priming the voters’ memories. One could make the case that this association is valid. However, it is not necessary to correlate McCain’s and Bush’s votes to prove a correlation between the economic or political state of the country and McCain’s past votes.
- Minority effect: McCain’s age gets very little discussion as a minority segment. However, there is an association here that McCain will under-perform as a president due to his age. Note that I believe the actuarial risk that Palin might become a president to be a valid risk; whether Palin will be a good president is separate issue than whether McCain will be a good president.
There’s another problem that plagues supporters of either party (Conservative/Republican | Liberal/Democrat)–especially the most passionate: motivated reasoning. It is far easier to prove an idea that you already believe in, rather than to search for all the available material out there to disprove any idea. This consideration brings back memories of the 2000 election, when the votes were in dispute. I remember seeing pictures of Republicans and Democrats screaming at each other. Each side had convinced itself very passionately that it was right–no doubt by invoking some amount of motivated reasoning. It’s clear that each side thought if the other’s candidate won, the nation would immediately plummet into disrepair. Of course, that didn’t happen.
Instead, it took 8 years. Ha!
My point is that we should each beware of the heavy marketing that we are being fed as voters. We should each try to see the other points in any argument. Keep an open mind. Each of us should remember that we are all American…
Except Joe Biden: He’s a puppy-killing Communist, and Joe is not even his real first name.
By the way, the book is not particularly generous to George Bush.
Picture-by-Picture: Setting up Mercurial with WikidPad
I’m personally using Git to version-control my WikidPad files. However, Mercurial (and especially TortoiseHg) is equally well suited for this function. In many respects, Mercurial is simpler to use than Git. The only shortcoming I had with Mercurial is that there’s no managed branches; to branch, you create an independent copy of the whole repository (clone it).
Nonetheless, for most people, Mercurial will not only suffice but give quicker rewards than Git.
I don’t use Subversion for this purpose, because subversion has a centralized approach which requires a repository, separate from a working copy. Importing, merging, branching, etc., with subversion is a bit of a hassle. This “hassle”, of course, is purely personal taste; others will (strongly) disagree. In fact, for many other purposes, I strongly prefer Subversion to Mercurial/Git/etc.
Goal
By the time you’re done with the following steps, you should be able to:
- Place a WikidPad Wiki under version control
- Commit changes as files change
- Revert to prior versions Read the rest of this entry »
Laconica on DreamHost
I got a laconica install going on DreamHost. I’ve been able to post from the web, but I’ve found that posting from email won’t work with DreamHost. The jury is still out on posting from Jabber, but I’m optimistic. I’ll update this post when I know more.
I was able to get notifications of new posts via email. I’m not sure if that’s useful. In my opinion, notifying from email is equivalent to a discussion group or mailing list.
Gimmesoda automatic script
I created a new domain and MySQL database/user using dreamhost panel.
Then, ran http://www.gimmesoda.com/2008/07/18/another-laconica-easy-install-script-update/ to install into ~/laconica.domain.tld
This actually worked! Except, its seems to be an older version of laconica. At minimum, it was useful for getting custom pear (right?).
Following Laconica README
Decided to download latest darcs copy. Moved the gimmesoda-install from ~/laconica.domain.tld to a laconica.domain.tld.bak directory and then downloaded the darcs copy using:
darcs get --partial http://laconi.ca/darcs/ laconica.domain.tld
Then, deleted database and re-created database called la_db (& MySQL user la_sqluser) using DreamHost control panel. Now, following README:
mysql -u la_sqluser -p -h mysql.domain.tld la_db < domain.tld/db/laconica.sql
Check to make sure:
[gorgon]$ mysql -u la_sqluser -p -h mysql.domain.tld la_db Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3326653 Server version: 5.0.67-log MySQL Community Server (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> SHOW TABLES; +----------------------+ | Tables_in_la_db   | +----------------------+ | avatar              | | confirm_address     | | consumer            | | fave                | | foreign_link        | | foreign_service     | | foreign_subscription | | foreign_user        | | invitation          | | message             | | nonce               | | notice              | | notice_source       | | notice_tag          | | oid_associations    | | oid_nonces          | | profile             | | queue_item          | | remember_me         | | remote_profile      | | reply               | | sms_carrier         | | subscription        | | token               | | user                | | user_openid         | +----------------------+ 26 rows in set (0.00 sec)
Skipped user access, since mysql user should already have access. Found one more thing to do:
cd domain.tld/classes cp laconica.ini la_db.ini
The .ini file needs to be the same name as the MySQL database name.
The above gave me basic functionality. I then tackled the following:
Pretty URL
Changed the config[‘fancy’] option to true. I then copied htaccess.sample to .htaccess (within ~/laconica.domain.tld). I then edited .htaccess and changed the line:
RewriteBase /mublog/
to be
RewriteBase /
I have to do this because .htaccess sits in the same directory in which I installed laconica.
I set up a new email address at laconica@laconica.domain.tld. I specified the following in the config.php file:
#Email info, used for all outbound email
$config['mail']['notifyfrom'] = 'laconica@laconica.domain.tld';
$config['mail']['domain'] = 'laconica.domain.tld';
# See http://pear.php.net/manual/en/package.mail.mail.factory.php for options
$config['mail']['backend'] = 'smtp';
$config['mail']['params'] = array(
'host' => 'mail.laconica.domain.tld',
'port' => 25,
'auth' => true,
'username' => 'laconica@laconica.domain.tld',
'password' => 'xxxxxxxxxxxxxxx'
);
#For incoming email, if enabled. Defaults to site server name.
#$config['mail']['domain'] = 'incoming.example.net';
Note that that last (commented) line is redundant. Unfortunately, posting by email won’t work. What needs to happen is a php script needs to get executed upon receipt of an email. This can’t happen, because DreamHost doesn’t support email addresses being tied to UNIX accounts. I’d like to disable the laconica “Post by email” feature altogether, but I’m not sure how.
Jabber/XMPP
One nice feature with DreamHost is that you can host your own Jabber accounts. I set up a custom-hosted Jabber account laconica@laconica.domain.tld for a post/notify bot. It hasn’t activated yet, so I have no confirmation on whether it works. Anyway, here are the changes to config.php:
# xmpp
$config[‘xmpp’][‘enabled’] = true;
$config[‘xmpp’][‘server’] = ‘laconica.domain.tld’;
#$config[‘xmpp’][‘host’] = NULL;Â Â Â Â Â Â Â # Only set if different from server
$config[‘xmpp’][‘port’] = 5222;
$config[‘xmpp’][‘user’] = ‘laconica’;
$config[‘xmpp’][‘encryption’] = false;
$config[‘xmpp’][‘resource’] = ‘zzzzzzz’;
$config[‘xmpp’][‘password’] = ‘xxxxxxxxxxxxxxxxxxx’;
$config[‘xmpp’][‘public’][] = ‘laconica@laconica.domain.tld’;
#$config[‘xmpp’][‘debug’] = false;
Setting up Pidgin for Google Talk behind an http proxy (web proxy / corporate firewall)
I use Google Talk at work mainly to post to social networks (army.twit.tv, identi.ca, twitter.com, yammer.com). It is possible to receive notification using Google Talk (which is just a Jabber/XMPP instance), but I find that too intrusive to what little work I get done.
-
Run pidgin (if not already) and select Accounts->Manage
-
Select Add to add another account:
-
Select XMPP for the protocol type:
-
Fill out the form as follows with gmail/gtalk username & password; domain is gmail.com; Resource is (optionally) Work:
-
Click advanced button. Select old (port 5223) SSL. Select 443 for port number. Server is talk.google.com. Fill out http proxy (for example, wwwgate0.example.com, port 1080) & http-proxy username & password (not likely the same as your gmail username/password):
This works because http proxies generally allow ports 80 (http) and port 443 (SSL/https) through. They generally disallow other ports. Luckily, google’s jabber server (talk.google.com) accepts connections on port 443–and they are SSL (encrypted) connections, so that’s good, too.
The beauty of dollar-cost averaging | a bear market strategy
MAJOR DISCLAIMER: I am not a financial analyst/expert, and I know nothing about stocks, markets, and money. If I did, I would have probably figured out how to monetize this blog. If you want real financial advice, seek a financial adviser.
Dollar-cost averaging is a phenomenon that occurs when you regularly invest the same amount of money in a stock no matter what happens. What tends to happen when you adopt this head-in-the-sand attitude is that when stocks are high, you end up buying fewer shares; when stocks are low, you end up buying more shares.
Note that the old adage of “buy low, sell high” is still the best you can do. However, (as Burton Malkiel points out), timing the market on these highs and lows is extremely difficult.
Here’s an example. Let’s say for 12 months, I invest in a stock. The first 6 months, the stock goes up, then returns to its initial price. The next six months, the stock goes down then returns to its initial price. Let’s say I invest $1 per month in the stock no matter what the price is doing. Here’s a table with the numbers:
| month | price | shares purchased | cumulative shares purchased | average price | total value | gain/loss |
| 1 | 1 | 1 | 1 | 1 | 1 | 0 |
| 2 | 1.1 | 0.91 | 1.91 | 1.05 | 2.1 | 0.1 |
| 3 | 1.2 | 0.83 | 2.74 | 1.09 | 3.29 | 0.29 |
| 4 | 1.3 | 0.77 | 3.51 | 1.14 | 4.57 | 0.57 |
| 5 | 1.2 | 0.83 | 4.34 | 1.15 | 5.21 | 0.21 |
| 6 | 1.1 | 0.91 | 5.25 | 1.14 | 5.78 | -0.22 |
| 7 | 1 | 1 | 6.25 | 1.12 | 6.25 | -0.75 |
| 8 | 0.9 | 1.11 | 7.37 | 1.09 | 6.63 | -1.37 |
| 9 | 0.8 | 1.25 | 8.62 | 1.04 | 6.89 | -2.11 |
| 10 | 0.7 | 1.43 | 10.04 | 1 | 7.03 | -2.97 |
| 11 | 0.8 | 1.25 | 11.29 | 0.97 | 9.04 | -1.96 |
| 12 | 0.9 | 1.11 | 12.4 | 0.97 | 11.16 | -0.84 |
| 13 | 1 | 1 | 13.4 | 0.97 | 13.4 | 0.4 |
The thing to take away from this is that at the end of the 13th month, I have made some money. It may not seem like a lot of money, but the stock price did not go up; it’s exactly where it was when I started. In general (though not always), the stock market goes up over long periods of time (5-10 years), so I’ll be even better off than in this pessimistic (though timely) example.
Sure: I could’ve made more money if I sold all that I had during the 4th month (when the stock price was high), and then just waited until the 10th month (when the stock was low) to buy everything back. However: that would require a great deal of prognostication.
With dollar-cost averaging, I can make money withour requiring the stock to go up. Of course, if it goes down, I don’t make money–unless I keep investing and it eventually goes up.
A healthy default
For a while, I used to try to stick to a set schedule. I’d get very angry at myself when I deviated from it. If, for some reason, I didn’t get a work-out in the morning–or if I didn’t put away the laundry and the kids dispersed the formerly clean clothes throughout the house.
What I recently realized is that I don’t have to do that schedule every day–and I certainly shouldn’t agonize when I deviate (even on a regular basis) from the schedule. What’s more important is that I return to it at some point. I’ve had some pretty long fitness kicks, but usually, I end up going 6 months to a year of no excercise.
It’s more important to make this daily routine a daily default rather than a rigorous discipline. What do I mean by default? I mean that unless I have a reason not to, I am going to stick to the things that help me become healthier.
Here are some of my defaults | and some reasons I might skip them:
- Working out (running or weight training) in the morning | sleeping in late
- Packing a lunch (rather than eating at the cafeteria or at a restaurant) | meeting my friends for lunch
- Drinking lots of water | there’s really no good reason not to
- Folding and putting away laundry in the evening (used to be morning) | playing with the kids or helping with homework
- Emptying the dishwasher in the morning (and possibly re-loading it at night) | slept in or the kids got up early
- Reading a book (rather than surfing the web) at night | but I really want to write that blog entry about healthy defaults
Over at The Growing Life, Clay Collins talks about life balance and insanity. I didn’t realize it before, but that post influenced me in re-assessing my daily schedule (and the discipline I tried to enforce on it).
What’s important to me is that I ensure I don’t derail from my default for too long. It’s all too easy to decide that I need to write 10 blog entries right now–or I need to learn a new programming language. Usually, when I do (resume my default), I find that my default is a welcome return.
Great morning run
Not sure how I did it, but somehow, I managed to go for a nice run this morning.
It was unlikely that I’d go for such a run. The forecast said it would rain at 6. It seemed like it would be cold outside. It was pitch black outside. I usually get up early but somehow get sidetracked online. Curiously, because I thought it would rain at 6, I was motivated not to waste time on the computer this morning. I found a small flashlight and put batteries in it. I looked for a long-sleeve shirt, but instead stepped outside and found that the weather was perfect.
I was able to get out at 5:30 AM and run under the moon and stars. The temperature was perfect (58 degrees C) and there was a nice warming fog everywhere.
I’ve been wanting to get back into a moring excercise routine for a while now, but have failed due to static inertia. Luckily, this morning I made it out, and I’m glad I did.
Curiously, I had to focus my mind on my surroundings. My initial reaction was that “this is so great of an experience; I should blog about it.”
I could’ve easily squandered an hour or so this morning, surfing the mindless Internet. Instead, I got out and re-appreciated the warm wooded neighborhood in which I live. I ran to the fitness center, did some core strength excercises, and started my way back.
I decided to extend my run (another example of static inertia–in this case, a healthy one) and took the long way home.
Verisign Labs’ Personal Identity Portal (PIP) / OpenID
2008-10-01 Update
I’ve been informed by Verisign that you can only have one FOB attached to your PIP account. This is no big deal for me, since my FOB is on my keychain and you can always have a one-time password emailed or SMS’ed to you as a backup.
Personal Identity Portal (PIP) is an OpenID provider. This means that you:
- Register an account with PIP. You’ll get a URL (i.e. example.pip.verisignalbs.com); that is your OpenID URL.
- Go to other web sites–called OpenID clients–for example, My Yahoo, most blogs, identi.ca, army.twit.tv, etc. Instead of registering a username and password, tell them to consult your OpenID URL. Instead of giving them a username:password combination, you just tell them your OpenID URL (example.pip.verisignlabs.com).
- The web site then consults with PIP to see if you are authenticated. This authentication is done in a very secure manner, using cryptography, so that no one can impersonate you. To do this, you are temporarily transferred to PIP’s web site.
- You select what information (name, location, DOB) that PIP should share with the OpenID client.
- You are now logged into the OpenID client and can go about your business. The whole time, you only had to remember one password: your PIP password.
OK: big deal. So, I don’t have to remember more than one password. Here’s the cool part: PIP can be set up so that you get a neat FOB (a keychain doohiky). Here’s a picture of mine:
When I hit they grey button, I get a John Nash-like one-time code (only I’m pretty sure I’m not imagining it). This way, no one can log into my account unless they have my key FOB. I can have only one key FOB, and they come in different form factors (including a credit-card size one that fits in your wallet). You have the option of buying them from Paypal for $5 or the cooler looking ones (credit-card size and waterproof FOB) from Verisign for $30-$40.
If you don’t like carrying it around, you can also have PIP SMS or email you a one-time password.
Here’s another cool feature: PIP also has a little javascript bookmarklet that will save passwords for other sites that don’t support OpenID (linkedin, facebook, etc). Now, I don’t use this capability because I have a pretty good solution already (KeePass), but I might someday.
A list of web sites that support OpenID is at http://openid.net/where/.
Finally, a runner-up that I’d use is Yubikey. However, being an OpenID provider isn’t their main thing right now (although they do provide it sort of as a demo/utility), and I already bought the PIP/Paypal FOB. Alternative providers (including one that works with Yubikey) are at http://openid.net/get/.
Steve Gibson and Leo LaPorte’s SecurityNow podcasts have in-depth discussions of all these technologies.
The 80/20 Rule in my life
I wake up every morning before the kids/wife wake up and try to get a few hours of unfettered time. I use the 80/20 rule (to which I was introduced in the Four Hour Workweek) to figure out what to do.
Out of the many things I could do:
- Pick up the house
- Do dishes
- Do laundry
- Pay bills
- Get a headstart on work
I chose doing the laundry, and if time avails, doing dishes. The reason: I’ve noticed when I’m home that if the laundry isn’t done, finding clothes takes an disproportionate amount of time. Similarly, when the kids want juice or a bagel, it’s really hard to stop and wash a cup or plate (and inneficient, too).





