A Tale of Open Source: The Beginner's Guide to Data Structures and Algorithms in Python

Don't miss the opportunity to learn while you teach...

Collaborating with open source is a great way to gain experience in a real-life scenario. It is a win-win. You learn either way, you gain new skills, and you can contribute to other people's projects and be acknowledged for it.

In this article, I will tell you about an initiative I started to spread knowledge about Data Structures and Algorithms using the Python language.

Let's go!

Some Context

I come from a background where Data Structures and Algorithms are a must. Mastering these topics was (and still is) a great competitive advantage.

I started mastering Data Structures and Algorithms mostly because I participated in numerous Programming Contests. These contests usually have several problems that require deep algorithmic thinking and the use of special data structures to create fast enough solutions.

But, Data Structures and Algorithms are topics that are present in the everyday job of every software developer as well. The difference between a slow and a fast website in production can be that Balanced Tree you didn't use to store your data or the fact that you are performing a Linear Search when you can do a Binary Search instead.

Believe me. I have faced hours of profiling some of my projects because I didn't make the appropriate decisions at the right time.

So, because I understand the importance of the appropriate usage of Data Structures and Algorithms, I decided to create a project that allowed me to teach people while learning a lot from the process as well.

Open Source Project

I started this project a while ago. The purpose of it was to create a compilation of Data Structures and Algorithms implemented in Python.

Why Python? You might ask.

The reason is simple. I have been coding practically every day for the past two and a half years in Python. I have done some Back-end Development, some Geospatial Data Science, and some DevOps. But guess what? I still feel like my knowledge of Python is not even near to that of the greatest Pythonistas.

So, with the hope that I could learn a lot from reviewing the code of the people collaborating with my project, I went for Python as our language of choice.

Surprisingly, not only have I learned about the details of the Python language itself. I have also gained a lot of experience using libraries that help you format your code, keep track of the versions of the packages without having to deal with dependency hell, and some other examples that I will cover in the next section.

So, yes. For me, it is being an amazing learning experience, and I have benefited a lot from the contributors. And I know firsthand that they have also benefited a lot from collaborating.

Why bother collaborating?

A question that you might be asking yourself is why you should care about collaborating on this project. And I have some really good answers, not only from me but from the current collaborators as well.

Real-life experience

As you hear it. I know this Data Structure and Algorithms idea might sound more like an educational project that you can build at school, and I sure hope I get to teach using the examples that we are implementing there someday.

But, what I haven't told you yet is that we are trying our best to have a good review system that enforces some of the good coding practices in the Python language. This will allow you to get familiar with the software development process that is usually applied by most software companies that develop software using Python.

That includes:

  • Proper Object-Oriented Programming code:

    Implementing Data Structures and Algorithms is the perfect educational set up to learn about concepts such as Inheritance, Polymorphism, Abstraction, Encapsulation, etc... Every software development company creates code that relies on the best practices of Object-Oriented Programming, so you might want to polish those skills.

  • Unit Testing:

    We try to ensure that the functionalities we add to the project have proper tests that guarantee a minimum of correctness. Creating tests is a useful skill that you should be trying to master if you want to excel in software development. We provide you with the basic workflow to do it in Python and guide you if you are stuck.

  • Automated Workflows:

    We are using some of the features that the GitHub workflows allow to automate some processes when certain events happen on the project. For example, we run all tests when we push a change for the development branch. We take this as a first step to the CI/CD processes that you will have to deal with in real-life enterprises.

  • Writing Proper Documentation:

    Documentation is as important as the code itself. For that reason, we aim to create valuable documentation for users and developers as well. Contributing to our documentation will allow you to get familiar with another common process that is done when you develop software in real life.

Collaboration

Collaborative skills are one of the most important skills you can develop in the software development industry. You will most likely be working as part of a team, where the decisions are made by consensus. Because of that, getting used to explaining your points of view, and understanding other people's reasonings is beneficial for you in every way.

With that being said, you can check our contributors here. You will see that we all come from different backgrounds, have different ages, and live in different countries but that does not prevent us from gathering in a common project and making contributions aiming for a common goal. The magic of Open Source!

If you decide to be part of this project, you will be interacting with Computer Scientists, Competitive Programmers, Data Scientists, Junior Developers, Senior Developers, etc... There are only good things to learn from people with such a wide range of experiences.

Some Numbers

As of the time this article is being written, we've had contributions from 7 different developers. We have 9 people who have forked the project, so we are expecting more contributions soon.

Already 28 stars ⭐ from people all around the world. That includes countries like Spain, Cuba, Sweden, Bulgaria, Uzbekistan, and The United States.

We have opened 30 issues, and 24 of them are solved already. We still have 6 more waiting to be solved by the brave ones. Related to this, 20 Pull Requests have been opened, and 17 of those have been closed already, leaving 3 of them in the "Work in Progress" state.

Lastly, since we care about the quality of the code we make, we have started 6 discussions regarding the implementation details of the features that we are adding to the project.

Conclusions

If you haven't contributed to an open-source project yet, take this chance to showcase your skills and be acknowledged for that. Don't miss the opportunity to collaborate with great developers from across the world and get familiar with some of the most common software development processes.

We are eagerly waiting for your contributions.

See you soon!

Also, if you want to have a look at a similar project but get hands-on with the Rust language I recommend you check this project by Alexander González Fertel. There is a lot of that project in ours.


👋 Hello, I'm Alberto, Software Developer at doWhile, Competitive Programmer, Teacher, and Fitness Enthusiast.

🧡 If you liked this article, consider sharing it.

🔗 All links | Twitter | LinkedIn

Did you find this article valuable?

Support Alberto Gonzalez by becoming a sponsor. Any amount is appreciated!