Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Proper communication with the team and always do a git fetch then create new temporary branch then do the git pull there. Also check commits and changes in the online github or Bitbucket
-
auditt9876y@oreru so we are doing a small application for a school's project. I was the only one who was working on it till 2 days ago, my friend starts working on it and we usually code at the same time and on the same file so we keep getting conflicts. I want to know if theres anyway to avoid that as much as possible.
-
nam178875796yShort answer: Open-close principle.
Code should be design so changes to existing code made by adding/removing classes as a whole, instead of modifying existing one.
Example: you have a service that writes messages into a queue. Now boss wants to change the code to write both to the queue and also a file.
Bad code: you go and edit the service to write both to the queue and the file.
Good code: ADD a new class (a decorator) that wraps existing service, with the ability to write to the file.
Anyways,
You wont have merge conflicts if you always ADD instead of MODIFY the code.
What are good practices to avoid getting a merge conflict?
question