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.
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.
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.
The following are the steps to find the convex hull.
Let points[0..n-1] be the input array.
- 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.
- Consider the remaining n-1 points and sort them by polor angle in counterclockwise order around points. If polor angle of two points is same, then put the nearest point first.
- 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.
- If m is less than 3, return (Convex Hull not possible)
- Create an empty stack ‘S’ and push points, points and points to S.
- Process remaining m-3 points one by one. Do following for every point ‘points[i]’
- 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]
- Push points[i] to S
- 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.
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.
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.
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.
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.