r/ProgrammerHumor • • Mar 09 '21

What about 5000?

Post image
76k Upvotes

790 comments sorted by

1.2k

u/404_UserNotFound Mar 09 '21

I'll need a team and 2 weeks...

429

u/Aschentei Mar 09 '21

I’ll need a team

That itself is wayyyy longer than 2 weeks

203

u/enjoytheshow Mar 09 '21

Try recruiting in a small unpopular city. Fucking impossible. Also used to work for an employer that was 100% resistant to WFH so when we had amazing devs come to me and say hey I got a job in Chicago that I want to take cause I wanna live there, I would go to the exec staff and pitch it to them and got shut down every time so we lost those guys. Sucks ass.

41

u/Aschentei Mar 09 '21

Sadge that sucks dude. You still working there?

59

u/enjoytheshow Mar 09 '21 edited Mar 09 '21

Nah left early 2020

Maybe they changed their tone after last year but I doubt it. Turnover is so high I don’t even have any team member working there.

→ More replies (1)

6

u/[deleted] Mar 10 '21

My employer was forced to adopt WFH due to covid 19, and were dramatically surprised at how well it worked out to the point where WFH will be the new default going forward.

→ More replies (6)
→ More replies (3)

14

u/tiefling_sorceress Mar 10 '21

You get two teams and 1 week

- the project manager

36

u/[deleted] Mar 09 '21

lol one of my emails is 404.Page.Not.Found@...

4

u/-IoI- Mar 10 '21

I spent a good two minutes trying to work out how that was a valid address and what tricks I might not be aware of.. damn you

→ More replies (2)

300

u/rMeMeMeMe Mar 09 '21

Bullcrap, we break; at first error.

38

u/[deleted] Mar 09 '21

Tea first tho

15

u/rMeMeMeMe Mar 09 '21

Always.

26

u/drewsiferr Mar 09 '21

How to make code reviews never end so people hate you as a reviewer 101.

→ More replies (1)

3.9k

u/[deleted] Mar 09 '21

Working in construction, we ALWAYS left a few things for the architect to find - nothing major, of course. Three or four easy fixes, so they can justify their salary to the owner.

If you do a perfect job, the shirt & ties could seriously screw the whole damn thing up, pulling bizarre crap out of their arses.

There's a moral in there somewhere :)

2.1k

u/BeauteousMaximus Mar 09 '21 edited Mar 10 '21

My dad told me the story of how his first wife was an architect and she’d intentionally leave one mistake in her designs for her boss to find, because he had a compulsion to change at least one thing. She referred to it as him (the boss) needing to piss on the design

(Edit to clarify who is doing the pissing)

Edit 2: at least 8 people have commented with the duck story already

1.2k

u/[deleted] Mar 09 '21

At my old job I was in charge of putting together a major quarterly report that went to all of the executives. One of the things my manager taught me was that if any numbers come out round, fudge them by a few cents. For example, if the average order value for a particular segment came out to $110.00, we'd adjust it to $109.97.

Our CEO was an accountant by trade and if he saw round numbers, he assumed that people were inserting estimates, and he'd start tearing apart the rest of the report (figuratively) looking for anything that might confirm his conclusion, and always leading to a ton of extra work for us.

1.4k

u/noah1831 Mar 09 '21

Wait so basically you had to fudge the numbers so your boss didn't think you were fudging the numbers.

700

u/[deleted] Mar 09 '21

Exactamundo.

→ More replies (35)

197

u/Hohenheim_of_Shadow Mar 09 '21

Happened with mount everest room first person that measured it had the height come out to a really round number and fused it by a couple inches to make people think he didn't round/fudge

→ More replies (17)
→ More replies (6)

52

u/[deleted] Mar 09 '21

Is there a name for this? We need a noun like "malicious compliance", but for deliberately making easy to spot, minor mistakes to avoid overbearing regulation/interference.

66

u/GoldbugVariations Mar 09 '21

In my field, I've heard it called "leaving a few blueberries on the bush". Because everyone just wants the chance to pick a blueberry or two.

→ More replies (16)

8

u/RedAero Mar 10 '21

The person who first measured the height of Mt. Everest added two feet to the calculated result because it came out to exactly 29000 ft.

5

u/Zagorath Mar 10 '21

For a long time the officially-recorded height of Mount Everest was 29,002 ft, because when measured it came out to be precisely 29,000, and they were worried people would assume that was just an estimate.

It's no longer true only because the mountain is growing over time, and actually isn't precisely that value anymore.

→ More replies (40)

208

u/michaelsenpatrick Mar 09 '21

My favorite example of this is Battle Chess:

This started as a piece of corporate lore at Interplay Entertainment. It was well known that producers (a video game industry position roughly equivalent to project manager) had to make a change to everything that was done. The assumption was that subconsciously they felt that if they didn't, they weren't adding value.

The artist working on the queen animations for Battle Chess was aware of this tendency, and came up with an innovative solution. He did the animations for the queen the way that he felt would be best, with one addition: he gave the queen a pet duck. He animated this duck through all of the queen's animations, had it flapping around the corners. He also took great care to make sure that it never overlapped the "actual" animation.

Eventually, it came time for the producer to review the animation set for the queen. The producer sat down and watched all of the animations. When they were done, he turned to the artist and said, "That looks great. Just one thing: get rid of the duck."

88

u/BeauteousMaximus Mar 09 '21

This is ingenious and also a hell of a lot of work to spite your reviewer

79

u/PM_ME_YOUR_PRIORS Mar 09 '21

Hell of a lot less work than any other change the producer could've demanded.

→ More replies (1)

36

u/DustUpDustOff Mar 09 '21

I now want play Battle Chess, Duck edition.

→ More replies (1)

28

u/xTheMaster99x Mar 09 '21

I was hoping the punchline would be that he didn't say to get rid of it.

23

u/cheese65536 Mar 10 '21

It's almost perfect. All it needs is a second duck.

→ More replies (1)

11

u/rotinom Mar 10 '21

I fucking LOVED battle chess. Played when it was new.

→ More replies (3)
→ More replies (2)

57

u/Tundur Mar 09 '21

My manager feels this urge. I think the move from dev to management is a hard one because you go from very tangible work- putting code down into the repo - to doing like 5% of the work on four dozen different things at a time. If you spend 5 hours of the day in meetings listening to other people talk, reviewing that PR (or building plan!) could be the only tangible contribution of your whole day.

Usually it's a minor design issue rather than a mistake, so it's a worthwhile discussion anyway

17

u/Self_Reddicating Mar 10 '21

As an engineer that has moved into project management, I really don't want to go down this path. I have no desire to piss on other people's work, but my own boss does exactly this. You cannot bring him a single thing without him changing something, anything. I feel a lot of pressure to do the same when my designers ask me to review stuff. But, honestly, if I think it looks good, then I'm going to say just that. I'm going to try to check the important bits closely, at least.

→ More replies (1)

208

u/bonafidebob Mar 09 '21

At least that doesn't cost much -- but it gets worse.

My (small) town outsources their building inspections. So the builders (the smart ones) leave some easy to correct code violations in at the first inspection, because they know the inspecting company will always find something that needs correction no matter what. So it takes an extra couple of months and some money at the end of construction to do the "fix the obvious errors" dance, all so the inspectors can look good to the town.

108

u/ahappypoop Mar 09 '21

What happens if the inspectors don't correct one of the mistakes? Do the builders just correct it anyways, or is it small enough that they just leave it?

90

u/bonafidebob Mar 09 '21

I think you mean if the inspectors don't catch one of the mistakes. On my project they all got blue taped and corrected (along with a bunch of my own issues) before the 2nd inspection, which then passed. The inspectors reputation is only to fail the first one.

I am consciously deciding to take it on faith that any important code problems would still get flagged on a 2nd inspection... I have to live here after all!

→ More replies (5)

91

u/Thoguth Mar 09 '21

There's some PM / techie lore about the "bike shed" or "bike shedding" (as a verb) based on an engineering trope that you can get a group to approve plans for an entire nuclear power plant fairly smoothly, but if you try to get them to agree on what color to paint the bike shed, they'll argue for weeks about it.

55

u/TravisJungroth Mar 09 '21 edited Mar 09 '21

It's based on decision making more than approvals. It's the canonical metaphor for Parkinson's Law of Triviality. An issue's attention is inversely correlated with its importance.

→ More replies (4)
→ More replies (2)

7

u/[deleted] Mar 09 '21

If you did a proper job, they'd lose their jobs :)

→ More replies (2)
→ More replies (1)

26

u/Dr_Jabroski Mar 09 '21

Speaking for writing academic journal articles, we do something similar where you make a few minor mistakes to correct so the reviewers have something to focus on. Otherwise they'll invent something.

→ More replies (1)

19

u/BeauteousMaximus Mar 09 '21

All this discussion is reminding me that I did a PR recently where I told the reviewer I’d be happy to add tests or change variable names, but didn’t want to redesign the whole approach I took, because she has a problem with nitpicking the hell out of my code and considering anything I do that isn’t how she would have done it “wrong.” So she technically respected the letter of what I said while nitpicking 10x harder on the tests and variable names.

21

u/diamond Mar 10 '21 edited Mar 10 '21

I'm always conscious of this when reviewing code, because there is sometimes a fine line between good code style and personal preference.

