Category Archives: cs-wsu

Week 3: 10 February 2014

[Wiki Editing]

This week’s learning on editing the Wiki page was actually very helpful and easy to pick up on. I can see why wikis are being more and more common for compiling information or for use as knowledge bases. I began by going to to the CS wiki and logging into my account. I wrote a brief description about me and then added a link to this page under the Students page. Editing in a wiki was incredibly easy to do and straight forward and I had no problem with it.

The Issue Tracker Activity was also very informative on how to use formatting and editing for a wiki. As I proceeded through the activity, I learned from the few mistakes I made in formatting so my responses were easier to read, but in the end I got the hang of it.

 

[Issue Tracker Activity/Three Issues]

Viewing the info on the OpenMRS Issue Tracker was also sorted out very well and made it easy to read and follow how tickets and bugs were logged. The filters make sense on how one would want to search for a particular type of issue. I was able to easily find all of the necessary field and type information, but I did have trouble at first finding the summary of the project. I was looking for a description or paragraph summary but did not realize it was right on the front page shown with data.

After perusing the list on all the tickets at a glance, I ended up choosing three according to my comfort level (programming level as well as overall knowledge of the project so far). I couldn’t think of any other ways the system might have been improved upon, but there certainly are ways. To me as an outsider to the core of the project, it seemed to suffice very well for giving someone cursory information.

 

[Git Videos and Tutorials]

Following the Git tutorial was very useful and gave me a tool that I can come back to in case I need to remember certain commands without having to look them up without example uses. I  completed it after about 10-15 minutes, but I still had some general confusion about what the syntax for some of the commands were (I do not feel at all comfortable operating in a Linux/Unix environment, even after my classes here at WSU). As they came up in the example terminal, I did somewhat look up what they meant but did not come up with anything really concrete as a definition or further examples of how to use them.

The Git videos were also a good reference to go alongside with while watching on my desktop and following along on my laptop. I have never used GitHub before this class (unfortunate we are learning it so late) so a further explanation with maps and diagrams was helpful. One thing I did notice though was that even though these were tutorial videos on using Git and what it is, it still was not as detailed as I would have wanted it to be for some areas.

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

Week 2: 3 February 2014

[IRC]

The IRC activity that we did in class was awkward to say the least. For starters, before going into further detail, I did not know people still used IRC in today’s age of the internet. It seems that it is extremely dated and only suited for some of the “hardcore” or old-school crowd that are stuck in the old ways. After downloading a few clients (experimenting with some proved to be more difficult or hard to navigate) I landed on one that was recommended to me by Brian Gibson — HexChat. After setting up the initial server and identity for myself, I connected pretty easily.

The whole conversation that took place afterwards was silently done inside the IRC. It gave me a first glimpse of how to use it and to speak my thoughts clearly via an online forum. The in-class lack of speaking was a little weird, but the exercise was meant to show us how to use it in case we could not meet for class. All in all, I think it was valuable even though I thought the method of doing online meetings was a little dated.

 

[Readings]

The readings for this week were a good statement to me personally as to how I could contribute more to the project. I do not believe I have anything much higher than an average programming level, nor do I have extensive knowledge into other languages and tools other than what I’ve used during my major progress at WSU. So joining this open source project seemed a little daunting. I did like to see that there were tons of other ways to contribute (I’m more keen to the documentation and bug tracking part). Some of the examples I could tell were a little “out there” in terms of how they were actually going to help, but I can see the end result of it all.

Reading about the bug tracking methods and etiquette was not 100% new information, seeing as I have worked in an environment before where bugs were coming up from clients and we were helping resolve them. For a programming aspect, though, it is applicable in almost the same way. I think the OpenMRS bug tracking feature is well developed (it has to be at the scale it is at this point) and should be easy to pick up on as bug tracking becomes part of the assignment.

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

Hip Rafters and more Refactoring

Well, its been a bit over a week since my last blog because I have not been able to pull myself away from coding.  The goal for the week originally was to get hip roofs done, but falling behind a bit last week made me shoot fro getting hips and gables done in the same week.  This did not turn out to be possible as there were a number of obstacles which presented themselves as the week went on.  I can say at this point that basic the hip roof is fully functional but so far there is no option for valley rafters and valley jacks.  As it turned out, the hip roof consisted of more than was originally considered, ballooning from 3 different rafters to as many as 8 if there is a valley.

