Contributing to Open Source : Week 5

(This story is part of the weekly assignments for my internship at Nearsoft. I hope that some of the insights I learned this week can help others in their learning journey.)

Issues and pull requests

This week, I worked on two issues:

How I was trying to contribute

For the open-desk issue (Javascript + React), I had to connect the UI to the backend by calling the /site endpoint with the following request:

For the smug issue (Go), I had to add the ability to create and edit configuration files within smug command.

For example, smug <edit|create> <project> should open ~/.config/smug/project.yml in the $EDITOR.

Any positive or negative results

For the open-desk issue (Javascript + React), I successfully connected the UI with the backend and received a successful response from the API. The most difficult part was to work on the logic for the input of the dynamically added <Add Floor/> component.

To solve this, I used the onBlur event in the input button, which would trigger a function to update the floor array as follows:

For the smug issue (Go), I created the Edit function which gets the full executable path for the editor and opens it.

However, I still need to pass the filename argument into the function in order to edit or create a new file if it doesn’t exist. Also, I need to create the tests for the function and implement the error handling.

What did I learn this week?

A lot! 🙂 I learned about Error Handling and Go. I also started to study Grokking Algorithms by Aditya Y. Bhargava in order to review Data Structures and Algorithms. Last, I learned about SOLID Principles.

In Javascript, Error Handling looks like this:

However, in Go it looks like this:

26 yo. Self-Taught Software Developer. I write about Career Change, Women in Tech and anything exciting I’m working on.