Monthly Archives: March 2014

New Ticket: TRUNK-243

After two attempts to work on the OpenMRS’s project my group has now chosen a new ticket, the TRUNK-243. The description of this ticket explains that the current unit tests have bad names, so this ticket is about cleaning the unit test. I’ve been researching about unit test before to start working on the actual code, so this is what I have learned this week.

What is Unit Test?

Unit testing is a software development process designed to correct individual parts of code by isolating each part of the program. In other words, unit test is a piece of code that invokes a unit of work in the system and then checks a single assumption about the behavior of that unit of work.

Benefits of Unit Testing

  • Reduces the level of bugs in production code
  • Problems can be found early in the development cycle
  • Automated tests can be run as frequently as required
  • Facilitates change
  • Simplifies integration
  • Is a form of documentation
  • Can improves the design of code

From the blog Naty Zelaya » CS@Worcester by natyzelaya and used with permission of the author. All other rights reserved by the author.

Drawings, Diagrams, and Instruction

I spent this week tidying up a few odds and ends in my rafter creation app as well as drawing diagrams and creating icons.  I have done a bit of coding, as well as correcting a bug I discovered with gambrel and mansard fascia calculations.  There will be more coding needed before I can publish still, but not too much, the rafter instructions are not yet housed independently in their respective classes.  That – and I still need to build in an options menu with an ‘about’ page and an option to quit the application.  I have honestly been debating whether it is entirely necessary, but have been leaning towards yes.  The reason being, I don’t want the user to become frustrated with clicking the back button repeatedly when they want to quit.  There is also an issue with the fascia options regarding what to do when the user selection will not allow for a standard fascia cut.  In the event of steep pitches and short fascia projections, it can become necessary to notch the birds mouth cut of the rafter above the top plate.  When this happens you need to lace the plywood or sheathing with the portion of the rafter that is notched out.  I show this situation in the picture below.  

Image

The problem is the user may already have sheathed their building, in which case their needs to be some sort of warning to let the user know the affect of their choice.  There are a few ways I could handle this.  I could limit the user from making choices that create this situation.  The draw back here is it is not a bad practice to notch above the plate in order to accommodate the proper fascia size, and there is no reason not to apply it other than that it will require more work.  I could also choose to allow the situation to occur and just give the user a warning.  However, that would not be very helpful to the user and it would require disabling the creation instructions because they would be incorrect in such a situation.  The last and I think best scenario is to catch the situation and warn the user, giving them the option to re-enter new data or proceed.  In the event that they proceed the fascia activity will pass a message along to the output activity.  This message will let the output activity know what changes to make to the images and instruction in order to accommodate the new fascia cuts.  As a bonus to this approach, the app would be able to accommodate any fascia size in any circumstance.  The draw back would be that it will take the most time to implement and I am severely short on time.

 

I have completed some of my diagrams and icons this week so here are some pictures of the final product.  

Image

Image

My plan is to utilize top down views to show the necessary inputs for hips, unequal hips, mansards and sheds with hips, as my original 2D approach left to much to be assumed on the user end.  For instance you cannot show to different opposing pitches with a 2D diagram.  I will be working on those soon and will post some more pics when they are ready.  In addition to that I still need to draw all the instructional diagrams, which depict how cut up each rafter.  The textual instructions for cutting common rafters are complete but I still need to write instructions for cutting other more complex rafters.  I expect to finish all diagrams and textual instruction by the end of the week.  I will be working in order of what is most important.  Any instructional texts that don’t get done by the end of week will have to be part of the second version at this point.  That’s pretty much all thats left before I can publish so I had better get back to it.

 

Till next time.

 

Jason Hintlian

From the blog jasonhintlian » cs-wsu by jasonhintlian and used with permission of the author. All other rights reserved by the author.

TRUNK-243

