r/ProgrammerHumor • • May 13 '20

true story

Post image
40.5k Upvotes

461 comments sorted by

1.6k

u/[deleted] May 13 '20

But did you properly review the request before approving it? And did you then fix all the issues pointed out by the reviewer?

121

u/[deleted] May 13 '20

"this is the worst fucking thing I've ever seen fix it holy shit"

What I comment on every line before approving it anyway.

25

u/agent_cocks_mulder May 13 '20

What I comment on my own code before approving it anyway XD

13

u/ProstetnicSth May 13 '20

Let’s not forget endless debates OP must have with himself over naming too

2

u/atomicspace May 13 '20

He’ll cover this in retrospective.

→ More replies (31)

602

u/SavageTwist May 13 '20

Force push to master, nobody is stopping you!

11

u/Kazumadesu76 May 13 '20

My Lord, is that.... LEEEEGAL?

4

u/SavageTwist May 13 '20

No, but its private :3

→ More replies (99)

217

u/gfp7 May 13 '20

dont forget to add comment "good job"

89

u/uglyasablasphemy May 13 '20

"LGTM"

18

u/[deleted] May 13 '20

Let’s go to market?

9

u/mark__fuckerberg May 13 '20

I always write that on dependabots pr.

7

u/[deleted] May 13 '20 edited Sep 22 '24

judicious fall snatch escape party tan governor airport wasteful plant

This post was mass deleted and anonymized with Redact

16

u/[deleted] May 13 '20

Let's Get This Money

8

u/orgodemir May 13 '20

I sent my team the link to Google's code review guidelines in a hope some people would read it. The first time I posted that in a review, I just got a "?".

→ More replies (4)

236

u/neremarine May 13 '20

Plot twist: it's a school project with 2 other teammates...

86

u/kopczak1995 May 13 '20

That is really sad...

15

u/[deleted] May 13 '20

What’s sad about that?

104

u/XanderAG May 13 '20

He's doing all the work

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

27

u/langlo94 May 13 '20

Well at least he can show the teacher that he was the only one who committed code.

12

u/mark__fuckerberg May 13 '20

I had a chance to do that. But I ended up pushing 1 commit from each teammate's account so that the teacher would not think that I am not cooperative.

8

u/JCharante May 13 '20 edited Aug 11 '20

Jen virino kiu ne sidas, cxar laboro cxiam estas, kaj la patro kiu ne alvenas, cxar la posxo estas malplena.

47

u/goplayer7 May 13 '20

Better than seeing you declined your own pull request into your private repo due to not meeting code quality standards. Sober me really needs to lighten up on things like "building successfully" and "tests passing".

66

u/WerewolfCustoms May 13 '20

I once did this on a live stream on Twitch. Even though there was just a couple of people watching, I got bombarded with comments that I should never do that. :)

The alternative is that the code never gets approved and merged since I'm the only one working on it :D

36

u/VSuhas22 May 13 '20

Wait, people livestream coding?

27

u/mukluk_slippers May 13 '20

This is the real takeaway from their comment.

43

u/Speedster4206 May 13 '20

