Showing posts with label django. Show all posts
Showing posts with label django. Show all posts

Tuesday, September 22, 2009

Oauth, O Superman, O judge, O Mom and Dad

I am still on my Big Science kick.

This morning I received an enlightening email from Pawan, the head of IT over at UNICEF Malawi. He told me the reason why I cannot log on to the Malawi UNICEF servers is because there is a problem with the service provider. Ahhh. This makes me feel a bit better, because it means that I did not destroy the system with my attempt to fix dns mapping.

It is unfortunate that the Ministry of Health is in the field this week training health workers. RapidSMS should still be working (cell network no relation to internet-work). But who knows, I cannot log in to see. Stanley has a big rapidsms presentation this weekend, so I am going to put the site up over on one of the ChangProject sites and let him use that. Then at least I can work with Stanley to make the UI look as fantastic as possible - and bring glory to RapidSMS.

I did not implement my new plan of blogging at night. Rather I came home and worked on BlackListTweet and read the fate of africa. Last night, Lian and I got home at about 10:30. Instead of going to kung fu, I went to a fantastic Jivamukti yoga class with JF&Son. It was a great class, but I think Kung Fu is a better work out - and Kung Fu has weapons. It is also true that Yoga people are in general more insane than Kung Fu people. But Yoga and Kung Fu are related. Yoga is in many ways the foundation of Kung Fu (in particular the I Chin Ching). When the first kung fu master - whom I forget - came to china to teach the shaolin monks - the monks would fall asleep during his lectures. They had no energy. So he forced them to do yoga (I Chin Ching) to bring up their constitution and their energy level.

After yoga - we met diametrik and the parents and ate cold candle cafe. It was a momentous occasion. My mother stayed up past 9:30, and my father and brother continued the finkelstein family business of hiring the most obnoxious and incompetent people possible and then berating one another about it. (Katie this does not refer to you, as you may be where JF is breaking out of this tradition)

This morning I am working on BlackListTweet. I lost some time due to mediatemple's implementation of django. I wish I could just have my own box and do my own hosting - but that, too, is a pain in the neck. I had to recreate a database and deal with some fcgi issues. Now I am implementing some oauth functions, so I can access twitter via oauth. Django has some nice code snippits I have been cannabalizing. Maybe TOMORROW I will have an alpha up.

The Robot Parade is coming - I need to work on my singularity song!

And I need to get my eyebrows waxed - it hurts to be beautiful

Friday, September 4, 2009

Vodka prevents Malaria

I am currently at Mamma Mia for my weekly pizza. Today I also had an espresso that tasted like dirt. I hope I dont get sick.

Today I am working from old town, rather than the UNICEF office. I dont see the point in spending 2 hours in transit to stay for 4 hours - unless I have a meeting. Well, I did NOT have a meeting. I was supposed to have national level training on the new INFSSS SMS system protocol, but the Ministry of Health rescheduled. This is both good and bad. Good because it gives me more time to refine, bad because it gives me more time. Do you know what I did with that time??? I refactored by code.

After speaking with Sean who is working on a malnutrition project in Rwanda, I decided I had to make my framework super flexible. So I stripped out everything hardcoded, report formats, headers, everything - and made a class called LayoutManager. I will eventually have to refactor this class to include two classes, HeaderManager and Variable Manager.

For example, you define columns for a report, you link these columns to a function or variable (thank you getattr), and then you link these to a view and a class. (You can also do things like associate a link with the column.)

I also broke out the wasting and stunting tables to their own class -I renamed nutrition to childhealthindicators. I made an abstract class/app Person and then in childhealthindicators I have two classes ChildPatient and Healthworker. I have health status and other strings in messages.py. Here I will also define the SMS response flow. Messages should also be its own app - Probably one app called SMSFlow, and one called appconstants.

This would be a singleton - a singleton - for those of you who dont know - is a class that only has one instantiation. This is useful for keeping things that dont change - such as constants - and that are initalized at system startup.

The pagination was super simple- thanks Adam - but means that I need to rewrite my layout engine so that I dont corrupt the model objects - before I would turn the model objects into strings. It just struck me that there is something wrong with my solution -arrg.

The interesting thing about developing out here - is that all my research is done in batch. I cant be programming and think - ok what is the proper way to do that in django semantics and then google it.... instead i need to file it away until i get internet access and then do all my research all at once.
This is also making me reconsider webmail. i think I am going to start downloading all my mail into evolution and just respond off line. Then the message will go out when I sync. Ahh -living in a batch world.

So I am hoping to get my refactoring done tonight. Tomorrow I may go to Lake Malawi. If I dont - I will get started on Graphing. That is the last piece I have left - I download flot - the graphing library - so I can read up on it tonight.

Monday I go to the field. I have to rewrite the questionnaire for the local health workers. Really I want to know if they find it difficult to enter in children's ids or that sort of thing. My good friend Joelle is a questionnaire master - I will seek her advice for all future questionnaires.

Tonight I am planning to go to a local tech meetup - I am also supposed to give a demo at 4 to a local techie - but I have not heard from him - so I am not sure if that is still happening.

I have been watching a few movies - via paul V. Most recently, family plot and my man godfrey. I sort of OD'd on Kung Fu. Next on my list are Marnie and Vertigo (which I have never seen). I sort of prefer the old hitch. modern hitch is creepy flirty sexy. That is also an inside joke from the new 13bit movie. I may breakdown and rewatch some lynch (blue velvit)
And thank you Chris Barker for the Free Jazz (Don Cherry) It is great. I still need to download the second package!

This is probably enough - but I met a man who had Malaria 14 times. He told me the secrets of how to detect malaria carrying mosquitos (apparentl i was wrong). He also said mosquitos dont like gin or vodka - so drink up.
~