My highlights on BridgeInTech Second Coding Phase GSoC20

Maya Treacy
AnitaB.org Open Source
4 min readJul 27, 2020

Week 8 Second Coding Phase GSoC 2020 with AnitaB.org

Time flies really fast in GSoC. In a blink of an eye it’s already the last week of Second Coding Phase. In this week blog, I will do a quick recap of my highlights with this BridgeInTech (BIT) project in particular on technical challenges I come across throughout GSoC journey.

1. Mocking API calls

Learning to mock api calls on testing for both backend and frontend so far is my most favourite experience this GSoC. Perhaps since to me it was quite a hard concept to grasp at first, the sense of accomplishment after the tasks were done was almost indescribable.

When I first heard about unittest.mock, I didn't quite understand why BIT need to mock the API requests to Mentorship System (MS) or why it couldn’t (or best not to) send a real request. But now I couldn't think of another way to complete the testing without mocking. Well.. perhaps the closest possible solution is to set a remote MS server where BIT can send its requests during Travis build. However, this alternative method would likely add extra layers of complexity and efforts such as setting up and maintaining the remote server specifically made for this purpose (testing PRs). Not to mention, the potential interruption and delay that might happen during sending/receiving process since the remote server might not be powerful enough to handle the multiple test cases that will run at the same time during Travis build (meaning more than one request will be sent at the same time).

Not only this learning experience changed my mind on the benefit of mocking api calls on networking, I also learned about different things that could be mocked, at which point on the code the mock object is needed. Even though far from being an expert, but thanks to this GSoC, I can say that now I’m quite comfortable talking about or working on mocking api calls which makes me a happy student.

2. Python decorator

The next highlight I want to share with you is my learning on python decorator on transforming tuple to namedtuple object. I was grateful that I’ve got a hands-on experience on this “magic wrapper” that can transform functions that are passed to it. I’m still impressed on how handy it is to be used when refactoring our codes that often happens throughout the lifecycle of our program.

If I can think of a metaphor, it’s like applying accessories on top your existing clothes to change your fashion outlook according to the season change. With the same underlying clothes, you can look different if you wear different types of hats, sunglasses, scarfs, jumpers, jackets, etc. By applying our mix and matching technique, we save ourselves time and effort (don’t forget cost) in comparison to going through that massive “wardrobe change” (aka refactoring). Anyway, you get my point, right? 😁

3. Protected page

On the frontend side, I was thankful to have learned about protected route on Reactjs that in my opinion probably one of the most important thing to know in web application. Through this experience, I learned to protect private pages to allow for certain features to be dedicated to specific type of users (such as members vs non members).

Here I also get to know about React Context, cookies, as well as further deepen my learning about React Hooks (useState, useEffect) and function-based components. As I use them more in completing each MVP tasks, the more comfortable I am in writing the code on frontend. I hope by the end of this GSoC, I could use this valuable knowledge to pickup the startup project that I’ve started a while back but got hold up with one of the reason being the lack of hands-on experience on similar project.

I’d like to thank my mentors for giving me this opportunity to have this challenging yet exciting learning experience. Beside the technical gain in this GSoC journey, I’ve also learned the importance of communication, respect, perseverance and patience through our team interactions.

When I first heard about GSoC, I had my doubt with the fact that this is done through a remote setting. But now I’m loving working remotely. As a newbie and one who is looking for a career change into the IT industry, I never thought that an Open Source program could open my eyes on how the industry works. Furthermore it offers lots of hands-on learning opportunities that anyone can pick up through contributing to the project.

To end this week reflection, in comparison to the first few weeks of GSoC, the number of PRs I have pushed this second phase of GSoC increasing noticeably. This gives me confident and hope about the outcome of GSoC and the BridgeinTech target MVP. Let’s hope this momentum remains if not further improve throughout the next coding phase, which also is the final phase of GSoC. 🤞

Don’t forget to read my blog next week….. 👋

Profile Link:

LinkedIn | Github | Online resume

--

--

Maya Treacy
AnitaB.org Open Source

Master of IT student / Software Developer / GSoC20 Student with AnitaB.org / Passionate learner