Monthly Archives: February 2016

Beginning OpenMRS

One of the first projects that I’ve been working on this semester is the OpenMRS Project.  “OpenMRS is a collaborative open source project to develop software to support the delivery of health care in developing countries.”  I found this to be an interesting project to work on since it’s an open source project with many talented developers as well as supporting a good cause.  However, the setup to begin developing was definitely challenging.

Since OpenMRS is open source, all of their code is published on GitHub, so being able to jump in to developing should be easy. Wrong (for me at least).  First I was introduced to a new IDE, which is no big deal, that’s easy enough.  The IDE I was starting to learn was called IntelliJ IDEA, or as I like to call it, IntelliJelli.  What’s nice about IntelliJelli is that you can directly import a project from GitHub.  However, I did not do this at first.  I thought it would be easier to pull the code from GitHub and just import it myself.  Upon doing this, as planned it imported all the code, but it was missing everything; and what I mean by everything is that it wasn’t created as a maven project, it was missing some maven imports, it even had errors that I don’t know how to explain.  After being very confused and disgruntled with all the unknown errors I had, I decided I would try importing directly from GitHub.  Why I didn’t think of that in the first place is beyond me.  It worked flawlessly.  It created it as a maven project by default, it had all the imports it needed, everything was perfect except for a couple of lines that had a few errors (later I would find out that these errors are not important).

In order to finish getting a working build of this code, I had to open the console and use a few commands to get things working.  First I needed to work my way towards the OpenMRS directory and do a clean maven install.  This built the project as a maven project (again I believe? If not officially for the first time so it’s recognized).  Once the maven clean install and updates were finished, I was ready to start the server that’s contained within.

OpenMRS works within a browser so I had to work my way to the webapp folder and start the jetti program.  Now starting the jetti server worked, however I had nothing to actually work with, I needed some form of UI and database to work with while developing.  Thankfully, OpenMRS supplies an option upon the initial setup to create a fake database of people with certain information and characteristics.  To store this database, I also needed MySQL.

So the first step to this was downloading and installing MySQL, which also needed Python, visual basics, SQL connector, etc.  So before I could even get the database setup, I needed other programs and languages as well.  After installing those and finishing the installation of MySQL, I was ready to begin the installation of the Legacy UI supported by OpenMRS.  Thankfully there was a very helpful tutorial provided by OpenMRS on their wiki page, so I followed those instructions and placed the generated UI file into my appdata folder.  With this I was finally ready to begin the initial setup of OpenMRS in my browser.

Upon starting MySQL and the OpenMRS jetti server, I opened up my browser and went to localhost port number 8080.  I went through the custom / advanced setup so that I could select creating a database of fake people to use and to communicate with MySQL.  It took awhile for it to create the data, but it finally worked and redirected me to the log in page. Success.  I logged in and went straight to the database to see what I could find for data.  I found 2 people.  I can tell that the identification numbers for the people are not in chronological order, but I feel like I should have more than 2 people in my database.  I’m hoping to resolve this issue soon.

In the coming days / weeks I’ll be working on a new project with OpenMRS that deals with radiology.  The radiology team seems excited to be helping us students succeed, which is very thoughtful of them and I’m grateful for that.  Working on the tickets they suggested we look into will be interesting and I’m hoping it will put my knowledge to the test.

Until next time… Nick

From the blog CS@Worcester – Nick Richard by Nick Richard and used with permission of the author. All other rights reserved by the author.

The Clean Coder Chapter 1

The first chapter of “The Clean Coder” written by Robert Martin is about Professionalism. For being a professional programmer, he has mentioned some key points. Responsibility and accountability are two important aspects of professionalism. As a professional programmer, we should take responsibility for our code. It is our job to know what our code does and ensure that the entire code works properly. When coding, we should always aim to cause no harm in our project. This may be achieved by writing automated tests for every line of our code and test them every day to make sure that there isn’t any bug. Furthermore, we should write codes which are reusable and easy to change as we need. It is also our responsibility to keep training ourselves by reading, practicing, learning, and keep ourselves up to date on new techniques. I’ll try to be a professional programmer by using these points in my future career.

 

 

 

From the blog cs@Worcester – siminshamsblog by sshamsfallah and used with permission of the author. All other rights reserved by the author.

Clean Code Chapter 1

The first chapter of the book, “The Clean Coder” by Robert Martin had many interesting concepts and points for building elegant software. It had few interesting points regarding professionality and how being profession is very important for a software developer. The first point I found interesting was regarding the ideas on making our code more readable, reusable and versatile. I like the way how the author states, spending free times learning new skills will greatly improve our coding skills and builds a better career. He also states that the code should be cleaner, flexible and it should be tested often for better results. It was nice reading the chapter and being introduced to few points about professionalism. As most of us are in the senior year and will be facing the work environment in the future, I think learning good coding skills will help us to build good careers.

From the blog CS@worcester – pavanimothe by pavanimothe and used with permission of the author. All other rights reserved by the author.

Chapter 1 Reading

This reading is about being professional. Being professional is necessary to better yourself as a software developer. The reading talks a lot about challenging yourself to spend your free time learn new skills or study up on old ones. It stresses that doing this will make you a better coder that will make the jobs of your colleagues and employers easier. It will help your career to be better at coding. I agree with this chapter because putting in a few hours every day for yourself will greatly improve your skills and make you worth more to future employers. It talks about making your code flexible and make sure to test your code often. You should change your code often to make sure it is flexible. By testing often you are able to catch more bugs and make yourself better at not making the same mistakes over and over again. Being professional is more than just doing your job, it is learning more skills to make yourself better.

