My first contribution to FOSS (Free Open Source Software)

It’s been a while since the first time I got in contact with Free software. I don’t remember the first time I heard about what it was, but I remember feeling extremely interested about it. However, I never dared to work in any Open Source Project: I am a quiet/shy person and it felt somehow intimidating, but I have to admit that also have doubts about my technical skills.

During the last month I have been doing my first contributions to an Open Source project: Wikimedia, more specifically the Program & Events Dashboard. I am so glad I did! Now I feel more empowered and capable of working in new projects and software development.

My first contribution was full of mistakes. The first approach was not only wrong because it didn’t match the requirements, but also all the tests were failing, everything was a mess. I did a first commit because 1) it was working in my machine (except “some” corner cases) and 2) I was a bit lost and wanted some feedback. And honestly that was what it really helped. Specially one contributor from the Wikimedia Foundation (Ragesoss) gave me some guidance and after three days my first Pull Request was merged! The main things I learned in it were:

  • What Guard and Jest are, and how to make them run in my machine. I also learnt about different kinds of tests (Rails and Javascript tests), and how to interprete them in order to improve your code.
  • It was the first time I worked with React and, to be honest, I really liked how intuitive it is. I am very far from knowing what React is and how it works but I strongly believe that I am less scared of touching libraries I don’t know.
  • I cleaned code! And this felt very well to me. I keep hearing how difficult is to deal with Legacy and Technical Debt in different conferences, blogs and from friends, so helping a project to have better quality code it’s a very rewarding feeling.

After this very first Pull Request I have also contributed a bit more to the project. Sometimes it was frustrating and I felt I was not good enough, but sometimes I also felt very encouraged to take the code and fix its problems. I did my own proposals about how to fix the bugs or needs of the users. The main learnings from all these contributions were:

  • I learned how to transfer methods from helpers to models and convert them in instance methods in a Rails App.
  • How to test this transfer and correct the code from every place it was affected by this change.
  • I also learned the difference between prototypes and states in React and also did understood how the stores work. Note to self: I still have to learn more about this.
  • How a minimal change in a test also can affect the rest of the tests. Specifically, this spec was creating a certain number of objects and by deleting one of the tests that was generating one of them, the rest of the tests were failing as well.
  • I also did my preliminary approximation to Rails Cache, but honestly it felt a bit overwhelming and need to research more about the topic. Any resources in the comments are very welcome!

These were only some of the main things I learned during my first contributions and I expect to continue learning and improving my skills with the next ones. I guess working for a specific project I really like, helped in my motivation. All the end, everything I had to do was just dare to ask for some guidance and start coding. I only worked in five Pull Requests so far but I already notice the difference in my way of communication and approach between the first and the last one. I want to think everybody starts like this and there’s nothing wrong with it.

I hope this blogpost helps any person that is thinking about doing some contributions to any Open Source Project. All I can say is: go for it!