Thursday, February 24, 2011

Playing Catch Up

Whoa! Almost let this blog die...
I have a few things I'd like to catch up on and discuss.


CS Alumni Symposium
First I'll talk about the computer science department's alumni symposium. Our department put on this symposium for current students and in my eyes it was a huge success. Previous graduates came to offer their advice about graduating and getting jobs. I thought all of this advice was very useful. Seeing these graduates and how successful most of them are is a very big eye opener. It reminded me that I am involved in a career field that is constantly in need of new people. It's good to know that finding a job after school will be easier than most. I also got to talk to Jason Youmans of Bibliolabs who gave some good ideas about internships. I think that the main message that i took away from the symposium was that I need to get extracurricular with my computer science and get involved in something I'm passionate about. Overall I thought it was a successful meeting.

Team Project and Bug Fix
Fixing our bug has pretty much been a flop so far. Most of us have had other school work to deal with the past week or so. It has been slow moving. I did make a minor amount of progress the past few days.

I am starting to try and learn Spring MVC which deals with the form submission in OpenMRS. If I can figure out how the form submission redirects when there is an input error I can just use that same technique when the "preferred patient" is not selected. This should be easy to do within the next week. Hope to have a solution very, very soon.

After we get done working out this bug I hope to work on a bigger issue with OpenMRS and make some major contributions with our group for the semester.

TOSS Chapter 7 Exercises
...........................................

Monday, February 7, 2011

Bug Tracking OpenMRS using JIRA

Issue tracking is probably one of the most important aspects of open source software development. Evolution of open source software depends upon a community resolving problems.

OpenMRS is most certainly an open source project, and also has an issue tracker. OpenMRS uses JIRA to track all of it's issues. Issues include a bug, defect, task, improvement, incident, etc. JIRA does a great job of reporting, filtering, and designating issues. I found it very easy to navigate issue tickets and find some information that exercises in "Teaching Open Source" requested.

The oldest bug in OpenMRS:
TRUNK-330 is the oldest ticketed bug in OpenMRS that is still open. The bug is described as the following:
  • audit trails for obs - can only change one attribute at a time.
  • double data entry
Since I am just getting involved with the project it is hard to tell what the bug's domain and nature is. I hope to figure this out with time. My guess is that it hasn't been solved because the bug is probably insignificant to future development.

Creating a JIRA Account for OpenMRS
I was able to create a JIRA account for OpenMRS very easily and I am now ready to report or solve tickets within OpenMRS. Since our project will most likely involve fixing a minor bug, this is very important.

Reproducing a Bug
First I went into the JIRA issue tracker and picked the revision/version of OpenMRS that i have checked out:  Version 1.9.0 SNAPSHOT Build 18013.
I then searched for a bug that i felt was relatively easy to reproduce. The bug that I tried was known as TRUNK-222. The description of the bug is, "If a patient's first name is less than 3 letters, we cannot search for him without knowing his family or middle name". I thought that this would be an easy bug to reproduce so i went ahead trying.

First i went ahead and created a patient with a 2 letter name "Di":

I then proceeded to try and search for "Di" and could not produce any results, as expected.

Although this bug ticket was not well formatted, it was still easy to reproduce. Also, after reproducing it i think that this is not actually a bug but a design problem.


Bug Triage

Since I'm very new to the OpenMRS project bug triage would be very difficult at the moment. Instead, I'm just going to go through a few bugs on my own and share my thoughts on what bugs are more important than others, a part of the triage process. All of the bugs I'm going to mention are under the category from the JIRA ticket system on OpenMRS as being a "severity" of "3 or 4" (on a scale from 1-4).

Bugs:
  1.  "JUnit tests fail if run independent of maven" - This bug is extremely bad. OpenMRS fails to pass the unit test's that are designed. This means that there could be an unforeseen amount of issues with the particular build (1.9.x)
  2. "OpenMRS can not be installed with MS SQL Server" - This bug is also extremely bad considering some machines trying to implement the particular build could be running MS SQL Server.
  3. "Change default logging levels of service methods" - This bug is import because it affects the logging of everything that happens in an OpenMRS deployment. Logging could be very important if you wanted to track information in a particular deployment of OpenMRS
  4. "support names with more than 2 components when going to create patient page" - This bug is a little less important than the first 3, but still has a profound affect on any particular implementation of OpenMRS. This bug will cause the name of  a patient to display and appear to be incomplete.
  5. initialsetup: OpenMRS logo text is not correct - This is a less important bug. This bug is simply a cosmetic item in a build that is very new. I think that this could be avoided until some of the tougher bugs are fixed.
