OSD 600 Reflection

Looking back at these last 31/2 months I feel I grew as an open source developer. I can recall the first week of this class not even knowing what open source development was or that there were so many large companies that had open source projects that I could potentially contribute to.

I started off in this class excited, but very timid and with low expectations of my skills and contributing power. As the semester rolled on I still felt kinda shy. I could feel like I was doing something,  but my contributions felt small. I was honestly about to give up in this class and just play it out to the end of the term after hacktoberfest. That was until I received some feedback from my professor.

I took this reflection to heart and really reflected on myself. I decided to try harder. I decided to get more involved like I said I would. I went from writing a simple hello world for hacktoberfest to contributing on Mozilla Firefox! That, I never thought I’d do.

From this class and the experience I gained, I hope to keep contributing in the future as I grow my skills from my next work term and keep making each contribution slightly bigger!

 

Release 4-3

I became very comfortable with the linting I did for Mozilla fox I wanted to find an error that was similar. I was going to work on another project suggested in class, but did not find any that required linting. I was learning through linting issues on github and I found a smaller project on Github that needed Eslint set up from scratch.

I cloned this project and ran it locally on my computer. I ran npm i -g eslint to get eslint set up. I tried running eslint –fix and was wondering WHY wasn’t it working? I obliviously missed that I needed to set it up first so I ran eslint –init to set up the configurations.

byb

I started running eslint –fix on  some of the errors and found errors that popped up like ” console. log unexpected here” I did some research and found out I just needed to add a line to the module exports in eslintrc file. I  created a pull request once I fixed my issues.

Although the setting up part was new to me, I was much more confident fixing issues in this project ( collectively 10 -15 manual fixes). I was able to use my experience from my previous pull request to work on this one.

Release 4 -2

My 4-2 release was a big one. I  decided to work on the linting  bugs along with 12 peers  on Mozilla Firefox code. I was reading through how to set up my working environment from the list of instructions I received and from what I found on the developer guide. I found both of these a little confusing to read. I am so thankful to my peer who posted a simplistic version of the steps I had to follow on Slack.

help

After setting up my working environment ( 4 hours of cloning ) and eslinting –fix the 3 directories I was working on I was left with a total of  204 errors.

This seemed like a lot so I started by tackling the directory with the smallest number of errors. A lot of them were repetitive so I was able to fix a lot of errors with one or two  manual fixes.

There were a few errors I was unsure of how to fix some so I decided to check the Slack channel our professor had set up. Luckily there were some people that had similar problems and I was able to follow their rules.

serviceError.JPG

I read a peer’s blog to help me with this error and this saved me a lot of time of researching myself.

I got it down to errors  12 – 13 errors in total which  I found were tougher and required more thought. After a few hours of researching I was able to solve most of them.

It was such an incredible feeling seeing this after a week of working on this project.

fdhtfh

(Note: Using a friends laptop, thus the username difference)

 

Although there were some issues I was unsure about, I look forward to hearing feedback on any fixes I need again . I thought the most complicated aspect of this project would be fixing the errors and not trying to commit my code. I found setting up Phabricator, (like many of my peers) tedious and difficult, but I understand it is a necessary evil. Atleast if I plan on working on this code in the future I know the steps to take for next time!

Release 4-1

As mentioned briefly in my previous blog post, the next internal pull request I wanted to work on was a webcrawler for pySearch. My peer and my professor both left me with great places to start to understand how I can create one. I did my research on scrapy, and on Beautiful Soup. I installed both and found a samples of code to run both. After playing with both, I decided Beautiful Soup was easier to work with for this project. Scrapy is more useful for large scale web crawling and from what I read Beautiful Soup could be used for something similar to what I was trying to do.

I started writing my web crawler to pySearch and had completed it. I followed this article to help me get started, but it is outdated and there have been updates such as import urllib2  no longer working and I had to import urllib instead.

Silly me did not realize that by the time I started working on this issue the code I was working on was outdated and I had to integrate my code into the new search file and not the pySearch file. This is something I need to keep a closer eye on next time. From the time I started there was one search engine working, by the time I updated to the new code there was 4 – 5 different options of search engines.

Because of the many changes that are happening on the project my pull request needs some changes. Something new I saw that is added for this project is the automated emailed being sent after the pull requests with basically asks for changes and displays errors in each line of my code as shown below.

Cpysearch

