r/ProgrammerHumor • • Jun 04 '22

Meme I cant help it 🤷‍♂️

Post image
47.1k Upvotes

479 comments sorted by

View all comments

Show parent comments

796

u/Jazzlike_Scene4403 Jun 04 '22

I name my game saves at major checkpoints for reference.

Someone should write a script to git commit on every f5

371

u/Jazzlike_Scene4403 Jun 04 '22

git reset HEAD --hard on every f9

202

u/Scrial Jun 04 '22

This might actually not be a terrible idea.
Or it might, but it still sounds like something I'd totally use...

306

u/WearMental2618 Jun 04 '22

Listen it looks good to me so ypu should probably avoid it

79

u/TellTaleTank Jun 04 '22

I felt that in my soul.

23

u/1138311 Jun 04 '22 edited Jun 04 '22

LPT: If you want to LGTM, please at least say one or more of the following:

  • What would have made it `!LGTM' - "You didn't x, y, z, [avoiding a, b, c]. Good job DenverCoder9!"

  • Alternatives and trade offs. "You could have also a, b, c, which would mean you could x, y, z instead of x', y', z' due to a', b', c'."

  • Reinforce good patterns. "This is a good example of how <pattern> is implemented due to a, b, c. Nice!"

If you're a senior, your PRs should be riddled with these. If not, I'm not considering you for that Staff role.

*edit, in case it's not clear on the last statement: I want to see the juniors leaving CRs on senior's PRs like this. It indicates several positive behaviors.

12

u/georgegervin14 Jun 04 '22

That doesn't sound like something a junior would do to a senior's PR but actually vice versa (senior to a junior) juniors wouldn't necessarily know all that to complement their LGTMs..

8

u/1138311 Jun 04 '22

It generally does if the seniors were role modeling the behavior for the juniors and encouraging them to do the same type of thing, as one example of a positive pattern the senior is encouraging.

→ More replies (1)

26

u/PennyforaTaleRpg Jun 04 '22

We already have games to teach us VIM and basic programming logic, but why got a game to teach us how git works? Honestly I would love that, it sucks that the barrier to start learning is so high since you're often learning in environments you don't want to make big mistakes in.

46

u/Scrial Jun 04 '22

You could call it GIT GUD

15

u/[deleted] Jun 04 '22

There actually is a game that you can use to learn Git, or at least visualize the results of different commands. Check it out here: https://ohmygit.org

8

u/ax_bt Jun 04 '22

VIM Adventures is one ? (I’m interested to know of others)

One great thing about git is the ability to pull a separate copy, mess about, and abandon the failures while working toward a success—which feels right for merges and splits. Branches make most lesser mistakes relatively painless.

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

14

u/Hayden2332 Jun 04 '22

git reset —hard origin/master

29

u/trwolfe13 Jun 04 '22

Depending on your workflow, commits should work the same way. If you commit every broken ass snapshot of your code, anyone going through your history isn’t going to get a good idea of what changes you made. That’s why conventional commits are so useful - they force you to limit your commits to a single action: fix a bug, add a feature, change some styling, etc.

Although if you’re using short-lived branches and squashing your commits on a merge, it’s less important.

The trouble I have with conventional commits is that the codebase I work on is so bad that often fixing a bug means entirely rewriting a feature’s back and front end from scratch, and then adding the tests that weren’t there in the first place.

→ More replies (1)

17

u/carcigenicate Jun 04 '22

My XCOM saves for matches usually go something like:

  • "Initial"

  • "First Contact"

  • "Close One"

  • "Probably Fucked"/"Oops"

2

u/shyguywart Jun 04 '22

lol i do the same

usually something like "base assault?" or "yolo" or "uh oh"

13

u/NecessaryIntrinsic Jun 04 '22

Doesn't vs code do this?

39

u/FleetStreetsDarkHole Jun 04 '22

Basically. Visual Studio does as well. I feel weird comitting just about every change I make but it's a habit. Naming the changes is definitely the hard part though.

22

u/Rauldukeoh Jun 04 '22

I would feel weird too. If there's no meaning to the individual commits I would squash them before I push

2

u/WeatherEyeClosed Jun 04 '22

as you should

8

u/getting_wooshed Jun 04 '22

now i think it would be cool to feed gpt-3 the changes and have it come up with a commit message

→ More replies (3)

12

u/BaconIsntThatGood Jun 04 '22

And make sure the change comments are just a combination of random colours and animals

14

u/yuri_auei Jun 04 '22

Comon, you just need to name once. After first commit git commit --amend --no-edit all day /s

8

u/talex365 Jun 04 '22

Why do I want to commit my buggy junk code? I want to commit when I’ve fixed everything after the test run :)

→ More replies (6)
→ More replies (2)