Telescope

This is my last term in Software Development program in Seneca College. One of the classes that I choose for this term is part 2 of DPS class, so I am back to posting about my adventures in the Open Source world.

Last time I wrote a post in a WordPress was more than a year ago and during this time things changed in Seneca’s Open Source (OS) community. Now, almost all the people in my college that are involved in OS are working on a project called Telescope. Before I came to class I’ve never heard about it. My professor and new classmates decided that they would like to test how easy is ‘on-boarding’ process for a newcomers. And I will be a test subject.

I should say that my acquaintanceship with Telescope took place 3 weeks ago, so my emotions faded away. I will not go into details of it, I’ll just list things that changed in Telescope after I tried to ‘touch’ it. My main task for the first week was to go through the documentation of the project and file any issue, unclarity or confusion I spot there. I thought that since everybody in the class was already contributing to Telescope for at least one term, the set up should be easy and quick.

I started with reading about what is Telescope in README.md file. This is were I filed my first issue.

Screen Shot 2020-01-29 at 9.03.51 PM

If you are interested in reading an updated, nice and comprehensible version of what is Telescope — here it is. 🙂

Next step was the setup. Here is where my torment started. I did not understand a thing there, almost every step was problematic. I can’t say that I went through hell and high water there, but I definitely felt lost and stupid.

“This is my last term and you cannot even set up a project on your laptop” — that was my primary thought. Luckily, it appeared that I’m fine and a lot of stuff in setup instructions were messed up. Here is one more issue, created by me:

Screen Shot 2020-01-29 at 9.10.08 PM

I’ve got a reply from one of my classmates that was working on documentation at that time.

Screen Shot 2020-01-29 at 9.55.11 PM As you could understand,  CONTRIBUTING.MD file also went through some major changes.

Overall, I guess it was a tough beginning , but I learned a lot. During the process I became familiar with things like Docker, Redis and .env files and refreshed in memory what you feel when doing OS. Next post about my first contribution to Telescope soon will be here, stay tuned 🙂

SenecaBlackboardExtension and Elastic

Today, I want to write about 2 PRs which I have made this week for Release 0.3 for my Open Source class.

Capture-1

I have decided to contribute again to SenecaBlackboadExtension which is a Chrome Extension for Seneca Blackboard. This project is made by the students from my Open Source class. If you are interested in my last work on this Extension — here is a blog post about it. Right now, our project is on a stage, where we remove parts that are not used by students, faculty, and staff on a daily basis. I decided to edit a My.Seneca Tools section which originally looked like this:

I spoke with some of my friends from college and they suggested a few ideas. My.Seneca Tools contains a lot of clutter that can be removed and this will make the page less overloaded with unnecessary information. For example, there are links to some pages, that a majority of students do not have access to, like ‘Student Connect Starfish’. Also, there are things like ‘My Tasks’, that, unfortunately, are not used, because there are more convenient or efficient ways of planning. But at the same time My.Seneca Tools section has two frequently used links: ‘E-mail’ and ‘Calendar’.

Overall, I removed more than half of the items in this section but I had a weird feeling that something was still wrong. This feeling was not related to the number of links I deleted. I sat for a few minutes and tried to understand what was wrong. And then I realized what it was! I was looking at this website for four years and it is not a surprise that I know every ‘functional’ detail I want to change. But at the same time, there are things that I saw so many times, that I do not even realize they are there. I think my ‘not seeing’ is usually related to design. In this case, there were those icons, that looked like they were 20 years old!

I knew that some websites use icons from the fontawesome. I looked at the sources of Seneca website. Here is what I found:

Seneca website uses it too somewhere else! 3.2.1 version is not the newest version but still, this meant that I was able to use them too. All old gifs are replaced with less older icons now. Here is the final look:

Better, right? 🙂 I made a PR and it was merged to the project.

The next task for the Release 0.3 was to contribute to a large Open Source project. I decided to work on Elasticsearch. The reason was simple — I really wanted to try to contribute to a project written in Java. Elasticsearch is the most popular search engine based on the Lucene library and is commonly used for log analytics, full-text search, security intelligence, business analytics, and operational intelligence use cases. Among the clients of Elasticsearch are Uber, SoundCloud,  Quora, GitHub, Netflix, Amazon, IBM, Foursquare and others.

