r/ProgrammerHumor • • Dec 05 '21

Removed: Repost What about 5000?

Post image

[removed] — view removed post

9.7k Upvotes

141 comments sorted by

91

u/posicon Dec 05 '21

Same title, same post, same subreddit...

Bad bots

16

u/NastyMeanOldBender Dec 05 '21

What's with the North Korean General thing next to your names?

1

u/Ctownkyle23 Dec 05 '21

To the front page!

108

u/SANatSoc Dec 05 '21

PR's probably shouldn't exceed a few hundred lines. Frankly, even that much is a bit much. The ticket should be broken up into smaller tickets that require less lines to get it to work, if at all possible. Even just a few lines per PR is good.

27

u/[deleted] Dec 05 '21

I’m not sure what kind of projects you’ve been working on, but that’s just not feasible. Sometimes even relatively small features add more than 1k lines of code. Now, we can discuss whether you count all lines including comments, documentation, unit and integrations tests, etc

5

u/DoctorWaluigiTime Dec 05 '21

You can do multiple PRs per ticket / feature. I've dealt with trying to de-program people with this concept before: "Must do all my work in one PR or else stable branch will be tainted with unfinished work and we tuned our board to auto-advance tickets based on PR status!!!" (Use feature flags bruh; or just don't call your new stuff. And yes I know every code project is different but there are means to work around this, or build it into the workflow.)

(Side rant I hate source control and story/etc. board integration. Those two paradigms should not be linked and I will die on that hill.)

That way you can complete units of work that build up to a ticket / story / task / what-have-you, and divorce effort tracking from good coding / source control practices so you can practice the latter fully.

5

u/rabbyburns Dec 05 '21

source and story board should not be linked

That is a very surprising hill to die on. I personally find it extremely useful to be able to link to the target issues in my PR. You don't have to use language that auto advances the issue every time you open a PR.

1

u/DoctorWaluigiTime Dec 05 '21

I've just been burned by too many PMs / processes that have abused what should be a simple useful reference, and have become jaded. I've yet to be involved in work (going over a decade now in the job) that hasn't done this in some way.

As you say, it can be used correctly!

3

u/BurningTheAltar Dec 05 '21

Yeah, smaller chunks are better, but I agree that breaking up tickets/prs is not always feasible or efficient. However, I ask my team to break their work down into a set of the smallest functional changes possible. Then in the PR, I review the changes one commit at a time and do a once over at the end. I suppose this is more or less what you’re saying.

This is the approach I usually teach my team:

  1. Inventory what you already have and what you need to meet the requirements

  2. Create a sketch of minimal, discrete tasks needed to meet the requirements, starting from the consumer/user/client/contractual end and working your way in*. The tasks should start by roughing in your changes, and then add tasks to do fit and finish, cleanup at the end.

  3. Start working down your task list**. Commit changes related to a task together before moving onto the next task.

  4. As you go, you may identify problems or new things that need to be addressed. No problem, just add them to the task list and reprioritize as needed.

  5. When you get to the end, make sure all your requirements are covered, review it yourself to look for any refactoring or cleanup, testing, etc. But if you need to make changes, commit them one at a time.

  6. Submit your PR***, address feedback, update documentation, etc.

  • I recommend this because the contract with the actor is the most important part and should influence the internal implementation, not the other way around (building inside out has a tendency to result in the consumer experience being compromised to suit the internals you already built, which is occasionally necessary but usually how bad user experiences manifest) ** they can literally enter this task list as sub tasks in Jira or whatever, although most devs rightfully hate monkeying around in Jira so I typically require this for junior devs and then let them decide how they want to track it once everyone’s comfortable with the approach *** PRs don’t have to wait til the end, I always encourage opening them as a WIP for early feedback

Now this approach probably seems pedantic and rigid. Well, it sort of is, and that’s on purpose. Everyone wants to jump right in and start coding, which I understand and that’s fine for small changes, PoCs or individual projects, but it sort of sucks for more teams. I feel like this is where a good amount of spaghetti code, missed requirements, etc. come from, on top of it being difficult to review. A little thought, planning, and organization up front can have huge time and frustration savings in the end. And besides, if you practice this process a few times, you’ll get pretty fast at it and can even do it in your head (although I always recommend writing things down somewhere so you don’t lose your place at the end of the day or when a distraction pops up).

