DPS909 Open Source Review

It is the end of the semester and during this semester I have had a completely new learning experience which tends to happen going into a new semester. But this time it was with a professional option and not a mandatory course for my degree. This new learning experience was open source. When I first registered for open source, I did not exactly know what I was getting myself into. I knew that open source had to do with a lot of work with GitHub and my experience with GitHub was not exactly great so I was looking to improve in that area. As far as that, I was not exactly sure what else to expect.

I half-expected to work with languages that I had not worked with before and I was sort of correct. I did work on a pull request with Ruby which was completely new for me, but that was the extent of my experience with working with a new language. It was mostly working on projects that I had no knowledge in which threw me off at the beginning. Like most programming courses that I have taken, when it comes to assignments, we are given an outline of what needs to be completed, and projects and normally started from scratch. For a few courses, a template is given which is for us to start from, but other than that, not much has been completed. For open source, projects are completed or completed as close as possible, and it is anyone’s job to work on those projects to either fix bugs or to make improvements to the project. If there was a project that I was working on, I had to take the time to review and understand what had already been completed in order to fix a bug or make an improvement.

I think overall, even though that this was a new experience, I am glad that I took this course in the end. My goal of understanding GitHub better at the start was definitely completed, but having this new understanding of open source could be a helpful experience for me in the future. If I end up working in a field that uses open source technology, I could go back to what I learned in this class and apply it to the working field. I think the most important aspect of the class that I’ll take into the future is the collaboration aspect of open source. Its difficult to work on an open source project on my own, which is what I am used to doing when it comes to assignments. For open source projects, collaborating is not only encouraged but it is needed in order to complete the tasks correctly. By collaborating with others, there is a clear focus on how a project needs to be completed since there is not a specific set of instructions that is given from the start, which is what students are usually used too when it comes to most programming courses.

Moving on from open source and this semester, I am not entirely sure what is next. I know for sure that I want to keep my doors open. I know that if I want to continue in open source, I would have to make improvements in order to get better in this area. Mainly when it comes to collaborating because I normally work on my own, which I also prefer. But I did learn during my eight month work term before starting this semester that maybe collaboration might not be such a bad idea. There were times where I was working on projects given to me by my supervisor and a second opinion on my approach on completing projects seemed necessary to complete tasks as efficiently as possible. So hopefully in the future I can improve on collaborating with other people when it comes to projects. These people can be people that I know, or just complete strangers from halfway across the world. Either way, the need to improve when it comes to collaboration is required in order to go anywhere, not only in open source, but any other aspect of software development.

DPS909 0.4 Release – Blog 3

Hello again. Its the end of the semester and I’m submitting my last pull request for my Open Source class. Like always, the semester has flown by but like always, I have to worry about major assignments being due, and final exams. Luckily I only have one exam this semester which does not seem to be too difficult. But before I get to studying for my final exam, I’ll have to make my final pull requests. Last week I talked about my other major assignments for my Web Services and iOS class. I was able to finish both major assignments for those classes which allowed me to direct my complete attention to my Open Source class. I also talked about having C# fresh in my head after completing my major assignment for Web Services so I was determined to find an external issue to work on that used C#. For the 0.4 Release, I had to complete one pull request in an external open source project and two pull requests for an internal open source project.

External Pull Request 1

External Pull Request 2

For my pull request for an external open source project, I was not able to find an issue in C# so I had to find another issue which used other languages. Even though I only needed to complete one pull request for the external open source project, I completed two. For the first external pull request, I added a source code file which would display the convex hull for an already set collection of points. The following is a link to the issue.

Convex Hull

With a given a set of points in the plane, the convex hull of the set is the smallest convex polygon that contains all the points of it.

ConvexHull

The following are the steps to find the convex hull.

Let points[0..n-1] be the input array.

  1. Find the bottom-most point by comparing y coordinate of all points. If there are two points with same y value, then the point with smaller x coordinate value is considered. Let the bottom-most point be P0. Put P0 at first position in output hull.
  2. Consider the remaining n-1 points and sort them by polor angle in counterclockwise order around points[0]. If polor angle of two points is same, then put the nearest point first.
  3. After sorting, check if two or more points have same angle. If two more points have same angle, then remove all same angle points except the point farthest from P0. Let the size of new array be m.
  4. If m is less than 3, return (Convex Hull not possible)
  5. Create an empty stack ‘S’ and push points[0], points[1] and points[2] to S.
  6. Process remaining m-3 points one by one. Do following for every point ‘points[i]’
  7. Keep removing points from stack while orientation of following 3 points is not counterclockwise (or they don’t make a left turn). a) Point next to top in stack b) Point at the top of stack c) points[i]
  8. Push points[i] to S
  9. Print contents of S