From the blog chanson2016 by chanson2016 and used with permission of the author. All other rights reserved by the author.

Installing OpenMRS

The process of installing OpenMRS was a lot harder than I had expected.  The first step in the process was to just download that OpenMRS core from github.  This went exactly as expected but the next step is where somethings started to go wrong.  The first time that I tried to put the project into inteliiJ it had errors compiling.  Finally after a little trial and error I had corrected the errors that I needed to and it was time to move onto the next step in the process which was getting a maven clean install to run.  This process was a lot harder than it needed to be.  The first issue that I ran into was an error saying that my computer didn’t have enough memory to make a VM on the heap.  At first glance I thought that this was because my laptop is older and doesn’t have a lot of ram.  After doing a little research I found out that java was trying to take too much of my memory to run the process so after changing the default value the clean install was able to run.  After this it was time to run the Jetty run command to have the server start running.  Finally I was off to races and it was working.  The next step was installing my sql which was pretty easy to install.  Once this was done it was time to import the Legacy GUI.  The process went pretty easy just following the instructions.  After this it was time to go back into the LegacyUI and make sure that there were some entries in the database and there were!!!  Finally I was able to start coding for when we decide a project to work on!

From the blog CS@Worcester – dperry2blog by dperry777 and used with permission of the author. All other rights reserved by the author.

Installing OpenMRS

Let me start by saying this was a project within itself. Throughout the installation process there were multiple errors that took a fair amount of time to fix. The process started with installing IntelliJ. This was not much of an issue just a simple download. Then you have to clone the OpenMRS-core to your computer using git and add an upstream. This again was simple. You then needed to install Maven and a SDK. We were given directions to do this and the hardest part was changing the environment variables correctly. The next step was to do a clean install through Maven. This is where I ran into problems. It was coming up with an error with the sure-fire plugin. This error was caused by a Junit error. I ran a clean install that skipped this test and then it installed correctly. You could have also fixed this problem by opening your Open-MRS-core in IntelliJ and clicking on the build button. There will be errors in the code. You go to the Junit errors and do a quick fix and then run the maven clean install again and it should work. The next step was to run a jetty:run through maven. This also gave me an error because I did not have the jetty plugin. I looked up how to add the plugin and it involved adding code to the pom file of the project and updating a settings file. The directions were easy to find on google. You just had to find the correct spot in the code to add it. You then had to change your directory to the web-app directory and run jetty:run again. This time it will open a server and you go to http://loginhost.8080/openmrs. At this point you need to have MySQL, so you need to find a download on line and go through the installation process. You then follow the instructions to install the OpenMRS server. After the install you need to download the Legacy UI. After all of this OpenMRS is installed and ready to go.

From the blog chanson2016 by chanson2016 and used with permission of the author. All other rights reserved by the author.

The Clean Coder

I enjoyed reading the beginning of The Clean Coder very much. The Foreword in which the way that developers  are treated by management is highlighted rang true with my own personal experience. The Foreword also laid out the main theme of the book and gave a great purpose for continuing reading. The Preface was also very powerful, and displayed how management ignores the technical experts with dire consequences. The Pre-Requisite Introduction gave a good introduction to the author and his background. The most powerful part of the reading in my mind was in Chapter 1 where the author said that QA should find nothing, and that bugs making it to QA should be just as embarrassing as bugs making it to production. The emphasis on extensive testing and automated tests had an impact on how I do my software development. I enjoyed reading the beginning of The Clean Coder and look forward to continuing reading.

From the blog cs-wsu – Spencer Leal by spencerleal and used with permission of the author. All other rights reserved by the author.

Clean Coder ch2

This chapter was very hard to read because I am not a confrontational person. I would rather become a sleep deprived, caffeine addicted, overworked person for a few weeks than tell my boss no. I may argue here and there with people on the same field as me, but anyone put in authority over me is to be heeded to. I would absolutely be one of the people saying, “I will try”. I am not sure how much I could change in this aspect, being friendly with others is my personality, and I am not sure I would want to risk changing that. In the instances provided in the text, I can see why and how it is useful to say no, but it would take a lot to get me to that point. This chapter was filled with useful points and examples, and probably contains the most important information that I needed to hear.

From the blog shatos by shatos and used with permission of the author. All other rights reserved by the author.

Clean Coder ch1

Overall, the first chapter of the book “The Clean Coder” had a lot of useful insights and lists of useful information, as well as good ideas for self-improvement. There were a few minor things I disagreed with such as always writing tests first, and testing every single line. While parts of these things are useful, actually writing the tests first is not always the best thing, and testing every line is ideal but often unnecessary unless coding in a basic environment. His point about spending time outside of work on practice is a good idea, though hard to follow. I think it is great that he talks about owning your work and the responsibility that comes with it. I do not know if I would pay a company $10,000 for a mistake I made, but the reasoning was not lost on me. Professionalism is definitely something I must work on.

From the blog shatos by shatos and used with permission of the author. All other rights reserved by the author.

Clean Coder ch2

This chapter was very hard to read because I am not a confrontational person. I would rather become a sleep deprived, caffeine addicted, overworked person for a few weeks than tell my boss no. I may argue here and there with people on the same field as me, but anyone put in authority over me is to be heeded to. I would absolutely be one of the people saying, “I will try”. I am not sure how much I could change in this aspect, being friendly with others is my personality, and I am not sure I would want to risk changing that. In the instances provided in the text, I can see why and how it is useful to say no, but it would take a lot to get me to that point. This chapter was filled with useful points and examples, and probably contains the most important information that I needed to hear.

From the blog shatos by shatos and used with permission of the author. All other rights reserved by the author.