-1

u/SANatSoc Dec 05 '21

What's not feasible is expecting someone to write 1k lines of good code for a feature and then expecting someone to correctly review 1k lines of code to ensure it maintains standards, is clean code, adheres to good practices and notice loopholes, edge cases, possible problems. Break up your features into multiple tickets, the more the better.

2

u/keirbhaltair Dec 05 '21

It's much easier to hide a problem if it's caused by a combination of code in 3 separate PRs reviewed on 3 separate days, compared to 1 PR reviewed all together.

Obviously there's a limit to how much stuff can the reviewer keep in their head when reviewing, but it can in some cases be even worse if you split it too much.

16

u/tr0j4n_v1ru5 Dec 05 '21

whats a PR?

45

u/CarlDen Dec 05 '21 edited Dec 05 '21

Pull Request on Github, and other version controls.

Edit: Drunk and loopy meant to say Github not Git. Please remove pitchforks.

Edit Edit: Yes, yes there other version controls that use the term.

9

u/Little-Helper Dec 05 '21

Why 'on GitHub'? How is it any different than a pull request on Azure?

0

u/[deleted] Dec 05 '21

[deleted]

6

u/ZyzzTM Dec 05 '21

Azure DevOps has Git functionality

2

u/Cosoman Dec 05 '21

Team Foundations cloud offering went to many rebranding and is now called Azure Devops. You can create project with git (default) with PR support. You can also still use the ye olde Team Foundations Version Control

4

u/me-ro Dec 05 '21

*on GitHub

8

u/teh__Doctor Dec 05 '21

I mean it’s also for bitbucket

8

u/synapticplastic Dec 05 '21

Unless it's on gitlab, then it's an MR ¯_(ツ)_/¯

23

u/NUTTA_BUSTAH Dec 05 '21

Which also makes much more sense. At first it always baffled me why I'm requesting to pull instead of requesting to push. (I'm actually requesting FOR a pull).

Merging is still more sensible to me.

6

u/me-ro Dec 05 '21

I was just trying to say, that PR (or MR) is not a git concept. Although technically git request-pull generates an email for you, that could be roughly seen as part of GitHub PR process.

1

u/Ozryela Dec 05 '21

PR is either Problem Report or Pull Request. In this case the latter.

I really hate that the acronym is used for two things that are so close together that you often can't tell the difference from context. "Have you looked at this PR" is entirely ambiguous.

1

u/aloisdg Dec 05 '21

I created a list of common acronym to help: https://github.com/d-edge/foss-acronyms/ The list is missing Problem Report. For it, would you submit a PR? ;)

1

u/MrDude_1 Dec 05 '21

It's also performance review and physical representation and public relations.

0

u/[deleted] Dec 05 '21

[deleted]

1

u/Ozryela Dec 05 '21

Ah it's no doubt not something all companies use. I think many companies avoid the term 'problem' because it's too negative. And of course many companies avoid using the term pull request by not using git.

1

u/MrDude_1 Dec 05 '21

We literally replaced the word problem with issue.

1

u/aloisdg Dec 05 '21 edited Dec 05 '21

like you I have a hard time with acronyms, to help I created a list: https://github.com/d-edge/foss-acronyms/

1

u/tr0j4n_v1ru5 Dec 05 '21

thank you kind sir

1

u/aloisdg Dec 05 '21

You are welcome! Star and share the project if it is helpful. More people looking at it means more contributions we will have :)

2

u/mattk1017 Dec 05 '21

We just implemented the first endpoint in our new API. The unit tests alone were 300+ lines. Do you propose creating a PR for the implementation and additional PRs for tests? Then at that point after the implementation PR gets merged there would be code in master that isn't tested until the test PR gets merged in. I'm a new grad so I don't know the best strategy when it comes to reducing PR size

0

u/[deleted] Dec 05 '21

[deleted]

1

u/discourseur Dec 05 '21

Inexperienced indeed. Too vague.

