Swift Mentorship Program 2022

I never expected to find myself participating in the Swift Mentorship Program. Isn’t Swift just a programming language for Apple platforms? Up until now, I have been working mainly in C++ and before trying Swift I had, like many others, that thought. I became a Swift enthusiast while working with Metal. Swift’s type-safety and expressive power allowed me to focus on the 3D rendering concepts that I wanted to learn. Swift is backed by the high-performance LLVM compiler, which allows it to compete with C++ for speed, which is what I am used to! Swift is certainly a modern language among the family of C-based languages. My curiosity around Swift made me want to contribute to a Swift open-source project.

After applying for the program the Swift mentorship team assigned me the Swift Package Index (SPI in short) as my project for the summer, and Dave Verwer, co-creator of the SPI, as my Mentor. During most of the time of the Mentorship program, I was working full-time, but as others mentees I wanted to get most of this experience. My main goals were to learn about open source collaborations in a fairly big project and server-side programming with Swift. The SPI is a perfect opportunity to learn that from! The SPI is more than the search engine for Swift packages; it aims to help people make better decisions about their dependencies. It highlights things like how well maintained a package is, how compatible it is with different Swift versions and platforms, how each package is licensed, how many dependencies a package has, and many more metrics.

Looking at a well-established open-source project is daunting. We get stuck in a paradox: our desires of contributing have been inspired by the work of others, but we do not feel ready to contribute as we do not see ourselves experts yet. It is not primarily our fault as we do not have a sufficient understanding of what was required for reaching that state that initially attracted us. Namely, that there were many drafts, mistakes were made and that they are all necessary part of the journey. I feel grateful that I had the opportunity to participate in the mentorship program and specially for the advice received by Dave to help overcome this barrier. Thank you!

In our first weeks we talked about what could be an appropriate contribution and after getting the development environment a “low hanging-fruit” was waiting for me. Namely, a good first issue from the SPI. This was my first pull request ever in an open source project! Believe me, there is a lot of things happening at the start, but as Dave kindly remind me, it is important not to get overwhelmed with all the new stuff. I learned to interface with Docker and PostgreSQL, which I had never used before. One thing in particular that came up while working with the SPI is that I got to learn about the existence of interesting Swift packages that are being developed right now. While testing and getting a feeling about the SPI I searched and stumble across many of them.

In the next Meetings, we discussed about what I could do to work towards my goals. One thing that quickly impressed me was the hard work of many people in open source. It is inspiring the amount of love and effort that is put into open source projects. Much of it is not recognised enough in my opinion. We agreed to work on adding a feature to acknowledge the work of package authors by displaying their names on each SPI package page. Hearing Dave saying that it was okay not to know exactly how to proceed with this feature was a relief to me, as he himself was not completely sure how to tackle this. An open and relax conversation set a perfect atmosphere for a productive collaboration.

Dave and I discussed how the feature would work. One tricky part is that extracting author information from git commit history can be misleading. Git history sometimes has bots making commits, or maybe the level of effort being put into a package is not accurately represented by a simple number of commits. This could lead to “bad vibes” around package authorship and collaborations if not accompanied with direct access to the authors to change this at their will. I talked with Dave about this and expressed my concerns about my contribution. I shouldn’t have worried. Dave told me that the whole feature will not be shipped until we give package authors the means to configure what is shown as primary contributors. I have successfully added a backend support for gathering author information and I am currently working on adding the option for authors to override the default extracted metadata. Basically, authors of a package will have complete control of what is shown in the SPI as their author information.

One thing I learned during the mentorship was how crucial good communication is in any type of collaboration. This was definitely a motor to get things going and I enjoyed the meetings with Dave so much. The conversations we had about my initial concerns and doubts about the authors feature is an example, but not the only one. Discord was a great channel for communication and where different opinions were exchange. I witnessed a couple of fragile external discussions where generous and thoughtful communication was much needed and given. I am happy to have Dave as my mentor for reminding me this and being a true sample in this regard! Moreover, thanks to this experience, I feel more confident in professional Git and gained insightful tips in Swift development that will last after the mentorship is over.

I hope these words inspire you to give Swift (an unbiased) try, and maybe contribute to an open-source project one day. I would like to extend my gratitude to Dave, Sven A. Schmidt, James Sherlock and the contributors of SPI for their time and given feedback. Also to the people in SwiftWasm Discord for answering my noobie questions about their project. This proved as well to me that the Swift community is welcoming even if you are not directly working with them. @hborla,@devanshimodha and everyone in the Diversity in Swift group thank you for working hard to build an inclusive Swift community! Your detailed guidance on approaching mentorship was invaluable.