I have found three issues that were totally unclear to me. After I spent a few evenings without any results, I decided to find something else and leave these three for later.  I knew that I looked through all of the existing issues with ‘help-wanted’ and ‘good-first-issue’ labels again. nothing there. Then, I realized that Elastic has a wide range of other repositories for other projects, like the one for Kibana. Kibana is a data visualization plugin for ElasticSearch. Honestly, I’ve got glued to Kibana’s dashboards. Good visuals are my weakness, and those dashboards are just incredible! There, I found my issue. The task was not hard — to change old links with new ones. But the description was a little unclear to me, so I researched this topic, just to make sure I did not put a wrong link in the wrong place.  So now I know a little bit about Elastic APM because I have read their documentation. I am still working on issues for Elasticsearch, so be ready for new posts about how I handle them!

 

 

Seneca Blackboard Extention

Capture-1

As I already wrote in my last post, today I am going to talk about my experience of contributing to a new GitHub project that my classmates and I have created. This project is called SenecaBlackboadExtention and it is a Google Chrome extension for the website that everybody uses at Seneca College. I bet, a lot of people from Seneca would tell you that this website is not really up to today’s standards of usability, probably because it was designed years ago. And would I totally agree with them. For almost four years I have spent learning, I am painfully aware of all its downsides and I am really glad that now I have a chance to improve it.

For my first contribution, I decided to work on an issue that, in my opinion, is one of the most useful things that could be implemented for this website – separate notifications for marks and announcements. I will explain why. Almost every day I wake up anxious to find out what grade professors gave me for some of the things I have been working on lately. I open my laptop and click on the icon of the Seneca Blackboard that is in my browser ‘Favorites’ bookmarks.  I log in to the system and I see something like this:

Image (2)

I’ve got 12 notifications! My heart starts beating faster, I click on my name in the upper right corner, and I expect to see my grades. However, what I usually get is this:

Image (3)

NO GRADES. Just regular notifications from professors that the new assignments have been posted, the deadlines have been moved, that there will be no class on Tuesday or something like this. This whole situation irritates me every time and kills my nerve cells. No surprise, that when I saw an issue that said “Split up announcements and marks notifications in the top right corner on the main page” I decided to work on it without hesitation.

This task appeared to be not so simple as I initially thought. There were two reasons for it, I believe – first was that it has been 2 years since the last time I wrote something on JavaScript, and the second was the complexity of Seneca Blackboard code structure, which was really tangled, complex, and hard to understand. I don’t want to write here about every difficulty I faced, because, honestly, in most cases, it was because of me not remembering JavaScript. But there were two challenges which were caused by the complexity of the Blackboard, and I want to talk about how I solved them.

The first problem I faced was that the information about how many grades and announcements there are is not available in the page HTML when it is loaded. This information loads only when I click on the dropdown with notifications in the top right corner. I decided to simulate 2 clicks on this area just to make the page load the necessary data. It wasn’t the best approach possible, but it worked. The next issue was that the data about grades and announcements needs quite a bit of time to get injected into the page code. I realized this when I put the call to get this data right after the clicks I simulated in our chrome extension. For some reason, all the returned values were null; but when I ran exactly the same function calls in Developer Tools, everything worked perfectly. To work around this issue, I used the setTimeout() function that waits asynchronously 1000 ms and then runs the function that is passed to it as an argument.

After I had all the problems sorted out and the code tested, I made a PR and my code was merged into the extension. Here is how the marks and announcements now look like:

Screen Shot 2018-11-18 at 2.58.26 PM

Now, the rest of my nerve cells are safe and I do not panic every time I open the Blackboard website. By the way, there is a small hint in the last screenshot about my next PR for the SenecaBlackboardExtention. 🙂

Starting to Work on Seneca Blackboard Extension

Now, when Hacktoberfest is finished I will be working on a few things for my Open Source class. Our next task is to contribute to one of the projects created and run by our class. I decided to work on a project called SenecaBlackboarExtention which is basically a Chrome extension for an ugly website that every student and teacher uses in our college. I have been struggling with this website for almost 4 years and now I think it is time to make some changes to it.

I have zero knowledge of how to create and code web extensions. That is why,  first of all, I decided to look at some already existing ones so I could have at least an approximate understanding of how it works. There are a lot of Open Source browser extensions on the GitHub. I really like few of them, like this refined-github which I installed on my laptop and even thought that this would be cool to contribute to it sometime. Then, I decided to read some documentation on how to write extensions for chrome. There were a few websites with small instructions on how to create basic Chrome extensions which I did on my laptop. Also, I forked and upload SenecaBlackboarExtention to my PC and tried to do some DOM-model modifications just to practice.