Also what would be the target branch? Shouldn’t the multiple PRs target the feature branch or the previous PR? So you have one PR / feature branch and small increments / feature branch?

1

u/[deleted] Dec 05 '21

Found the PM who loves to over complicate things

34

u/paralum Dec 05 '21

How do you refactor code with pull requests if you shouldn't change multiple lines or files?

Let's say you update a library and the signature has changed.
Or you decide to add an abstraction layer in front of for example a logging library.

7

u/DoctorWaluigiTime Dec 05 '21

No rule is 100% absolute/definitive and there are always valid exceptions.

14

u/NUTTA_BUSTAH Dec 05 '21

You just do multiple. You need to have quite a large or badly abstracted codebase if you have to do thousands of lines of changes for a couple signature changes.

But it's ok to change multiple files, as long as they are all in the same context. E.g. Don't do "Refactor this and some of that" PR but do "Refactor logging interface" and "Update library"

11

u/keirbhaltair Dec 05 '21 edited Dec 05 '21

This doesn't necessarily have as much to do with badly abstracted codebase, as it does with the type of codebase and user stories you work on and the rate of change.

If your stories entail stuff like "move this button to the right", of course your PRs will be tiny, but if they're more like "implement this endpoint", there can be quite a lot of work on the backend to make it work. And endlessly cutting everything into smaller chunks can be harmful because you lose the context.

Sometimes the fact you need to refactor a part of the code to make room for new functionality might arise after you've already done some work on it. But if you made a PR for the refactor only, my first question would be why. Why do it, why do it now, why do it this way. Or you might refactor something one way and then realize you need to make some more adjustments to it, and make way more PRs then you'd otherwise need. If you do all relevant changes in one PR, you get the context and all the changes should be well thought together.

If you make 10 PRs, it will often take longer overall and the reviewers will often miss more stuff because they won't put together something you did in PRs 2 and 7. Yes, it will take some time to go over the PR, that should be part of the time estimates to begin with, and if your developers just end up skipping them then you have other problems.

Sure, try to make small commits, and if the reviewer prefers going by smaller chunks, they can go along the individual commits. Do write good, meaningful and comprehensive automated tests and bundle them along with the PR to show the changes also work. And yes, 5000 lines is probably too much, but 500 considering unit tests and a handful of new classes is very common in larger enterprise codebases and it's not just because the codebase is bad.

2

u/NUTTA_BUSTAH Dec 05 '21

500 is still pretty reasonable, depending what it touches of course. If the code is actually a dependency to 20 different things, it's much more painful to review when you have to go far outside the PR to see the ripple effects

3

u/f03nix Dec 05 '21

You need to have quite a large for a couple signature changes

When you have a large codebase, you also cannot actively keep updating all dependencies for the amount of effort required in QA for recertification of the new components. When you do finally update, the changes are more than just a couple signature changes even in the most mature of the libraries.

2

u/CptnObviousWasTaken Dec 05 '21

This is the "1 PR should do 1 thing" principle that I've been trying to preach as gospel since leaving the company that taught it to me (preaching with limited success, people really hate being asked to split up PRs)

It's the only way to scale though.

1

u/keirbhaltair Dec 05 '21 edited Dec 05 '21

One commit should do one thing.

The purpose of a PR might not only be whether the code follows technical standards put in place for a given codebase, but also whether it makes sense conceptually, is well thought out architecture-wise and satisfies the Definition of Done (such as good unit tests).

If you split your PRs per individual commits, more often than not the PR cannot fulfil those roles properly.

I can imagine that in some codebases this principle can work very well and is indeed the right way to go, but it should not be a blanket rule applied to every kind of codebase.

2

u/gyroda Dec 05 '21

I think there's a difference here in how you determine what "one thing" is.

Is "one thing" a whole new feature, or just a component of that feature?

2

u/keirbhaltair Dec 05 '21

I guess, "thing" isn't exactly specific. But I still think we disagreed on the scope of things for PRs based on the comment they responded to.

At my workplace we have a rule of thumb "1 user story = 1 pull request per repository involved = 1 individually deployable and testable feature (where further splitting it would break the individual deployability or testability)". It is not a hard rule but it's where we tend to start.

