Thursday, October 30, 2008

proud papa

I installed python on my 10-year-old's computer a while ago and showed him a few things. He's really into football now and for some reason he wanted to calculate NFL passer ratings for some QBs. I helped him write a program in python that prompts the user for completions, attempts, etc. and then prints out the passer rating. This morning I found him on looking up stats and punching them into his new calculator. I think it's the first time he's created a tool. It feels a bit like watching him discover fire. I'm a proud papa.

Wednesday, September 24, 2008

defaultdict and R

In answering a question on the python-tutor list, someone used collections.defaultdict. I didn't know about this. I guess it looks a little cleaner to say a = defaultdict(list) rather than use a.setdefault(key,[]).

Well, that isn't much learning for the day, but it's something.

I'm also trying to learn and use R, but fell back to python for my task today when I couldn't quickly figure out how to do what I wanted to in R. R is frustrating right now because it seems so insanely powerful, but at the same time foreign to how my python-oriented brain thinks.

I have "Modern Applied Statistics with S-PLUS" and learned to parrot the examples in order to do some cool stuff, but when I have to deviate much from the examples, I find myself a bit lost. I figure I don't understand the basics of the language well enough and now have "Programming with Data." Hopefully this will get me up to speed, so I can be one of those guys on the R-help list who can answer a question with six different one-liners to accomplish the same thing.

emacs org-mode

I tried org-mode a while ago, loved it, and then inexplicably stopped using it. I think I was trying to figure out how to integrate my entire workflow (calendar, task, notes, etc.) in emacs and it was too much at once. This time I was just using it for notes/outlining and it is quite amazing. The keys are very intuitive also. You use the Meta and Shift keys combined with the arrow keys to move sections up and down, indent, etc.

I also used the table mode to actually make a table I needed and it is, quite simply, incredible. It's amazingly intuitive to fill a table, move rows and columns, insert, and delete. The thing can even be used as a spreadsheet, but I haven't tried that yet.

Tuesday, September 16, 2008

my fingers remember emacs

Long ago, I used to live in emacs. ctrl-x-`, etc. I've been playing with pydev and eclipse recently and got frustrated with trying to figure out how to add modules to the python path that are "egg-link"s. So, I fired up emacs to start editing my text and I can't believe how much my fingers remember. I did a ctrl-5 2 to open a new window without blinking an eye. Where did that come from?

Sunday, July 20, 2008

javascript libraries - there are a lot of them

And I thought the multitude of python web frameworks was bad. I was playing with google app engine and wondered if it had some library for making your app all AJAXy and cool. It doesn't.

Django doesn't have some preferred library. Turbogears 1 did (MochiKit), but I'm sure that (like everything else) has changed in Turbogears 2.

OK. I'll see what's out there. Holy cow. There are (off the top of my head) -- Mochikit, prototype,, jQuery, dojo, mootools, ...

The breadth-first search continues...

Wednesday, March 19, 2008

on to pylons...

I caught up a little bit with respect to turbogears happenings by perusing planet turbogears. Version 2 is going to be built on pylons, SQLAlchemy, genshi, and ToscaWidgets. Does that mean this book I have is basically worthless? OK, now I'm looking at pylons. I notice is using pylons. That's a pretty good endorsement.

Friday, March 07, 2008

My nascent GTD system

Getting Things Done is everywhere on the net. I read the book a few years ago and it's really very inspiring. Who wouldn't want "mind like water," but how making it actually happen is going to take some effort.

I've emptied my brain and put it all in lists many times and tried a ridiculous number of software programs, but haven't ever really got the hang of it, shifting from one system to the next. My latest incarnation feels right, but I've said that before. I always experience a temporary boost in productivity, but I really think that's just because I've spent time reviewing and prioritizing all my "stuff." Still, I'm only cautiously optimistic about my new system.

So, what am I using now? Google notebook. I'm basically following these instructions, except that I'm not using a Next Actions notebook with a section for each context (@computer, etc.). Those instructions were written before notebook had tags, so I'm leaving the actions with the projects and tagging (labeling in google-speak) them with contexts. This avoids the problem of losing the tie between projects and next actions that lots of people (like myself) find troublesome.

I can also now keep a link to mail. I've always lamented the fact that gmail didn't have a single URL per message. Well, now apparently it does! Those guys must have updated the software. Now I can use the notebook firefox extension to select the text in an email and create a new note, which automatically creates a link to the email. Unfortunately, outlook web access doesn't have a unique URL for each message. You can open as a web page and that kind of does it, but then you don't see all the messages meta-data and if you move it to a new folder, the link breaks. A long time ago, I tried notebook-like application called evernote, which could link to outlook mail, but it was a desktop app with a local file that wasn't portable unless I carried a thumb drive around. (Of course now evernote is working on a web version.)

In violation of GTD principles, I've added @today and @thisweek tags. This way if I lose focus on just what I *need* to be doing right now, I click on those labels. In the week I've been using this, I've found this very convenient. "Today" and "this week" covers my most common short term horizons. When I do a weekly review (probably Friday afternoon or Monday morning), I can label things with "@thisweek" as I come across them. (Maybe I should add a @thisFY -- fiscal year?)

What do I do when I finish a task? At first, I just deleted them, which didn't really bother me too much, but then I had a better idea. I created a new "Journal" notebook. I make a new section for each day, 2008.03.06, 2008.03.07, etc. Then, when I complete a task, I select "Move" and select "Journal" and section "2008.03.07." That way I know what I did today. Pretty neat, huh?

So far my annoyances with this system are:
  • Keyboard shortcuts. Geez, are there any? I can't find any documentation although I accidentally figured out that hitting the right arrow twice at the end of a note begins a new one.
  • Not being able to create links with my work email quickly. I usually just annotate "from:Fred sent:3/06/2008" which I can cut and paste into windows desktop search and find it in a jiffy, but it's not ideal. I could forward to gmail, but that has its own issues, and it takes several minutes for the forwarded mail to arrive.
  • Google notebook's mobile version doesn't support labels. One workaround here is to put my mobile contexts (like @errand) into a next actions notebook like he does.

Saturday, March 01, 2008

It's been a while since I've posted here

I should probably start doing more learning and less running. It's been over a year since I've put anything hear.

My running log project has been languishing. When last I left it, I had decided I would use pygtk, libglade, matplotlib, numpy, and sqlobject. This is a nice solid, pretty mature base for such a project. Then, of course, I'm tempted to use the enthought tools, but it seems to be a moving target and documentation can be tough to come by. I'm tempted though because it looks like "cool stuff" and coming up with a project to force myself to learn it might be worthwhile. Finally, my unfocused brain is thinking about implementing it as a web application using turbogears in order to learn a different set of "cool stuff."