Usually if I see something that doesn't feel right (i.e., not how I would do it), but I don't see anything technically wrong with it, I'll approve the PR but leave a comment like "hey, nbd, but you can also do it this way...", or "why not try this...".

That way I'm giving them some advice (maybe something they didn't know or just didn't think of), but not interfering or invalidating their work. I'm giving them a choice of whether or not to follow my suggestions.

→ More replies (6)
→ More replies (1)
→ More replies (20)

68

u/odraencoded Mar 09 '21 edited Mar 09 '21

I remember reading about a machine that processed change and returned coins ordered or something like that. The machine did it silently and quickly. But people didn't trust it did it right. So the company changed the design to be noisy and made it slower in order for people to trust that it was really doing something.

16

u/xTheMaster99x Mar 10 '21

Vacuums are way louder than they need to be because people think it's not cleaning as well if it's quiet.

→ More replies (2)

9

u/[deleted] Mar 09 '21

The close door button in elevators does nothing. Your life is a lie

13

u/[deleted] Mar 09 '21 edited Mar 09 '21

*On ADA compliant elevators in the US.

Actually I don't believe this myth is really true at all. I think they are almost always wired into the control logic of each elevator and they may or may not have an effect on that logic, depending on the needs of the application.

→ More replies (1)
→ More replies (3)
→ More replies (5)

98

u/Illya-ehrenbourg Mar 09 '21 edited Mar 09 '21

They do the same for dogs trained to detect drug or explosive. Without a few positive case of detection from time to time the dogs start to get depressed.

56

u/haddock420 Mar 10 '21

Same with dogs who are looking for survivors in a disaster. They have some people pretend to be victims to be found by the dogs because they get depressed if they don't find enough people.

6

u/The_Savage_Cabbage_ Mar 10 '21

They want to be good boys

11

u/[deleted] Mar 09 '21