With that in mind, "one thing" in terms of a PR would be something like "one new REST method".

This PR could then comprise of commits like "add new tables/columns in the database", "add DAO methods to work with the database", "refactor the general processor to work with a new parameter", "implement the service/endpoint itself", "add unit tests for the database layer" and "add integration test for the endpoint".

Doing PRs for those small changes in isolation will not catch stuff like "the refactoring is okay by itself, but it isn't necessary for this endpoint to begin with" or "you might need another change to the processor for this new edge case" or "you don't have a test for this case that you don't cover properly".

1

u/CptnObviousWasTaken Dec 05 '21

When I mention scale, what I mean is scale of developers all working on the same repo/codebase. I'd argue that most of the points you make re: stuff not being caught in a PR, should actually be reviewed at a higher level (in a tech spec or something) and not in an individual PR. It also requires the reviewers you're working with have some context on the overarching feature / project.

The biggest benefits I've seen for small PRs that do 1 thing are a) lower cognitive load to review (i.e. less stuff to keep in your head all at once as a reviewer). b) this results in increased bandwidth to handle more reviews and less context switching to perform them. c) higher quality code as a result (for exactly the reason this tweet captures).

All that said, this "rule" is really just guidance (but only works if the whole team is on the same page), and 1-thing is intentionally vague and open to interpretation (for example, im not suggesting we submit PRs w/o tests, lol). It's just about cognitive load and code quality, since it really is just not possible to keep 5000 lines of changes in one's head at one time (when you're not the person that wrote it).

-1

u/MrDude_1 Dec 05 '21

Most of the people doing this stuff are script kitties doing web browser bullshit.

So they literally mean moving buttons around or tiny CSS changes or whatever the fuck they do today.

2

u/MrDude_1 Dec 05 '21

It's very simple. 90% of what's being said here is full of shit.

109

u/dotcomslashwhatever Dec 05 '21

who tf has time to check 5000 lines lol if it's 5000 lines tho there must be something wrong. prs shouldn't be that big.

30

u/aeropl3b Dec 05 '21

Running clang format on an entire project after updating the style rules...only time that is okay

6

u/Ozryela Dec 05 '21

But in a separate commit, please. Don't mix actual changes and white-space changes.

I once had to review a pull request where someone had done that. Something like twenty thousand changes lines, a few dozen of which were actual changes. Never again.

3

u/ConspicuousPineapple Dec 05 '21

Make it a separate PR, actually. No reason for it to be mixed up with functional changes.

4

u/Ragas Dec 05 '21

Hey can you format this legacy as fuck project up to our current coding standards?

18

u/GargantuanCake Dec 05 '21

I won't even look at that. The best way to turn your bugs into major problems is to hide them in massive, unreadable blobs of code nobody will ever look at until the day after you leave the company.

7

u/faul_sname Dec 05 '21

until the day after you leave the company.

As if anyone will look at it on that day, as opposed to the day it breaks.

8

u/GargantuanCake Dec 05 '21

If my time in code land has taught me anything that's the day it's guaranteed to break.

2

u/faul_sname Dec 05 '21

That's the day it will break but nobody will discover it until 2 years later and in the meantime data has been silently getting corrupted.

1

u/MrDude_1 Dec 05 '21

Then they can hire you as a contractor to fix it.

12

u/Anthuril12 Dec 05 '21

13

u/RepostSleuthBot Dec 05 '21

Looks like a repost. I've seen this image 3 times.

First Seen Here on 2021-04-06 96.88% match. Last Seen Here on 2021-09-09 90.62% match

I'm not perfect, but you can help. Report [ False Positive ]

View Search On repostsleuth.com


Scope: Reddit | Meme Filter: False | Target: 86% | Check Title: False | Max Age: Unlimited | Searched Images: 271,183,803 | Search Time: 1.34011s

11

u/Scyyyy Dec 05 '21

want to get some cheesy code through a pull request? take 5 reviewers instead of the usual 2. The first half will think 'aww, so many people, let's wait for someone to accept, I'm sure if there are any problems, the others would find them', the second half's like: 'aww i'll accept, the others will surly look through the thing carefully'.

2

u/yourgirl696969 Dec 05 '21

Lmao this explains my code reviews so well

28

u/[deleted] Dec 05 '21

Image Transcription: Twitter Post


Giray Özil, @girayozil

Ask a programmer to review 10 lines of code, he'll find 10 issues. Ask him to do 500 lines and he'll say it looks good.


I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!

9

u/Super_Banjo Dec 05 '21

Good human

6

u/SoInsightful Dec 05 '21

To be fair, everything looks good after doing 500 lines.

4

u/misterrandom1 Dec 05 '21

If I want to save myself the headache later, I will checkout the branch and run it if it's an extra long PR. Prevents rolling back after prod deployments.

2

u/OxygenatedBanana Dec 05 '21

5000 lines

Me: Perfect

2

u/Simtau Dec 05 '21

Unfortunately this is not funny. It makes me cry on a daily basis

2

u/keahie Dec 05 '21

Let’s deploy to live on a Friday

2

u/frogking Dec 05 '21

5000 lines of un-squashed PR.. yeah, not gonna put my signature on that, sorry.

2

u/[deleted] Dec 05 '21

ITT: People who never checked in test data (json files etc.)

Also you could easily need 500 lines of unit tests for 10 lines of code

1

u/seanflyon Dec 05 '21

What about 5000 lines? He will say nothing at all.

1

u/AgentPaper0 Dec 05 '21

Only 10 issues? Amateurs.

1

u/Isolannicum Dec 05 '21

A coder could probably write 10,000 lines of code before their heart exploded if they did 500 lines.

1

u/pr1m347 Dec 05 '21

Mesut's younger brother is in to computer and shit.

1

u/kdyz Dec 05 '21

This is how you sneak code in you don’t want seen by anyone.

Then git blame someone else for the final touch

1

u/[deleted] Dec 05 '21

So what if my GUI calculator doesn't catch wrong input. I am not gonna bother with JUnit.

1

u/ucario Dec 05 '21

Can confirm

1

u/andoy Dec 05 '21

you can probably automate that. just write some program.

1

u/RepostSleuthBot Dec 05 '21

Looks like a repost. I've seen this image 3 times.

First Seen Here on 2021-04-06 96.88% match. Last Seen Here on 2021-09-09 90.62% match

Feedback? Hate? Visit r/repostsleuthbot - I'm not perfect, but you can help. Report [ False Positive ]

View Search On repostsleuth.com


Scope: Reddit | Meme Filter: False | Target: 86% | Check Title: False | Max Age: Unlimited | Searched Images: 271,231,235 | Search Time: 0.74507s

1

u/FetusMeatloaf Dec 05 '21

Pretty sure you’d OD from 500 lines

1

u/sipes216 Dec 05 '21

5000? Sorry, I'm not specialized for this.

1

u/rjlin_thk Dec 05 '21

saw this 4 times

1

u/Pazaac Dec 05 '21

if you just put some regex on the first line of the 10 lines it has the same effect.

1

u/The_ASMR_Mod Dec 05 '21

Lol ok what does this tweet even mean

1

u/[deleted] Dec 05 '21

Refactor everything

1

u/Toocheeba Dec 05 '21

500 lines of... what?

1

u/Darktidemage Dec 05 '21

not really?

You think no programmer ever assigned to review 500 lines of code ever gave negative feedback?

I think a more legit way to put this is

Ask a programmer to review 10 lines of code and they will find all 10 issues.

Ask them to review 500 lines of code and they will find the 1 biggest issue.

•

u/Ginters17 Dec 05 '21

Hi there! Unfortunately, your submission has been removed.

Violation of Rule #2 - Reposts:

All posts that have been on the first 2 pages of trending posts within the last month, is part of the top of all time, or is part of common posts is considered repost and will be removed on sight.

If you feel that it has been removed in error, please message us so that we may review it.

1

u/VeryPickyPenguin Dec 05 '21

"he" 🤔🤨

-4

u/[deleted] Dec 05 '21

lol - that's a good one. I've always questioned the sense of human-read reviews. The compiler can tell the same - better and faster. It's way better to review concepts rather than code

0

u/[deleted] Dec 05 '21

[deleted]

172

u/coin-searchr Dec 05 '21

5000? I'm over here making 3-line pull requests. I get paid by the PR, not by the line. Or at least I wish it worked like that

93

u/Kangalioo Dec 05 '21

3 line pull requests are cool but aren't you spending 90% of your time clicking around in Git and GitHub to set up all those PRs?

35

u/[deleted] Dec 05 '21

it literally gives you the link to create the pull request when you push a new branch. Click on some reviewers and click create.

1

u/edibledetention8 Dec 05 '21

it literally gives you the link to create the pull request when you push a new branch. Click on some reviewers and click create.

that's the basic way to create new branch but makes sure to think before you click.

23

u/Coffeinated Dec 05 '21

Clicking around in git? Wat?

8

u/Kangalioo Dec 05 '21

I could have said "clicking around on GitHub and typing various commands in the Git CLI or clicking around in your favorite Git GUI" but that would have become overly verbose

1

u/fmaz008 Dec 05 '21

Or use SmartGit.

0

u/[deleted] Dec 05 '21

[deleted]

2

u/Brtsasqa Dec 05 '21

boolean threeLinePullRequestsAreCoolButArentYouSpendingNinetyPercentOfYourTimeClickingAroundOnGitHubAndTypingVariousCommandsInTheGitCliOrClickingAroundInYourFavouriteGitGUI = determineTimeOfClicksAndVariousCommands() /90 * 100 >= timeSpentDeveloping();

1

u/[deleted] Dec 05 '21

he is probably talking about git guis

1

u/circumstellarmedium Dec 05 '21

Middle click paste /shrug

40

u/happybirthdaytomei Dec 05 '21

gh pr create

1

u/[deleted] Dec 05 '21 edited Oct 08 '23

Deleted with Power Delete Suite. Join me on Lemmy!

1

u/coin-searchr Dec 05 '21

I've never really used their gh command. Is it worth learning instead of using git?

2

u/happybirthdaytomei Dec 05 '21

Not especially no

8

u/Treacherous_Peach Dec 05 '21

70% of the time figuring out where and what the change needs to be, 10% writing the automated test that covers it, 10% on the change, 5% confirming it worked, 5% on the PR in my exp

5

u/ItsKoku Dec 05 '21

There's sometimes those tricky bugs that are deep in the obscure parts of a large enterprise codebase that are complex to narrow down on but have a very simple/short fix. As a backend that works on a project with a pretty large codebase (~5mil lines)

1

u/coin-searchr Dec 05 '21

But that's what being a coder is all about. Let's be real here!

17

u/Caesim Dec 05 '21

I once had to review a PR with 2000 loc. Yeah, that was NOT fun. I took as much time as I could to do it properly and it was like 2 weeks just understanding it.

But it couldn't be made shorter as it was a whole new subprogram with new functionality.

18

u/BadWombat Dec 05 '21

So after 2 weeks you said "it looks good".

14

u/Caesim Dec 05 '21

After two weeks looking busy playing Switch I said "works on my machine" and merged it lol. jk of course

10

u/[deleted] Dec 05 '21

Narrator: he was not JKing.

5

u/SharkSymphony Dec 05 '21

It should always be possible to submit code for something like that in stages. If not, there's a larger architectural/organizational problem you should step back and take a broader look at.

1

u/BachgenMawr Dec 05 '21

Ding ding. One PR for an entire sub program sounds massive.

At the very least I’d hope it’s a lot of smaller commits.

Imagine trying to debug some issue that arises from it and cherry pick through one massive change.

1

u/discourseur Dec 05 '21

But even individual commits can be confusing. You could be studying a commit that gets reverted down the line in the same PR.

People rarely squash and cherry pick.

1

u/BachgenMawr Dec 05 '21

Yeah definitely. I guess really you’re looking at a pr as a whole.

I guess you want small and frequent commits to give you flexibility while you’re on a branch, but ultimately the PR size itself is what makes debugging your application easier.

It’s partly why we have a rule of smaller, frequent PRs that we try and deploy straight to prod once you’ve merged them in.

1

u/MrDude_1 Dec 05 '21

Yeah you step back, take a broader look at it, agree that it's a stupid way to do shit....

... And have no authority or ability to change that so you just have to deal with it anyway.

1

u/SharkSymphony Dec 05 '21

My general advice is:

  1. You probably have more power to create and enforce sound engineering practices than you think.

  2. If not, you should look for employers that are more receptive.

2

u/Caesim Dec 05 '21

Both are really important. I could sneak in better practices and ideas just by talking to my manager.

3

u/[deleted] Dec 05 '21

Then you can rely dark launching and rely on integration /unit to split it. It requires more planing but late development are faster and with less bugs.

1

u/PunctuationGood Dec 05 '21

Which, at that point, calling a "code review" is just ridiculous. Do (and call it) what it is: a "program review" and review it like you'd review a whole program.

And it's perfectly fine. If you've been doing this for 20 years, are known to follow proper development practices, have tests in place already, etc., there's no point in treating you like your fresh out of college and don't know where to place semicolons.

1

u/liamht Dec 05 '21

With that you review commit by commit and pray they used good commit principles.

2

u/jrobiii Dec 05 '21

Came here for this!

2

u/GisterMizard Dec 05 '21

Okay, so how do I change the font size in gitlab?

1

u/[deleted] Dec 05 '21

Ctrl (Command on mac) + plus/minus works on all major browsers

1

u/Hopalongtom Dec 05 '21

Can use ctrl plus the mouse scroll wheel too!

2

u/gratock Dec 05 '21

So, I'm pretty new in the development world, working as a web-dev for about 1.5 years. I'm working on a new feature with an even fresher co-worker, and I just checked our PR. It's approaching 4500 lines. Now this is including some styling and some pretty boilerplate state-management.

Assuming I wrote my code as compact as I (emphasis on I) feasibly could have while still fulfilling the brief, what things could I have done to not make the PR this big?

4

u/gyroda Dec 05 '21

Do it in multiple stages. Not everything needs to be done in one PR.

0

u/[deleted] Dec 05 '21

[deleted]

1

u/PunctuationGood Dec 05 '21

You need to figure out a way to make small incremental changes.

So what is the correct number of lines of code in a PR?

Rethorical question obviously as you also made the point that the code in question could already have been developed as a team, obviating the need for a deep review. Honestly, this to me points to the fact that the epxression "code review" is due for a... review since it can mean so many different things in different contexts.

"5000 lines is too much". Sure... Sometimes.

0

u/[deleted] Dec 05 '21

[deleted]

2

u/louis-lau Dec 05 '21

Commits are not the same thing as pull requests though.

2

u/Mrcollaborator Dec 05 '21

Yall do pull requests? Just git push! Then merge to master

2

u/[deleted] Dec 05 '21

We talkin computational physics I see…

1

u/Cryse_XIII Dec 05 '21

Maybe its just me but "pull request" is a stupid way to phrase it. Especially the Button on someones git page.

1

u/rush22 Dec 05 '21

It "makes sense" since the request is for the other side to pull your code into their branch. So it's "Please pull my code into your branch" not "Please allow me to push my code to your branch".

Its not exactly intuitive though.

1

u/prav_u Dec 05 '21

Step up your pull out game

1

u/rush22 Dec 05 '21

So ... 50 pull requests?

0

u/[deleted] Dec 05 '21

[deleted]

3

u/evanldixon Dec 05 '21

If you know you need to change the entire code base, try making 1 PR per logical change. 1. Massive refactor changing 500 files but no intentional behavioral changes. 2. New feature 1 that adds 50 files. 3. New feature 2 that adds 20 files. 4. Bug fixes found during testing.

2

u/[deleted] Dec 05 '21

[removed] — view removed comment

1

u/rush22 Dec 05 '21

Everyone is so suspicious on reddit. It would be at least 5 lines of code to scrape the top post and resubmit it for karma. What's next? 5 more lines to post the top comments to the the thread? Impossible. You'd need at least 3 or 4 reddit accounts to do that.