Monday 23 April 2018

Open Source Assignment 3

Hello Everybody,

This week I am going to talk about assignment 3 from my open source class. This assignment like assignment 2 requires us to contribute to a open source project but to solve a more difficult issue. The project that I am working on is this issue, this issue belongs to the Firefox development team in their devtools html debugger. The issue regarding this bug is that when a new parent directory is made then trying to reveal the source tree of a file to show it in the primary pane.
The function works properly when it is in it's original parent directory, As shown below.

The image below is an image of whats going in the issue. 

My current progress in the issue is that I have figured the source of file is not adjusted to the parent directory. From this the debugger would search for the source in the new parent directory causing it to fail and not open. My thoughts on the solution is that I would calculate the number of / in the new parent directory and concatenate "../" in front of the file source with the number of / in the new parent directory. 

I am currently at the point of getting number of / in the new parent directory source and assigning the number of "../" into a string to concatenate in front of the file source when it searches in the file. However I was unable to locate the point where it uses the file source to search through the source tree. These edits were all done within the ui.js under the src/action folder. as shown below


I will continue to work on this issue and report back next week.

Thank you,

Kevin Pham

Open Source Assignment 2 - Cont

Hello Everybody,

This week I talk about the changes I made on the project I talked about in my last post.

So to be able to understand and write the documentation for the fix I had to first take a look at the issues that it fixed. Specifically I looked at this issue and learned that since the node module doesn't link the css directly to the minimap it does not show the toggle button on the map even though it was coded to show.

The file I will be changing would be the Readme.md file. Within this file I added a new section describing the necessary code that needs to be added to the original code file that the minimap would be added. This code below:
require('../../node_modules/leaflet-minimap/dist/Control.MiniMap.min.css');

This is my contribution, for the assignment,

Thank you,

Kevin 


Open Source Assignment 2 Introduction

Hello Everyone!

This week am going to talk about my experience with my second assignment in my open source class. I was assigned to contribute to the open source community. Here are my experiences leading to finding my contribution.

At first I had trouble looking for a issue that I could tackle. This attempt continued with the process of forking the project attempting to recreate the problem, only to find out that I can't reproduce it.
I had two specific projects that took me the most time and resulted in no avail.

The first issue was a problem in this brave issue, the problem I had with this issue was that it did not specify how many bookmark pages it required only that it needed a lot. I had spent a day bookmarking pages but didn't get to the point where the issue occurs. After that I jumped to searching again.

The next issue I tried to tackle was this issue. With this issue I had problems with properly running the brave software due to environment issues on my part. I had problems running the npm install and figured out late(two weeks- three weeks) that I had to do a npm update rather than install. When working on the issue for a few weeks I realised that the issue wasn't really a issue. This is because the about:error page goes with the about:certerror and about:safebrowsing. These pages pop-up due to a event in the browser. It also explains why the url is chrome:extension...., as not just about:error has the url but all three of them do. After realising this I looked at the person who made the issue, I figured out that this person created this as his first issue on github and that it was not from a contributor of brave. So I went off and looked for another issue.

I was suggested to create documentation by my friend so then found the contribution I would be doing. The project that I contributed on is Norkart Leaflet-MiniMap. What this project does is add a minimap onto the leaflet map. What I intend to work on is creating documentation on a fix for issues that occur with the css linking with the minimap when using node modules.

Thank you for reading.

Kevin Pham

Thursday 19 April 2018

Brave Browser

Hello Everybody !

This week I was tasked in my Open source class to make a fix on the Brave Browser. We were able to pair up in partners to complete this task, in which I had partner up with my classmate Pranoy.

The bug we had to fix was that in other browsers accessing a file with a space automatically converts the space into URL encoded as shown below:

In Chrome Browser
















However in the Brave Browser the result happens:
In Brave Browser
















The way we fixed this bug was to add a trim onto the URL variable to remove any white spaces and convert it to the URL encoded white space. 
let str = input.trim().replace(' ', '%20')

the result of this addition in the code was this:
in Brave Browser
















We had also added in some test cases:

+    'it('seaches for dog cat instead of the link itself', function(){ + assert.equal(urlUtil.isNotURL('https://www.google.ca/search?q=dog cat'), false) + }) + it('seaches for dog cat instead of the link itself', function(){ + assert.equal(urlUtil.isNotURL(' https://www.google.ca/search?q=dog cat '), false) + }) + it('seaches for dog cat instead of the string itself', function(){ + assert.equal(urlUtil.isNotURL('/home/pranoy/Desktop/dog cat.txt'), false) + }) + it('seaches for dog cat instead of the string itself', function(){ + assert.equal(urlUtil.isNotURL(' /home/pranoy/Desktop/dog cat.txt'), false) + })

Thank you for Reading,

Kevin

Lab 5 Bridge Troll

Good News Everyone,

     I have completed my open source lab 5!
The task we had to do within this lab was to implement a Day and night palette on the open source project Bridge Troll. At the beginning of the lab I had trouble setting up my environment on my windows laptop (Typical). I had to resort to reformatting an old laptop to Linux Ubuntu to be able to run and complete the lab.

When I started analyzing the code I did not know where exact to start until logically pathing to the maps folder and into the baseUI. I changed the baseUI to include a custom javascript file that takes the latitude and longitude given and produces the time at that given location. This was done through using the npm library sunCalc, when getting the time I had setup a function to automatically switch the tiles from the default light tiles to the night palette tile accordingly to the time.

The style I went with to represent the night palette is CartoDB.DarkMatter.












The things that I found troublesome in this lab was properly setting up the environment, this is because some of the projects I've encountered has issues with the windows OS.

Thanks for reading,

Kevin

Thursday 22 February 2018

VS Code Bug fix attempts

Hello Everybody!

Today I tried tackling some VS code bugs on Github.

Visual Studio Code is a open source code editor. From what Microsoft describes vs code it is "new type of tool that combines the simplicity of a code editor with what developers need for their core edit-build-debug cycle."

Specifically I have tried to fix the bug on https://github.com/Microsoft/vscode/issues/16834. In this bug I was able to recreate the issue. However after attempting to comb through the code to find the source of the problem, we could not figure out where it was occurring.

Another bug that we attempted to look into was https://github.com/Microsoft/vscode/issues/36219. This issue gave us some problems because we were unable to reproduce the bug. So we decided to move on to the next bug.

The next bug we worked on is https://github.com/Microsoft/vscode/issues/42720. In this issue we tried to reproduce it however, we weren't able to reproduce it. As it seems it has already been resolved. After that we worked on the next bug.

The last bug we tried to look into is https://github.com/Microsoft/vscode/issues/43302. In this bug again we were not able to reproduce the issue due to not having the option of opening up the .bat file with code.

As I am still new to trying to fix issues and bugs on Github. I apologize if I made some mistakes in attempting reproduce and solve the issues properly.

Please leave some feedback so I can improve the blog and grow the community for the blog!

Thank you

Kevin.

Thursday 1 February 2018

Electron

An interesting Open Source project I found is Electron. Electron is a framework that allows you to write cross-platform desktop applications using HTML, CSS and JavaScript. Looking into the project I found that many popular applications were made from using the framework. Some are Discord, Slack, Visual Studio Code and Github Desktop.

Electron

Electron started around April 2013
Primarily coded in C++ with some JavaScript, Objective-C and some other languages.
There are currently 833 open issues
Currently has 721 contributors.

To Get More Information:
https://github.com/electron/electron
https://electronjs.org/