Archive for the ‘software development lifecycle’ Category

Alternate Approach to Legal Independent Election Tallying

The Uganda elections are more or less over with less than 6 hours for the Uganda Electoral Commission (EC) to announce the results for the presidential elections.

Given all the time on our hands, with no social media, the team at Styx Technology Group designed the following alternative approach to independent electoral vote tallying for future elections that provides inbuilt mechanisms for audit and verification of results.

The primary data sources for the process are:

  1. Official EC list of polling stations and voters per polling station
  2. Photos of the signed election tally sheets from each polling station. To ensure that the photos are not tampered with and provide an audit trail:
    • Each photograph has to be taken with information on the camera, the GPS coordinates of where the photo was taken, date and time when the photo was taken which is available in many cameras that share it using the Exchangeable Image File Format (EXIF)
    • Two separate photos of the tally sheets have to be taken by different cameras
    • The cameras taking equipment may be registered beforehand to provide validation of the source of the information
    • The signatures of the returning officers and stamp must be clear and visible in the photo

The architecture for the technology solution is as follows:

  1. Web based solution accessible via any browser. Due to poor Internet connectivity in many areas of the country, an Android app would be provided to assist in data collection, then data sent once the user gets into an area with Internet.
  2. The field officers who capture the photos would also be provided with an option of entering the candidate vote tallies.
  3. In the tallying center, candidate vote tallies are entered from the photos received and vote tallies entered by data clerks. In order to reduce errors the following approach would be used:
    • The clerks are randomly assigned photos as they come in
    • The tally for a station must be entered correctly by two separate data entry clerks, then approved by a supervisor. This process is formally called the two-pass verification method or double data entry.
  4. All correctly entered data is shared with the rest of the world for download and analysis.

This system is mission-critical having to be available for the entire vote counting period of 48 hours,  so the architecture includes the following paths for data collection:

  1.  Multiple access IP addresses and domains for the website in case some are blocked off
  2. Any data collected via the Android app can be sent via email to a dedicated tallying center address. To ensure that only data from the app is received and not changed in transit, encryption is used.

The inspiration came from a quote by Ghandi “Be the change you wish to see in the world”, disproving the myth that there is no local capability to design and implement such solutions and most of all that such solutions have to be complex.

Looking forward to hearing your thoughts and suggestions…

Tech Tip: Websites on Github with Jekyll

We have been facing a challenge on how to manage the Styx Technology Group corporate website without having dedicated resources to host, deal with security, updates and maintenance. Having been in the website business for over a decade at the turn of Y2K,  having an easily maintainable solution was key for the long haul.

