Monthly Archives: February 2014

First CS-401 Post

This is my first post for the CS-401 class. It’s really late but you know what they say… Anyway today I sat down to catch up on all the work that I have missed. I wanted to do the following:

  • Catch up on readings
    • 14 Ways to Contribute…
      • I saw some of the same excuses that I run through my head when I think about trying to contribute to some kind of programming project. 
      • I had never thought about the closed bug issue I see this at at work all the time. The squeaky wheel gets the grease, and if there are issues out there that have been solved and aren’t causing an issue why would most people look thought the bug tracker for them. How would they even know about an issue to go looking for that matter. 
      • Over all the article was a pretty easy read, not long or overly technical.
    • How to Contribute to Open Source Without Coding
      • Just a list of things, not much of a read but I bookmarked it just incase I was at a loss for something to do. 
    • Bug Tracker
      • I am already familiar with bug trackers from work but the knowledge was gained on the fly so it was nice to see a fomal explanation of the system.

   Once I had caught up on the readings i wanted to catch up on the work so I set out to fork the Github repo. I am pretty familiar with git from my job so this was a painless activity that took less than 5 minutes. I am however torn between using the Github GUI that I have installed on my Mac or the good ‘ole command line. Who am i kidding command all day. Since I am using the command line I created a folder in my home directory (~) that will hold the repos for this project so I don’t have to ‘cd’ through a bunch of folders to get to it.

   After that I worked on the Issue Tracker Assignment. What we were supposed to do in the assignment is familiarize ourselves with the OpenMRS issue tracker. The assignment worked well I got familiar with the terminology that they use and the layout of the application. 

From the blog A blog about things by TRStaake and used with permission of the author. All other rights reserved by the author.

Week 3, Feb 2014

During the class on Feb 10, we created our own profile on wiki page of the course CS-401. It is very easy to create and add a link to our profile on main course wiki page. Here are some important points from Git Videos:

       •Git is a fast and modern implementation of version control.

  • Git provides history of content change. Git stores history snapshot.
  • Git facilitates collaborative changes to file.
  • Git is easy to use for any type of knowledge worker.
  • Git is locally enabled.
  •  Serve merge very well

Also the Git tutorial is very useful and helps me get familiar with some command line.

  As for issue tracker activity on class, by explaining certain term such as issue type, status, Key, I understand OpenMRS issue tracker more.  

 

 

 

 

From the blog yuyuzhou » cs@worcester by yuyuzhou 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.

IRC and Weekly Readings

IRC Activity and Weekly Readings

The IRC activity was interesting to say the least. Like I mentioned in my previous blog I have never used an IRC before. The company I previously worked for used Skype and Go to Meeting for conversing when all team members weren’t on site. My first impression of the IRC was that it was just a chat room of sorts, but after doing the activity in class I could tell that it was a much more powerful tool than that! I liked that the MeetBot was able to keep track of the meeting topic and minutes. That could be very useful for future referencing. I also think it’s cool that there can be multiple chairs for a single meeting. During our exercise in class I found it a little tough for me to keep up. Usually when I wanted to respond or comment on a topic, the topic had already changed. I think as time goes on and I get used to communicating with the IRC my contributions will grow. In general, I’m more used to conversing in person with team mates, so I truly believe that this IRC will break me out of that shell. Also I realize that at some point I will have a question that more than likely my team members will not be able to answer so via the IRC, I can ask a question and possibly receive an answer within minutes! The commands also seem very straight forward and easy to implement with some practice. All in all it was a very interesting and amusing experience given the rooms sereneness.

In the OpenMRS reading I got the feel that this project really does have a sense of community and that they care and respect eachothers thoughts and ideas. The OpenMRS’s Code of Conduct seems well thought out and looks to lay a solid foundation for a productive environment. Some of my favorite codes are “When you disagree, consult others” and “When you are unsure, ask for help”. I believe it’s important to bring in a third party into a discussion that is not bias’s to either side to hash out your disagreement. It’s also important to ask a fellow developer or mentor for help if you run into a snag. Mistakes can be made or time can be wasted if you are too proud or nervous to ask for help! I think the commit early and often will not be that big of a problem for me. While at CNC Software Inc. we often had to commit our changes that same day so that it could get tested and implemented into the nightly build so that the next morning everyone had the latest version of the software. I’ve been getting used to finding my way around GitHub and it reminds me of the old Tortoise SVN.

