tag:blogger.com,1999:blog-52270583481880583612024-02-21T04:41:47.533-08:00Vincent's coding journeyDev Vincenthttp://www.blogger.com/profile/00757200171162138836noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-5227058348188058361.post-51429528422129261432018-12-14T18:36:00.002-08:002018-12-14T20:08:47.117-08:00Helping Mozilla firefox with enabling ESLint<div>
It was an amazing experience contributing to Mozilla Firefox.<br />
The bug that I worked on: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1508985">here</a>.<br />
For new developers to help with enabling ESLint with FireFox here are the steps that I took (<b>Window user</b>) assuming you already have a bug assigned to you:</div>
<ol>
<li>Follow <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Windows_Prerequisites">Mozilla Build</a> to download and get the "Required tools" and stop at "Getting the source"</li>
<li>Download <a href="https://www.mercurial-scm.org/">Mercurial</a>.</li>
<li>Continue with Getting the Source and stop at <span style="background-color: transparent; color: black; display: inline; float: none; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">"Build FireFox!" it's not really needed when fixing ESLint bugs and saves some time.</span></li>
<li><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike>Remove your <directory path> from `.eslintignore`.</li>
<li>Run `./mach eslint --fix <directory path>` this will run ESLint only for the specific directory you are fixing.</li>
</ol>
<div>
Note: I was told to commit 2 versions: An automatic change version and a manual change version.</div>
<div>
</div>
<div>
6. So at this point I did `hg commit -m "Enable ESLint for <directory path> (automatic changes)"`</div>
<div>
<br /></div>
<div>
Since I was told I needed 2 commits I wanted to push my automatic changes before doing the manual changes so I tried hg push and I got an error apparently we should be using moz-phab to push changes.</div>
<div>
<br /></div>
<div>
7. Some more setup. Download <a href="https://github.com/mozilla-conduit/review">moz-phab</a> zip. You will also need <a href="https://moz-conduit.readthedocs.io/en/latest/arcanist-windows.html">arcanist</a>.</div>
<div>
Note: Another part that I got stuck on was in arcanist, for step 3 it says "<span style="background-color: transparent; color: #404040; display: inline; float: none; font-family: "lato" , "proxima-nova" , "helvetica neue" , "arial" , sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 24px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Copy php.ini-development to php.ini in that same directory" <span style="background-color: transparent; color: black; display: inline; float: none; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">this just mean rename the "php.ini-development" file to "php.ini"</span></span></div>
<div>
</div>
<div>
8. Before you get into "<a href="https://moz-conduit.readthedocs.io/en/latest/phabricator-user.html#setting-up-arcanist">Configuring arcanist</a>" step 12 of arcanist. Test arc command by typing `arc help` in prompt to see if arc is in your environment.</div>
<div>
<br /></div>
<div>
Note: You will need "arc" and "moz-phab" and "PHP" in your system environment variable.</div>
<div>
Note: After you copy the bin path in your computer environment variable you will need to restart your computer for it to work.</div>
<div>
<br /></div>
<div>
Luckily for me, <a href="https://github.com/jkmdev">Julia</a> told me when I do moz-phab submit it will push all my commits at once.</div>
<div>
<br /></div>
<div>
9. At this point just put the arcanist and moz-phab on hold and start fixing the ESLint errors. You will thank me for this.</div>
<div>
<br /></div>
<div>
10. Once you finish fixing ESLint errors with ./mach eslint <directory path>. Do another commit for manual changes: <span style="background-color: transparent; color: black; display: inline; float: none; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">`hg commit -m "Enable ESLint for <directory path> (manual changes)"`</span></div>
<div>
</div>
<div>
11. Now you can get back to <a href="https://moz-conduit.readthedocs.io/en/latest/phabricator-user.html#setting-up-arcanist" style="-webkit-text-stroke-width: 0px; background-color: transparent; color: #0066cc; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Configuring arcanist<span style="color: #b00000;">.</span></a> <span style="background-color: transparent; color: black; display: inline; float: none; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">You will need an authenticator connected to <a href="https://bugzilla.mozilla.org/">Bugzilla</a>.</span></div>
<div>
<span style="background-color: transparent; color: black; display: inline; float: none; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br /></span></div>
<div>
<span style="background-color: transparent; color: black; display: inline; float: none; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"> 12. Lastly run: python <Your path/moz-phab>. This will ask if you want to submit and if you type "yes" it will automatically push for you.</span></div>
<div>
<span style="background-color: transparent; color: black; display: inline; float: none; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br /></span></div>
<div>
<span style="background-color: transparent; color: black; display: inline; float: none; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">This is the final result I got at the end: </span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="background-color: transparent; color: black; display: inline; float: none; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1QGfY9b9xy7LmyV6sKykNws-pL-FkOgVL6vSSCE1OQkGhugFuOEwDlOSLZCHlkm3qSXvV6ZWsmC-e6s6d6sO2HdJIW3yJxSutHrxmVbP3aKg5zAHlDR2iLTPEzWLQyBeu-h9Zslyz-GA/s1600/Submitting+ESlint+fixes+for+firefox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1284" data-original-width="647" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1QGfY9b9xy7LmyV6sKykNws-pL-FkOgVL6vSSCE1OQkGhugFuOEwDlOSLZCHlkm3qSXvV6ZWsmC-e6s6d6sO2HdJIW3yJxSutHrxmVbP3aKg5zAHlDR2iLTPEzWLQyBeu-h9Zslyz-GA/s320/Submitting+ESlint+fixes+for+firefox.png" width="161" /></a></span></div>
<span style="background-color: transparent; color: black; display: inline; float: none; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
</span>
<div class="separator" style="clear: both; text-align: center;">
<span style="background-color: transparent; color: black; display: inline; float: none; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br /></span></div>
<span style="background-color: transparent; color: black; display: inline; float: none; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
</span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="background-color: transparent; color: black; display: inline; float: none; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Special thanks to <a href="https://github.com/humphd">David</a> for connecting me to other members that were working on this, and <a href="https://www.blogger.com/goog_871167783"><span id="goog_871167784"></span>Mark Banner<span id="goog_871167785"></span></a>, <a href="https://bugzilla.mozilla.org/user_profile?user_id=628708">Julia</a>, <a href="https://bugzilla.mozilla.org/user_profile?user_id=628843">Shreena</a> and <a href="https://bugzilla.mozilla.org/user_profile?user_id=628654">Adam</a> for helping me with ESLint errors.</span><span style="background-color: transparent; color: black; display: inline; float: none; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br /></span></div>
</div>
Dev Vincenthttp://www.blogger.com/profile/00757200171162138836noreply@blogger.com0tag:blogger.com,1999:blog-5227058348188058361.post-28826791787498511082018-12-12T16:33:00.001-08:002018-12-12T16:33:29.868-08:00Testing out Travis CI for the first time<a href="https://travis-ci.org/">Travis CI</a> is a continuous integration service that helps compile, build, test and deploy code for GitHub projects. Just to test it out I decided to add it to a repository that I was working on (Currently has no Continuous Integration bots) <a href="https://github.com/yevseytsev/SenecaBlackboardExtension">SenecaBlackBoardExtension</a>. Now I have to give the bot something to do. Since SenecaBlackboardExtension is mostly JavaScript code I decided that the best starting point is to run <a href="https://eslint.org/">ESLint</a> with Travis CI.<br />
<br />
Travis CI can only be connected to a GitHub account that you own. I don't own that repository so to work around it I forked the repo so I have my version of it. With the help of <a href="https://github.com/humphd">David Humphrey</a>, who was familiar with ESLint, and the ESLint and Travis user guides I was able to run ESLint with Travis in my <a href="https://github.com/VinceBackpack/SenecaBlackboardExtension/pulls">forked repository</a> of SenecaBlackBoardExtension.<br />
<br />
Once it worked on my forked version, in theory it should work in the main repo with little tweaks (Eg: The owner to connect his GitHub). So I made a <a href="https://github.com/yevseytsev/SenecaBlackboardExtension/pull/93">pull request</a> to add in the files that are needed to get Travis CI and ESLint working and Voila! It is now up and running!Dev Vincenthttp://www.blogger.com/profile/00757200171162138836noreply@blogger.com0tag:blogger.com,1999:blog-5227058348188058361.post-91379171227088173602018-12-10T21:55:00.000-08:002018-12-10T21:55:11.141-08:00Contributing to 2048 Repo cont'dGitHub Repo: <a href="https://github.com/plibither8/2048.cpp">2048</a><br />
<br />
Previously, when I was working on this repository it turns out my code format was not consistent with what they had. I've noticed that they have a .clang-format file which means there should be a way for me to run it and auto format my code. After searching, I have found a couple of online formatters. When I used the online formatters it either spits back the same code format or it loads until timeout, either way I don't get what I am trying to do. I went back to searching for clang-formats and I came across a Visual Studio Code extension that allows me to use the .clang-format file.<br />
<br />
After running the clang-format on the source files, compiling errors start to arise from the .clang-format file which I have posted an <a href="https://github.com/plibither8/2048.cpp/issues/84">issue</a> on. After trying to fix a few of the errors the owner of the repo believes the error could be related to the VSCode extension. Apparently, they were using npm to run the clang-format file. Maybe I should have asked how they did the formatting earlier, but then again I did help test other ways of formatting that they had not thought of.Dev Vincenthttp://www.blogger.com/profile/00757200171162138836noreply@blogger.com0tag:blogger.com,1999:blog-5227058348188058361.post-1265358627654989852018-11-20T19:58:00.000-08:002018-11-20T19:58:07.134-08:00DPS909 Release 0.3 PR3For my third pull request in release 0.3 I had a tough time searching for an issue for an external project that I wanted to work on. After days of searching I finally landed on this <a href="https://github.com/plibither8/2048.cpp">project</a>. The <a href="https://github.com/plibither8/2048.cpp/issues/65">issue</a> that I found is upgrading enums to enum classes. I found this interesting because I worked on enums before but I never heard of a enum class, so it was new to me as well. As always I downloaded the code to test what it can do before messing with the code. I followed the README to setup my windows environment to compile, build and run the code. I got to compile the code however I couldn't get pass the build phase. At this point, the best option is probably to move on to a different project but I didn't want to let go of such an interesting issue/enhancement. So I went back to the README and see if I have other options, it seems Linux/MacOS have less work to do building this project. I wanted to try using Macs to build this but I don't have any apple products. Then it hit me, I remember there are a few Macs at school that I could use but because of it's limited quantity, it would be hard for me to find an available one. Once I finally got my hands on a Mac, compiling, building and running the project went as smooth as I thought.Dev Vincenthttp://www.blogger.com/profile/00757200171162138836noreply@blogger.com0tag:blogger.com,1999:blog-5227058348188058361.post-86248223174379219122018-11-17T13:37:00.000-08:002018-11-17T13:37:19.977-08:00DPS909 release 0.3 PR2Based on previous blog post: <a href="https://vincent20180916.blogspot.com/2018/11/dps909-release-03.html">here</a>.<br />
<br />
My second pull request was a simple fix but a huge bug. It all started when I was working on my previous <a href="https://github.com/yevseytsev/SenecaBlackboardExtension/issues/22">issue</a>. At school, I downloaded the zip file for <a href="https://github.com/yevseytsev/SenecaBlackboardExtension">SenecaBlackboardExtension</a> from <a href="https://github.com/">GitHub</a> and ran it on Firefox to see what we have working so far. It had an email login and the "did you know" box was taken out. It was getting near the end of class so I decided to work on the first issue at home. Once I got home I updated my forked repo and test the extension again on Firefox and... it didn't change the page and no errors were displayed. So I quickly went to check the repo to see if any new pull request was merged. There was changes but 1 of the changes was on the readme file and the other change was on the manifest file which was for icons. The change to the readme file shouldn't have affected it so I tried reverting the change in manifest but the extension still didn't change. I then used "blame" from GitHub to show the changes history for the manifest and homepage-guest.js file but there were no changes. So my guess was that it was probably my personal computer that couldn't run it . The next day, at school I downloaded the repo again to test the blackboard extension and it didn't work so at that moment I knew it was not a problem with my computer. I went home and test it on Google Chrome and it gave me this <a href="https://github.com/yevseytsev/SenecaBlackboardExtension/issues/27">error</a>. Now I know the error is coming from homepage-guest.js file. I thought back to when it worked the first time and I realized homepage-guest.js is now in a "src" directory. The pull request for that fix is <a href="https://github.com/yevseytsev/SenecaBlackboardExtension/pull/28">here</a>.Dev Vincenthttp://www.blogger.com/profile/00757200171162138836noreply@blogger.com0tag:blogger.com,1999:blog-5227058348188058361.post-68849722691194103292018-11-09T16:42:00.003-08:002018-11-09T16:42:23.880-08:00DPS909 release 0.3For my open source class at Seneca, we are now at a phase where we can start creating our own open source project. After both class have brainstormed brilliant ideas, 12 of the most popular ones are created. From the 12 projects, I was interested in two of them. The first one was the <a href="https://github.com/yevseytsev/SenecaBlackboardExtension">SenecaBlackboardExtension</a> project because as a user I know best what could be improved. The other project that interest me was the <a href="https://github.com/Mera-Gangapersaud/Creative-Collab">Turn-based creative writing web app</a>.<br />
<br />
The first <span style="-webkit-text-stroke-width: 0px; background-color: transparent; color: black; display: inline !important; float: none; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">issue </span>that I created on <a href="https://github.com/yevseytsev/SenecaBlackboardExtension">SenecaBlackboardExtension</a> was a great idea suggested by my professor(David Humphrey), which was to include a details/summary block to show/hide things on the site, instead of removing everything from the website. The first place I thought of using this was the Seneca Services box, since all the links in the box are important but only a couple are used most often, so I decided to add a collapsible view for the links that aren't used as often in the <a href="https://github.com/yevseytsev/SenecaBlackboardExtension/issues/22">issue</a> I've created.Dev Vincenthttp://www.blogger.com/profile/00757200171162138836noreply@blogger.com0tag:blogger.com,1999:blog-5227058348188058361.post-6510008169951869092018-11-05T11:23:00.001-08:002018-11-05T11:23:49.774-08:00My hacktoberfest 2018 journey reflectionDuring the Hacktoberfest month I have worked on these issues:<br />
<ul><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike>
<li><a href="https://github.com/theelous3/asks/issues/87" style="-webkit-text-stroke-width: 0px; background-color: transparent; box-sizing: border-box; color: #0366d6; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">https://github.com/theelous3/asks/issues/87</a></li>
<li><a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4907" style="-webkit-text-stroke-width: 0px; background-color: transparent; box-sizing: border-box; color: #0366d6; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4907</a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></li>
<li><a href="https://github.com/filerjs/filer/issues/551" style="-webkit-text-stroke-width: 0px; background-color: transparent; box-sizing: border-box; color: #0366d6; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">https://github.com/filerjs/filer/issues/551</a></li>
<li><a href="https://github.com/cjlcarvalho/crazy-robots/issues/18" style="-webkit-text-stroke-width: 0px; background-color: transparent; box-sizing: border-box; color: #0366d6; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">https://github.com/cjlcarvalho/crazy-robots/issues/18</a></li>
<li><a href="https://github.com/cjlcarvalho/crazy-robots/issues/20" style="-webkit-text-stroke-width: 0px; background-color: transparent; box-sizing: border-box; color: #0366d6; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">https://github.com/cjlcarvalho/crazy-robots/issues/20</a></li>
<li><a href="https://github.com/cjlcarvalho/crazy-robots/issues/23" style="-webkit-text-stroke-width: 0px; background-color: transparent; box-sizing: border-box; color: #0366d6; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">https://github.com/cjlcarvalho/crazy-robots/issues/2</a></li>
</ul>
<div>
What I have learnt:</div>
<div>
<br /></div>
<div>
I have realized that 5 pull requests may not seem like a big number to do but to do that in a one month of time, it's more than you'd think. At first I completed an issue during the first week so things were going as planned. During the first week, I also got to learn a new programming language(Python) mostly just to understand the part that I was working on. Once I got to the second issue, I got stuck at setting up the environment, it took about 1-2 weeks and I was still getting errors while trying to build the code. That is when I decided I should push this issue off for another time. Luckily for me, while trying to set up the environment I also started working on my next issue. It started to get close to the end of Hacktoberfest so I decided it was best for me to look for issues that don't need much time to set up and easy to do. </div>
<div>
<br /></div>
<div>
Experience from Hacktoberfest:</div>
<div>
<br /></div>
<div>
<span style="-webkit-text-stroke-width: 0px; background-color: transparent; color: black; display: inline !important; float: none; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">I would say it was a wild experience. </span>Within that month, I have seen all sorts of things, <span style="-webkit-text-stroke-width: 0px; background-color: transparent; color: black; display: inline !important; float: none; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">people from different parts of the world, different coding styles, different coding standards, </span>from large projects with lots of contributors to small projects with a few contributors, <span style="-webkit-text-stroke-width: 0px; background-color: transparent; color: black; display: inline !important; float: none; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">from people adding their names to a README file to real bugs in a project.</span></div>
<ul>
</ul>
Dev Vincenthttp://www.blogger.com/profile/00757200171162138836noreply@blogger.com0tag:blogger.com,1999:blog-5227058348188058361.post-36389847516756196052018-10-31T20:59:00.002-07:002018-10-31T21:01:34.591-07:00My fifth Hacktoberfest 2018 journeyIf you have followed my previous Hacktoberfest contributions you would know where this one's going. Previously on my third issue, I have tried to improve the performance of a program which didn't go well because the owner of the repo didn't want to use global variables, that is why my fifth issue will help him remove the existing global variables.Dev Vincenthttp://www.blogger.com/profile/00757200171162138836noreply@blogger.com0tag:blogger.com,1999:blog-5227058348188058361.post-63382859616562242552018-10-31T20:51:00.004-07:002018-10-31T21:01:53.702-07:00My fourth hacktoberfest 2018 JourneyMy fourth PR was based on the previous <a href="https://github.com/cjlcarvalho/crazy-robots">repo</a> that I have worked on. I chose this project because of three things. I was familiar with what it does and the code. It is a small project and that there was lots that can be improved. I created an issue to give more details on the README for the users and for the future developers to use. Details on what is needed to run and the expectations.Dev Vincenthttp://www.blogger.com/profile/00757200171162138836noreply@blogger.com0tag:blogger.com,1999:blog-5227058348188058361.post-18984070635303129282018-10-31T20:39:00.001-07:002018-10-31T21:00:58.440-07:00My third Hacktoberfest 2018 JourneyThis issue I created was suggested by a nice guy(Nate) who already finished 5 PR's. The idea was to increase the performance of a robot program. Instead of using the size method, a global variable would be used to keep track of the remaining robots for a quicker comparison when needed. This program was in C++ which made it very easy for me to read since that is one of my strength. The owner of the <a href="https://github.com/cjlcarvalho/crazy-robots">repo</a> later told me that he didn't want to use global variables.Dev Vincenthttp://www.blogger.com/profile/00757200171162138836noreply@blogger.com0tag:blogger.com,1999:blog-5227058348188058361.post-89189435941633747702018-10-31T18:50:00.002-07:002018-10-31T18:54:34.428-07:00My second hacktoberfest 2018 JourneyMy second hacktoberfest issue was the fastest I have ever started an issue. I didn't have to look for it, it came to me! The issue was based on my previous contribution to <a href="https://github.com/filerjs/filer">filerjs</a>. Apparently, the test case that I have created for filer had no method implementation! The reason I didn't pick up on that when I created the test was because I forgot to add the file to the test index. Although the code compiled perfectly with no errors, the test was not actually being tested.Dev Vincenthttp://www.blogger.com/profile/00757200171162138836noreply@blogger.com0tag:blogger.com,1999:blog-5227058348188058361.post-58621926140758237052018-10-31T13:18:00.001-07:002018-10-31T13:24:54.691-07:00My first Hacktoberfest Issue/PRFor my first Hacktoberfest related issue and Pull Request(PR), I was looking for a simple documentation issue to start off easy and ramp up later on. I came across one that I found interesting which was modifying an <a href="https://github.com/theelous3/asks">example in the README file</a>. Since it was a README file, I thought the coding language wouldn't matter for me when I picked it to work on. I found that the example they wanted was quite similar to the method that was already implemented. So I sent a PR to update the file and the owner of the repo wanted the example to be executable. At that moment I knew it was going to be harder than I expected because the code was written in Python, which I had not used before. So starting like a beginner, I had to search for ways to compile and execute Python code. But I keep running into websites that say Python code "doesn't need to be compiled" or "automatically compiled" so that got me confused for a day or two. I ended up with downloading different software to run the program like the python extension in Visual Studio and Pycharm. Luckily for me the owner of the repo was very helpful in describing which part of my code was not working. I thought it ended pretty good because the owner merged and closed my Pull Request.Dev Vincenthttp://www.blogger.com/profile/00757200171162138836noreply@blogger.com0tag:blogger.com,1999:blog-5227058348188058361.post-77193369298757785202018-09-27T13:26:00.001-07:002018-09-27T13:26:42.768-07:00First time contributing to a open source projectThe first open source project that I have contributed to is filer.js. The hardest part of contributing to an open source project was "Where do I start?". Our professor has gave us two options to where to start. 1. Finding a bug to fix. 2. Creating a test case for an existing function. I chose the second option because I feel that it would be harder to find bugs.<br />
<br />
<b>Getting Set up:</b><br />
<b></b><br />
To look at existing test cases, I would have to physically look through the code so I downloaded the project on to my computer. I thought about using Visual Studio, the code editor I use for C++ and Java but filer.js is JavaScript so I decided it's time to try a different code editor(one that starts up faster on my computer). I downloaded one called "Atom" and the start-up was a lot faster comparing to VS <span style="-webkit-text-stroke-width: 0px; background-color: transparent; color: black; display: inline !important; float: none; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">and when I opened the project, the directories were perfectly lined up on the left side so I started searching for the test files.</span><br />
<span style="-webkit-text-stroke-width: 0px; background-color: transparent; color: black; display: inline !important; float: none; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span style="-webkit-text-stroke-width: 0px; background-color: transparent; color: black; display: inline; float: none; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br /></span></span>
<span style="-webkit-text-stroke-width: 0px; background-color: transparent; color: black; display: inline !important; float: none; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span style="-webkit-text-stroke-width: 0px; background-color: transparent; color: black; display: inline; float: none; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><b>Looking for test cases that I could potentially add to:</b></span></span><br />
<span style="-webkit-text-stroke-width: 0px; background-color: transparent; color: black; display: inline !important; float: none; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"></span><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><b></b><br />
When I searched through the test files, I was thinking of "What specific test cases are similar to the existing ones but not added yet?" After an hour of looking through the test files, the really specific test cases that I wanted to add an issue was opened to the same function. To avoid any duplicate/similar issues I have decided to create a test case for a function no one has even opened a file on yet. Another hour has gone by and I have finally found a test case I would want to work on, the `fs.unwatchFile()` function.Dev Vincenthttp://www.blogger.com/profile/00757200171162138836noreply@blogger.com0tag:blogger.com,1999:blog-5227058348188058361.post-92117186672012748822018-09-17T20:00:00.002-07:002018-09-17T20:00:56.189-07:00Node.js<span style="font-size: large;">Node.js filesystem: ReadFile vs ReadFileSync</span><br />
<br />
<b><a href="https://nodejs.org/api/fs.html">ReadFile</a></b><br />
<u><span style="color: #000120;"></span></u><br />
fs.ReadFile() takes 3 arguments:<br />
<br />
1. The first argument this function takes is "path"<br />
Path takes in a string, integer or an URL for the filename or file descriptor.<br />
<br />
2. The second argument this function takes is "options"<br />
Options can take in a string to indicate a specific encoding of a file<br />
<br />
3. The last argument it take is a "callback"<br />
Callback takes in a function that is used for error handling or continue the program.<br />
<br />
<b><a href="https://nodejs.org/api/fs.html">ReadFileSync</a></b><br />
<br />
For this version of ReadFile it only takes 2 arguments:<br />
<br />
The first two arguments are the same as fs.ReadFile() it takes the path and options.<br />
<br />
Now the main question is when is it time to use one over the other?<br />
For this question you would need to ask yourself "Do you need to do things at the same time or do you need the program to wait until you finish a part?"<br />
<br />
If you needed to run the whole program then you would need to use the fs.ReadFile() function.<br />
On the other hand the fs.ReadFileSync() function returns the contents of the file instead of continuing the program.Dev Vincenthttp://www.blogger.com/profile/00757200171162138836noreply@blogger.com0