So why did hip roofs turn out to be so so complex?  Well to start with, I only considered the 3 most basic rafters needed when building a hip roof, the common, hip and hip jack rafters.  However, once I emerged myself in the task I realized how short my intentions fell.  I’ll start with the first issue encountered strictly regarding the design of my hip implementation; and I will discuss issues encountered in the code design next.  The first set back when designing a hip roof was that many code books require a ‘double hip’, meaning there are two hip rafters which connect the ridge pole to a corner of the building.  The two rafters, while sharing many values in common, differ in compound angles and the process for cutting.  The second issue I encountered was putting a hip on a square frame.  In the beginning, I had intended on making a hip roof object that only had one roof pitch, but in the event of a square frame the hip rafters would meet in the very center of the building leaving no room for a ridge pole.  The way to circumvent this problem was to now offer unequal pitches.  Now users can select 2 pitches  for example: pitch A could be 5/12 and B 7/12.  I wont get into the finer details here but suffice it to say it was a lot more work behind the scenes handling unequal pitches.  It also created the need for two individual rafter jacks and valley jacks.  Just to put this in perspective, a shed roof or gable consist of one common rafter but a hip can have a common, inner hip, outer hip, inner valley, outer valley, hip jack A, hip jack B, valley jack A, valley jack B which was a bit more to keep track of.  I never even got to think about Gambrel roofs this week but they will be next.  Now I will explain the refactoring I did this week and why.

For refactoring this week there where two goals in mind, code to an interface not an implementation and cleanliness of code or easiness to read.  Thus far, I had been putting all my data into what android calls a bundle or passed it directly via an android Activities Intent.  The bundle and data were passed along to all Activities and Fragments which are essentially sub activities and used or updated as needed.  However, it was very messy and hard to follow.  Furthermore it caused a situation were rafters were being created in all different areas as soon as the necessary data was collected instead of in one place every time.  I felt like this decreased the modularity of the code and readability.  My solution was to trace all the code from the very beginning and make sure I always used a bundle to pass data and that only one was actually created and simply passed between activities.  Fragments would no longer be responsible for updating the bundle, they just pass the data back to the activity which places it into the bundle and sends the bundle along.  So this solved my issue of passing data in a clear and concise manner but I still had an issue with the design of my rafter classes, up until this week – there was only one…

To start tackling the problem I did something that can be difficult, nothing.  What I mean is I coded nothing, after all there is a time to think and a time to act.  I needed to find a way to package everything I needed under one roof, pun intended (haha), and have it be modular and versatile.  I could not help but think back to a strategy class I took and so I started reading up on strategy patterns.  What I landed on, I don’t believe is technically a pattern; though I could be wrong, but rather a fundamental principle to code by.  Program to an interface not an implementation, meaning write your code to fill out an already designed interface that outlines what you want, do not just code classes separately to do what you want and worry about modularity later.  Up until now as I said I only had one rafter class, which executed different logic based on whether I asked for a shed rafter or a common rafter.  I also had a separate fascia/soffit class; ugly but it worked for the time.   After a few days of careful planning, I decided that I would Start from a Roof interface which all roof classes would implement.  The sole purpose of the roof class is to create the needed rafters and add them to a rafter array.  That leads me to another good point going back to strategies which is, its better when a class has an object as opposed to trying to be that object.  Meaning the roof should not try and handle rafter logic, but simply create rafters which contain all there own logic.  All roofs implements the roof interface so I can pass then generically throughout the code and have one purpose delivering an array of rafters.  The rafters themselves were handled the same way, but first I had to condense the fascia/soffit logic in with the rafter logic as it really belonged together.  Then I created a rafter interface again allowing my objects to be passed generically, and making it easy to change a rafters concrete class at run time.  Now rafters and roofs are completely self contained and modular, making it simple to create a roof which then provides the output and instruction activities with a rafter array. Thus allowing those activity classes to easily access data generically – not needing to know what type of rafter it has.

I wish I could say that was all I had to deal with this week but it wasn’t. I also ran into an ‘out of memory’ error when testing on older phones. This was actually an old error come back to haunt me which cost about a day and a half spent creating a custom view class.  The only way I could get height and width of a layout was to extend view which was impossible in my activity classes because they already extend Activity.  So basically the solution was to add the custom view to a FrameLayout which contains an image view, an image, the resources and the activity containing everything.  This has allowed to modularize the resizing and loading of images large.  The only issue I found was that when cycling images in and out of a Frame Layout you must remove the old image before adding the new one or performance can seriously suffer.  Now my code uses a fraction of the heap space it was and is faster and more efficient.