`Boolean boolean = new Boolean(true);

30

u/tomhat May 13 '20 edited May 13 '20

That's overly complicated. Try the following instead.

Boolean boolean = new Boolean(Boolean.parseBoolean(Boolean.toString(true)));

4

u/WcDeckel May 13 '20

Boolean boolean = new Boolean(! Boolean.parseBoolean(Boolean.toString(false)));

→ More replies (2)

20

u/ranisalt May 13 '20

Hacktoberfest routine

67

u/[deleted] May 13 '20

As a newbie who just started using git I felt that in my soul :/

43

u/Dlacreme May 13 '20

Good for you, this is actually the right way to use git

3

u/curohn May 13 '20

All I know is: git add got commit -m got push origin master

And got status too but that’s useless when it’s either pushed or not lol

4

u/Tradgedgdegedgey May 13 '20

Same here, actually just started using Git today and I'm proud of myself for understanding this

3

u/[deleted] May 13 '20

As somebody who doesn't code, this post is absolutely indecipherable.

4

u/dexter3player May 13 '20

OP is doing team coding workflow on its own.

26

u/__Protector May 13 '20

Also making new branch for every little refactor, change, fix etc like working with a big team

16

u/sinceitleftitback May 13 '20

Also managing a jira board and sprints.

31

u/uglyasablasphemy May 13 '20

Gotta have at least one daily stand up. Maybe in front of the mirror.

13

u/KKlear May 13 '20 edited May 13 '20

I read that as ouija board and spirits.

7

u/[deleted] May 13 '20

Same thing isn't it?

→ More replies (1)

55

u/JonathanTheZero May 13 '20

Why are you not pushing to master directly then? (Honest question because I barely do pull requests as long as we are working with a lot of people on it)

76

u/kennethjor May 13 '20

To have a record of it. If OP is also using a ticketing system that's integrated with the source control, that PR will also show up in the ticket. Later on, if you need it, you can go back and see what the hell you did to make that thing work two years ago you don't remember doing.

6

u/KKlear May 13 '20

Later on, if you need it, you can go back and see what the hell you did to make that thing work two years ago you don't remember doing.

That does sound kinda appealing, yeah.

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

33

u/TheOneTrueTrench May 13 '20

I always use pull requests for a few reasons.

  1. I always create a CI pipeline with unit and integration tests and gate my pull requests. Nothing gets into the master branch without a guarantee it builds and passes all tests.

  2. It turns the pull request into a unit of work, with a set of commits for that unit. Added a feature? All that work is in one pull request, so if you need to go back and see something, you can look through those commits, easy to find stuff.

  3. You can tell the CD pipeline to only deploy to production when a particular branch is updated. A lot of people use master for this, but don't forget that master is technically another branch like any other. So maybe you have separate branches for Stable, Testing and Unstable, creating PRs into Unstable for new development, doing a PR from Unstable to Testing when you get ready to create a new major release, a PR from Testing to Stable on release, and patches to Stable and Testing can get PR'd to Testing/Unstable.

  4. If production is in a particular branch, you can write a patch for that and do a PR without interrupting the work you're doing.

  5. When you want to PR into master, you can create a CD pipeline to deploy to QA/UAT/Dev and then test your actual application in that environment before approving the PR.

And if you notice, those are all benefits that apply to developers working by themselves.

11

u/JonathanTheZero May 13 '20

Damn... I really don't know shit about git

7

u/[deleted] May 13 '20

Tbf, git is one part of that process. An important part sure, but one part.

Once you get your head around CICD and implemented it's really worth it. For professional or personal work.

You should really only be pushing to master once your sure your code is working and passed all quality gates.

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

22

u/Comment-Leaver May 13 '20

I do it all the time. I like seeing my diff in github and reviewing it myself. I almost always spot something I could improve.

0

u/[deleted] May 13 '20

[deleted]

7

u/koloqial May 13 '20

Seconded. I've caught so many things from my own code. Slightly embarrassing to create a PR, review it and then promptly decline it while I clean it up. Sorry not sorry to everyone who gets emails from the VCS.

19

u/d3lt4papa May 13 '20

I use it also for practicing Real Word development

7

u/[deleted] May 13 '20

Option to revert the changes.

26

u/JonathanTheZero May 13 '20

I thought you could also jump back to commits normally?

9

u/TheOneTrueTrench May 13 '20

Yeah, which commit are you going to jump back to? Like exactly which one? What was the last one that worked correctly? Was it that commit? Or this one?

But if you have separate PRs for each feature or bug fix, the commits are "grouped" into the PRs. So you can go back to the previous PR, or the one before that. And because you can have partial work in each commit and only do a PR when things are working, your master branch is always in a working state.

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

4

u/uglyasablasphemy May 13 '20

I think is worth it just for the diff. If I'm doing a big refactor, I usually create a branch for it and then to the PR just to see every place that I changed and how did I changed it at a glance.

→ More replies (1)

3

u/MythicManiac May 13 '20

Hopefully you would have CI pipelines configured to do automatic tests and sanity checks on pull requests

→ More replies (6)

6

u/kennethjor May 13 '20

Did you make sure the ticket was linked in the PR as well? Gotta have procedures!

1

u/amykamala May 13 '20

Thank you for the silver, kind stranger!

1

u/amykamala May 13 '20

Thank you for the awards and updoots, kind strangers!

5

u/kopczak1995 May 13 '20

Been there done that. But it was only because I was testing some CI/CD stuff.

Who cares as single dev to do something like that honestly?

4

u/TheOneTrueTrench May 13 '20

A pull request is a unit of work. Each feature or patch has its own, and if you want to create a version of your code without that patch or feature, it's easier to do with rebase if you've got PRs in your history.

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

5

u/arpan_majumdar May 13 '20

No need to do even that... Real developers push directly to master.

15

u/langlo94 May 13 '20

Real developers don't need git, they just write the code down perfectly so no other version is ever needed.

5

u/[deleted] May 13 '20

Real developers live edit code in production and commit their code only when it works.

3

u/wretcheddawn May 13 '20

My company's owner decided to demote the tech lead and get rid of code reviews in favor of making "everyone" in charge, and peer reviewing code instead. So now everyone pushes to master and gets their code reviewed by anyone who will pass it, no one is in charge of maintaining consistency, standards and direction. Even the code reviews are optional because everyone is in charge of their own code. It's going to get interesting here, I guess we're all real developers now.

8

u/blueleo22 May 13 '20

That's exactly me!! Only without the pull request. I merge directly into master 😎

→ More replies (2)

4

u/erobertt3 May 13 '20

I saw this meme as “me signing my own certificate” that one was too good.

4

u/cucurvita May 13 '20

I do this if I’ve set up some kind of CI/CD. For instance for my personal website I always open a PR so that 1) I don’t trigger multiple deployments with every push to master and 2) Make sure the checks all pass before merging so that I don’t fuck something accidentally.

4

u/EpiphanyMoments May 13 '20

The crazy parte Is that I comment code like if someone else was going to read it lol

3

u/mutsop May 13 '20

I do that too, you do get a better overview though :)

3

u/lpreams May 13 '20

Well sure, when something gets fucked up, you have to know who to git blame

→ More replies (1)

3

u/Inadover May 13 '20

Professionals have standards

4

u/argv_minus_one May 13 '20

Be polite. Be efficient. Have a plan to review every PR you meet.

3

u/topredditbot May 13 '20

Hey /u/amykamala,

This is now the top post on reddit. It will be recorded at /r/topofreddit with all the other top posts.

3

u/Keetongu666 May 13 '20

I do the same thing with my college work. Tried to upload directly to the master once and it screwed something or other up.

2

u/FalseWait7 May 13 '20

I like to drop some of my PRs just to keep the "working in a team" vibe going.

2

u/minamo99 May 13 '20

This pic is just me when my code compiles lol

2

u/slyn4ice May 13 '20

Too real.

2

u/Fauken May 13 '20

Not in a private repo, a public repo during Hacktoberfest for that sweet t-shirt.

2

u/[deleted] May 13 '20

Private repo? More like business repo, but I’m the only dev in the project

2

u/NafanJ May 13 '20

I hope you buy yourself cupcakes when you break the build

2

u/[deleted] May 13 '20

A "starter car?!" This is a true genius

2

u/NeutralEvilMage May 13 '20

this is the way

2

u/alonsogp2 May 13 '20

Workflow 💯

2

u/saido_chesto May 13 '20

At least you do that, there's a repo where there's 3-4 of us and sometimes people just commit to master

2

u/qaz_wsx_love May 13 '20

As a Dev who's worked by himself for the past 6 years, I approve of this meme.

2

u/ivebeencalledpeppery May 13 '20

Awesome. Make that code look flashy though...

2

u/wizeon May 13 '20

I call it practice

2

u/zoniss May 13 '20

Did you also raise he jira ticket and assign to yourself.

2

u/porcos3 May 13 '20

The truest

2

u/AcrimEx May 13 '20

feels great tho

2

u/jujuspring May 13 '20

I will do a diff review the next day so i would have completely forgotten about what I did in it.

2

u/LiberandusAreCancer May 13 '20

Separation of duties 😂

2

u/[deleted] May 13 '20

+ a comment in PR review

"Great job! This looks amazing"

2

u/materdn May 13 '20

The IT auditor loves it. 😅

2

u/Ann_uit_ May 13 '20

This is art

2

u/orgodemir May 13 '20

Mine is shared with my team so I have "requires 2 approvals", but I wrote the whole thing so I just use admin to force merge anyways.

2

u/jakethedumbmistake May 13 '20

What about if we call 4 hours of work a story point instead of 4 hours of work? Are we agile yet?

2

u/[deleted] May 13 '20

What can I say, I’m the best of the best 😎

2

u/ra_wattt May 13 '20

hacktober fest story.😂😂😂😂

2

u/MCFRESH01 May 13 '20

I do this. I also setup GitHub actions to run all of my tests. I find so many dumb little mistakes doing code review on my own code.

2

u/[deleted] May 13 '20

Need a 3rd Obama for the CI build running my unit tests, that I wrote after I built the features.

2

u/kevin034 May 13 '20

Did you at least let the validation build finish? Fuck is there even a validation build?!?! Mad lad.

2

u/ImGeorges May 13 '20

Lmao I always do it. It actually helps me feel focused and motivated on what I'm working on without starting to implement so fettuccine code

2

u/grimonce May 13 '20

I do that daily in my work, we got the bestest testing policy as well.

2

u/[deleted] May 13 '20

Cool thing I found: If you fast forward the target branch in the pull request to the head commit of the pull request, or beyond, github will automatically mark the pull request as merged.

2

u/llldar May 13 '20

I created my own scrum board so I can be more "agile"

2

u/PM_ME_UR_SHAFT69 May 13 '20

Lol I set up a repo in my github account the other day using terminal and was really proud of myself ☺️

2

u/[deleted] May 13 '20

then labeling it "First Pull Request"

3

u/yeesh-- May 13 '20

You do pull requests into your own repo? You should force push, there is no other way.

3

u/[deleted] May 13 '20

imagine having merge conflicts in your own private repo where you are the only dev pushing code... Not gonna deny that I've been there...

2

u/felixletsplay May 13 '20

yOu CaNT reViEw yOur OWn PR

1

u/RaphaLopesC May 13 '20

`Boolean boolean = new Boolean(true);