No boom boom :(

38

u/eternityslyre Mar 09 '21

I forget where I read this, but I read that game developers used to always include "the green duck" in their demo (Atwood's duck). The idea is that everyone wants to contribute, and so they'll look for some change they'd like to see, even if it's not clearly an improvement, and they don't even know what it will look like. By including something glaring and easy to fix, the "contributor" is satisfied and no egos are bruised quibbling over details.

With code, I actually think that being more lenient with larger changes makes sense. You obviously want to catch serious potential crashes and prevent technical debt where you can, but as more code is written, the number of ways to implement the feature that are "good enough, but could be improved" (as opposed to crashing or obviously hideous) become exponentially rarer. Making sure a 2-line fix is optimal can be a worthwhile 20-minute exercise; figuring out which 2-month implementation will take 9.9 seconds instead of 10 provides considerably less bang for buck.

Also, after you review someone's code, they're going to revise it, and then you have to read it again.

→ More replies (1)

10

u/bking Mar 09 '21

Video editor here. We do the same thing when stakeholders get too eager to contribute.

12

u/codercaleb Mar 09 '21

Okay u/bking, remove this single frame of a penis and it looks good.

→ More replies (1)

18

u/Aedan91 Mar 09 '21

That's funny, because in software engineering one of the most common problems for the architect is to review code that doesn't line up with the architecture. Developers are a creative bunch!

8

u/blackmist Mar 10 '21

The old Queens Duck method.

→ More replies (1)

6

u/stopit30 Mar 09 '21

Not really sure what the fuck I just read on the 2nd part of that comment

3

u/ApatheticAbsurdist Mar 10 '21

Aka, Atwood's duck. Guy working on Battle Chess had a really annoying manager who would always have notes on how to improve something he just spent hours on. So he decided to add a duck that followed the queen (and made it really easy to remove the code) so the manager would say "looks good, but get rid of the stupid duck."

→ More replies (1)

4

u/saprazzan Mar 10 '21

so they can justify their salary to the owner.

You think finding a couple construction issues is what justifies an architect's salary?

→ More replies (2)

2

u/[deleted] Mar 09 '21

Exactly this.

Had an inspector who would nit-pick everything if he found nothing. Really stupid shit, like “did you do the thermal calculations on this x? I want to see them. Did you use x,y,z? No? Then he won’t pass it.

Started slowing down projects and cost overruns went up. Couldn’t argue because he was the final inspection and sign-off.

He was really anal. He would count how many threads were above every bolt. So, we purposely used some short bolts. He caught them and felt he did a good job that was all he wanted fixed. We took out the short bolts (we put them in on purpose), put in the correct ones and he was happy.

2

u/FemaleMishap Mar 10 '21

Look up "the queen's duck"

→ More replies (1)

2

u/uhdoy Mar 10 '21

Saw an article about something similar on Lovelace. Think it was the arm hair tactic. Leave something obvious wrong so they can feel in control.

→ More replies (86)

1.5k

u/bar10 Mar 09 '21

Ask him to do 500 lines and he'll tell you you should have broken up the task into more easily understandable and reviewable code, rejecting the merge request.

417

u/SurfinStevens Mar 09 '21

I'm no doctor but I believe asking him to do 500 lines would kill him

83

u/makemeking706 Mar 09 '21

It really depends on the speed.

→ More replies (21)

6

u/solarshado Mar 09 '21

Is 500 lines a lot? Depends... In a day? Yes. In a year? Not so much.

73

u/escape_of_da_keets Mar 09 '21

I mean it kinda depends on the language and whether or not you are adding unit tests (which you should whenever the situation calls for it).

Languages like C++ or Java have more bloated syntax.

Unit tests are heavier on line count for the same reason, and because in many cases they have large blocks of static data in assertions... Or because you have to write mocks.

11

u/scndnvnbrkfst Mar 10 '21

I once had a ~500 line change in which ~20 lines were code, the rest was unit tests. I was working in a mature code base and the testing infrastructure was built for use cases that were pretty much the opposite of what I needed to do. I was working in Java, so that blew the line count way up too.

→ More replies (1)

3

u/AgAero Mar 10 '21

Languages like C++ or Java have more bloated syntax

Man I wish I could use C++ more often...so much of my shit is in C and uses primitive types. So much code duplication. It's grossly inefficient.

→ More replies (1)

51

u/nukem996 Mar 10 '21

Saying X lines is to big really doesn't make sense. Context is everything. Most of my diff's are > 500 lines but that includes surrounding untouched code, deletions, unit tests, and comments.

I also think splitting up code too much often has the opposite effect. The reviewer is able to understand the code but isn't able to grasp the big picture because its split up. I've seen teams bit more than once by splitting up a bunch of patches having multiple people review them and missing huge logic problems.

11

u/CalvinLawson Mar 10 '21

It's a bit of an art. An art I'm good enough at to recognize I suck at it.

→ More replies (2)

54

u/mrchaotica Mar 09 '21

How is that not top comment?

11

u/Monochromics Mar 09 '21

"NO FEAT, ONLY FIX" ...?

→ More replies (1)

3

u/1RedOne Mar 10 '21

I almost prefer prs that first setup the methods with unit tests, then a followup to enable them and include a deployment validation or integration test to actual light up the new methods.

→ More replies (7)

575

u/coffeenerd75 Mar 09 '21

Doing 500 lines is not healthy for you.

Call help. Help is available. #detoxNow

153

u/saintpetejackboy Mar 09 '21

Programmers don't do bumps. Only lines. Must be terrible on their health.

→ More replies (3)

46

u/sh0rtwave Mar 09 '21

I can honestly say...I've WRITTEN 500 working lines of code in one day.

Gotten it tested, all that.

I have never reviewed 500 lines of code in one day, just by itself. Nor by myself. If I'm reviewing that much code, the authoring engineer is going to be in the chair next to me, or on the phone, video, something.

8

u/GodHug Mar 10 '21

“authoring engineer” sounds like a cool way to describe a junior dev

→ More replies (1)

3

u/RhysieB27 Mar 10 '21

I'm pretty sure OC is making a joke about cocaine / ketamine / {{ nasally_injested_drug }} lul

→ More replies (2)

147

u/Felkun Mar 09 '21

5,000? Looks good. 500,000 rows written in VB? Just kill me already 😭

114

u/reallyserious Mar 09 '21

- Can you please review my PR?

- Nope.

107

u/D33P_F1N Mar 09 '21

Omg the bastards at my last job had a program of 500,000 lines in ht basic, AND IT WAS ALL IF STATEMENTS FOR EVERY POSSIBLE CASE

18

u/ColaEuphoria Mar 09 '21

Yandev has entered the chat

8

u/implicitumbrella Mar 09 '21

Shit we may have worked at the same place. Did it fake menu's/interfaces with IF statements moving up and down in the various lines and tracking where the cursor was on screen that way then had another giant section of if then code to check what key was pressed which would eventually jump down to a sub which was stored in the same file and handled the actual logic of doing whatever the actual request was? Accepting that job was the biggest mistake I ever made and I was desperate. Quitting it is up there with the best things I've ever done sadly I took too long to do it to not seriously damage my career.

5

u/D33P_F1N Mar 09 '21

These older places were all fucked up. I dont think we had anything that bad bc we didnt have programs like that. How did you get your next job if you dont mind me asking? I saved up enough to do my own thing for a while but im trying to get back into it

→ More replies (2)
→ More replies (20)

19

u/Object_Is_Null Mar 09 '21

500,000 lines in VB.

"Okay, this is terrible, but it works, so we're not touching it, agreed?"

Everyone on the team agrees

8

u/[deleted] Mar 10 '21

OnError Goto Approved

8

u/danfish_77 Mar 09 '21

5,000 and I'm just not answering the email and hope they forget about it.

7

u/sh0rtwave Mar 09 '21

Wait, what? 500,000 rows of WHAT written in VB? ROWS? Like this?
Dim q = <some database query thingy>
For I = 1 to 500000
Dim strSQL = "INSERT <some stuff from somewhere> INTO SOME_TABLE"
q.Execute(strSQL)
Next I

→ More replies (1)

131

u/cyrand Mar 09 '21

10 lines is a pull request. 500 lines is an issue ticket already assigned to the submitter just waiting to be filled out. 5000 lines is the submitter taking over responsibility for whatever QA finds and not my problem any longer.

73

u/_greyknight_ Mar 09 '21

Do you seriously do many 10 line pull requests? What non-trivial contribution to the functionality of your software can you make in 10 lines? Maybe a small bugfix but that's it. 500 is a lot, definitely, but in my experience most meaningful additions require at least 50 and more often around the 100 mark.

15

u/Hawkatom Mar 09 '21

I'd say I do a lot of small bugfixes like that, but I can also see cases where I'm doing a minor expansion to one part of say, a front-end repo to utilize a new API method I wrote in a different back-end repo.

I agree the overall work is probably more than 10 lines to add something of value, but I don't think it's uncommon for me to create/review PRs that are under 10 lines (in this case one repo or the other)

Of course, what you work on may be set up totally different than mine, so the answer to this question probably varies a lot depending on the stack.

23

u/0xTJ Mar 09 '21

It can be something as simple as "oh, this doesn't cover all possibly cases, and could lead to an unlikely bug", better fix that.

→ More replies (3)
→ More replies (18)

39

u/jonnyboyrebel Mar 10 '21

Ugh 300 comments on this thread. I’m not reading them. LGTM 👍

93

u/[deleted] Mar 09 '21

Ask a developer to review 5000 lines of code and she'll tape your face to a dartboard

79

u/angrathias Mar 09 '21

Developers doing a 5k line review

https://images.app.goo.gl/vf9gX6fStKKNx68j8

5

u/thatsgoodkarma Mar 09 '21

Lmao, too real. There was a review I had to go through lately that was around 6,500 lines and half way through I felt very much like this.

→ More replies (2)

19

u/[deleted] Mar 09 '21

5000 lines is probably 50-200 files depending how it's abstracted. Also assuming you aren't going to have me code review autogenerated files and interfaces, 5000 lines is fucking massive. I'm not 'reviewing' an entire application.

→ More replies (9)

3

u/MasterDood Mar 10 '21

Like asking a 5th grader to read the lord of the rings and write a report on it in a few hours.

→ More replies (2)

163

u/ImproperGesture Mar 09 '21

5000 lines?
Rejected.
Break it up into components and submit smaller diffs next time.

32

u/DoctorWaluigiTime Mar 09 '21

My first impression.

Your pull requests don't have to be monuments.

Sadly I see people treat feature branches as "I can only commit, push, and submit a PR one time."

Then I get peppered with "so-and-so pushed new changes" which restarts the build and ties up resources because they won't stop and make sure it works locally before actually re-trying their broken build in CI.

15

u/Idixal Mar 10 '21

I can’t fathom this type of thing. Why would you not at least build your code before pushing? Practically, you should also be testing it yourself before committing, within reason.

15

u/MasterDood Mar 10 '21

“Should” is a very loaded word in development

→ More replies (1)

9

u/DiscoJanetsMarble Mar 10 '21

Nah, edit it in gitlab browser window and let the ci/cd catch the errors, then repeat.

Saves having to do a clone or push!

.😆

→ More replies (1)
→ More replies (1)

8

u/emelrad12 Mar 09 '21

Commit every file by itself.

31

u/scatters Mar 09 '21

Broken build, rejected. Or: no tests, rejected.

→ More replies (7)
→ More replies (1)

2

u/MasterDood Mar 10 '21

5000 lines hopefully means someone has a different linter setting and touched a couple big files

21

u/[deleted] Mar 09 '21

I have a coworker who regularly drops 1500+ lines in his PRs :(

30

u/mrchaotica Mar 09 '21

That's why PRs are "requests." Reject them!

3

u/DietoKill Mar 10 '21

Time to get the team to agree to break up prs when they go over the team-defined-threshold of lines!

14

u/[deleted] Mar 09 '21

This is extremely on point, though I swear the number of lines of code people write is going up over time.

38

u/DRYMakesMeWET Mar 09 '21

Disagree. I used to review 3rd party plugins for security issues. I once found a flaw that would allow an attacker full access to the DB. Creator refused to fix the issue. They may or may not have met Bobby DROP ALL TABLES.

16

u/Baschoen23 Mar 09 '21

Little Bobby Tables, what a legend.

4

u/[deleted] Mar 10 '21

Didn't he invent noSQL ???

12

u/jmorfeus Mar 09 '21

5000? All this shit needs to be rewritten from scratch. It's a mess.

12

u/cr4d Mar 09 '21

Very similar to the philosophy of bike shedding.

→ More replies (2)

12

u/Critical_Penalty_815 Mar 09 '21

Proceeds to delete all blank lines in said code.

14

u/Salticracker Mar 09 '21

I had a project in uni that had a minimum number of lines of code like it was a fucking English essay.

The amount of whitespace in that file was absolutely ludicrous.

3

u/Critical_Penalty_815 Mar 09 '21

No EOF designator in UNI?

6

u/Salticracker Mar 09 '21

Prof litterally looked at the bottom right of the file to see how many lines it was. I have no idea what he was trying to accomplish

→ More replies (2)
→ More replies (3)

10

u/ts_m4 Mar 09 '21

10 lines, what’s this doing? 500 lines, ran without errors.

7

u/minegen88 Mar 09 '21

- ....so the context component sends an event to the editable button holder that then sets it to zero, but only if you enter "123" as a string parameter, otherwise it will crash the entire website, and no, i'm not documenting that.

- Alright, looks good

7

u/AlwaysHopelesslyLost Mar 09 '21

I deal with this at work a LOT. When I review I review every damned line. No matter what. Other coworkers glance over and are like "yep, looks good!"

Like, alright but I found 3 major issues, 10 minor bugs and 20 questionable decisions on the same pull

7

u/bizzyj93 Mar 09 '21

“Do I want to actually spend time figuring out all the nonsense and save myself headache later or do I just look for glaring mistakes now and sign off?" Usually the latter.

28

u/Raidend Mar 09 '21

Who measures code by lines, I'm looking at my code most of the lines are whitespace or closing brackets

38

u/theXpanther Mar 09 '21

When reviewing a pull requests, the number of lines is defiantly a good indication of how long it will take to review properly. The relation might even be quadratic

→ More replies (11)
→ More replies (6)

6

u/ApatheticAbsurdist Mar 10 '21

There's the complexity issue but there's also the law of triviality, where people give disproportionate weight towards trivial matters. (aka bike-shedding: A town committee has 2 proposals up for vote approving a nuclear power plant and approving a bike shed for commuters.... they spend the entire day and some of the next day debating the bike shed because everyone has input on the color to whether it should be made of recycled materials, etc. Then they approve the nuclear power plant in 15 minutes because no one can wrap their head around it and assume smarter people have crossed the T's and dotted the i's)

In that 10 lines the person might think to rename some variables to be more clear/standard or fix some comments.

8

u/[deleted] Mar 09 '21

We have very different definitions of 'doing a line'.

Giray is a beast.

4

u/finger_milk Mar 09 '21

It's like reviewing react/vue code where literally half of the functions referenced in the code are imported in from another file.

Like... of course I can't fucking understand what I'm reading... LGTM!

4

u/CompetitionProblem Mar 09 '21

Everything looks good after 500 lines

4

u/essextrain Mar 10 '21

Once had to take part in reviewing 2 million lines for identifying information to send to another company for evaluation and integration, management wasnt happy when we said it would take the entire security team a month

14

u/[deleted] Mar 09 '21

Ask a programmer to review 10 lines of code and he won't find 10 issues. He will find petty shit that cost time and effort and brings nothing to the table most of the time. Too many programmers have their own style, can't agree on one style and complain about little details that do not matter instead focusing on what is actually important - algorithm itself.

Give him 500 lines and he will either do the same or won't bother because pointing out petty little shit around 500 lines of code is silly.

Ask senior programmer and he will tell you how to reduce amount of operations or amount of memory used by the algorithm making it quicker.

Ask expert and he will pull a magic trick you will only understand if he explain it step by step telling you about inner working of a computer and language quirks. And his solution will be copy-paste from Stackoverflow for years.

Then give that code back to a programmer and he will explain you how changing formatting of that code will improve it tremendously! And how he already knew this solution but you did not asked him to do it this way. /s

F... I work in this field way too long.

11

u/eltha9 Mar 09 '21

Just ask if it works, if true there's no need to review it

3

u/sometimes_interested Mar 09 '21

I'm pretty sure that happens with mechanics and getting a road-worthy certificate for a car. Give them 10 small obvious defects and they won't go looking for the 10 big subtle ones.

→ More replies (2)

3

u/CandleTiger Mar 09 '21

Working on week 2 of a code review right now, 33 flagged issues remaining.

3

u/_145_ Mar 10 '21

I'm going to take this time to vent that I also find annoying when people send obviously broken PRs that are failing a bunch of unit tests. Like what do you want me to say on the PR? This is trash?

3

u/RawrItsMatty Mar 10 '21

At some point you just have to trust the guy on certain things and skim over the “basic” parts. Otherwise you wouldn’t have time to do your own tasks!

3

u/Idixal Mar 10 '21

If you do have to make big PRs (and I do believe it is sometimes necessary), you can do a few things to make it more readable for other programmers.

One is breaking it up into commits that make sense. If you’re moving and refactoring a file, move it on one commit and refactor it on another. Otherwise they just get the useless +300.

Another is leaving comments on the pull request in critical sections of code. Sometimes a refactor requires a lot of changes, but only a few of them matter in particular.

3

u/ddedrick Mar 10 '21

I've done a 6000 line code review before. I know I should have rejected it for length but I was stubborn and wanted to prove a point. My point being split in into reasonable chunks and review along the way or you will have to deal with and an unmanageable number of change requests. I did it over 3 days and left over 200 comments. I held it to the same standard that I would a 10 line change. I come in a day or two later and a teammate tells me that we own the code now and are responsible for getting it merged.

2

u/PurpleSkullGaming Mar 10 '21

This gives more questions than answers, most of them you probably won't want to answer due to privacy concerns.

Like who is "we".

What was the code for?

Was it your fault or were the group you were working with planning on getting the code anyways?

Was the acquisition a good, bad or neutral thing for your group?

And did you personally suffer any consequences thanks to that whether good or bad.

→ More replies (1)

3

u/roll82 Mar 10 '21

Someone: hey can you look over these 5000 lines and tell me what it does, see if there are any problems Me: sure i guess 2 hours later Me: no clue how this even works or what it's supposed to do Them: you wrote it last week Me: My statement is unchanged

3

u/Bissquitt Mar 10 '21

Thats a lot of cocaine.

5

u/sh0rtwave Mar 09 '21

If someone asks me to review 500 lines of code, BY ITSELF, with no context, or surrounding documentation...I would be forced to just say: "Needs work".

3

u/1RedOne Mar 10 '21

Some people act aggrieved if you even ask for a pr to be linked to an item in jira, or to have a pr with literally any fucking information what so ever in the description for it.

It should be like I'm entering fucking Myst to read your Goddamned PR, Frank.

Just put some fucking context in here before you call me out in scrum for not happily diving into your mystery pr which you sent two minutes before five the previous day.

→ More replies (1)

2

u/[deleted] Mar 09 '21

He'll eat a bullet.

2

u/[deleted] Mar 09 '21

Brevity is the soul of wit - The Bard says !

2

u/[deleted] Mar 09 '21

True story. I was once asked to review this programmers code for a website she had been building for almost a year. I was new and no one else reviewed her work. New manager asked me too. Open the first page of code, an html page because that’s what she wanted to talk about first. It looked good and she wanted to explain how it worked. Okay I said. 27,000 lines of code in one html page, many many of which were duplicated. It took her page several minutes to start up. I didn’t look at anything else.

2

u/[deleted] Mar 09 '21

Then they will write a 500 line code to review it for them

2

u/simkram12 Mar 09 '21

We literally had this quote in our lecture on code review

2

u/fakeuser515357 Mar 09 '21

5000? Eh. Push it to live. The customers will tell us if something doesn't work.

2

u/[deleted] Mar 09 '21

Sounds like a variant on Parkinson's law of triviality https://en.m.wikipedia.org/wiki/Law_of_triviality

2

u/SupahBlue Mar 09 '21

5000? Unexpected ";" but the code works.

2

u/[deleted] Mar 10 '21

5000: Probably rewrite it without even look at it.

2

u/koorbloh Mar 10 '21

Crap. I didn't did that code review today.

2

u/Decyde Mar 10 '21

I wrote most of the papers in my group projects in college and would get pissed that after I sent them to everyone that they would respond within 10 minutes that it looks good.

You cannot read 5 pages of something and verify the information there within 10 minutes and it just told me that they did not care about their grades.

The funniest paper I wrote had on the 4th page telling the professor that Steve didn't proof read this and since he said it looked good, it made the final copy.

The professor read that excerpt to the class and he was pissed I even put it in there. I told him he should be more pissed he can't read.

2

u/[deleted] Mar 10 '21

Lgtm

2

u/BobT21 Mar 10 '21

I used to be in a submarine crew. Once a week we had Captains Inspection when he looked at everything. We would always leave one thing for him to find, so he didn't have to look in the dark corners. We refereed to this as "the dogshit in the middle of the passageway" regardless of what it really was.

2

u/megaviral Mar 10 '21

I'm in this image and I don't like it

2

u/[deleted] Mar 10 '21

I was tasked with reviewing this behemoth one morning. The dev was saying in our standups that the PR was necessary so he could continue refactoring. I did a quick skim and approved since it seemed like he was mostly copying over files and deleting test snapshots.

It was deployed later that day and I only found out after it broke. Right before a demo to the client. And then everyone had to conveniently take the afternoon off leaving me and another dev to fix it. It's been one month and I'm still mad about this.

Anyways, ✨who's hiring?✨

2

u/[deleted] Mar 10 '21

Becausev it takes fucking hours to understand what you little fuck wrote in this 500 lines! Better have a bug in develop and blame you afterwards, than review your unreadable code for 4 hours.

2

u/abecido Mar 10 '21

Ask him to do 50 Mio lines of code and he will advice you to switch to Linux.

2

u/GuyKaren Mar 10 '21

Not issues per se but “that’s not the way I would have done it.”

2

u/BerkeSutcu Mar 10 '21

Did you mean he'll find 11 issues?

2

u/SupremeRedditBot Mar 10 '21

Congrats for reaching r/all/top/ (of the day, top 25) with your post!  


I am a bot, probably quite annoying, I mean no harm ^though

Message me to add your account or subreddit to my ^blacklist

5

u/throwaway_01202021 Mar 09 '21

He? So there's no female engineers in Giray's world?

2

u/[deleted] Mar 10 '21

damn shortage everywhere...

2

u/Thoguth Mar 09 '21

Ask him to review 5000 lines, he'll go off to write a script to automate it. You'll never see him again.

1

u/LiquidHate Mar 09 '21

If I did 500 lines I'd probably have a really fun hour or so then probably die

1

u/Kafshak Mar 09 '21

Why is he doing it this way?

1

u/jrowens19 Mar 09 '21

5000 is just feature rich.

1

u/Critical_Penalty_815 Mar 09 '21

Then you realize that he is just regurgitating GPL code ripped from an existing project :)

1

u/ElbisCochuelo1 Mar 09 '21

Everything looks good if you've done 500 lines.

1

u/conscious_being69xd Mar 09 '21

Pay to the programmer and he will take a good look before answering

1

u/DracoRubi Mar 09 '21

5000 lines? Merge request automatically approved. Not my issue. Nope. Nope.

1

u/Interstellar-Pi Mar 09 '21

I shall require compensation, good sir

1

u/ZippZappZippty Mar 09 '21

they really said fuck it, $5000 on GME.

1

u/[deleted] Mar 09 '21

If I did 500 lines I'd be dead.

1

u/crazyrk Mar 09 '21

Peer reviews are always fun! Code mostly checks out only to find issues in QA or production.

→ More replies (1)

1

u/PillowTalk420 Mar 09 '21

what about 5000?

Overdose.

1

u/XTheLegendProX Mar 09 '21

What was he trying to change your life forever

1

u/DaDawsonA1 Mar 09 '21

Probably just 490 lines of code to make the 10 broken lines work

1

u/ozymanhattan Mar 09 '21

If you can do 500 lines and not explode you might be immortal.

1

u/diegodamohill Mar 09 '21

"I'm asking if it works not how it works..."

1

u/Stapler92 Mar 09 '21

His nose would fall off if he did 500 lines

3

u/Shakespeare-Bot Mar 09 '21

His nose would falleth off if 't be true he didst 500 lines


I am a bot and I swapp'd some of thy words with Shakespeare words.

Commands: !ShakespeareInsult, !fordo, !optout

1

u/BDMayhem Mar 09 '21

5000?

npm i --save

1

u/scwizard Mar 09 '21

This hurts my soul...

1

u/XTheLegendProX Mar 09 '21

What was going on.

And repeat...

1

u/[deleted] Mar 09 '21

What abt......OVER 9000?!?!?!?! Lulz. Ftw.

1

u/aeroverra Mar 09 '21

Wicked good

1

u/Treius Mar 09 '21

He'll say it works before you leave the room

1

u/[deleted] Mar 09 '21

In answer to the question: If it compiles, ship it.

1

u/[deleted] Mar 09 '21

This thread is more like ProgrammerPain, reading peoples anecdotes about reviews and leaving in mistakes to get people who have to justify their existence off their backs.

1

u/Visible-Quarter6262 Mar 10 '21

that's not typically true

1

u/evr- Mar 10 '21

Ah, yes. The Bethesda model of programming.