After flipping through many many issues of OpenMRS’s issue tracker our group has decided to choose TRUNK-243. This issues is about going through the units test of OpenMRS and ‘cleaning up’ the tests. This bug will be great for my group and I to learn all about unit tests. My book I also chose to read this semester focuses on unit testing specifically in Java.  Unfortunately last week I posted on this issue to try and save time by not needing to sift through the vast amount of classes OpenMRS CoreSW has… however I have yet to get a response. My group and I will need to manually go through the code to find all of the unit tests. This is not always a bad thing, by looking through more and more of the code we should all get a greater understanding as we mine for the unit tests. 

From the blog tbruceblog » cs401 by tbruce731 and used with permission of the author. All other rights reserved by the author.

Week (Project Status Report)

This is the second week we keep working on the ticket TRUNK-3009, then we are splitting the assignment  for each group member. Then we decided to change the ” Settings (formerly Global Properties 1.8 and below)” instead of “Global Property”, but we forgot to tell readers a number of ticket  on the wiki page , which belong to the OpenMRS website.. Unfortunately,  we could not log in on the wiki page, then we tried to reset the account but it isn’t work. we knew our account have been clocked out from  the wiki page, because a developer guy is confusing on what we are changing. Currently, we are still being locked out from the wiki page, but we still can log in on other page from the OpenMRS web site. We may un-sign the ticket 3009 and looking for another ticket to work on.

From the blog herangoc » cs@worcester by emtrieu and used with permission of the author. All other rights reserved by the author.

OpenMRS Wiki

Up to this point, working with OpenMRS software has become frustrating. A quick recap… In a matter of minutes, our original ticket was claimed by someone else, so my group ended up losing such a great ticket to start off the project. After this misfortune, we chose another ticket, which was not very clear in the description of the problem. However, we had an answer and likewise the approval from one of the OpenMRS developers to start working on the issue.

Unfortunately, on March 11th, I received an email about the recent edits made to the wiki page.  The email states that some of the senior developers have expressed concerns & confusion about the accuracy of the edits.

Before proceeding with our work, we ensure that the outcome was what they were asking. It’s frustrating because all changes made by the group have been reverted back. Working on this project has been a waste of time, and at the end it seems my account has been restricted to access the wiki page.

After two attempts, looking into a new project will be a challenge.

From the blog Naty Zelaya » CS@Worcester by natyzelaya and used with permission of the author. All other rights reserved by the author.

Trunk-3009 Problems…

Our first bug got reassigned shortly after we decided to work on it so then our group went out on the hunt to find another issue. We found Trunk-3009 which is updating many of the wiki pages on the openmrs wiki page. We started work the week of the 10th of march making many changes in all of the sections which required changes. However many if not all of our changes were reverted. Our issues Trunk-3009 was marked as ready to work therefore should have been verified by developers with more knowledge of the openMRS project. Our group had worked hard on making the changes in the necessary changes and they all got rolled back, this is very frustrating. I have been looking on the bug tracker for some new issues to purpose to our group to work on next.

From the blog tbruceblog » cs401 by tbruce731 and used with permission of the author. All other rights reserved by the author.

Gambrels, Mansards and Theming

Well, It would seem another two weeks has flown by but with midterms this past week; I hardly noticed.  I honestly would have had nothing to post a week ago due to a test in Operating Systems which required a lot of preparation.  I also had to set up two other operating systems on my Mac Book Pro Retina MBPR for that class as well this past week and write a report on it.  That said I am going to try and post a tutorial for setting up Ubuntu and Windows 8.1 on a  MBPR using the Refind boot loader, I downloaded from GitHub.  Reason being it is not very straight forward and I could not find any clear instructions myself for setting up a triple boot system on a MBPR.

Anyway, once I finished all that I was in the clear to get some work done on my rafter app.  I decided I would tackle Gambrels and Mansards simultaneously due to there similarity in nature.  Simply put, a Mansard is a Gambrel with hips.  Considering all the mathematical logic I needed was already completed doing past roofs, it only took two days to implement everything else involved.  Although, I have to admit one of those days was severely inhibited due to a Saint Patricks Day work party my wife and I had to go to the night before.  In any event, all the roofs I will be offering in the first version are complete now and by that I mean the great majority of the code is completed.  I have neglected art work, diagrams and the instructions sets which is basically the content of the app, in an attempt to catch up on my tentative deadlines.  Unfortunately, I am not much of an artist and it tends to take me a long time to create icons and diagrams.  The plan now – regardless – is to complete all of that which I imagine will take a couple weeks at least.