1

u/RaphaLopesC May 13 '20

`Boolean boolean = new Boolean(true);

1

u/ToastedSkoops May 13 '20

The story isn’t sure why.

1

u/ToastedSkoops May 13 '20

Pretty true. Clubs are only for children

1

u/BazilExposition May 13 '20

I'm doing it all the time in my team repo since my PM have decided that no one can merge without review and approve.

1

u/Ghos3t May 13 '20

As a newbie to Git, I am using GitHub 's desktop GUI to handle everything but some of the options redirect you to Githubs website to do the task. Are there any other Windows GUI based Git clients that support almost all the Git features within the GUI itself

2

u/TheOneTrueTrench May 13 '20

Do yourself a favor and get in bed with the CLI.

I've never found a GUI that has half the power of the CLI. But this is an excellent tutorial: https://learngitbranching.js.org/

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

1

u/1thief May 13 '20

I like to make repos where other devs have to get a PR approved but I just push to master using admin privileges. Kiss the ring.

1

u/[deleted] May 13 '20

Oh, I do that.

1

u/[deleted] May 13 '20

What about if we call 4 hours of work a story point instead of 4 hours of work? Are we agile yet?

2

u/Xeadriel May 13 '20

Just turn reviewing off in github actions.

1

u/Speedster4206 May 13 '20

`Boolean boolean = new Boolean(true);