I found the first issue to work on. Here it is a link to it. It is not so easy to do as I thought and I will write in the next post how I fixed it.

 

Hacktoberfest 2018

Screen-Shot-2018-10-01-at-5.58.26-PM

This is the end of October and this means that Hacktoverfest is finished. Overall, this was a great experience and I am really glad I participated in this event. I have this awesome feeling that I was a part of something big and meaningful and my contributions to different projects have a value. Before Hacktoberfest I contributed to open source project only once. Now, I have worked with people from 5 different projects, offered solutions, and incorporated feedback. And I am not planning to stop! All of the pull requests I made are totally different and I learned something new during work on each one of them. Here are the names of the projects I contributed to with the links to the blog posts I wrote about my experience with working on them:

Of course, it was not easy at all, but now I know so much more and finally have a feeling that I can do things. I also feel more confident about using git and GitHub. Moreover, I realized how important is the communication between developers and how great is the open source development with all these people that are willing to help you.

I definitely did not expect participating in such events as a part of my study in college. And I’m more than happy that I have this awesome open course class that gives me such opportunities!

Fifth Pull Request for Hacktoberfest 2018

Screen-Shot-2018-10-01-at-5.58.26-PM

Here is my last PR for Hacktoberfest this year! I have decided to work on Filer again. If you want to read about my previous experience with Filer here is a link. I really enjoyed it so decided to contribute to this project again, but this time as a Hacktoberfest participant.

First of all, I created an issue to work on. Last time I found out that Filer had zero tests for fs.ftruncate() method. This is why I’ve created a new file and wrote there a few tests for fs.ftruncate() method. Since then nothing changed, so I have decided to add a few more tests for this method.

My issue looks like this:

Screen Shot 2018-11-05 at 10.02.58 PM

I updated the repo on my PC and start working on tests. fs.ftruncate(fd, len, callback) change the size of the file represented by the open file descriptor fd to be length len bytes. I have added two tests. One of them checks if the method assume len to 0, when undefined len is passed. Here is how the code looks like:

Screen Shot 2018-11-05 at 10.13.20 PM

The second test checks do fs.ftruncate() update the file size. This is how I implemented it:

Screen Shot 2018-11-05 at 10.15.31 PM

My pull request passed all Travis CI checks and I am waiting for it to be merged.

Screen Shot 2018-11-05 at 10.19.45 PM

Fourth Pull Request for Hacktoberfest 2018

Screen-Shot-2018-10-01-at-5.58.26-PM

This time I want to talk about another PR I made for Hacktobefest 2018. I already contributed to ClassicPress, killedbygoogle and Periodic Table projects on GitHub. My fourth PR turned out to be really confusing for me but still interesting.

Again, all my blog posts for Hacktoberfest starts with me complaining how long it takes to find an issue to fix. Same here. I chose this issue not because it somehow was correlating with my interests or I knew I’d learn a lot of new things while fixing it. The reason was simple – I could not find anything else. I spent a ridiculous amount of time just surfing through all GitHub issues and repos. At some point in time, I decided that I need to stop on this issue in one of the repos of Freedom of Press Foundation. This Foundation is a non-profit organization that protects, defends, and empowers public-interest journalism in the 21st century. Sounds cool, right? On GitHub, they have 80 repos and the issue that I found was in one called securedrop-sdk. It looks the following way:

Screen Shot 2018-11-01 at 5.03.06 PM

I forked this repo, cloned it to my laptop. I thought that everything would be complicated and I would have to dig into the code for 10 straight hours to search for a tiny piece of code that was causing the error. Everything turned out to be more trivial. I found the line of the code where an error message was produced and I realized that the problem was not in the code itself but in the output message. I changed the wording of this message. That’s it. It took me around 3 minutes and I felt really uncomfortable because it was so easy. I even thought that I was wrong because it cannot be so simple but decided to submit it anyway. However, I contrived to mess up with the submission of the PR. Did you know that GitHub has a PR description keywords, as well as commit messages, that automatically close issues? Now, I know this too! You just have to follow certain rules and your PRs will always be connected to the issue. Here is a link if you want to know more. Anyways, my PR passed all tests on CircleCi and now I’m waiting for someone to review it and hopefully merge it.