1

I'm an intermediate programmer. I know C very well, Java somewhat well, and have just done some very basic programming with Python, Shell, and Applescript. I'm writing the program for Mac OSX.

I'd like a create an application that plans my day for me, and lets me schedule due dates for different projects.

The idea being, i could tell the program I have deadline for a task on April 1st, 2012, and that it will take approximately 80 hours. The program would then pick the hours and days to schedule blocks of time dedicated to the task, based on a number of factors.

What this means is, I need the program to have a fine-grain knowledge of time, over a large number of dates. I need at least 30 minute intervals for each day to be split into. Each block of 30 minutes needs to be checked if a task is scheduled for that time, and the possibility to assign a task to that block.

So these 30 minute blocks must exist for each day, and obviously there will be many days the program will have knowledge of, at minimum I'd say a year or 365 days.

I'm just at a crossroads as to how to store the data. I haven't had any experience yet with databases, so I'm not sure if thats a solution, or what that involves.

How would you approach the problem? My prefered languages for this problem would be C and/or Python.

Thanks for any and all insights.

st0le
  • 33,375
  • 8
  • 89
  • 89
user974703
  • 1,653
  • 4
  • 20
  • 27

1 Answers1

1

I'd recommend using sqlite3. Take a look at the api for python here http://www.python.org/dev/peps/pep-0249/.

You could use another relational db with the same api, but for the scale of your app sqlite3 gives some ease of use benefits, and you could always switch dbs. It's straight forward and simple for your application. Also, it's the more typical relational database, so you'll be able to find plenty of information.

You could use one of the more popular non-relational like http://www.mongodb.org/, and if you have no experience with SQL this may be easier to grasp (I'm not sure about this though, take a look for yourself.) Mongo supports several drivers (http://www.mongodb.org/display/DOCS/Drivers), but I do recommend going with python for something like this for ease of implementation. ie. http://docs.python.org/library/calendar.html is very nice.

Additionally, there's also things like https://storm.canonical.com/Tutorial for sqlite3 and http://mongoengine.org/ for MongoDB. Depending on your experience and scope of the project these may be very worth learning. Really, as things get larger and more complicated, using a ORM layer becomes more worth it. On the flip side, if your are very familiar with SQL, and relational database schemas, it may not be worth the effort to learn a new API for a solo project.

Derek Litz
  • 10,529
  • 7
  • 43
  • 53
  • Storm and SQLite seems to be the way to go. I looked over the Storm tutorial, and it was easy to grasp. SQLite seems about right for the scope of the project, I don't need a full blow MySQL. Thanks for the information. I appreciate all the links greatly! – user974703 Dec 09 '11 at 16:03