This triage was simply an exercise and I hope to learn more about OpenMRS so that my triage can evolve and become better.


Conclusion:
All of these exercises were very helpful for me. They forced me into exploring deeper in to the project that I am working on. I hope to learn more and be able to contribute to OpenMRS.


Getting, Building, & Running "OpenMRS" Part 2

Okay!

Finally managed to deploy OpenMRS locally after a whole flurry of issues. Thank God for Google!

I first had issues with installing the right packages that were needed to install and run OpenMRS. Tomcat6 is used to deploy OpenMRS on a local server. Unfortunately it's not easy to get Tomcat6 working. The Tomcat6 download in the Ubuntu repositories is not a good install and has missing files, in my experience, that are crucial to running Tomcat6. I had to go directly to the apache Tomcat6 website and get a mirror to download the tar.gz file from their repositories. Some of my best researched advice came from "how to geek".

This was easy since all i did was run:

sudo wget http://www.trieuvan.com/apache/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.tar.gz

sudo tar xvzf  apache-tomcat-6.0.32.tar.gz

sudo mv apache-tomcat-6.0.32.tar.gz usr/share/tomcat6

After installing Tomcat6 properly I had to change a couple .xml files associated with the software in order to get it running. This was fairly simple.

Next was the feat of trying to get OpenMRS deployed on the tomcat server. This took me multiple tries with different settings. The quick installation is known to fail since it was just commited to the OpenMRS Trunk last week. All I had to do was to try and run the advanced install and I finally have OpenMRS running.

I can now start to explore some of OpenMRS and find out how i can contribute to the bug fixes located in their ticket system, implemented with JIRA. I look forward to blogging about more of my experiences.


Here's a screenshot of OpenMRS finally deployed on my system:

OpenMRS FINALLY Deployed





A word of advice for those reading that are trying to Build-->Install-->Deploy OpenMRS on Ubuntu:
Make sure that you get a good Tomcat6 install with /conf directory and make sure you use sun-java-6-sdk. This is crucial to getting OpenMRS deployed correctly.

Thursday, February 3, 2011

freeciv2.1 Build, Make, and Install

"Freeciv is a Free and Open Source empire-building strategy game inspired by the history of human civilization."  -taken from Freeciv

As a part of the "Teaching Open Source" book, there is an activity that helps you learn how to build, make, and install open source projects from source code. I went ahead and downloaded freeciv and extracted the files from the .tar.bz2 file. From here building was fairly simple. At first i ran into a problem with dependencies. Luckily the compilation script mentions which dependencies were left out. So i went in search for GTK packages in order to full fill the requirement. This proved to be very, very slow and agonizing. I finally came across a command that would find and download all missing dependencies for the freeciv projects.

sudo apt-get build-dep freeciv

This command worked great. next all i had to do was:

sudo make install

This installed to the default directory "usr/local/bin" and made the project. I got it to run nicely and all went well. This was a very simple exercise since i have commonly used these commands before in the previous course CSCI 360 "Software Engineering" Project.

Here's a screenshot of freeciv up and running:



Freeciv 2.1 Running

Wednesday, February 2, 2011

Getting, Building, & Running "OpenMRS"

My goal for this week was to checkout the latest version of OpenMRS and try to build and run it. Conveniently OpenMRS had a great guide for developers looking to build and run the source code here.  I found this guide to be very helpful. OpenMRS recommends that you use a couple of integrated pieces of software in eclipse such as m2eclipse and subclipse. subclipse and m2eclipse proved to be very helpful in the building process. Subclipse, which is a subversion client for eclipse, made it very easy to check out the Trunk for OpenMRS. All you have to do is type the repository's link and designate that it is indeed an SVN server. After checking out the code it was also very simple to build the code using m2eclipse, which is a client that maintains dependencies of a "mavenized" project. At first i encountered an issue with version conflicts but that was easily resolved. After resolving these issues i was able to succesfully build the project. Next my goal was to run the built code. This is the hardest part about the project since it has to be built as a web application instead of a piece of software that you use locally. OpenMRS suggests that you use TomCat to mount the OpenMRS web app. This is what i ran into trouble with. TomCat requires that you change permissions to the "users" file. I ran into trouble getting access to the .xml file. I am very close to getting OpenMRS to run and I am very excited to get it running.


I also got a response from one of the core developers and she suggested that we go ahead and resolve some of the ticket issues/bugs. As soon as i get OpenMRS built i will blog my experiences.