Enter GitHub pages (https://help.github.com/categories/github-pages-basics/), of course any decent software developer and team are using some form of version control, but the beauty is that it allows projects, users and organisations to have self hosted sites that are managed through a repository.  That in combination with Jekyll (http://jekyllrb.com/) supports content management without a database.

To further speed up our development process, we leveraged existing themes for the website look and feel that were close to our need, while keeping the site design very simple so that we focused on solving the problem at hand.

It was suddenly music to our ears as the team did not have to leave their IDEs (random plug for Jetbrains IDE tool suite that we have standardized upon)  in order to make updates to the website. Just create a new markdown document, verify and push … And bam!! the updates are done, version controlled and all, no more hassles with database configurations …

Need help getting your website up and running in such a fashion do shoot us an email at consulting at styxtechgroup dot com and we shall be happy to help and engage…. Have a great weekend

OpenMRS Implementor Series 101 – Building a distribution package

I am not sure where this will end, however it is my way of giving back to the OpenMRS community that has provided an excellent learning platform and great support to me over the last 6 months, I have been using the software tools.

My intention is to share what I know, as a way of organising my thoughts and sharing ideas as I figure out where to add this to the OpenMRS community documentation, where it surely belongs. The flow of each of these posts will usually be to answer a very specific question that I have asked in the past, and where I think I have figured out an approach that seems to work.

UPDATE December 31, 2015: The new home for this blog post is  on the OpenMRS Wiki at https://wiki.openmrs.org/pages/viewpage.action?pageId=93358939 all further updates will be placed there

Problem Statement: How can I get an OpenMRS distribution that has all the modules that I need?

New to OpenMRS – What is Possible?

If you are new to OpenMRS and would like to see what is possible, then download the OpenMRS X.X Standalone Edition from http://openmrs.org/download/ which contains a pre-configured reference application with sample data that is ready to run in a single command.  This is note meant for production use as the embedded components are not robust enough for the growth in data collected.

Enterprise Installation like Reference Application

If the reference application provides all the modules that you need, the next step is to set-up n enterprise ready installation using a dedicated application server & database in which the Platform x.xx WAR (for Enterprise) can be installed. The modules for the reference application above can be downloaded as a zip file from the standalone edition above.

Full Control of Enterprise Installation

The last option is the most complex, and is for those implementors who want to install the enterprise edition but have control over what modules are installed or even what versions. In this case the OpenMRS distro platform is your best choice (https://github.com/openmrs/openmrs-distro-platform) which allows the building of a custom WAR file that includes the modules that you need.

The modules are defined in the pom.xml file and are accessed from the OpenMRS Maven Nexus repository (http://mavenrepo.openmrs.org/nexus/index.html#view-repositories;modules~browsestorage).

An addition to this project is for modules (pending review) but currently available at https://github.com/ssmusoke/openmrs-distro-platform is the ability to include custom modules (*.omod files) by dropping them in a folder called modules.

Please do share your comments on this style and let me know where it would fit best in the OpenMRS community documentation

 

Syzygy – Release 2 – Uganda Mobile Money Cost Estimator

Syzygy is a Uganda focused utility calculator (launched by this post https://ssmusoke.com/2015/08/11/launching-syzygy-uganda-focused-utility-calculator/), this new release adds a tool not available anywhere else allowing you to estimate the costs of a mobile money transaction. Are you sending to a registered number, unregistered or trying to withdraw from an agent or ATM?

Hope this app saves you the hassle of searching for the transaction chart which is usually hanging in the agent’s booth.

Do let us know what you think of the new release.

The link to the app is http://bit.ly/syzygy-ug

A screenshot of the new calculator is below

Mobile Money Cost Estimator

Mobile Money Cost Estimator

Alternate Approach to MTN SIM Card Registration Process & Web Tool 

MTN Uganda has finally put together an application to support the online registration of simcards. However the process as outlined in the Dignited article (http://www.dignited.com/15503/you-can-now-register-your-mtn-uganda-sim-card-online-heres-how/) requires a user to download a registration form, upload it then wait until MTN staff can get back on the registration status.
This blog post provides an alternate design and approach for an online sim-card registration tool, thanks to the team at Styx Technology Group for putting the design and mockups for the alternate solution.
The principles of the system design are as follows:
  1. A user can register more than one sim-card under their own names only after completing their profile information, which cannot be changed later (for audibility)
  2. A user can return and check their registration information later
  3. MTN staff can respond to a registration pointing out any missing or inaccurate information
  4. The user can be notified by SMS and/or email of the status of their registration, and can also login to check the status
  5. The registrations can also be downloaded and added to MTN systems (as may be required)
  6. For identification, two documents have to be provided to confirm, and because the numbers are entered, it is easy for MTN staff to verify
The mockups below tell the story of how an alternate process looks like  licensed under the Creative Commons 3
Login Screen

Login Screen

Signup Screen

Signup Screen

Dashboard

Dashboard

My Profile

My Profile

Register Number

Register Number

UPDATE – November 19, 2015: Looks like MTN updated the sim card registration process to an online form at https://www.mtnbusiness.co.ug/mtnreg/ in response to this post

TechTip: Moving a Project Between Git Repositories

I tend to write these so that I do not forget them, and possibly to help others who may be face similar challenges. The question is why would somebody want to do this, well usually its because of a change in Git hosting providers or probably change in project ownership.

The process is as follows:

  1. Check the configuration of the remote repository
    local-box:change-url ssmusoke$ git remote -v
    origin https://github.com/ssmusoke/project-repo.git (fetch)
    origin https://github.com/ssmusoke/project-repo.git (push)
  2. Rename the url of the current remote repository from origin:
    local-box:change-url ssmusoke$ git remote rename origin oldrepo
    local-box:change-url ssmusoke$ git remote -v
    oldrepo https://github.com/ssmusoke/project-repo.git (fetch)
    oldrepo https://github.com/ssmusoke/project-repo.git (push)
  3. Create a new origin pointing to the new remote repository
    local-box:change-url ssmusoke$ git remote add origin https://github.com/ssmusoke/newproject-repo.git
    local-box:change-url ssmusoke$ git remote -v
    oldrepo https://github.com/ssmusoke/project-repo.git (fetch)
    oldrepo https://github.com/ssmusoke/project-repo.git (push)
    origin https://github.com/ssmusoke/newproject-repo.git (fetch)
    origin https://github.com/ssmusoke/newproject-repo.git (push)
  4. Sync the project to the new remote repository (if any issues occur the old url is still available)
  5. Delete the old url (only after confirming that everything works fine with the new url)
    git remote rm oldrepo

OpenMRS Module Development Learnings – 102

My team mates and I are completing a number of OpenMRS workshops focused on improving our module development capability. This blog post captures the unwritten lessons that we have picked up as a way of giving back our lessons to help others in the community (and will be moved to the OpenMRS Wiki once the lessons have been internalized and consolidated, as that is its natural home).
The approach is based on the following OpenMRS community articles:
  1. Creating Modules – https://wiki.openmrs.org/display/docs/Creating+Modules
  2. Creating your First Module – https://wiki.openmrs.org/display/docs/Creating+Your+First+Module
As you develop the module it is important to keep testing and verifying whatever you do especially when the module involves user interface components, extending the OpenMRS UI. The process we ended up using was as follows:
  1. Setup a module using the module creation command line utility
  2. Downloaded Spring Loaded from its maven repository http://mvnrepository.com/artifact/org.springframework/springloaded
  3. Downloaded and setup OpenMRS standalone from http://openmrs.org/download/ picking a version greater than 1.11.x which supports debugging options
  4. Once the standalone version is installed, open the openmrs-standalone-runtime.properties and add the following variables to the vm_arguments: (should all be one line – separated here for clarity)
    • -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
    • -Dmodule.development.directory={absolute path to root folder of the module}
    • -javaagent:{absolute path to spring loaded jar}
    • -noverify -Dspringloaded=inclusions=org.openmrs.module.modulepackage..* (note the two trailing dots before the *)
  5. Setup newly the module into an IDE (tested with IntelliJ & Eclipse)
  6. Installed a FileSync utility, RemoteSynchronizer for IntelliJ & FileSync (http://andrei.gmxhome.de/filesync/) for Eclipse
  7. Setup sync for the omod webapp folder into the standalone webapp folder located at WEB-INF/view/module/{modulename}
Our development workflow is smoothened out since any changes to Java classes & JSPs are automatically applied & reflected in the standalone app.
Additional Tips and Tricks
  1. Tomcat – Change the following init params in web.xml:
    • modificationTestInterval from 4 to 0, so that JSPs are automatically recompiled
    • development is true (this is the default)
  2. Intellij – the Java classes are not automatically recompiled on saving changes so there is need to run mvn package -DskipTests
  3. Follow the OpenMRS conventions as much as possible by cloning openmrs-core to see how the design of the interfaces, service layers is done. This will help get access to lots of the magic that happens behind the scenes.
  4. Java 8 will give you trouble, stick to 1. 7 as we did not try 1.6 anywhere.
%d bloggers like this: