Open Source

OSD Release 0.2 Part 1 Intro

Better late than never, this is my introductory post to my 0.2 release.

What project did I choose?

For this release I chose to contribute to the Desktop/Laptop version of the Brave Browser project, a free open source browser that works on all platforms, whose mission is to give users a better browsing experience.

Brave is on a mission to fix the web by giving users a safer, faster and better browsing experience – while growing support for content creators through a new attention-based ecosystem of rewards.

Much more than a browser, Brave is a new way of thinking about how the web works.

Brave is open source, and built by a team of privacy focused, performance oriented pioneers of the web, founded by the inventor of Javascript and co-founder of Mozilla.

Source:  www.brave.com/about

At first glance, I thought that this release would be an easy peasy task to do, but I came into the realization this is much more than anticipated and expected.  Such task of finding a good first bug to fix as a novice requires such dedication as I can’t gauge how simple or difficult a bug is until the moment of realization.

In this release, I have dedicated my last week or two into fixing an issue that Kamil Jozwiak published roughly a month ago at the time of this writing.  Kamil is an official member of the Brave team, therefore my initial inclination is that this is a real issue that isn’t too critical to the browser’s overall performance, nor isn’t too simple to ignore, but the overall verdict is that it shouldn’t happen.

I also think that because of the degree of this issue, the team perhaps want it fixed, but it’s not critical to get it fixed now, nor they have time for it, so they are inviting contributors to participate.

To read more about the issue, you can visit the issue page:  https://github.com/brave/browser-laptop/issues/13634

I’ve tested and verified this issue as well when I reproduced the issue on a website I visit frequently.

05

Here, you can see that upon first visit on the website, the history is recorded.

06

And then, I navigated through links inside the website…

07

And then I reproduced the error when the history page didn’t record it (Ignore the Slack notification).

08

My task for the next 7 days is to try and fix this issue, and hopefully if I do, I’ll submit a pull request and be approved for merge.

And so it begins!

 

 

Open Source

Lab 4: Getting a feel of Testing

The goal for this lab is to get a familiarity of how testing is done in development, but more specifically to this course is testing in the open source development.

To dive in deeper into the type of testing I am assigned to do for this lab, David has assigned us to contribute to the active testing of the JavaScript (ECMAscript) language itself using the test suite built for it called Test262.  Perhaps 262 means that this is the 262nd release, or something?

Getting familiar with the test suite required us to clone the repository off Github, installing and then running it to see the results.

Figure 1: Cloning the Test262 repository

Capture.PNG

Figure 2: Installing it and all its dependencies

Capture1.PNG

Figure 3: Running the test suite.  It appears that of the 205 tests that were executed, 201 has passed and 4 has failed.  It has got something to do with locale.js but I am quite not sure what it is.

Capture2.PNG

Continuing with this lab, our task was to write a simple test for the Array.prototype.reverse() functionality of JavaScript.  reverse() as literally it means to reverse the order of the elements it stores.

So I wrote a very simple test.js script that simply tests whether an array has been successfully reversed.

Capture3.PNG

The initialized an array of 6 elements, reversed it, and then passed it into another array.

I wrote two simple tests that assesses whether the second array captured the reversed values of the original array that was also reversed.  And also,  I wrote a simple test that determines whether the type of both is the same.

I saved and ran the tests, and both passed.

Capture4.PNG

And that’s pretty much it!

Uncategorized

My First Experience Fixing an Open Source Project Bug – I Didn’t Get Far

The moral of this post: it doesn’t hurt to ask, as long as you have done and tried all the possible solutions you are best capable of doing first.

For this lab, we were given the task of contributing to the Visual Studio Code project by searching for good bugs that we can then try to fix.  Setting up the environment was very straightforward, however, I spent most of my two weeks trying to fix a problem that I came across with which turned out to be a bug, and it prevented me from going any further with this lab.  It wasn’t only when I finally caved in and asked my professor and one of my colleagues for help that they told me that I’ve encountered an actual bug that was just recently patched, so they advised me to pull the most recent commit from the VSCode repo and I was able to run, debug and test without any problems.  Unfortunately I have spent too much time stuck in this bug that I had to halt and move on as I need to start working on Release 0.2 that’s due in less than a month.

To give an overview of what happened, I’ll walk through the screenshots I took as I go along the steps and the hiccups of this lab.

The problem was rooted in the error I was having from running the ./scripts/test.bat file.

When I came across this bug the first time, I reacted how you’d expect a first time bug fixer to react – panic.  I thought maybe it was my environment that is not properly set up, so I redid the installation and setting up of my environments.  And to my dismay, it didn’t work again.  Countless times I repeated this resetting the environment, and every time failed to run the test.

