Posts

DPS909 Release 03: My Second Open Source Contribution

Image
So after a lengthy but rewarding experience with the completion of my pull request for my first open source contribution, we were now faced with building on this experience by tackling on Release0.3, which involved taking a step up from what we had already accomplished. To do this, I've decided to take on what I considered to be a more difficult bug for the brave browser. 

The bug i've chosen can be found here: https://github.com/brave/browser-laptop/issues/7645

Introduction; Explaining the Bug, Exploring Known Territory

The bug this time around involves the back and forward navigation buttons, more precisely, what happens when you press and hold one of those buttons for a long time. Here's a visual representation of the bug;


When pressing on the navigation buttons and holding the mouse click button, a dropdown list appears with the list of previously visited websites if you clicked and held back, and a list of previously navigated websites if you clicked and held forward. The…

Fixing a Bug, Adding Tests

In this lab, we were asked to work on the Brave browser, but more specifically to see how it compares to other browsers in certain niche tests. To do this, we studied the testing code for the Brave browser to try to understand it at its base, compared to FireFox and Chrome as examples. Following this analysis, we would find some bugs or odd behaviour that Brave did but other browsers didn't. So our task was to fix those behaviours, and add tests to it before submitting a pull request to our local branches. Here's some insight on how it went;

P.S.: I worked with a classmate on this lab, his name is Owen Mak

1- Which URL string cases did you have trouble with in Brave vs. other browsers?

" https://www.google.ca/search?q=dog cat " and " file:///Users/humphd/repos/browser-laptop/dog cat.txt " mainly. We used both these cases to test since they both resulted in different behaviour when comparing Brave to Chrome or FireFox.

In the first case, Chrome/FireFox would red…

DPS909 Release 02: My First Open Source Contribution Part 2 (WIP)

Image
***As of 2018/03/25, this is a work in progress. This blog post is showing my progress made thus far, and will be updated once the final fix has been coded.

As a follow-up to the first part of this post, this post will cover all the process I've gone through to solve this bug. I will also include useful links to the bug, resources, and my pull request as well.

1. What bug did I choose?

After investigating the project and the kinds of issues that are filed on GitHub, I've chosen an issue that has to do with the Brave menu and submenu, more specifically with the History tab and some of its submenus that need to be disabled after certain conditions are met. 

Here is the link to the GitHub issue;

https://github.com/brave/browser-laptop/issues/2681

Here is the original comment about the bug, how to reproduce it, and the used specs;


So essentially, the bug consists of disabling two submenu options below the History tab of the menubar, only when the browser history has been cleared beforeha…

DPS909 Release 02: My First Open Source Contribution Part 1

Image
Our second Open Source project was to solve a "good-first-bug" in any project that suited our interests. Since I mostly prefer doing Java and/or C++ programming, I looked at many places for opportunities to solve bugs in those languages. Unfortunately, I couldn't find what I was looking for and I settled with solving a JavaScript bug in the Brave laptop-browser project on GitHub.

Github Project Repository: https://github.com/brave/browser-laptop
Brave Browser regular download: https://www.brave.com/

"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."

This blog post will attempt to highlight all the major steps in the development of this project, including finding the bug, solving it, and contributing to the Brave community. To help visualize the timeline of this project, these following questions and answers will illustrate my progress better;

1. Wh…

Running Test Suites and playing with ECMA Standards

In this lab, we looked into language standards, as well as testing test suites for the first time. Additionally, simple tests were contributed, with the possibility of posting as a contribution if need be. Here are some questions that cover the work that was done;

1- When you run the tests, do all the tests pass or do any of them fail for you?

After following the instructions and forking over the repo from https://github.com/bterlson/test262-harness#test262-harness, the "test262-harness test/**/*.js" command let me find out which tests would pass and fail. After a short compilation of the tests, I've found out that out of 205 tests, 199 passed and 6 failed. The failed tests concerned 'locale' related errors for the most part.

2- Examining existent test 'https://github.com/tc39/test262/blob/master/test/built-ins/String/prototype/toUpperCase/S15.5.4.18_A2_T1.js' and providing observations

The sets of tests ran by this code include some defined conventions as fo…

Finding and fixing a bug in VSCode

In this lab, we were tasked with finding a good beginner bug inside of VSCode to practice detecting bugs within a large framework that we're unfamiliar with. Here are the steps I followed, described in the form of these following questions;

1- Which bug(s) did you work on?

I worked on the following issue; https://github.com/Microsoft/vscode/issues/43302

2- What was this bug about? How do you make it happen (steps to reproduce)?

This bug involves Windows OS which allowed me to select it as the bug I would work on. It has to do with opening a batch file using the "Open with Code" option in a Windows explorer window. The steps to reproduce are as follows;

- Right-click on a Windows bat file in the explorer (unpacked from downloaded zip file)
- Select "Open with Code" (with the VSCode icon beside the text)
- "Windows protected your PC" screen appears to "preventing unrecognized app from starting"

First of all, I created a small bat file for testing purp…

DPS909 Release 01: First Open Source Project

Our first open source project was separated into two parts; the first being to create a web service in any language that could find phone numbers either from a string entered in a URL, or by sending in a file containing phone numbers. The phone numbers found would then be returned in JSON format back to the user. These following questions/answers will go into more detail:

1. What did you build? Discuss your web service and include links so people can find it.

I chose to program my web service using Java. The platform I chose was Eclipse IDE, Oxygen 2 version to be more precise. It was my first time making a web service in Java so I had to do a bit of research to make sure I knew what I was doing. The web service was tested from Eclipse since the IDE provides an internal web browser viewer from which I can debug and view the site. The server was downloaded via external dependencies and set up on my laptop, so the website will not run unless my laptop and Eclipse is opened, as well as hav…