The following are the graphs containing the example points that were used to find the convex hull. The third image is what is displayed after the convex hull is found.

A4_PR1

A4_PR1_3

A4_PR1_2

For the second pull request in an external open source project, I was looking through some of my old pull requests that I made and I noticed that there was an issue for a repository that I made contributions for. So I decided to make a pull request for that issue.

Date does not update automatically #1

External Pull Request 2

For my pull requests in the internal open source projects, I continued my work for the GitHub-Dashboard. Last time I was able to download the files from a specific repository so I decided to make a count for the files that were downloaded. The following is the pull request.

Internal Pull Request 1

For the next pull request for the internal open source project, I decided to continue working with octokit/rest.js to gather metrics for the dashboard. Using octokit/rest.js I put together some source code to gather the pull requests and issues for a specific GitHub repository. The following is the pull request that I made.

Internal Pull Request 2

Overall, open source was a new experience mainly because of the collaborative aspect. Normally, I have worked on assignments on my own and it is something that I have gotten used too. I realize though that in the future, the experience that I have gained during this course can help if I get into a field that works with open source technology because I will need to collaborate with others, even if I don’t see them at all.

References

Convex Hull

octokit/rest.js

rest.js

DPS909 0.4 Release – Blog 2

Hello again. It’s been a week and a lot of work on my end has been completed. We’re in the final week before exams and naturally a lot of major assignments are due this time. Last week I officially completed my course work in Web Services and I personally feel like that I have learned a lot in that course. It was the second time that I took a course where there was coding in C# and the second time around was better. The first time I took a course in C#, it was a completely new subject and we were being tested in material before lectures were being held in the specific topics. The assignments were a lot challenging at first and it did not help since I was using a pretty old laptop at the time that was not as fast as I wanted it to be when running Visual Studio. That forced me to use the school computers most of the time, but I would have preferred to use my laptop for the assignments so I could work at my own pace at whatever time of the day. Working on the school computers for long assignments really limits your time in my opinion. But this time, I felt a bit more prepared and having a new laptop for the semester which would run Visual Studio properly was a lot more comforting. The topics this semester in Web Services were definitely new, but with a lot of practice and going through notes and coding examples helped when it came to completing assignments. A demo was supposed to be held this week but it was cancelled and it was actually something I was looking forward too since I was feeling really confident in the subject and I had completed my entire assignment within the due date.

I almost have a similar feeling when it comes to open source. At first the entire idea of open source was intimidating, especially working with other programmers that seem to be experts in whatever they are doing. But over time, I was starting to feel more comfortable and having discussions with others over topics I wasn’t entirely sure of became natural.

For the external open source project for the 0.4 Release, I have been hoping to find an issue related to C# which I could complete because I’m feeling really confident in the subject and also because my head is still filled with C#, after staying at school for over twelve hours on Friday to complete the final assignment. C# seems to be the language with the least issues after looking around so I’m not hopeful in finding an issue that would be acceptable to complete.

For the two internal open source projects for the 0.4 Release, I am still researching and trying to figure out how to move forward with what I completed before for the 0.3 Release. I decided to work on the GitHub Dashboard, and I decided to make a pull request where I was able to gather some simple metrics from a repository. Using octokit/rest.js, I was able to download contents from a specified repository but I was not able to gather the simple metrics that I wanted to. I was thinking that maybe with the contents that I was able to download, I could have a program where it would search through the contents and possibly gain some data from the downloaded files. I am not entirely sure what I can find but hopefully I can gather some simple metrics which can be applied to the Dashboard in some way.

During this final week, I have a final assignment for iOS to complete so my focus will be towards that but once that is finished I can direct all of my attention to the pull requests that I have to make before Monday December 10. My goal is to find an issue in C# that is related to web services since those topics are still fresh in my head. After completing the pull request in the external open source project, I can direct my attention to the GitHub Dashboard. Until then, it’s back to iOS. I’ll check back next week and by then I can discuss about the pull requests I will have made.

DPS909 0.4 Release – Blog 1

Hello there. Long time no see. It feels like a while since I worked on open source. With the end of the semester around the corner, I can start to feel the weight of my other assignments. The past few weeks, my time has been split between Web Services, Mobile Programming on iOS, Human-Computer Interaction, and Open Source. I recently finished my last test which means I can use all of my time to focus on the major assignments that are due soon. That includes figuring out what external project I can work on. Since I completed two pull requests in external projects and one pull request for an internal open source project for the 0.3 Release, this time I will have to do the opposite. That means I have to complete two pull requests for an internal open source project and one in an external open source project.