So as one week passed by I was very discouraged from continuing any further with this lab.  It wasn’t until I finally caved in and asked on the Slack channel what went wrong.

My professor David came to the rescue, and asked me to run the file on –debug  mode so I can see what is preventing this test from running in the first place.

On the following screenshots of the debug process, you could see that there are a lot of errors that needed deciphering.

 

David suggested that my problem is rooted in the keyboardMapper function as shown below.

He then suggested that I investigate further by looking deeper into the errors and failures of the tests.   Further investigation has led us to believe that the error lies in the equality check of \r and \n, and it was confirmed to be the case when a colleague of mine said that this was in fact a bug that was only recently fixed.

The bug can be found here: https://github.com/Microsoft/vscode/issues/43357

 

 

After pulling in the changes from the VSCode repo, I tried running the tests again, and eventually ran perfectly.  Unfortunately due to the time that was lost in this process, I have to halt this and move on to my release 0.2 assignment.

 

 

Uncategorized

My first experience contributing to Open Source development.

After a hectic two weeks that have come and go, I was finally able to spend some time with my Open Source development course.  But to give a short summary of what took place within the last two weeks, my team won the regional Fishackathon competition that took place on February 10-11 for the city of Toronto, and advanced into the global stage of the competition.  We then had a week to finalize our prototype and submit into a three minute video by last Sunday midnight.  It was a hell of an experience, didn’t get to sleep much from the rush and adrenaline.  Most of my time was spent on finalizing the front-end side of the prototype, therefore I didn’t have time to catch up with school.  Through hard work and determination, we completed everything exceedingly by strike of the midnight’s hour with a sigh of satisfaction given how our submission turned out to be.  Now, we wait for the final verdict.  Whether we win this or not, my team are proud of how far we’ve come.  It was my first hackathon experience, and against all odds with 35 other teams, we won.

Coming back to reality, I had to face a lot of catching up to do with my school work, and OSD600 was no excuse.  I am behind with Lab 3, which hopefully I will complete by tonight.  Thank goodness, I was able to complete Release 0.1 just in the nick of time.

And to finalize my submission for this assignment, I have answered these required questions below.  To sum it up, this course is AMAZING!

What did you build? Discuss your web service (e.g., what is its name, how does it work, etc.) and include links so people can find it?

I built an open source project that utilizes Google’s libphonelibrary to find, validate, and parse and format phone numbers.

The link for my release 0.1 can be found in here: https://github.com/simon-inoc/Open-Source

Which language, dependencies, and tools did you use? Why did you choose them?

I chose NodeJS and ExpressJS as the tools used for the server side scripting because they’re the ones that I have most familiarity with and have the most comfort using

What did you find challenging about your work?

The most challenging thing about this work is figuring out exactly how to utilize the libphonelibrary works, as it is my first time experiencing doing an open source project.  It was exciting venturing into the unknown and figuring out how stuff works and making them work at the end.

Compare the experience of being a maintainer to that of contributing to someone else’s project. Which did you enjoy more? Why?

Both were fun, because each were a completely different experience.

It’s great having to contribute to someone else’s project because you get to be exposed to other coders’ programming style, and more often than not you learn new things just by reading their code, and also how they think logically when solving different problems.

What did you learn as you did this work?

Don’t be intimidated, at least that was my experience at first.  But then I started to realize that everyone else is on the same page, and they understand if you don’t know what the answer is, or how to solve the problem.  The open source community is huge, and thus there is a lot of resources to help you out, and as the community gets bigger, so does the amount of people available and willing to help you out.

What do you still want to learn more about in subsequent releases?

For release 0.2, I would like to work on blockchain projects and learn more about this exciting technology.

Uncategorized

My first experience forking an Open Source project: Visual Studio Code

As my OSD600 course dwells deeper into the core foundations of Open Source development, our next task would be to participate into the development of Visual Studio code by contributing fixes and solutions to bugs and issues that are either published, or more excitingly, that we can find on our own.

Beforehand, it was our task to familiarize with the editor itself, which requires us to download it as a user, and then navigate through the functionalities and features of the software.

As I have already been using VSCode as my main Windows Editor for the last two years, I am already familiar with this editor, wherein I still discover new features everyday which really enhances my programming efficiency.  I have installed quite of extensions which I use a lot, mostly Angular and Ionic oriented, and I hope to do a future post on this later on when I have time.

Now, going through the task of forking the entire VSCode repository from MS’s GitHub profile was pretty straightforward, amidst a little hiccups of going through some of the steps I have never encountered before, such as installing and running Yarn, which is a package manager for Javascript.

After that, following the instructions to build, run and test the VSCode as a developer works like magic.

vscodedebug

I am now ready for the next task of actually choosing a bug and fixing it, and it’s going to be ahelluva fun.