What can pull requests for other people's projects teach us?

Hello. Go, using the example of games (Unity and C#) and assets for them, we will look at examples of why it may be useful for you to contribute to the programming community.

We will talk about requests for changes through a project fork.

Git system

Requests to accept changes will allow you to become more familiar with the Git system and master unfamiliar functionality. Requests to accept changes are not limited to just the goal of making a contribution to society: in large companies, requests are a mandatory part of the job, approving the work of the programmer as an employee working on a project together with others.

Learn something new

Obviously, contributing to someone else's repository requires reading someone else's code, which in itself teaches you something new. Writing approach, declaration of fields and properties, application of attributes, events, delegates, namespaces, assembly definition; design patterns using a specific example, nested methods, initialization methods, old-school programmers' tricks like using the address of a memory cell as a collection indexer…

I can recommend watching the video with C# features about this theme.

Refactoring

If you want to make changes to someone else's code, then this means… Refactoring! A great way to practice in this area. Kind with healthy.

  • Do you see repeated lines of code? Place it in a separate method.

  • Do you see the confusion of logic? Extract one logic into a separate class.

  • Similar behavior in different classes? Take out the interface.

  • Is there a lot of data being transferred inseparably? Can be assembled into a structure.

  • The method belongs to a foreign class, illogical arrangement? Move it to a more obvious place.

Before you change someone else's code, you should read refactoring methods and code smells. No one needs useless or illiterate requests.

Big class

Big class

Improving the project

Of course, when changes are made, the project becomes better.

  • gets new functionality

  • becomes optimized

  • bugs are fixed

  • non-technical errors are corrected

Thanks also to you!

I did not write this item first on the list, because… First of all, I wanted to emphasize the usefulness of requests for the author of these requests.

Writing style and respect

Contributing to the programming community teaches you to respect other people's coding styles. Your request will not be approved if you write everything in your own way, without taking into account what has already been written. Respecting other people's work will not only help you approve a request for an infusion, but will also allow you to work more effectively in a team at a regular job (or when participating in jams), and it will be easier to establish communication with colleagues in the workshop.

Communication

During the change process, you will need to communicate with the project owner. Even the most beneficial changes will not be adopted without proper treatment. Politeness and constructiveness will help you. Of course, these are also soft skills that will help you establish communication with colleagues.

I liked the article on how make requests correctly I advise you to accept the changes. Worth reading for queryers and reviewers alike.

Bottom line

Requests to accept changes are a powerful way to improve and help others do the same. The ability to write competent and understandable code, know the intricacies of the game engine and programming language, and establish communication while working – this is what you can learn in the process. The main thing is to enjoy the work done!

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *