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 – 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 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 2

As I mentioned on my previous post, I  started to work on the Rust project. I started to set it up locally and ran into issues which I googled for ways to solve them. When I was able to locate a specific reason for my error,  I posted on the issue of the problems I was facing and the owner of the project along with another git hub member suggested ways to solve the issue.

hackissue2

I was still struggling to make the code run locally  after using  the advice given to me so I decided to to do some more research. I had spend about a day and a half  going though Stack Overflow and other forums before I gave up and put the issue aside to focus on other assignments.

Fast forward a few weeks later, I decided to take a gander at this issue again. I looked at it and realized I was no longer interested in this topic. I started browsing Hacktoberfest issues and found one that peeked my interest very quickly. The week before I had spent my entire week doing a Data Structures and Algorithms assignment and studying for a midterm in that course. It consisted of linked lists, stacks and queues, and so forth. This new issue that I had found was to reverse a String using stacks! I thought that this was an awesome way to implement something I just spend a week studying and learning.

I was the first to comment on this issue and began working in it right away. It took me a couple of hours to finish and commit. As I was making a pull request, I realized someone had finished the task 5 minutes before I committed and the owner  of this project merged the other persons work ahead of mine. I think that was a pretty shitty thing to do, but nevertheless I created a pull request for my work. I am not sure it will get merged, but I am still happy to have finished this task.

 

For me this issue was a personal accomplishment as I was struggling with this exact topic a week ago. I had a hard time grasping the topic and went through many tutorials and examples to understand how to code stacks. So when I saw this issue I took it as an opportunity to implement my class work into an open source project. The reverse function I wrote is shown below.

reverse

 

 

I wonder what week 3 will have in store for me!