drewp for 2005 March

<M
Y> M>

2005-03-12T21:07:54 how long did I spend on that code:

I want an editor that counts how long I spend on code files. This is a function of when I make edits to the files, when the editor window has focus, when the console is non-idle (mouse/keybd moved recently). Time spent looking something up in a manual does not need to be counted as time spent on the code.

Presumably I don't want to exaggerate the time spent on code, so I won't generate fake edit events (such as toggling the up/down arrow keys in the editor while I'm on the phone).

I want to be able to report per project, per type of project, etc how long things take to write. I may also want to see how long I'm able to work on each project/type every day.

2005-03-12T23:51:37 todo and calendar are the same thing:

Every PIM I've ever heard of makes a big separation between calendar "appointments" and todo "tasks". I can't figure out the difference. Suppose I remember I have to go to the DMV-- that's a 'task'? What happens when I schedule a time with the DMV-- is it now an appointment? If I have to schedule a followup meeting, do we now have two appointments? After the meeting happens, I have to remember to make copies of some paperwork to keep in my home and car. Another 'task'?

It's all the same thing! The point of a PIM is to track items that correspond to things I will do in real life, and each item has at least one date [*] associated with it. A "calendar" is a display of items which makes use of some of their dates. Today's common PIMs have rigid schemas for their items (calendar item: creation / occurrence(s); todo item: creation / deadline; contact into: nothing). I want a PIM that stores whatever info I have, and then displays it in useful ways. The latter job is FAR lower priority than the former, since I can always get or write new display software and test it on my existing data.

Unsurprisingly, I'm not using a palm or a zaurus or any of the other software I have to manage my schedule. I'm using my email inbox [E]. There was probably email about any event, so I leave it in the inbox until the event happens. Also, people send me change-of-address emails that have their current email/phone/home addresses. Since my email archive already contains good information about contacts and events, how about I make it the main source of contacts and events? All the infrastructure exists already to send email to me from anywhere (and anyone). It just needs to be parsed and searchable.

[*] the creation date, silly

[E] and apparently so does Edd Dumbill (http://usefulinc.com/edd/blog/2005/3/14#22:02)

2005-03-17T22:51:10 Automatic display of incoming picture share:

Update: I have a better sprintpcs picture mail reader now which can post to blogs and understand both the Treo 650 and Treo 750 picture mails. Leave comments there or email me if you want more posts about how that's done.

I put this in procmail::

:0 c

* ^Subject: A Picture Share!

| $MAILDIR/pictureshare

And this is in Mail/pictureshare:

#!/usr/local/bin/python2.3

# if mail contains a link like this, launch mozilla on dash. part of
# the url will end up in a shell command, so i limit the url tightly.
# if there is not a good enough match, this program silently exits.

# &lt;a style="color: #FF0000;" href="http://pictures.sprintpcs.com/share.jsp?invite=gEZm4LPf8UzcFaCLk8Zx&amp;amp;shareName=Photo">View&lt;/a>

import sys,re,os
msg = sys.stdin.read()
m = re.search(r"""href="http://pictures\.sprintpcs\.com/share\.jsp\?invite=([a-zA-Z0-9]+)&amp;amp;shareName=Photo">View""",msg)
if m:
remote_cmd = "DISPLAY=:0.0 scripts/newmozilla http://pictures.sprintpcs.com/share.jsp\?invite=%s\&amp;amp;shareName=Photo" % m.group(1)
print "launching mozilla on dash for picture share email"
os.system('source ~/.ssh-agent-dot; ssh dash "%s"' % remote_cmd)

And this is scripts/newmozilla on dash:

#!/bin/zsh

URL=$1
if [[ $URL = "" ]]; then
URL=http://google.com
fi
/usr/local/mozilla/mozilla -remote "openurl($URL,new-window)"

For testing, I run received mh mails through the program:

dot(pts/0):~% cat Mail/inbox/127 | Mail/pictureshare
launching mozilla on dash for picture share email

2005-03-29T08:11:57 tmrs and mapping:

http://sumitbirla.com/software/tmrs.php is a really simple set of C programs for processing TIGER map data (and others) into maps and directions. After a slightly awkward install, you can find your address and draw a map of it. That's really cool.

Last night, I hacked the mapper into python with pyrex and pygame, and now I have an approximately equal clone. (My maps look like http://bigast.com/post/shot/pygame-map3.png) But what I also have is a better-factored Python interface to the data and mapping functions, which means I will be able to much more easily overlay http://gisdata.usgs.net/Website/Seamless/viewer.php aerial/satellite/etc photos; render to other targets such as opengl; and plot my own GIS data (e.g. rental prices).

Interestingly, in the five hours I spent on this project so far, I started out by writing an auxiliary program to auto-download selected counties from the census.gov server even though that task is an easy-to-do-by-hand, fixed-cost part of the project. And, I'd already downloaded my county when I was evaluating the original tmrs. What's interesting is that I started my video editor project the same way: I spent a big chunk of time on the program to pull DV from tapes even though I had a pretty good solution to that already. In both cases, I got partway through the warmup project and then abandoned it to go write the actual meat of the project. Apparently, that's how I start my projects sometimes.

Pyrex is a total winner, BTW. It's how C was meant to be written. :)

Code at http://cvs.bigasterisk.com/viewcvs/gis/ (or cvs -z3 -d :pserver:anonymous@bigasterisk.com:/srcmirror co gis)


[Main]

Unless otherwise noted, all content licensed by Drew Perttula
under a Creative Commons License.