In 14 Ways to Contribute to Open Source without Being a Programming Genius or a Rock Star, I honestly didn’t realize that there were 14 ways to contribute. A couple ways to contribute that I found interesting were to close fixed bugs. You would think that if bugs were actually fixed that closing that ticket would actually be an exciting moment, but I guess after you’ve fixed bug after bug, attention to certain details slips or priorities simply change to fast to tie up all the loose ends. Another contribution that I found very important and valuable is adding comments in code that is not well documented or documented at all. I remember at Mastercam we had specific software that would make you enter comments in a certain fashion that conformed to specific conditions before you were allowed to commit your changes. Thus, eliminating a great deal of confusion.

While going through the list of “How to Contribute to Open Source without Coding” some caught my eye. One in particular was to suggest new features and options. While some people might be brilliant at programming they might not have the artistic/visionary gene. So having ideas or options from people who don’t even program might be a huge benefit to a projects growth or choice of direction. Another that I thought would be beneficial to the entire programming community is to build a glossary of technical terms. This way everyone can be on the same page when speaking or describing certain aspects of a problem or program feature. Leading to less confusion or arguments.

As always I think Wikipedia does a great job disbursing information on the topic at hand. Their components were very detailed in explaining the entire bug tracking system or defect tracking system.

Until next week,

Matthew Lopatka

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

week 1

by reusing the code and and ideas from the MInix, and a tiny Unix. when all the Minix was completely rewritten then it become the Linux.

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

reading

My name is Em Trieu,  I’m studying on computer science major. I’m taking the class of software development. I’m very interesting about what is technician to code and build the perfect soft ware, what is designing software. Why are a lot of People become genius  software developer.  Where is an information the people can get help when they building the software.  After this class, i hope to have a good knowledge about what is software development and how i can work on it.

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

IRC & Reading

I thought it was very interesting that we had a somewhat silent class during the IRC chat. I had never used an IRC in the past, now that I had some experience with it I think it may and will be a great tool. 

The readings were all very interesting I never thought of the many contributions ones could make to and Open Source Project.

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

Ways to contribute to Open Source

An interesting aspect about open-source software is that it allows you to use your skills where you feel comfortable working with. Open-source helps people to discover that you don’t have to master all levels of computer science to contribute a piece of knowledge.

Personally, the readings have opened my eyes, and I’m glad that writing code is not the only way to contribute to large projects. Having 14 or more different ways to contribute to major projects make newbies want to add something to it.

IRC Activity

IRC activity in-class was enjoyable. It’s been a long time since the last time I chatted for over an hour. IRC is a great way to communicate in real time while working on large projects, especially since most people are looking for answers right away.

IRC is a great tool because it can be easily installed on user’s computers who have access to internet, regardless of the operating system running on the computer. IRC has different features such as chat and data transfer, file sharing, and also allows one to one communication using the private message.

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

Week 2

The class that we had in irc was different to say the least. At first the silence was really weird for me but after a little bit of time in irc the conversations seemed to flow well and the class seemed to become quite normal, if anything with a little less clutter since everyone’s points are written out and become much easier to track. I thought the readings were quite interesting, i wave worked doing some it support in the past were they really focused on their ticketing system and good documentation. I was happy to see that some of these same things are used in open source development since it is something i feel i can do very well. I also like the part on the life cycle of the bug tracker i didn’t realize there were so many steps to be taken before the problem is even addressed.

From the blog Dhimitris CS Blog » CS401 by dnatsis and used with permission of the author. All other rights reserved by the author.

Week 2

The IRC chat in class This week was interesting i felt that people were willing to contribute to the topics. Although it was very strange sitting in a class with no one talking yet still having a discussion. As for the Reading it became apparent that you do not need to code to help a project along although I doubt Ill be closing bug tickets that were just accidentally left open. The OpenMRS Developers Guide gave a few Good pages on there was of communicating as well as how to contribute.

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