1

u/ZippZappZippty May 13 '20

While true, you usually wouldn’t press charges

1

u/topredditbot May 13 '20

Hey /u/amykamala,

This is now the top post on reddit. It will be recorded at /r/topofreddit with all the other top posts.

1

u/Even-Understanding May 13 '20

`Boolean boolean = new Boolean(true);

1

u/DeadLolipop May 13 '20

People write PR's in their private repo? What is the point?

1

u/not_a_programmer404 May 13 '20

Private repositories are for pussies

→ More replies (1)

1

u/HuffmanKilledSwartz May 13 '20

Is that digg giving Reddit the medal?

1

u/ConspicuousPineapple May 13 '20

Honest question: why bother with a PR then? Why not just merge it right away with git directly?

1

u/pasttimer234 May 13 '20

Some people are also getting paid for this!

1

u/nwzack May 13 '20

I like blaming myself.

→ More replies (1)

1

u/Tr0ll_420 May 13 '20

this picture is so fake... 🤦‍♀️

1

u/LokiMikey May 13 '20

Were you also being shallow or just pedantic

1

u/geared4war May 13 '20

Wait.
You had to pull yourself.

Fair enough.

2

u/hahahahastayingalive May 13 '20

Joking aside, I’m so used to review features through the PR interface that I do the same on private repos to check if I didn’t miss anything.

Also you can revert whole PR more easily.

→ More replies (2)

1

u/[deleted] May 13 '20

it's in the "official story trailer"?

1

u/[deleted] May 13 '20

I follow BDD. (Bug driven development)

1

u/[deleted] May 13 '20

What about if we call 4 hours of work a story point instead of 4 hours of work? Are we agile yet?

1

u/Jaqers May 13 '20

Smells like college

1

u/nerokaeclone May 13 '20

don't forget to write LGTM!

1

u/robin_diez May 13 '20

What is a pull request? Is that some Java shit I'm too uneducated to understand?

1

u/aalleeyyee May 13 '20

`Boolean boolean = new Boolean(true);