I already know what I’m working on for the internal open source project. For the 0.3 Release, I was working on the GitHub Dashboard so I’ll be continuing on that for the 0.4 Release. My pull request for that repository was a Javascript program that pulled files from a specific repository, in this case it was the GitHub Dashboard. I was trying to figure out how to use octokit/rest.js to gather simple metrics from a repository. My goal was to gather simple data from a repository and have a json file filled out with the data. I was not able to do that, but by using octokit/rest.js I was able to pull files into my computer. I think that this is a step in some direction but it is obvious that I have to continue using this repository and somehow gather some metrics from a repository which can be used for the dashboard. If its not perfect but I am able to gather some simple data, then I will know that I am going in the right direction.

For the one pull request in an external open source project, I am not exactly sure what I can do. I could look at the Possible Issues to Work On for hacktoberfest to find an issue or bug to work on. I could also look at the Interesting Open Source Projects which deals with larger open source repositories. I am still unsure as to what I’ll be working on for the external pull request so I guess I can leave this one to the end. Since I know what I have to do for the internal open source project, I guess I can move forward with that. I do have a major assignment due this Friday for another course so I’ll have to manage my time wisely.

I’ll check back in a week to update you on my progress.

References

octokit/rest.js

DPS909 0.3 Release – Blog 3

It is the end of the 0.3 Release and I was able to complete the three required pull requests. The task was to either complete two internal pull requests for any of the open source projects and one external pull request, or complete one internal pull request for any of the open source projects and two external pull requests. I decided for this pull request that I would complete two external pull requests first then finish off with the one pull request for the internal open source project. The internal open source project that I decided to work on was the GitHub Dashboard. I was interested in working with this project because personally it seemed like the most interesting project out of all of the other projects. I do not have much experience in open source so I decided that I should work with something that I would feel comfortable in. I made sure to read through the other internal open source projects that were available but they all seemed a bit more complicated. Also, the GitHub Dashboard did seem like a cool idea and it is something that I would be interested in using in the future. But before completing the internal open source project, I had to first find two external open source projects and complete two pull requests for the respective issues.

For my first pull request, I came across a a repository where a website was using React and the issue was to add touch support to a themed login screen which was written on LightDM and the LightDM-webkit-greeter. The following is the issue for the repository that I chose to work on.

Issue 1 (External)

LightDM is a free and open source X display manager that aims to be lightweight, fast, extensible and multi-desktop. It can use various front-ends to draw User Interface, also called Greeters. It is written in C and is available for over fifty languages. I had to do a bit of research before getting started with this pull request because I had never added any kind of touch support to a program. Then after researching how to add touch support, I started to study what was completed already for the Lock Screen page. I had to gain an understanding since I had to make an enhancement to an existing program. I learned that when the user clicks with the mouse drags a page up, a login page is shown. The user has to click and drag the Lock Screen page along the y-axis and once the mouse reaches a certain point, the login screen is shown. So after doing research on adding touch support, I made the additions just like the tutorials showed. By adding touch support from the start of the event and at the end of the event, the Lock Screen can be dragged up and the login page can be shown. The following is the pull request that I made for the repository.

Pull Request 1 (External)

The second pull request was to fix a bug for a Fitbit watchface program which mainly uses Javascript. The issue was that the midnight hour was showing 0 for the 12 hour clock. The following is the issue that I decided to work on from the repository.

Issue 2 (External)

After studying the code, I saw that where the 12 hour clock time was being gathered. There was a check where if the hour was over 12, then a subtraction would be made by taking away 12 from the hour. This is where I assumed the value 0 for the hour was coming from. The program would subtract 12 from 12 resulting in the hour 0. So I inserted a condition before the subtraction condition where if the hour was 12, then it would stay at hour 12. After making my addition to the program I made the pull request and made sure to reference the issue in my pull request. The following is the pull request that I made for the repository.

Pull Request 2 (External)

The final pull request for the 0.3 Release was for the Internal open source project. I chose to work on the Seneca Student Personal GitHub Dashboard. The goal of this internal open source project is to create a web-based GitHub Dashboard suitable for Seneca students doing open source. The following is the issue that I filed for the repository.

Issue 3 (Internal – GitHub Dashboard)

My goal for this pull request was to work with octokit/rest.js to gather some simple data from a GitHub repository. After doing research with octokit, I was not able to gather the data like I wanted to but I was able to download certain contents from a repository to a local folder on my machine.

The following is displayed after compiling the program that I put together.

A3_PR3

 

The following is the pull request that I made for the repository.

Pull Request 3 (Internal – GitHub Dashboard)

For the 0.4 Release I am definitely looking forward to moving on with gathering simple data from a repository for the GitHub Dashboard. Hopefully I can get on top of my other school work so I can finish this aspect of the project within a reasonable time, and if I can get it working the way I want to then I think my contribution would be a success.

