Posts

Showing posts from October, 2018

Hacktoberfest Final Blog Post

Hacktoberfest 2018 During this October in my Seneca course I had a chance to participate in a big Open Source event called Hacktoberfest. My task was to do 5 pull requests to open source repositories on GitHub. For the first PR I chose to add a hello world program in Pascal language For the second PR I chose to fix css and html in survey form project For the 3rd, 4th, 5th PRs I chose to add different math and string algorithms and tests to one of the standard algorithms repo in JavaScript Issues: https://github.com/piyush97/HelloWorld/issues/5 https://github.com/yirano/surveyForm-v1/issues/5 https://github.com/manrajgrover/algorithms-js/issues/10 (Find Divisors) https://github.com/manrajgrover/algorithms-js/issues/8 (Longest common substring) https://github.com/manrajgrover/algorithms-js/issues/10 (Inverse of first 'n' numbers) Pull Requests: https://github.com/piyush97/HelloWorld/pull/58 https://github.com/piyush97/HelloWorld/pull/57 https://github.com/yirano/surveyForm-

Hacktoberfest Part #5 (5nd PR of release 0.2)

Image
Last PR of release 0.2! Pull Request #5 As I mentioned in previous blog post, this PR will also be in JavaScript algorithms repository. For the last PR I chose the math algorithms of finding the sum of n inverse numbers. One of the hard things in this repository is that there are no instructions given for algorithms to be developed. That is why I decided to implement the precision of result returned. Sum of n inverse numbers is a result that can be represented in the following way: n = 7 result = 1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + 1/7 Logic of my algorithm: The idea is that we get 2 numbers from the input -  n  and  precision If n equals to 0 then function returns 'undefined' Otherwise, function calculates the sum of first 'n' inverse numbers  The last step is setting up the precision and returning the result After that I wrote this code and tests for it. https://github.com/manrajgrover/algorithms-js/pull/61

Hacktoberfest Part #4 (4nd PR of release 0.2)

Image
Fourth PR of release 0.2... Pull Request #4 For the next 2 pull requests I decided to stay in the same repository. For 4th PR I chose the string algorithm of finding the longest common substring. It was a little bit challenging to understand the logic of how to find it. Logic of my algorithm: The idea is we get 2 strings from the input, first and second If first bigger then second we swap them Then we need to iterate trough the second string, to find pieces of different sizes (from 1 to size of string) from first sting in the second string Once we find any piece from first string in the second string we return it The process continues until first string exists If string do not have any common substrings then program returns empty string After that I wrote this code and tests for it: And created the pull request: https://github.com/manrajgrover/algorithms-js/pull/60

Hacktoberfest Part #2 (2nd PR of release 0.2)

Image
Next week of Hacktoberfest and second PR of release 0.2... Hacktoberfest is going on and our task for this week is to do a second pull request to one of the repositories on GitHub. Pull Request #2 For the second pull request I decided to take some web project because I feel confident in html, css and javascript. After researching I have found the repository where the owner asked to develop a simple form just to practice and for future use I guess. After looking through the code I have found out that the code is little messy and some css code are in the html file as an inline declaration. I decided to fix these small problems and created an issue. After fixing the code I created the pull request. Waiting my code to be merged will take some time I believe because repository seems to be not touched for 9 days and maybe author thinks it is dead right now, but I am planning to improve this form a lot in my future pull request because I know that some programmers oft

Hacktoberfest Part #1 (1st PR of release 0.2 and lab 3)

Image
It is a beginning of Hacktoberfest in the world...and DPS909  release 0.2 in Seneca College! :) Hacktoberfest is a worldwide fest that motivates open source programmers to boost up their skills in the community of contributors. This month-long open source fest is going on in partnership with GitHub. Moreover when you reach 5 pull requests you will be able to get a branded T-shirt! In Seneca College we celebrate it as well during our DPS909 course and release 0.2! (As well, first PR of release 0.2 is a Lab 3) Pull Request #1 (Lab 3) After researching different Hacktoberfest's open source projects on GitHub I decided to take something easy for the first PR. I have found the repository where the owner asked to add a hello world code in any programming language that I know. After looking through the repository I have found out that there are no Pascal code and I created the comment in the issue that I will take it: After completing the code I created the pull requ