Conversations With Myself
Monday, March 13, 2006
  Python: SQLObject or How Dumb a Programmer am I?
Ok, I know that I am dumb sometimes, but I also must be really thick too. It took me most of the day to figure out how to do a simple select query in SQLObject.

Basically I ended up doing something like this:



def VoiceTypeContents(self):
p = VoiceType.select().count()
html = "<li>" + str(p)
if p > 0:
for i in range(p):
vt = VoiceType.get(i + 1)
html += "<li>" + vt.description
return html



Now I am sure there is a better way, but the biggest complaint that I have with programmers and I am one of them, is that we suck a doing documentation. And since a lot of open source stuff is early in its development cycles, examples are quite sparse.

Now that being said, I think that SQLObject is a great package, and I can see the power of it and I am sure as I figure it out it will be fun to work with, but boy did I pound my head against some walls today.

Next is doing the same thing as above but using templates. :) Dumb stuff I know, but it is how we learn.
 
Comments: Post a Comment



<< Home
Here you will find what I find interesting to comment on. What interests me is Music, especially Church Music. Photography, Programming, Golf, and Politics.

Name:
Location: Thorndale, Pennsylvania, United States

I have been married for almost 23 years, and am the father of a teenage girl. I spend my days programming in just about any language they want in the banking and investing field. In the evening I work on my music, currently concentrating on arrangements and new choral pieces for my Church Choir. I have been Minister of Music, at my church for the past year, looking forward to next year. When I have time, I take pictures of anything and anyone. Also I play golf, not very well, but I enjoy it. Finally what I enjoy most is spending time with my family.

Blogs I Read

ARCHIVES
June 2005 / July 2005 / August 2005 / September 2005 / November 2005 / December 2005 / January 2006 / March 2006 / April 2006 / May 2006 / January 2007 /


Terror Alert Level

Powered by Blogger