Showing posts with label pizza. Show all posts
Showing posts with label pizza. Show all posts

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

Friday, August 28, 2009

RapidSMS is AWESOME

Many things have changed since I last posted.

1) I have decided to change my nutrition architecture and reuse the location app and the reporter app for locations, reporters and patients. I need to make some minor tweeks to this code to accomidate patient type things like gender and date of birth - which really all people have. I am trying to use rapidSMS to the fullest of its RAD capabilities - what this means is that I am spending time writing scripts to translate csv backdata to json to import as data into the RapidSMS databases. This is probably going to be a typical use case for RapidSMS implementation - as little reinvention of the wheel as possible.

I strongly urge developers/interested parties who want to use RapidSMS to look at the locations app and the reporters app - they are really well architected. I am going ahead with my malwai health app - eventually I think it would be useful to have an indicators app similar to the locations/reporter paradigm. But for now, I am going to stick with my explicit/non flexible model- which will work.


2) I have stopped drinking coffee
3) I can now identify malaria carrying mosquitoes
4) I have totally destroyed my local git hub repository and need to regenerate a ssh key. This is leading to massive ssh key proliferation that I need to stamp out.
5) I am on a good UNICEF bus pickup/drop off schedule

We end at 1:30 on Fridays - at which point - I think I am going to go and eat pizza at mamma mia. It is SOO good - I am dreaming about it- but pricey (I had to dig into my stash of gnu bars yesterday to save up for it)

Last night there was no bar volleyball -very sad. Instead I took myself upto the Kiboko bar, which is completely deserted, sat infront of a roaring fire (it is cold here), had a beer (a green one as we call Carlsberg in Lilongwe) - and cracked open 'Globalization' - the anthology I am reading. I think this book was written in 99, and it is a bit dated, however some of the articles are excellent (like the memory article from a few posts back). Last night there were two standouts, a piece on the Chinese Artist Wang Jin and his work 'A Chinese Dream' by Wu Hung and 'Inside the Economoy of Appearances' by Anna Tsing.

So the first piece was basically an analysis of this piece of artwork - a replication of a traditional chinese opera costume recreated entirely in plastic. Of course the author gives treatment to the artist as capitalist/cosmopolitian producer (the piece is manufactured by old ladies in rural china),artist reappropriating traditional forms - that are realy ersatz. (Chinese opera these days is akin to Disney world). I really was touched aesthetically by Wang Jin's artwork and its different manifestations (as performance art, as photograph, etc). I though the article was excellent as an thorough investigation into all aspects of the work: production, consumption, reappropriation,etc.

Second article, ok this one was bit long. In 13Bit filmmaking we would say it needed a little choppy choppy (ie editing). However,this was really an incredibly fascinating article and I recommend it to anyone interested in Gold, mining, and the markets. Basically it follows the rise and fall of Bre-X, a Canadian mining company as it attempted to look for Gold in Indonesia. The article touches upon how the 'scientific-izatio' of the field (now we have geologists exploring rather than miners), makes in palatable to wall street. How there was this transformation of part of Indonesia into frontier land fit for explorers and fortune hunters (like the Brazilian Amazon). How antropological tropes have been mapped on to this capitalist venture. How Bre-X was able to pull a magnificent swindle on the stockmarket - and yet how people were still able to make money from stock speculation. It is truly a rich article that is told in a narrative and entertaining fashion- I will probably reread it.

Caveat Emptor - I know I am discussing this book - however I dont recommend purchasing it. The quality of the articles are really uneven and I would probably be better off reading Shakespeare. That being said, if you still want to read it, borrow it from your local library.

So after my thinking and reading - I settled down into my queensize bed covered with mosquito netting, and listened to the philosophybites podcast - the most awesome podcast evar! http://www.philosophybites.com (well its a toss up between that and coverville)

OOp - just got the rest of the location codes from the Malawi ministry of health! They are really on top of things. More csv to json - via my jsonmedusa.py script.

Next time I hope to be reporting on my RapidSMS Malawi version2 test.
TGIF!