Monday, November 23, 2020

Release 0.3 - PR 2

 Dear PC readers:


Welcome back to my blog!


So PR 1 if you remember was on Telescope. Hence, this one had to be in the open source community. Yet again, I tried to do something different. I did not go and look out for the issues that were my forte like Web development or coding in that matter. I am learning DS algos in one of my other courses taught by Ms.Cathy Leung and I know I am gonna need this in my interviews soon. So I tried to use that and nurture my skills with DSA in this PR. We recently are learning many algorithms in the course including the tree algorithms. Also, another fact, that I am also going out of my way to learn a new language like Python which I am also taking this semester and move away from traditional C++ background of BSD. 

That is why, I tried my hands on this PR which needed to implement algorithms in various languages. I could have chosen the languages that I am well versed with like C++, JS, Java etc. But I chose Python to try something new like this course. So yeah, I started going through the issues of this repository: 

https://github.com/aniketsharma00411/algorithmsUse

I chose to add algorithms in Python language and for Binary trees that I am very new at. As usual, I commented on the issue to work on this, the owner replied positively and asked to read the contributing.md first. 

 https://github.com/aniketsharma00411/algorithmsUse/issues/1

I did that and bodied well with the rules and regulations. I, then,added one algorithm called balanced binary tree check. But then I thought, since this is a release 0.3 PR , lets add two algorithms instead of one to make the PR bigger. So I added one more called level order traversal. It was not easy, I for sure ran into many small stupid errors, but eventually I figured them out and finished this PR.

 But then again, I can never ever commit and push without the struggle. I always forget to fork and then only clone. It denied me the access and threw me error after pushing. Then I forked it , cloned it, and added original repo as the remote and synced them and then did the usual add-commit-push. Voila! Success this time. Thankfully!

So you can find my PR here: https://github.com/aniketsharma00411/algorithmsUse/pull/182

Thanks for reading my blog!

See you in the next one. Ta -da!

Best,

PC

Thursday, November 19, 2020

Release 0.3 - PR1

 Dear PC readers!


Welcome back to my blog. 

As the name suggests, this is a blog for Release 0.3 PR 1. In release 0.3, we had to make two PRs: one in Telescope which is kind of an internal project to this course, you could say. This blog feed server is created by Open source students only. So it was one of the tasks to complete a PR for this and get it merged in order to gain full marks for this PR. Although the second PR, could be in any open source and does not necessarily has to be merged( Although I will try it to be).


Let's start with the process, I started looking through the issues on Telescope. I see many of the students are working on CSS and other things, so I thought let's get something bigger and fix a bug. As a tester in my whole IT experience, I have been only logging bugs. Now, for a change, let's debug. But ofcourse, destiny plays its role, all the debugging  issues had the writing of the test cases also. Lol, test cases are back in my life(in a different way, but yeah back). Anyway, I accepted that and picked one issue. https://github.com/Seneca-CDOT/telescope/issues/1312


The issue was to validate the query route parameters i.e. text and filter using Express Validator and write the unit tests to check my code. I started by researching about the Express validator and learnt to how to use it. I installed it using

npm install --save express-validator

https://express-validator.github.io/docs/

 I added the functions called queryValidationRules and validateQuery which is a query Validation Function in Validation.js file.I used chaining with express validaiton like this.


And then used the queryValidation in the query.js 

 

I went ahead and added few of the test cases to test my code coverage. I then pushed the PR.

Devansh, Dave and Tony were my reviewers and they gave me some good feedback to improve my code and add more test cases for my work to better cover the code I created.There were some also very stupid issues that I left like saying 0 to 256 characters instead of  1 to 256. So thankfully Dave caught them and let me know. I fixed all of them.

I was then asked to squash all of my commits into one in order to get it merged in the project. I did that and thankfully my PR got merged in the holy project of "TELESCOPE" 😃

I was so happy to see that! 

FYI, I also reviewed my peer's PR which were similar to my issues. It felt like a teacher who dont know much lol. What if I say something that is wrong, what if it is not something that should be done and I break the code through my review, with lots of thoughts in my mind. I still tried to review a bit that I thought was not gonna break the code, if I did .. oops sorrryyy! 😜JK

So yeah, here is my PR link : https://github.com/Seneca-CDOT/telescope/pull/1334

Take care, Stay well! I will see you in my next blog!

Best,

PC

 

 

Lab 9 - The last chronicle

 Hey PC readers,  Welcome back to my channel! As the name says, this is our last lab of this semester Lab 9. In the last tale of the lighten...