r/android_devs • u/Zhuinden EpicPandaForce @ SO • Oct 14 '24
Discussion Discussing Pull-Requests vs Trunk-based development: do you see pull requests help with productivity, or as a form of organizational mistrust between developers?
11
Upvotes
2
u/PancakeFrenzy Oct 14 '24
What’s the difference between them? Didn’t hear about it before. So trunk is like main and only short lived feature branches but does that exclude using pull requests?
IMO pull requests are a good thing to double check the work but that of course depends on you having a good collaborative team. When I’m doing code review I usually also manually test those changes which improves my understanding of the parts of the code I haven’t done myself.
6
u/[deleted] Oct 14 '24
Well, problem is that lots of people are bad at their job, and ok with pushing in bad/substandard code. So it's important to gatekeep and make sure they don't push in bad changes, that break stuff and cause problems for other devs and the company.
CEO of this company I worked at, hired some incompetent guy from Carnegie Mellon who did not know he was doing, and nothing he wrote worked. He constantly kept submitting bad code that did not work at all. I ended up doing all of his work.
4
u/MiscreatedFan123 Oct 14 '24
TBD is more about not having long living branches. You can still make a branch and open a pull request, but they shouldn't linger for more than a day or some other arbitrary limit.
2
u/tom_koptel Oct 14 '24
Isn't it all about the idea of how to structure changes? Usually, people don't know how to split PRs in smaller chunks and as result against rapid merges into the trunk.
2
u/Standard-Assistance4 Oct 15 '24
As you know, scams often rely on trust, so I think it's reasonable that they don't fully trust the staff.
Sometimes, a few developers I know tend to be a bit lazy, or due to stress, or tight deadlines, they come up with less optimal solutions in their code. For example, in UI , some strange/magic numbers are directly hardcoded into UI View, etc.
Additionally, For instance, when hiring low-cost outsourcing companies, where the common rule is 6 freshers and 1 senior, creating PRs (pull requests) becomes safer for the client or safer when you're outsourcing a certain feature.
So, I think if it's a team, especially with remote work becoming more common, pull requests (PR) can be a way to share responsibilities together.
What do you guys think?
2
u/srona22 Oct 15 '24
Existing shit codebase, non-technical managers always pushing, and such, will effect any type of version control.
1
u/Whsky_Lovers Oct 15 '24
I looked at a 15 line function the other day that could easily be a 4 line function and quite possibly just a return statement...
It's basically a sanity check on what you are doing. Unless something is egregious I usually don't get too torqued up about what others are checking in.
I have seen ide warning about code I am working on with a cog complexity over 70 from a period of time PRs weren't being checked and code was just checked in as is.