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 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.

1 comment:

  1. this post has the best three-tag combination I have ever seen.

    I got the 13bit joke. duh.

    and I'm going to re-watch blue velvet and wild at heart. I need some lynch.