Archive for the ‘opensource’ Category

Alternate Approach to Voice Price Wars in Telecom Industry in Uganda

My colleagues at Styx Technology Group are looking at alternate approaches to telecos in Uganda to increase their ARPU (Average Revenue Per Unit) a metric for revenue from each customer, instead of the current price war tagged to 3/= per second (US$ 0.1 per minute).

  1. Accept that voice is now commodity, being pushed further out by VOIP for both regular users and business, due to the improving Internet connectivity both via fixed and mobile connections. There is no longer a competitive edge to having cheaper voice, the revenues are fixed and can only go lower
  2. Bundled services: Currently there are separate plans for voice, SMS and data, which have to be purchased daily or when needed. The monthly plans have a premium attached, so without looking at the numbers I suspect that a majority of the regular users purchase daily plans as and when is needed. The telecoms can create bundled plans (already existing for voice) to include SMS and data without the hefty premium. Additional incentives can be provided for further discounts when a user pays consistently for a plan for 6 months, without any breaks.
  3. Smartphone Device and Service Contracts: While these are being gotten rid of in the US and Europe, the market in Uganda is ripe for disruption, where smartphones are paid over 12 to 24 months, with bundled services. Obviously the argument here is the risk associated with lending in Uganda, but options include partnering with financial institutions can help reduce the risk profile, work through employers to deduct the costs of the contract directly at source.
  4. Multiple Smartphone Data Plans: This is similar to the device plans above, however this allows the owner of the plan to register additional devices for monthly fee to share the data. This has been common with unlimited plans, and would provide a new revenue stream.
  5. Extending Mobile Money Services: The best service to copy is PayWay with a wide range of devices, and platforms on which to use the service based on what infrastructure the agent has. I would like to be able to swipe my VISA card and transfer money to my account without having to go through the bank interface which tends to be down more often than not.
  6. Bulk Sales of Devices to Schools: The new underlapped customer base, sell more devices to schools get parents to pay part of the costs to push e-education services, why do kids still have to fill Advanced Level and University Level choices on paper forms that can be lost? With powerful tablets in the $50 to $100 range only the telecoms have the clout, network and drive to push this through.
  7. Custom Devices and Services: These are for data collection needs, surveys etc, which can be accessed through third parties but pushing the envelope on what is possible. The key here is flexibility of service, enabling channel partners build and innovate by creating custom services and plans to meet their specific needs.
The telecoms need to think of blue ocean strategies to create new markets, provide ability for others to leverage their platform investments for new revenue channels, leveraging the example of Amazon that has created a multi-billion dollar technology infrastructure business based on solving internal problems.
What do you think?

UPDATE: This blog post follows the same thinking as The Telecom Wars in Uganda – Round 5 – 2015 and Beyond on this blog too

Advertisements

OpenMRS Module Development Learnings – 102

