Python noob alert...
Looking to write a mood tracking program in python. I am definitely a noob programmer. I had one required class in college (mumble years ago). I know what I want to do, but I'm wondering if there's a more elegant way to do it.
So there will be about 20 prompts that I will rate from 0 to 4. I know I can have a variable for each question and then to get my score just do Q1+Q2...+Q20. (
Like here)
But there's gotta be a more elegant way, right? Or am I better off sticking with the simple and worry about elegant down the road. I'm more interested in learning, but this is a serious project for me. Currently I'm using MoodScope (online) but it's lacking in some areas and thus doesn't give an accurate representation of my mood. Writing my own prompts will help me dial in on my specific issues.
As a side issue, right now I'm planning on presenting the prompts in 2 sets. One that's positively scored (happy, proud) and one that's reversed scored (sad, tearful, where 0=4, 1=3, etc). This is because I can't think of a good way to reverse score on the fly. Ideally I'd like the present the prompts randomly (which I've already figured out), but I can't do that if I can't reverse score right then and there.
I hope I've articulated the problems I'm having. As I said, I'm willing to learn. I've tried to Google, but I'm obviously not hitting on the right terms.
Please be gentle and use little words. FWIW, I'm using IDLE when I'm on my Win netbook and Emacs when I'm on my Linux desktop. Most of my time is spent on my desktop, but I do have an hour at work every afternoon where I play around with this.
This is something that got in my way for a long time (and still gets in my way). You have an idea, so focus on the idea and get it working. Worry about elegance later. As a n00b, it's all too easy to get caught up in form over function.
posted by Cat Pie Hurts at 5:39 AM on February 19, 2011