"It was already late at night (I got carried away). I checked in my refactoring to master and went to bed, proud of how I untangled my colleague’s messy code."
No PR, no code review, no CI. Just a cowboy pushing to the master..
"It was already late at night (I got carried away). I checked in my refactoring to master and went to bed, proud of how I untangled my colleague’s messy code."
No PR, no code review, no CI. Just a cowboy pushing to the master..
Let's be clear that the dangers here are "no code review" and "no CI".
The others are fine in most circumstances, unless you work on some huge monolithic codebase.
Smaller cross-functional teams should be able to push to master to solve problems then and there without everyone's unanimous approval, and everyone should feel enough safety to be able to make changes to the codebase they share with their team.
The real "root of all evil" is why is someone working against the team from within the team?
We all push to main, no code reviews, no CI etc.
Hell, some people here patch things by downloading the live dll, decompile, update code, recompile and stick it back to live...
https://wiki.c2.com/?ContinuousIntegration " The most granular unit of integration should be one step of one refactor. "
Now, you could bypass all those tests and reviews and just deploy it anyways. And then you'll have a shitty codebase, but you'll have CI so that's good, right?
How is pushing to master not a form of CI?
Assuming Master is the "protected branch" and not kitchen sink, this sounds like - "we test only in production". Wouldn't or shouldn't reviews happen before merging to master?
I worked this way for years before we moved into full branched code review. I would never go back however.
That said, you should still have at least some review and automated testing before your code gets in everyone else's way.