L10 - Version Control 2 Flashcards
Why should we run tests locally before committing to VC ?
- Local tests run much faster than on the VC system
- Ensures that we know tests will pass on VC system
Why should we always ensure tests pass before moving on?
Ensures you don’t forget what tests were run, and what changes you made
Why should we avoid commits on a red build?
Building on a red build will make debugging harder and snowball, compound and overflow bugs as we increase development iterations
Should we build on a red build?
No. If build fails, no more changes should be made until build has been made to a Green Build
Why should developers never go home on a red build?
- Fixing a red build before leaving ensures you don’t forget changes you made that could’ve contributed to the bugs
- Changes made are fresh in your mind
- Stalls all progress → Must fix so the rest of the team can move forward and avoid stagnation of development
What working practice can be employed to avoid going home on a red build? Why is this a good practice?
Check in first thing in the morning as opposed to the end of the day → If a red build occurs, you have the whole team fresh in the morning to tackle it
Why should we be prepared to revert?
In case we need to technologically pivot or software becomes overly complex.
Why should we avoid commenting out tests?
Ensuring tests are always active provides consistent safeguarding
What is Regression Testing?
Re-running previous tests to ensure that they still pass
Why is it important to take responsibility for breakages? What does this ensure?
- If you commit and your tests pass but others break… It’s your responsibility to fix it, regardless of who wrote the code
- Ensures that all developers are capable of working effectively across the entire code base