Update November 2018: This blog post has been superseded by the OpenMRS SDK (https://wiki.openmrs.org/display/docs/OpenMRS+SDK)
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.

 

Mapping Adventures Day 1 – Introduction and Open Street Map

Mapping has grown by leaps and bounds, from the introduction of Google Maps, what was once the ode of cartographers and GIS experts is now available to the common folk like me 🙂

So wanting to learn how to map is one thing, getting the chance to do it is another, until well Fruits of Thought (http://www.fruitsofthought.org/) organized an exercise to update the information in Kabalagala, a local suburb of Kampala the capital city of Uganda.

The agenda was really simple, an introduction to mapping (and what we were going to do), the we were going to go out and collect the data, return for lunch after which we would upload the data we have collected to Open Street Map (OSM – http://www.openstreetmap.org).

The introduction to mapping was a simple affair, the concepts introduced where:

  •  Trace – GPS coordinates for a place, when entering these into OSM the type of feature found would also need to be described
  •  Track – the route taken to a point. The value of this was adding information on tracks, and side roads.

The GPS data collection devices were eTrex Venture HC Garminand GPS Receivers (https://buy.garmin.com/shop/shop.do?pID=8707&ra=true) and android smart phones with Open Streetmap Tracker  a simplified app that captures the GPS coordinates of a single location at a time.

Well then off we were down to the dirty collecting trace points and grabbing data for a few routes. The team I was in was on a mission and within 90 minutes we had a 4km route and 40 points of data. That was the easy part; next step was lunch then uploading to OSM.

First we had to create accounts which was pretty straight forward since it also supports OpenID so I used my Google Account, yes I am a fanboy. OSM requires a GPS Exchange format (gpx) file which was easily downloaded from the GPS receiver unit we were using.

An initial challenge we had was with Internet connectivity as for some reason it was very slow that evening so the upload of a 600K file took forever and failed later, but finally we got it in. Once the file was uploaded we could access the traces at http://bit.ly/KK15ql to start adding more information. This turned out as easy as drag a building and facility type and place it over the trace point, give it a name and details … A baby could do it in their sleep, isn’t that what we all say when we learn something?

Well after all is said and done we need to praise Google Maps for leading the charge, and so did this blogger “In Praise of Google Maps” (http://oleb.net/blog/2012/06/in-praise-of-google-maps/)

Display Contents of Different File Formats Word/Excel/Powerpoint/PDF/RTF as HTML

This is a typical problem which I also raised on Stack Overflow (http://stackoverflow.com/questions/11061929/php-extract-text-from-different-file-formats-word-excel-powerpoint-pdf-rtf#comment14475398_11061929), but there seemed no single resource around the web to solve this particular problem, so since I have solved it I thought it would make sense to provide an approach and a solution, it can be refined better with time

Problem: We have a web application that allows different users to upload different files to share with others, the file types are limited. However just before downloading a file, the user needs to see a preview of the file contents, which is where it becomes tricky since each  file type is different.

Approach:

1. Identify the extension of each file

2. Display the text or HMTL from each file using the appropriate library for the file type, since there is no unified library

The base class is https://gist.github.com/2941076 which requires the path to the file and the extension (since the extension is already stored in the database I do not try to extract it from the file)

The libraries used for the different types of files are the key to the solution:

1. MS Word Documents – LiveDocx Service within Zend Framework (http://www.phplivedocx.org/2009/08/13/convert-docx-doc-rtf-to-html-in-php/) the steps are:

– Create a Mail Merge Document using the word document as a template

– Connect to the LiveDocx service (here you need SOAP and SSL enabled on your local LAMP installation)

– Save the generated document, and render it as HTML

2. MS Excel – PHPExcel from Codeplex so simple its scary (http://phpexcel.codeplex.com)

– Create a PHP Excel class to read the file

– Create an HTML writer to render the HTML

– Save the HTML to a file and read its contents

3. PDF text extract – http://pastebin.com/hRviHKp1 

– Create an instance of the PDF2Text class holding a reference to the PDF file

– Decode the PDF which extracts the text out of the file

d) Powerpoint – Work in Progress to be added later

More as I work in the power point extractions

Databud – Startup Weekend Kampala – April 27 to 29

I will be attending my first startup weekend in Kampala, on April 27, 2012 to April 29, 2012 and well I thought that why not share my pitch and get advice on how to refine it. No idea is great unless shared right?

In the absence of #opendata in Uganda, there is a whole lot of data locked up within individual government systems, documents, in non standard formats which needs to be unlocked, the data set free so that it can grow (Data Bud) – the data buds and grow

A picture is worth a thousand words right – below is the whole concept

Data Bud Concept

Data Bud Concept

Comments, additions, advice? Looking forward to seeing ya this weekend

HTML Web Toolkits – Twitter Bootstrap

Well it seems like I have been doing a rip and replace of most of the “homegrown” components that we are using in our environments as we gear up for the new year. The latest to fall to the axe is our HTML + CSS + widget collection that has been growing over the years which was a collection of code from different places:

  1. reset.css by Tantek Celik (http://www.cssreset.com/scripts/undohtml-css-tantek-celik/) – to provide a base for initial browser compatibility
  2. Multiple column layouts from the Dynamic Drive (http://www.dynamicdrive.com/style/layouts/category/C9/
  3. JQuery and JQuery UI widgets – here and there 
  4. Input Button and Link styles inspired by Particle Tree (http://particletree.com/features/rediscovering-the-button-element/)

Well like all web development shops, you pick your poison and stick with it, but with the troubles we have been having with different IE versions, I set out to find out whether we had to go through all the pain of tweaking each project, or whether we could re-use existing solutions. Well my search led me to Twitter Bootrap (http://twitter.github.com/bootstrap/index.html) which was at version 1.4 at the time, and 2.x was in beta and HTML5 Boilerplate (http://html5boilerplate.com/) both of which seemed to be great starting points.

However Bootstrap won out, in the end, because it provided a responsive UI for different screen sizes, pre-built basic elements which we use a lot, buttons, forms, tables, dialogs, message alerts which were easily setup. Okay JQuery UI has great widgets but they are a pain to setup configure and use, the code for a dialog is ~20 lines with CSS, etc, very powerful but no everybody needs a V-8 engine.

First on the agenda was to understand the grid layouts, okay I have heard about 960 and Blueprint grids, but I never understood how they worked, but wow!!! This is amazing, all I need to do is add a few pre-defined grid classes and you can get 2 column, 3 column layouts, our home grown frameworks would never do this … I liked it, coming from an engineering background and lots of database work I think rows, columns and relationships, and the grid well, had me at Hello World 🙂 

The built with bootstrap site (http://builtwithbootstrap.com/) provides a great starting point to see what is possible and available. We decided to use a free theme for a project we are starting and its working for us. 

As we walk this journey, the next challenge is how to handle the tables vs table-less designs for forms. Please drop me a line and let me know what your take either here or on my Stack Overflow question at http://stackoverflow.com/questions/10072991/responsive-html-page-design-pc-tablet-smartphone-with-table-or-table-less-fo 

Doctrine2 Day 3 – Proxies, Associations, Relationships

Well if you are following this series, then by know you are aware that we have the validators setup, and we are almost ready to go. Well not quite so. I ran into an issue with proxies and class loaders which took a while to resolve, but what I did was:

a) Changed the Zend Framework-Doctrine2 integration to the Bisna integration (https://github.com/guilhermeblanco/ZendFramework1-Doctrine2) – note the additional configurations before

b) Learnt that DO NOT SAVE ANY MODELS IN SESSION OR CACHES due to Proxy auto loading issues

c) Develop unit tests for the model validations and saving as you go along because they will save you as you shift things around . I am currently trying to save an association to the database but due to the tests that I have running I can test out the different association mappings without issues because I track the changes using my unit tests.

Now onto relationships, well what I found was a follows:

  1. I have been having a tough time dealing with relationships from Doctrine 1 which autoloaded relationships, however with with the Doctrine2 data mapper, you have to auto load the associations your self
  2. In Doctrine 2, you cannot define the foreign key column and relationship as this creates problems for the ORM mapper, so since I need to access the foreign key value for example personid, and the related object person, my approach has been as follows:
    • Added a person instance and relationship mapping to the person as per the Doctrine
    • Add a setter setPersonID() which loads the Person from the database using the provided ID and sets it to the person relationship provided
    • Added a getter getPersonID() which obtains the id of the person for use on the screen
  3. As recommended avoid bi-directional relationships where possible, try to keep them as uni-directional as possible.

Next I will be implementing a nested hierarchical structure using the tree nested set implementation at http://www.gediminasm.org/

%d bloggers like this: