Hidden gems I acquired from open source projects

So recently, I started contributing to an open-source project called Wagtail, and I found myself capable enough or maybe free enough ;-)

The most frequently asked question that I hear. "Why should I contribute to open-source projects if I am not receiving anything in exchange ?".

I am here to share my experience as an open-source contributor to Wagtail.

What is wagtail?

Wagtail is a leading open-source content management system built on the python framework Django.


Here is all that I learned from Wagtail so far.

Design patterns and their implementation

Design patterns are less familiar to students who are new to software development; these are among the most used but underused components. Despite being used in all professional software development, Wagtail and Django make extensive use of them.

I learned patterns like singleton, factory, command, interface, bridge facade, and so on, which helped me grasp the depth and meaning of Object Oriented Programming.

How to push the limits of code reusability:

As I worked through some issues related to UI components ( storybooks, Django-partial templates & vanilla HTML )

Refactor Avatar styles into UI component #9814

Refactor Status tag styles into UI component #8656 #9721

Adopt core shared header for ModelAdmin headers #9993

Adopt core shared header for Snippet type listing header #10169

I learned how to push the limits of a code snippet that is meant to be reused across the entire codebase, I was able to make that snippet so flexible that it behaves so differently in different contexts.

Broadly speaking, if you write a separate partial code or component for a specific use case, you can push it to be reusable in other places by adding if-else or switch case behavior and making it polymorphic.

Importance and different ways of testing:

Working through multiple issues, there were times when I was clueless or very unsure about my solutions and whether they would work or not. As a newcomer to Test-driven Development, it was fascinating to learn that you can write code to test pretty much anything in your project.

Looking into those further, I discovered another development strategy: behavior-driven development, which provides our application with complete user-like behavior for more robust and close-to-reality testing.

New stacks, programming language, and technologies:

As a backend guy, Wagtail's UI stack was new to me, but compared to the backend of an application, which is primarily linear in terms of development, the stack front provides flavors of different stacks used and stitched together beautifully stacks like react tailwind, stimulus, and some excellent middleware modules like the telepath module.

I learned and worked with typescript for the first time.
I learned an entirely new js framework, hotwired-stimulus.
I worked with jest testing for the first time as well.

Migrate initErrorDetection to a Stimulus Controller w-count (tabs) #10110

Migrate addMessage from core.js to a Stimulus Controller w-messages #10182

fix 9521 Tab nav link error count is not correctly pluralized for screen readers #9696

Some other nontechnical learnings:

Working on open-source projects, I encountered some talented people across the world.

I learned a lot just by talking and listening to them. Participating in discussions with others also taught me generosity, coding etiquette, where to post questions, how to think about a solution and the thought processes of great solutions.

One of the most unexpected things I learned was the desire to help others.

Conclusion

To conclude, working on open-source projects taught me about software development and coding etiquette that I could have never learned in any college, university, or even corporate. With this experience, all that it does is leave a craving for more of it.