The last issue of the week was with the action bar and running on older devices.  Certain API’s only support certain action bar functions and API’s 10 and under require a support library for action bars.  I will stay backwards compatible at a minimum as far back as API 11, but I will probably support back to API 8 as well.  In the end what it means is I have different looking action bars for API’s less than 11, then from 11 to 13 and then customized action bars for API’s 14 and up.  At this point I am well within the fourth week of classes and starting to feel the pressure so I am sure my next blog will be full of updates just like this one.

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 Two, more ways to help than just programming

So, it appears that I’ve been under the false assumption that my only way to contribute to a large project, regardless of corporate or open source, was through straight programming.  How fortunate I am that I’ve been wrong.

I’ve never considered myself an ‘ace programmer’ by any means, and I have more than one not so fond memories of staring at pages of code wondering why it won’t work.  This has lead to a more favored past time of coding, debugging.  Generating code for me is often slow, and tedious.  While the pseudo-code can flow easily, actual implementation takes a bit more work and requires even more headaches.  But, once I get the general code going, debugging it for errors and making it run a bit more efficient seems to be something I can do, rather easily; especially when its belongs to someone else.  Perhaps that is what I should be setting my sights on, improving how well I can debug code, as it appears to be just another valuable facet of coding.

In a somewhat related event, the class I am working with on the OpenMRS project has been introduce to yet another invaluable tool, IRC chat.  Nothing can help you become familiar with a new program then spending a couple hours straight working with it and communicating with your peers.  Reminds me a little bit of MSN messenger or AOL back in my youth, but now with actual purpose.

From the blog aboulais » CS WSU by aboulais and used with permission of the author. All other rights reserved by the author.

A week of Refactoring

I began this week hoping to finish the hip rafter roof system implementation for my new Rafter Maker app.  However, I ran into a bit of a snag which required some restructuring.  The issue was – up until now, every roof system I have done, shed and gables, has only required one rafter, but a hip roof has three different rafters.   At first it did not seem like much of an issue but it became apparent that with the way the apps navigation was set up; I could not simply add a next button.  The underlying reason was thus far every class and activity has been reusable, because rafters are very similar whether or not they belong different roof systems.  Thus far I was developing separate input classes for each roof type, which would cause my program to have unnecessary repetitive code.  Instead, I chose to simply build a few FragmentActivities and fragments, which take in common inputs.  They passed a RoofState by the main menu when a roof is selected which has allowed me to reduce the number of classes and code overall.

In addition to this, there was a more obvious design issue with having multiple instruction sets.  With only one rafter to handle for shed and gable roofs it was easy to just offer an instruction button once the template data was generated.  However, having the one button for instructions would not allow room for a ‘next rafter’ button; in the case of a hip or gambrel roof, which require multiple different rafters, without effecting the ascetics of the app.  For that reason, I spent a good bit of time studying the android action bar.  I set up an spinner and several buttons and menus to get a feel for what I liked and eventually settled on just using an Xml menu item with other nested menu items creating the effect of a button with a submenu.  This allowed me to display an icon as well as text in the action bar that offers other options for instruction.  Now the app will be able to offer multiple instructions sets to help users throughout the process of building their roof, as well as handle roof systems with multiple different rafters.

The progress made this week was undoubtably in the right direction, but it has left me slightly behind on my timeline for completion.  In an attempt to make up lost time I will implement hip and gambrel roof templates this week.  The following week will be spent adding a few more templates and then the week after that on drawing up the rest of the diagrams I need and instructions.  I will be hoping to launch the android beta in about four weeks.  Then I will begin working on the iOS version, which should go smoother having already worked out a good many kinks developing for Android.  I have decided I will post pics in a few weeks once I have completed the necessary diagrams to truly show off the apps functionality.

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.

CS 401 – Software Development Process

This is my first blog post ever. Huzzah.

[What do I expect?]

Entering into my last semester at WSU, I expected my capstone class to be heavily interwoven with the knowledge gained from the other CS courses up to this point. Using all skills and techniques of software design and analysis and my average level of coding, I believe it is going to be a hard but valuable 16 weeks. I think it’s taken too long for us to learn about GitHub, something that should be taught to us very early on so we are masters at using it as the years build up. It’s unfortunate that I am only just beginning to know how to use one of the biggest platforms for version control and I head out into the real world in a couple of months. The same goes for IRC. Having heard about and generally knowing what IRC is for years, I’ve never had a reason to use it so I never bothered with it. Not having the class time to go over it was a shame, but I think I’ll be able to figure it out.

[Readings]

After reading through the articles, it doesn’t exactly add to anything I didn’t already have a grasp on as far as the ideas go for free and open source software. The quote from The Cathedral article, “Too often software developers spend their days grinding away for pay at programs they neither need nor love”, pretty much describes how I feel for a future of software programming.