I am hoping to communicate with the maintainer over the break and see how I can change it. I know for now my web crawler works for the default search engine (google) and hope to get it working with all the other options on the script. I have talked to the maintainer prior to making my pull request and he confirmed this was a good start for this request and for the future we can work on getting implemented for various search engines.

 

Until next time !

Release 3-3

Since my first pull request (PR) wasn’t too complicated I decided to take a baby step for my second PR and go bigger for my third PR. For my second PR, I assisted in the pySearch application again.  I learned to write a test in python. I chose this as my second so I can prepare myself to write a webcrawler for my 4th release, this gave me the chance to get more familiar with Python.

As mentioned, I decided to start my third pull request where I (bravely) choose a larger project to work on than I  ever did before. I searched though Prettier and found an issue I wanted to work on. I initially misread the issue and thought there was a problem with how Prettier was functioning. I then researched the tag assigned to the issue it was waaaay similar than I thought. It was labeled websitearea which meant the problem was there in the website folder. After some research I found out that the CSS was resetting the <b> tags in the code and I just had to change some CSS properties.

Prettier was taking much more time than I thought. I struggled for a few days trying to set up the environment. Firstly, my computer was not recognizing yarn commands even though I installed it and it took me a couple hours to fix. Then I ran the commands that were listed in the CONTRIBUTING.md document with no trouble. It took me more time to figure out how to run the website because I never build this type of application and couldn’t find anything about it in the contributing document. I googled “how to run Prettier” and you can imagine the results I was getting (haha). After actually browsing Prettier’s github I found the commands to get the website running locally in the website folder’s Readme. I thought I was done with the trouble, but it just started.

For some reason I could not build the project due to a vague error. I thought it was my computer and tried cloning and running it on another and same error. I then took the recommendations from Slack and tried the git terminal and still no luck. I was stuck on this for a few days and almost gave up as I was looking for easier issues to tackle for the deadline. I decided I invested enough time and even if I am late I wanted to see it through.

The next day (today), I deleted the app and re cloned it and followed the steps again and did not work in my terminal. I decided to try it again on the git terminal and it started working! I honestly don’t know why or what changed. I have narrowed down the css file that is effecting the specified portion of the website (the blogs) and have tried a few fixes such as putting in b{font-weight:bold!important} and deleting the b tag as a selector and it did not work.

I am currently working through this issue, but it has taught me a few things.

  1. I learned to be more patient.
  2. Not to shy away from asking for help.
  3. I learned not to give up.

Release 3 – 2

I talked with the project owner, Alex, and he discussed some of the first new issues he wanted to be done. He talked about the README and the unit cases he wanted done for this project. Another peer with more familiarity with Python took on the unit tests to be written and so I decided to write the README for this project. It gave me a good time to get more familiar with the program.  Alex is an amazing project owner as he had left a detailed description of this project on the issue that will help me.

To begin, I have no idea how to write a README. So the first thing I did was google ” how to write a readMe ” .

I found this template to use to write my own README. I have started filling in most of the file. I had a few questions for clarification on installing and running the program which I  reached out to Alex on slack and asked. I was initially going to wait and ask him in person because I didn’t have his contact information, but then totally remembered I can direct message him on Slack. This saved me lots of wasted time and I was able to get my questions answered right away.

I have created a pull request and am waiting for it to be merged. Below is a snapshot of what I have written to the read me thus far. I  think there is room for editing once more of the project has filled out.

pysearch

 

Release 3 – 1

The project I started working on is the pySearch program a fellow classmate has already started on his spare time. There were a few other projects I was interested in, but after exploring I realized this would be a pretty neat one to contribute to.

Well firstly, what is pySearch? pySearch is a script written in Python to help do web searches without having to use the mouse. You write in a single line what you would like to search and hit enter and it will open up your web browser to the google page with the results. There are also other neat features such as typing in other keywords, for example, amazon and what you would like to search there and it will open up your web browser into the Canadian amazon ( for now ).

I spent my first few days becoming familiar with what this program does and doing some research in Python. This will be my first time using python so I have not yet found an issue to work on, but did some research on python syntax and how to run a python function.

 

Hacktoberfest Reflection

First, I want to start off by very quickly summarizing what I worked on during Hacktoberfest

Issue 1Pull Request 

  • write HelloWorld program is Rust

Issue 2 – Pull Request

  • write a program in C++ to reverse a string using a stack