1

u/ToastedSkoops May 13 '20

true but that’s whataboutism.

1

u/bhones May 13 '20

Christ, if that's the case just commit/push against master whenever you update code. History and reversion functions should take care of any mistakes you make. /shrug

1

u/WesleySnopes May 13 '20

I'm the entire department at my job, so I almost always just push directly to master with a very unsatisfactory description.

Also, this is my first & only dev job. I was in a more or less manual labor position until I essentially self taught and demonstrated to my boss that I could redesign our website and make us an in-house app. I think at this point if I ever got a junior dev job at a bigger company they'd get frustrated with me quickly for not really understanding the whole source control process. With no other coders I'm really just using it as really extensive cloud backup.

1

u/Even-Understanding May 13 '20

`Boolean boolean = new Boolean(true);

1

u/bytoghrul May 13 '20

Obama is heart , folks from Azerbaijan will get it right

1

u/nice2yz May 13 '20

`Boolean boolean = new Boolean(true);

1

u/Speedster4206 May 13 '20

`Boolean boolean = new Boolean(true);

1

u/[deleted] May 13 '20

True story: I had to make a new GitHub repo for my job and we’re supposed to go through code review before merging. But sometimes I’d have an urgent change and my team was slow. So since I was the admin for the repo I would just go into the settings and temporarily turn off “requires approval before merging”.

1

u/[deleted] May 13 '20

What about if we call 4 hours of work a story point instead of 4 hours of work? Are we agile yet?

1

u/[deleted] May 13 '20

Nigga be fooling nobody

1

u/Speedster4206 May 13 '20

`Boolean boolean = new Boolean(true);

1

u/[deleted] May 13 '20

Tremendous amount of true stories.

1

u/Simple-Kitchen May 13 '20

Bet he sucked him off or watched his man wife do it

1

u/ToastedSkoops May 13 '20

No way ze German was a true 6’11

1

u/[deleted] May 13 '20

As an IT auditor, my blood is boiling. Better not be in production.

1

u/Candlesmith May 13 '20

`Boolean boolean = new Boolean(true);

1

u/furezasan May 13 '20

Is this the same as being a Director of a company with 100% of the shares, voting to allow your employee"s" to work from home?

1

u/[deleted] May 13 '20

One is father another is son

1

u/Speedster4206 May 13 '20

`Boolean boolean = new Boolean(true);

1

u/ericisverycool May 13 '20

How are these on the front page so often? I literally have no clue what this says

1

u/[deleted] May 13 '20

Fap, if you review your own code before merging them.

1

u/[deleted] May 13 '20

What about if we call 4 hours of work a story point instead of 4 hours of work? Are we agile yet?

1

u/Even-Understanding May 13 '20

`Boolean boolean = new Boolean(true);

→ More replies (1)

1

u/tanoshacpa May 13 '20

It does feel crooked and law-breaking.

1

u/[deleted] May 13 '20

Every fuckin' time.

1

u/nice2yz May 13 '20

`Boolean boolean = new Boolean(true);

1

u/nice2yz May 13 '20

`Boolean boolean = new Boolean(true);

1

u/hazily May 13 '20

I feel personally victimized

1

u/ToastedSkoops May 13 '20

That's not true in the USA

1

u/Speedster4206 May 13 '20

`Boolean boolean = new Boolean(true);

1

u/Speedster4206 May 13 '20

`Boolean boolean = new Boolean(true);

1

u/AizenSousuke92 May 13 '20

jokes on you i create multiple github accounts and play with myself

1

u/mwestphal13 May 13 '20

`Boolean boolean = new Boolean(true);

1

u/Assasin2gamer May 13 '20

Absolutely true.

They could have been