References

Touch Support

Javascript

LightDM

octokit/rest.js

DPS909 0.3 Release – Blog 2

The 0.3 Release is already underway and it seems that everyone is currently working on their pull requests for either the external or internal open source projects. It seems that people have already made pull requests for certain projects. Three pull requests must be completed by this Friday and I am still working on my first pull request. My goal is to complete the pull request for the internal open source project. I am currently working on the GitHub Dashboard. The pull request that I’m currently working on is to gather data from a GitHub repository using Octokit/rest.js. I am in the process of gathering some kind of simple data from a GitHub repository just to make sure it works. After I complete that, I can push my contributions to the GitHub Dashboard which can be used in the future to add to this dashboard.

For my external open source project I am still undecided as to what I will be working on. I have been looking at Microsoft/vscode but it seems that it is mostly written in Typescript and I do not have much experience with that. I would honestly like to make a pull request for a repository where a language that I am experienced in is being used. With all of my other course work, I do not think I would have the time to familiarize myself with a different language for a certain project then make a pull request. Going into this course I was open to working in Swift and possibly an iOS project but that would most likely require me to have a MacBook. I’m already taking an iOS course this semester and I have to spend many hours in the library to use a Mac since I do not have one for personal use. So working on an issue from mozilla-mobile/focus-ios is out of the question. But there are many other repositories where I could make a contribution.

Some repositories where I could make a contribution could be filerjs/filer. I have some experience working with this repository from the 0.1 Release. I could possibly find an issue or a bug and make some sort of improvement to the repository. Another repository that has my attention is notepad-plus-plus/notepad-plus-plus. Notepad++ is a text editor which I use regularly so it would be kind of cool to make some sort of improvement to it and the great thing about it is that it is written mostly in C++ which is a language that I have some experience in. Other repositories which I have some interest in are some Android applications such as TeamAmaze/AmazeFileManager and dkim0419/SoundRecorder. Both repositories are written in mostly Java which is another language that I have experience in and I also have experience working with Android applications from a course that I took two years ago which was on Mobile Application Development with Android.

All these choices are a bit overwhelming but I am sure that I can decide by tomorrow what external projects I can work on. But another thing that I would have to decide on is the second internal issue that I would have to work on. I’m going to have to communicate with the other members of the GitHub Dashboard to decide on what else would need to be added for this week and the following weeks before the 0.4 Release due date comes up. But I believe that I can complete all of the assigned tasks before they are all due. With some time management and a bit of research I can complete my tasks in time and possibly learn something new while working.

DPS909 0.3 Release – Blog 1

It is November which means Hacktoberfest has come to an end. I was successful in completing the five pull requests, but I am not entirely sure if I made them in time to earn a free t-shirt. But all is well because I leave Hacktoberfest with gained knowledge on GitHub and the open source community. During Hacktoberfest I mainly stuck with topics that I already had experience in, except for my first pull request which was completed in Ruby. Mainly because of my other course work, so experimenting with new languages had to be put on hold. While continuing with Hacktoberfest after my first pull request, I gained a better understanding of open source in general and how contributions to different projects are made. I always assumed projects for Mozilla or Microsoft or any other large software company completed projects internally. But now I realize that pretty much anyone can contribute to whatever issues are available on a repository.

For the 0.3 Release, we are instructed to complete 3 larger pull requests. I can either complete two larger pull requests in external open source projects with one large pull request in an internal open source project. Or I can complete one large pull request in an external open source project with two large pull requests in an internal open source project.

To start I think I’ll be working on an internal open source project. The following is the link to the project.

GitHub-Dashboard

The goal of this project is to create a web-based GitHub Dashboard suitable for Seneca students doing open source. The Dashboard can include information like repositories that are forked, pull requests that are made, projects that are of interest and even more. I think this is a great idea since GitHub does not exactly provide a dashboard which holds this kind of information. Some information that GitHub does show on a users profile includes repositories made, organizations joined, and an activity chart showing the certain months of activity the user has been active on GitHub.

I have been told of Octokit and how it can be used to gather metrics on GitHub data and possibly added to a json file. The json file might not be perfect at first but as long as some information is being gathered, then I’ll know I’m on the right track. I think that I’ll have to conduct more research into this topic so I can gain a better understanding of the subject since this is the first time I’m working on a project of this scale. The following is a link to the repository.

Octokit

I am not entirely sure of the other internal open source projects so I’ll be looking at possible external open source projects that I could work on. I think after looking into the available projects I can check back and say what I’ll be working on in the future. But for now, I’ll be researching Octokit and possibly making a pull request before I come back with my second blog.