Free software, as defined by the other articles, was pretty strict in cases where it defined certain things not free, but I guess it has to be in order to promote the truest form of open source software. I think overall it’s a nice premise and cause worth promoting, but in the end it just results in things like where we are with Linux (dozens of distro’s, i.e.). Open source projects should more be used for promoting concepts and ideas as ways to teach people to code better. Grabbing source code to investigate what certain things do and see the inside of the program is a good learning tool, but developing and tweaking each aspect of it and releasing it to the public convolutes everything.

[Git activity]

The entire GitHub activity was confusing and too “hardcore” from what I experienced. The whole manual process of doing it via command line was simply done in a matter of a few minutes with the GUI version. I think in this day and age, to say that you “aren’t a real programmer if you use a GUI/mouse” is too harsh of a constraint that people try to abide by in this field. It’s 2014. There are UI’s to make people’s lives easier and actions simpler, and we should use them. I was able to get up and running using the GUI GitHub install (not the 3rd party site download) and I think it represents it pretty well.

[IRC activity]

I have not done anything other than download an IRC client (HydraIRC: http://www.hydrairc.com/content/downloads) so I am not sure how much I can comment on this. Hopefully we can use it more in depth in the next coming class meetings.

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

First Week, CS-401

Well then, the OpenMRS is certainly a very large and interesting project to say the least.  But with such a large and ongoing effort to provide an Open Source EMR database one is immediately struck with the question.  “What could (what I consider) a novice programmer possibly contribute to such a large ongoing effort?”  The upcoming few months will certainly answer that question without doubt.  As for the time being, I am very excited to be working (soon) be working and contributing to the OpenMRS community.

My expectations of this course are already set quite high, with the hopes of simply becoming a much more savvy programmer.  My only regeret is not being introduced to such sources as GitHub and exposure to other open source projects sooner, but that cannot be helped at this point in time. On that topic, over the Eric S. Raymond’s article The Cathedral and the Bazaar have also opened me up to the raw potential  — and how powerful open source communities can be.  Maybe my current inexperience will still be of good use to the OpenMRS project after all.

From the blog aboulais » CS WSU by aboulais and used with permission of the author. All other rights reserved by the author.

Rafter Maker an Android and iOS Project

This will be the first of many blogs this semester explaining the progress and discoveries I have made during the development of my app.  My task, simply put, is to develop an application for Android which can be used to create roof rafter templates and generate specific instruction sets at run time.  I then intend to convert the Android version to iOS. I will be covering the most basic of roof applications for the first version.  It will will include shed, gable, hip, and gambrel rafters as well as gable and shed dormers.  Fascia and soffit will be handled as well, but they will be integrated into each template – due to their dependence upon the roof angle or pitch. The templates will be the main function of the app, but I will work to also include detailed instruction sets regarding roof construction.  

 Once that is accomplished, I will publish the app to the Google Play Marketplace as a free beta for a minimum of thirty days.  Hopefully, my users will find any bugs that have eluded me.  I plan to test all of the template algorithms with JUnit for Android and OCUnit for iOS, so there should be no bugs within those methods.  When the app is published I will begin working to convert it app to iOS.  I have done some preliminary research on developing for multiple platforms and despite there being softwares like Phone Gap and Titanium, I have decided to code the Android and iOS apps separately in native code.  My thought is, I will not need to put as much effort into the iOS version because the app content will already be completed, and also by coding natively my app will have OS specific look and feel.  In theory, I will just have to rewrite the code in objective-C though I am sure there will be plenty of problems along the way due to the major differences between Android and iOS app structure.  

 Upon completion of the iOS app, I will publish it to the Apple App Store as a free beta for a thirty day minimum.  Once the apps come out of beta, I will make them available for a fee in both marketplaces.  I had considered embedding advertising into the apps and offering them for free, but the market for construction apps is so narrow I have decided against that.  However, if I was marketing to children – who seem to love clicking anything and everything I would most certainly have made it free and embedded advertising.  

 With so much work to do I decided to begin early before the start of the semester.  I actually will be starting with a half finished android application.  I have a completed the shed rafter template and embedded the fascia soffit calculations into its process.  I also created a separate UI for tablets so the extra screen real-estate will be properly utilized. The app will support Android version 2.2 and newer, but there may be some limitations on small screen sizes.

 I will be blogging later in the week about some of the more difficult challenges I have encountered thus far.  There will be some screen shots of the phone interface vs the tablet as well.  Once the Android app is complete and I will begin coding in iOS; I will focus some of my blogs on the the differences between developing for both platforms. 

 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.

Working as a Team but on Individual Projects

Although this is an independent study, at times I worked with Dillon Murphy. For the most part we worked on separate tasks, but there were a few we worked together on.

We did work together on all of the virtual server installs, also working with Dr. Wurst. Dillon and I were pretty familiar with server installs, but since the new CS server was being used for the Wiki (which I was focusing on), and the blogs (which Dillon focused on), it made sense to plan out and figure out what we needed. As I said in a previous post, MediaWiki relied on an Apache/PHP/MySQL setup, and luckily for Dillon WordPress relied on that as well.

During our individual projects, we would shoot ideas off of each other if we ran into issues. For example, for moving over WordPress, Dillon wasn’t too sure how to approach it but since I was familiar with PHP/MySQL applications I suggested that it was likely all he really needed to do was dump the database and restore it on the new server and then move over the code. There were a few issues with configuration files pointing to old URLs, but other than that everything worked out.

We worked together on getting the new CS server up, which worked out thanks to some guesswork and brainstorming to figure out the best way to do it.

Getting the cluster with fresh installs of CentOS was another collaborative effort seeing as we planned to use them for our next projects, Dillon focusing on Hadoop and myself focusing on Eucalyptus. We had a few ideas on how to utilize the cluster for both platforms. One suggestion involved installing a virtual machine hypervisor on each machine and having two Virtual Machines on each, one for Hadoop and one for Eucalyptus. Another suggestion was splitting the machines between each project. The suggestion we went with, after Dillon said it looked like it would work out, was having one CentOS install on each machine and installing both on each machine.

Once we figured out what we wanted to do with the network and resolved the issues with it, Dillon focused on getting the servers up. We finally got that up and running, so next is focusing on the final solo projects.

While Dillon focused on that and a bit before, I focused on getting GitLab working to usable conditions. Dillon and Dr. Wurst helped test and ensure that everything was working as it should.

It’s really helpful to work in a team, even if each member is focusing on a separate individual project. Being able to bounce ideas off of each other and resolve things more quickly. Working on your own can be productive for its own reasons, but it never hurts to have a helping hand available.

From the blog Five mvs of Doom by Chad Wade Day, Jr. and used with permission of the author. All other rights reserved by the author.

GitLab Part 2

I missed a few things I wanted to go over with GitLab, and I have an update on trying out CACerts.

I didn’t really go over GitLab or git itself and why it’s important.

To understand GitLab, first you have to understand git. Git is a revision control software for plain text files. What this means is, you edit the code, commit your changes, and edit it again, and your code changes are tracked. Linus Torvalds, the creator of the Linux kernel created it when he wasn’t happy with the other software that was available. Git is one of my personal favourite tools to use, and has helped me with development a ton. I’ve definitely made poor choices in improving code or deleting code I didn’t like and want to undo that- with proper use of git this is trivial. One really advantageous feature of git is that it’s decentralized- when you clone a project with git, all its contents are self contained on your computer and if you want to update with a remote server you can pull the changes from the server or push your changes to the server. You can even have multiple remote repositories to push and pull from, though in practice you won’t use that feature too much. Another useful feature is you can set the remote repository to be another location on your local machine- this can be useful if you’re away from the internet and worried about accidentally ruining your working directory.

GitLab is probably the best free software alternative to Github. Github is a web front-end for remote git repositories, bring a lot of additional features to git such as editing your code from the web, forking other projects and pushing changes back to main projects (useful for feature development), easy account and group management, and of course the advantage of keeping your code stored on a remote server in case of issues with your local machine. For an example of a Github project, you can check out the CS-401 project from Spring 2013 that I was a member of. GitLab offers pretty much all of Github’s main features and a familiar interface. The big advantage of GitLab over Github is that we can store the data on WSU’s location, as well as private repositories, which are a paid feature of Github.

So as far as our GitLab install goes, last night I looked into using a certificate from CACert. Turns out, to apply for a CACert you need to own the domain, so that was quickly scrapped. I don’t think we can get HTTPS working at this point. I tried a few things with the configuration but it *seems* like the issue is the self-signed certificate and obtaining a legitimate certificate I don’t think is possible. This isn’t a huge issue, though with SSH you have to install keys on the server so it requires a bit more documentation.

What needs to be done with the server from here? I think all we need to do is resize the partition and virtual hard drive the server is on. I believe initially we set it to a 16gb install, but if students are going to use it for many assignments in their classes I feel like that’d fill up pretty quickly.

From the blog Five mvs of Doom by Chad Wade Day, Jr. and used with permission of the author. All other rights reserved by the author.