Outreachy Blog #2: Everybody Struggles

Three weeks and counting is how far I have gone in my Outreachy internship. The experience has given me opportunities to learn new things and meet other stakeholders in my project and community.

It has not been a bed of roses, as I struggled in the first two weeks of my internship. I will be talking about my struggles and how I was able to go past them.

Setting up the development environment

I supposed this should be easy to tick off since the project has an installation guide. I was wrong. I had bugs come up one after the other while trying to set up the development environment. My main challenge was with setting up the database and seeding the initial data.

I searched the internet for answers but was nowhere near fixing the error. I reached out to my mentors, and I got on a call - voilà, I was able to fix the issue.

During that process, I discovered that the installation guide was not up to date. Since I have gone through the installation guide as a first-timer, I updated the guide to include the needed information to setup the project locally.

Information Overload

In the first days, there were a lot of things to learn, ranging from writing unit tests in Django to using MediaWiki to complete my initial tasks. I found out that I was neck-deep into the research process, and when it was time to implement, my brain was overwhelmed due to information overload.

Information overload means when you try to consume too much knowledge about a topic all at once without breaks. Here is how I was able to work around it.

I start out by looking at the codebase; when I come across terms that are unfamiliar or not clear to me, then I look to get information on it. For example, if it is Django-related, my go-to resource is the official Django docs and tutorials. As I read, I make mental connections between what I am trying to do and the new information. Afterwards, I write down my notes based on what I understand in my own words.

Adopting a Testing Culture

An integral part of my internship project with Wikimedia is writing unit tests for the Capacity Exchange software, ensuring every part of the application works as expected at all times.

Before the internship, I had written tests a few times, however it was not a key part of the development process. I struggled with adopting a testing culture, that is testing every piece of code.

That got me thinking about what exactly unit tests are, what I am to test or not, and how to go about it. Let me share this with you.

Unit tests are ways to ensure the specific functions work as expected, even when the codebase is updated (add new features or change existing functionalities).

About what to test or not, I am currently testing the models, views, and forms in the Django application. Sometimes, I wonder and say what exactly am I to test in the particular model or view. I have realized that unit tests are often the first users of the application.

For example, while writing tests for a particular view, I try to imagine myself using a browser and mocking interactions like a typical user would do. Then I start with the what-if worst and best case scenarios.

What if I enter a wrong input, what should be the expected output?

When I click this link, what should I get?

I am certainly not a pro at testing yet, but I am getting better day by day.

I am writing the unit tests with the help of the standard Python module built-in unittest in Django. Ideally, I have a TestCase Class with its own data and methods known as tests that check if a particular thing is working as expected.

At the end of every tunnel is light.

What’s Next?

I am embracing every opportunity to learn and implement things in my project. I am looking forward to ways to make more contributions to the Wikimedia movement, even beyond code.

To start with, I have created a user page on Meta-Wiki to track the work I do on Wikipedia and other projects, and also connect and chat with other Wikimedians doing awesome work in the movement.

I am currently updating my user page with the Wiki markup language in order to learn how to edit or create a page on Wiki. Watch out for my Wikipedia articles and edits soon😊.

To more open-source contributions🎉,

Oyin

31
Subscribe to my newsletter

Read articles from Oyindamola Olatunji directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Oyindamola Olatunji
Oyindamola Olatunji