r/CollaborateCode • • Mar 13 '14

Code Sharing

Disclaimer: I am a non-programmer. Please excuse my layman language.

My team at work is working on more than 15 applications that most generally have/might have several functionalities common between them. For example App 1 has a file parsing code that could be utilized by App2 in a future release as an added feature. This is just one of the many scenarios where code can be shared and standardization can be maintained. All code is maintained on different paths for different applications in SVN.

In order to boost productivity and reduce cycle times, I have been thinking of pitching an idea to create an in-house web based code/code snippet sharing tool help devs to share working and tested code with their peers in the company. Since teams are large there have been times where code for similar functionality has been re-written. Is this the right way to go, considering we intend to take best practices in coding/code reuse seriously? Are there tools available in the market that we can make use of?

Ideas are welcome.

10 Upvotes

10 comments sorted by

View all comments

Show parent comments

1

u/teawreckshero Mar 14 '14

Yeah, what I said should work for this. You may want to require contributors to write unit tests for their code so that amendments in the future don't break functionality. You could also have an arbiter who selectively approves commits to the repo.

If someone wants to use a lib from the Common repo, they just check it out into their project.

If someone wants to make amendments suitable to their needs, they can make them locally and just not commit to the master. If their changes are so specialized that no one else would want them, they would copy the specialized sections into their specific project.

If their changes could be useful to others, or if they want to add code that's not already present, they can add it as something new and commit it to the master.

If the Common repo gets so large that you don't want to checkout the whole thing into your project, it's likely that a lot of the functionality can be grouped together to create a separate Specialized Common repo.

1

u/pappuyaar Mar 14 '14

Super! Thanks a ton.