Sunday, March 11, 2007

What's new?

Picked up Zen and the Art of Motorcyle Maintenance off my shelf and started reading the first chapter. I found one of my favorite quotes: "What's new?" is an interesting and broadening eternal question, but one which, if pursued exclusively, results only in an endless parade of trivia and fashion, the silt of tomorrow.

I started playing with the HRM program again yesterday and made a little progress on displaying the log summary data. I also changed the user interface arrangement to match more of an email look and feel.

Friday, January 26, 2007

kiwi

After playing around with kiwi today, I decided to put it aside for awhile. It looks promising, but I started to get the feeling I was off on a tangent. One thing I liked was that it didn't seem as insistent as traits was on what I use for a data model.

Wednesday, January 24, 2007

form validation

One of the nice things about Traits UI was that once you described the data, the validation of user input took care of itself. In my new Traits UI-less world, I'll have to find another way to do that. Being lazy, I googled around for existing libraries. Formencode does this for html and isn't tied to html, but I haven't found examples using pygtk. It's also supposed to be used by sqlobject? Maybe I can rely on sqlobject exceptions to do the work for me? Another possibility is kiwi, which actually serves as an MVC framework of sorts for pygtk. I will say I'm loathe to include more dependencies, but kiwi doesn't scare me that much.

Tuesday, January 23, 2007

splits -- some progress

I'm writing splits from python, pygtk/libglade, matplotlib, and sqlobject/pysqlite2. I've written the code to pull the data from STraM, which uses an access database and a set of files (for storing the R-R interval data), using odbc from the pywin32 extensions. The data is then stored in an sqlite3 database, which has the very nice property of being binary compatible across platforms. The would-be linux user (like myself) can install the windows app, import the data, and see how he likes it on windows. Then, if he's so inclined, he can start using the program on linux.

He can do all of this if I finish writing it that is :-) Here's something at least.
OK, it's not much, but I figured out how to do listviews in gtk and embed a matplotlib graph. On the backend, I've got the persistence piece figured out, which was a stumbling block before.

version control and plain text is good

I started using subversion for a few coding projects, keeping the repository on my web host, so I can "svn update" and "svn checkout" from wherever. Very nice. Why can't life be this nice for projects other than software? How about that report your working on? Well, the problem is binary formats. How do you handle conflict resolution? I'm sure if you're working on a word document there's some method for conflict resoluton, but I'm pretty sure it involves some big, complicated tool. Maybe I'm just living in the past, but it seems like things were easier when I wrote papers in LaTeX and they looked great. Can life still be lived in plain text?

Wednesday, January 03, 2007

more implementation, less invention

Ironically enough, an email to the enthought list with a link to this article convinced me to just use python-glade, matplotlib, and sqlite. These are all known quantities and I can easily see a straight line from here to the finish with them. It might be less elegant, require more code, and be less easy to change in the future, but at least I can see the path!

Tuesday, January 02, 2007

use traits/traits UI only from enthought tool suite?

I played with python-glade today thinking maybe I'd just try things the old-fashioned way. I started to think about it though and while getting a data viewer up and running wouldn't be hard, I'd have to write code to validate the inputs when somebody wanted to add a log entry (enter distance, etc.). That sounds painful, so maybe I'll give traits a shot.

Monday, January 01, 2007

Splits -- should I build it with the enthought tools?

I tentatively named my little STraM replacement "Splits." (Suunto Training Manager -- aka STraM is the software the T6 uses.) Now what should I build it from? I decided use python because that's what I'm familiar with and I think it's quite nice. I figured I'd need a UI, a graphing library, and a database that have python bindings.

My initial inclination was to use wxpython, matplotlib, and pysqlite2, but the enthought tool suite was kind of intriguing and without much work I created some model classes and views and then did the magic "splits.configure_traits()" and got a nice gui I could use to browse logs like so

So far I've just used traits and don't know quite where to go from there. There's a lot of tantalizing "stuff" in the enthought tool suite but not much in the way of documentation (or an indication of whether it works).
  • I need some method for storing the data -- "persistence" for those with computer science degrees. I see enthought.persistence.state_pickler.py, enthought.persistance.versioned_unpickler.py, enthought.sweet_pickle. Is one of these good enough for me to entrust someones sacred running logs with? I'm pretty confident in sqlite, but I don't know about pickling.
  • I made the simple graphs in the screenshot just using Plot from enthought.model.numeric_ui which I happened upon somehow. How configurable is this? Should I use chaco? chaco2? pyface with matplotlib?
  • What other tools are in the enthought tool suite I can use? I see enthought.units. Maybe this will help me not reinvent the wheel in handling mph, minutes/mile, km/h, etc.
  • Should I be using this envisage framework? What is this? What would it buy me? Is there any documentation? As far as I can tell the best way to understand it is for me to look at eclipse, a java framework on which envisage is based.
Lots of questions. Figuring out the way I'm going to store data is really the next step.