This is not what I had hoped for, but the fact is it leaves four maybe five weeks to convert the app to iOS.  However, I am convinced that with layouts, instructions, icons, and themes finished in Android, the conversion will go smoothly.  There was really nothing I could cut from the first version, other than dormers, in order to expedite the process.  Dormers would have been a slightly different animal and they should have needed there own menu as well, so it made sense to cut them.  As a consolation for the loss of dormers from my original proposal though, the app now includes sheds roofs with hips, unequal hip roofs and mansard roofs.  I felt this was a rational and fair trade-off. 

In addition to the two new roof options I added this week, I also made some major updates regarding theming.  Android makes it very easy to customize the look and feel of your app.  You can create customized backgrounds for anything that supports a background; which is almost every UI component available.  In addition to that Android provides a style.xml file in your res/value folder where you can set themes for the entire app like text styles, menu styles, action bar style etc..  It took a little while to wrap my head around it at first, but now changing the theme of the app has become quite trivial.  I spent a good amount of time this week just playing with all the different options and trying to decide which themes best suited my app.  I will be working to finish my icons this week and diagrams so I can post some pictures of the app.  The instructions will more than likely be written before the instructional diagrams, but I will be able to post pics of the menu and input screens soon.

Till next time.

Jason Hintlian

From the blog jasonhintlian » cs-wsu by jasonhintlian and used with permission of the author. All other rights reserved by the author.

Week 5

Our group decided  to work on the ticket TRUNK-324 (Go through the TODO items code and create tickets out of them) . Unfortunately, some one was already assign, then we had to choose another ticket 3009(Update references to Global Properties in the wiki), before we assign what is assignment the group member will work on, to solve out the problem on the project “ticket TRUNK-3009″  we go to the website: https://tickets.openmrs.org/browse/TRUNK-3009 , and read the information on that page to find out what is problem.

 

From the blog herangoc » cs@worcester by emtrieu and used with permission of the author. All other rights reserved by the author.

Trouble with issue

This week we started working on a new issue: refactoring the wiki pages to indicate a change in the name of a feature from general properties to settings. I was concerned about changing everything without asking, so I asked on the bug report to clarify, and after receiving validation that my intention for replacement was correct, began to carry out the plan. However, after making changes on some of the pages, I got a barrage of emails questioning me, to which I responded to, explaining why I did what I did, and asking for more validation. I received an email back vaguely replying that my path way correct, and that the community might not have been aware about the bug we were working on. I though everything was good. However, last night I got another garage of emails stating that all the changes that I made from my account were reverted back, and by the same person who told me I was on the right path. I think that I wasted my time, and will be more careful about working on things in the future. I would think that the questions I asked would have been sufficient, maybe in the future they should take a look at the bug reports instead of being surprised and upset when someone works on them. 

From the blog ckelley6 » CS401 by ckelley6 and used with permission of the author. All other rights reserved by the author.

How Much Are We Responsible For..?

So, found more info on the project. Dhimitris found most of the sections where we need to add the comments, so that should work well. On the other hand, from what we can see, the last person to work on this project also went about building actual test classes for the project, so we’re not entirely sure whether or not to do the same.

There’s also some question about which sections still need to get done. Taking a look through the project, we found a few cases mentioning the need for ‘tests’, but didn’t specifically mention JUnit tests, so there’s some question of whether or not those were just lazy typo’s, or if they’re separate things we are not responsible for.

Most likely, we’ll first focus on the TODO requests in HibernateFormDAO.java, and HibernatePatientDAO.java to add the @should comments. It seems that they have some Plug-in available that uses such comments to generate test classes, so the comments are first priority. Maybe afterwards, we might be making those test classes themselves, after asking the ticket publisher.

From the blog Kyle's Works » CS@Worcester by kyleprimmer and used with permission of the author. All other rights reserved by the author.