Issue 3Pull Request

  • add a JSON object to a  React application

Issue 4 – Pull Request

  • create a form to capture user infomation in a Node.js application

Issue 5 – Pull Request

  • create a database and connect to it for same application as issue 4

 

My Experience – the Good, the Bad and the Ugly 

This experience was interesting to say the least, I learned how to utilize the skills which I learned in my classes and use them in “real life” scenarios. Even though this was an assignment assigned in class for marks, it did not feel like it was.

To start off with the good, looking back at the issues I tackled, I can see that each experience was unique as each issue required me to use a different programming skill. What I mean from this is that I used 4 different programming languages ( Rust, C++, HTML, JavaScript ) of which one was a new to me and one where I created a database and another in which I created a object that could be stored into database. Thus, I got to develop each skill with a new issue.

What I feel I could have done better during this experience is  not giving up quickly on something I couldn’t solve. I should have reached out within my own community of peers on Slack for help, but decided to give up instead. I feel next time I will try harder and reach out more. I felt intimidated by looking at the amazing work others have done in my class and in comparison feel like a “noob”.  So I decided to stop comparing myself to others and I learned to be more confident in my skills by taking baby steps in the projects worked on. I hope to continue these little steps and participate in Hacktoberfest next year and contribute to the larger projects talked about in class such as  different editors or browsers.

 

With Hacktoberfest in general, I feel people should get penalized for working on claimed bugs. It was extremely annoying working on something that was taken away from me, on multiple occasions, one of which I still continued to work on ( and included in my pull requests ). Other than that, I feel like I would try this again next year!

 

Hacktoberfest Issue 5

For my FINAL Hacktoberfest issue I decided I wanted to keep working on the previous web application from issue 4. As I previously mentioned, no database has been set up to store the information of the user as well as data from the survey. I checked the issues and saw that no one claimed this issue and decided to proceed with it.  The project owner wanted it to be done with MongoDB or mySql. I have used MongoDB 2 – 3 times for my assignments in my web class so I was familiar with how to do the set up.

I  had mongoDB  installed on my computer already and then started with using npm install  mongoDB into this nodeJS application.

After that I was a little rocky to start as I forgot to to do the basic set up. In my web class there are usually detailed steps on how to set up the database, what commands to use, where to add the variables and in which folders.

For this project, I was given no guidance on where to start so I open up an old project to start comparing similarities. I also recalled my previous professor had put the steps up on his github so I followed his documentation for this open source project. I initially was trying to set up a MongoDB database locally, but decided to use a cloud MongoDB database via mLab instead because I found it must easier to implement. I  created a new deployment on mLab and added a user. I ran a command to connect to the database which is similar to this (but with my credentials).

mongorestore -h ds######.mlab.com:##### -d <dbname> -u <dbuser> -p <dbpassword>

I then set up the database to work with the project by adding a mongoDB connection string with my credentials to the project.

I submitted this for my FINAL pull request.hackissue5.JPG

Even though I have finished with Hacktoberfest I plan on working on this project more to see it to its completion as I became interested in to along the way. I would like to do some styling,  improve code for the survey forms and write handlers to capture the user data from the survey into the database. Since I have used my credentials to set up the database in mLab I may need to work closely with the project developer to transfer over the database.

Hacktoberfest Issue 4

For my fourth issue I found a web application that was made to take a survey and store the results into a database. This application was fairly new and in a disorganized structure compared to the structure I learned in my web development classes at Seneca. Thus, I seen a lot of potential fixes with this application and knew I had to work on it.

The issue I decided to work on first was a simple form that was needed on the front page to record the information of a user, their email address, organization and an optional mobile number. I had to firstly understand the structure of this code by seeing where file the routes were installed in, which frameworks were being used and which files were holding the survey forms so I knew which file to write my form in ( which was the first page).

hackissue4.JPG

I added this bit of code, but was unable to post it to a database as it has not been set up for this project yet, so I left a comment for the next developer to pick this up when they start developing a database. It was pretty easy to write this form since I learned this over a year ago and used it repeatedly on assignments since. The only attribute I had to look up was how to implement a required fields vs optional. A styling option commonly used by websites have a red asterisk to indicate it is a required field, but someone was already working on this issue so I left that for the next developer.

After I made the pull request to this project I went to check on more issues this project still needed to complete and were not taken.

To be continued . . . in issue 5 !