In Lilongwe, after getting to know people for a bit, they invariably will ask - 'Are you a Christian'? I am not quite sure what the analogue is in America, perhaps are you a democrat/republican. I've started saying no - I'm a secular humanist. (This unbeknownst to me is my husband's twitter ID!)
Then I explain that, I believe in Christian ethical values, but not necessarily in a Christian god or Jesus who interferes in world affairs - aka a God with divine providence. But this leads me to think what exactly are Christian ethics? During the crusades, would it be meaningful to speak of christian ethics - these ethics would be different from christian ethics today.
I suppose what I value is the humanist tradition expressed in the teachings of jesus, the rational tradition, preserved by Aquinus - and the scientific tradition that was actively repressed by the medieval church, and of course the legal/judicial/debate tradition of Judaic teachings.
More about this later - I think my internet connection may soon give up.
Last night I had a lovely dinner with Isaac Holeman of Frontline SMS at Huts, a well recommended Indian eatery in Lilongwe. It was good - but my pricest meal in Lilongwe 4800k for the two of us! It was good, and I am not feeling any digestive side effects but not worth the kwatcha.
I returned home to finish the fixtures for my new refactored data models and low and behold the fixtures revealed some issues with my class structure. Basically I had a person class (an abstract class) that was inherited by a healthworker class and a childpatient class. Prior to this project my only experience with django was writing fast backends for iphone applications. This project has been a django learning experience. When I started loading fixtures for my healthworkers and patients, they would not show up in the django admin page as separate entities, but as aggregated, unclickable items on the admin page (something like 20 patients). Exhausted and exasperated - I chucked the possibility of polymorphism and added a person object to healthworkers and children. Then because of my super slick - with some spaghetti code - dynamiclayout model I remapped the report columns to the new function/method names and everything worked as in a dream.
FIXTURES ARE IMPORTANT
Also in looking at the data - it is really bad. I am not going to be able to clean this data before I leave. I would if I could, but it really is not in the scope of this project - and already I have been unsuccessful in staving off feature creep. In software development it is important to have strict boundaries for a given project. You could conceivably work for ages on a project making minor tweaks and assisting with various automated tasks. You cannot work indefinitely with out appropriate remuneration on a project. People generally only value a service that they have to pay for - and in this case they will take ownership in the project. In the case of the INFSSS project. It is paid for by a Columbia grant - and I think this is reflected in the lack of interest by stakeholders. Everyone wants the sun, the moon, and the stars, if its free. However, if there is money then the hard decisions in terms of scoping - are made. Then, too, people will take active interest in the project and in its success. How this works into open source software - I will discuss at a later date.
I am now debugging my stats and graphing - and then will add 2 more sms messages. I should be done tonight. Tomorrow hopefully will be spent wandering around and trading video out CDs for tzchakies. Hopefully going to Mzuzu next week, but need to speak with Stanley on Monday.
Showing posts with label fixtures. Show all posts
Showing posts with label fixtures. Show all posts
Saturday, September 12, 2009
Monday, August 31, 2009
The Joy of Fixtures
I have had a thoroughly unproductive morning - I suppose to balance out my productive weekend. However, you cannot be productive all the time, because it is in those moments of unproductivity that provide the well springs of productivity.
I am about to break for lunch and will perhaps go to the market near the UNICEF building. It is a series of thatched stalls serving local delicaies that Sima and intestines, and of course sim cards. Down the street, there are about 300 worshippers dressed in white - a Christian sect I believe. They have been camping out in an open field for the past 3 weeks, and apparently will be staying another week. I wonder what the occasion is? I figure I could move to the hotel close by - the Sanctuary Lodge - and then walk to the office.It would take me about 15 minutes. I may actually do that.
I spent the weekend shoring up my datamodels, building the basic front end template system and building fixtures. I also joined the local IT listserv and I have already met developers in Blantyre doing SMS development. Will SMS work become obsolete once Africa gets wide GPRS penetration?
This morning I am praising the joy of fixtures.
There are all sorts of methodologies in place in order to control the quality of software. The intention is good. Something like 80% of all software projects fail (this may be an outdated number). I've seen pair programming, extreme programming, agile, object oriented design is supposedly a methodology, then you have aspect oriented design - and the list goes on .
Design patterns are good (Object oriented design for example). The main goal is to provide reusable chunks of code. So like - oh you figured out how to print something - good. I'll use that code in my application for the printing functionality. Design Patterns however also provide a a meta language with which to understand software in general. I write software in at least 5 languages at a given time, to say - oh this piece of code is decorator, or oh this is a singleton - is analogous to saying oh this is a noun, or this is in the subjunctive. It gives me a framework for cross-language comparision. It is a software grammar.
For quality control people are very excited about Unit Testing. Basically with Unit Tests you are writing bits of code that attempt to simulate how someone will use (or misuse a software ). Unit tests are for the smallest atomic element of your software project. For each atom, you write a unit test. The thing is, the person writing the unit test is not really the user. You will never anticipate the real world issues that crop up by writing a unit test.
I am a big believer in fixtures however (a part of unit test methodology). This is why I spent a few hours this weekend writing them. Fixtures are data that essentially 'Fix' your system at a certain state, so that you, or another user, can actually use and test the system. Essentially it is dummy data. The good thing about fixtures is that you see quickly if there are problems with your data model, and with the interactions between your datamodel. Sure there might be something wrong with a functional piece of your code - (ie you may want the maximum height for something but you are actually getting the minimum height). However, this will reveal itself in testing and iterative design. You cannot iterate if you have no data, and if you data models are buggy.
Software quality control is a thorny issue. Software is only as good as the programmer, and the way to become a good programmer is to be naturally talented or to find a good mentor, or to read good code (and perhaps contribute to an open source project), and of course to write code - in a variety of languages.
So this morning, while enjoying my Kiboko breakfast of eggs, fruit salad and tea (I have quit coffee!) I read a poem 'Stepping Westward' by Denise Levertov. When I first read it, I thought it was written by a man. I thought it was absolutely ghastly! Just a terrible poem. (I's about being woman / among other things). But when I went back and reread the poem, after discovering the poet was a woman, I absolutely fell in love with the poem. I often experience the same thing when watching one of my films with different audiences. Some audience make you love your film, and some make you want to go out and play in traffic - what is in the work and what is in your mind?
Some links of interest:
AfNog - african network operators group
Maker Faire Africa
Nubian Cheetah
Dream Manufactory
White African post on SMS vs GPRS in Africa
I am about to break for lunch and will perhaps go to the market near the UNICEF building. It is a series of thatched stalls serving local delicaies that Sima and intestines, and of course sim cards. Down the street, there are about 300 worshippers dressed in white - a Christian sect I believe. They have been camping out in an open field for the past 3 weeks, and apparently will be staying another week. I wonder what the occasion is? I figure I could move to the hotel close by - the Sanctuary Lodge - and then walk to the office.It would take me about 15 minutes. I may actually do that.
I spent the weekend shoring up my datamodels, building the basic front end template system and building fixtures. I also joined the local IT listserv and I have already met developers in Blantyre doing SMS development. Will SMS work become obsolete once Africa gets wide GPRS penetration?
This morning I am praising the joy of fixtures.
There are all sorts of methodologies in place in order to control the quality of software. The intention is good. Something like 80% of all software projects fail (this may be an outdated number). I've seen pair programming, extreme programming, agile, object oriented design is supposedly a methodology, then you have aspect oriented design - and the list goes on .
Design patterns are good (Object oriented design for example). The main goal is to provide reusable chunks of code. So like - oh you figured out how to print something - good. I'll use that code in my application for the printing functionality. Design Patterns however also provide a a meta language with which to understand software in general. I write software in at least 5 languages at a given time, to say - oh this piece of code is decorator, or oh this is a singleton - is analogous to saying oh this is a noun, or this is in the subjunctive. It gives me a framework for cross-language comparision. It is a software grammar.
For quality control people are very excited about Unit Testing. Basically with Unit Tests you are writing bits of code that attempt to simulate how someone will use (or misuse a software ). Unit tests are for the smallest atomic element of your software project. For each atom, you write a unit test. The thing is, the person writing the unit test is not really the user. You will never anticipate the real world issues that crop up by writing a unit test.
I am a big believer in fixtures however (a part of unit test methodology). This is why I spent a few hours this weekend writing them. Fixtures are data that essentially 'Fix' your system at a certain state, so that you, or another user, can actually use and test the system. Essentially it is dummy data. The good thing about fixtures is that you see quickly if there are problems with your data model, and with the interactions between your datamodel. Sure there might be something wrong with a functional piece of your code - (ie you may want the maximum height for something but you are actually getting the minimum height). However, this will reveal itself in testing and iterative design. You cannot iterate if you have no data, and if you data models are buggy.
Software quality control is a thorny issue. Software is only as good as the programmer, and the way to become a good programmer is to be naturally talented or to find a good mentor, or to read good code (and perhaps contribute to an open source project), and of course to write code - in a variety of languages.
So this morning, while enjoying my Kiboko breakfast of eggs, fruit salad and tea (I have quit coffee!) I read a poem 'Stepping Westward' by Denise Levertov. When I first read it, I thought it was written by a man. I thought it was absolutely ghastly! Just a terrible poem. (I's about being woman / among other things). But when I went back and reread the poem, after discovering the poet was a woman, I absolutely fell in love with the poem. I often experience the same thing when watching one of my films with different audiences. Some audience make you love your film, and some make you want to go out and play in traffic - what is in the work and what is in your mind?
Some links of interest:
AfNog - african network operators group
Maker Faire Africa
Nubian Cheetah
Dream Manufactory
White African post on SMS vs GPRS in Africa
Subscribe to:
Posts (Atom)