📜 ⬆️ ⬇️

Why and why write open source code?

image

Under the cut interesting survey

Perhaps the title of this article will seem to you not correct, ”How can I write open-source code? And what kind of code is this? ” - you ask.
')
How does open source code differ from “plain code”? An open-source project is responsible for the quality of the code, for covering it with tests, for documentation, for timely answers to questions and responding to bug reports, for handling pull-requests. Your behavior and thoughts while writing open-source code that the world will see will be different, respectively, and the output code will be different.

An open-source project lives its own life - the life of a community that forms around a project. Ideas, feedback, bug reports, discussion and thanks from other members of the community influence you and the project directly, and encourage you to write code - understandable, documented and covered in tests.

Pro experience:


Once, having laid out the code on GitHub, I could not stop any more. My first public repository was PHP code intended for internalization based on MySQL tables. This repository did not collect stars and it is doubtful that it was noticed by someone. Not in the stars business, the fact is that your code is accessible to all. Your code is not hidden on the server, not minified / advertised in the browser and not compiled on the user's hard disk - it is displayed for everyone . Awareness of this fact simply obliges you to write code in a generally accepted manner ( in accordance with the language in which you write ), observe indents, add descriptions to methods and classes ( at least public ones ), adequately name variables, classes, methods and functions, observe do-not-repeat-yourself rule

I am sure that the code I publish is useful to other developers for exactly the same amount as myself. When publishing the code, I not only share my experience with the world, but also organize myself exactly as much as my code is organized.

Writing a public code is like attending social events. You look, talk and meet the highest standards of the IT industry, or at least strive for them. To write a publicly available code is how to discuss the functionality of an IT team equal in scale to the entire IT community of the planet. Any member of the open-source community can suggest changes, report a bug, and discuss further development of the project.

Pleasant in open-source projects are emotions and sensations experienced from understanding that your project is useful. When the number of downloads grows up, when you get feedback, when people from all over the world join the project and together you make the project better, this is what you should write code for. At this point, simply writing code to solve the problems grows into a contribution to the IT community.

About the concerns of Studios and Companies:


Does your company write code? Do you think that the written code belongs only to you and your customers who paid for it? If your answer is “yes” , go to your developers and ask them to calculate how many lines of code are written behind the walls of your company by a third party, downloaded from SourceForge, GitHub, installed via NPM, apt-get, aptitude, and other code distribution sources.

When it comes to open-source, many managers ( not all, but there are such ) believe that GitHub has entire projects ready for use and making money. When your employees offer to publish on GitHub, they are going to “merge” all the code for which the developers received a salary, and someone else ( bad ) will collect a clone of your product and will earn money. Or worse, discover the exploit and use it secretly. This is absolutely not true. Firstly, no one needs your project entirely except for you and your client, and secondly, you don’t need to lay out projects entirely . Small pieces, classes, methods, adapters, etc., of which your project consists, can be useful not only to you. The IT community will respond to your input by searching and correcting errors and vulnerabilities, adding functionality and improving performance. You may find a new employee in the person of the active contributor.

Open-source project is:


  1. Live emotions, communication with people around the world.
  2. Access to accumulated knowledge and previous experience.
  3. The most demanding approach to writing code, documentation and tests.
  4. Teamwork on the task.
  5. Open to end users.





In the universe where people have not learned to work in the open-source community, there is no opportunity to use the previous accumulated experience of the IT-industry and accumulate it. In turn, IT-companies allocate a large part of the budget for paid software. And in order to save on purchases and subscriptions to software, they write their own solutions, which causes a rise in the number of developers tenfold, ready to perform tasks from writing OS and frameworks to text editors, in which this code is written. It’s good that in our open-source universe the community is actively developing and this does not threaten us.

Post your code. Spread the code written in the walls of the company ( with the agreement of all managers ). Make a contribution to the development of the IT industry. Read someone else's code. Improve someone else's code. Always write bug reports. Ask questions to project owners and do not forget to answer the questions asked to you. Thank.

Source: https://habr.com/ru/post/274791/


All Articles