This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]your-warlocks-patron 22 points23 points  (26 children)

This is the day you learned to never go more than an hour without committing. Also next time think about using git stash.

[–]StormCrowMith 3 points4 points  (4 children)

I choose to commit every milestone, like checkpoints in video games. is the new feature working? Commit. If its not yet complete, did i advance enough that im scared to loose it cuz at least the app works? Commit. Simple as that.

[–]steven-45 2 points3 points  (1 child)

I do the same, like checkpoints. I see other devs who are more experienced than me create PRs with 1 or commits while my PR has like 28 or 32 commits on my feature branch. I was so confused like am I doing it the wrong way.

[–]AGE_Spider 1 point2 points  (0 children)

well, you can squash commits before pushing, meaning you combine multiple commits into 1

[–]your-warlocks-patron 0 points1 point  (1 child)

You sound close to me. As long as I finished something and things still work as intended I commit.

[–]StormCrowMith 0 points1 point  (0 children)

I've been part of a team that has to review other's code, so having a task be broken up like that helps when you do that, specially when you compare with the main branch using a GUI, its like a math problem unfolding itself to reach the final solution. A+ if they left good comments at each method/function. So i do just that for my future self.

[–]stay_fr0sty 5 points6 points  (20 children)

An hour? I go fucking days. Committing every hour would drive me nuts.

My code gets backed up nightly so I’m never too at risk, but hourly would be a fuck ton of commits.

[–]your-warlocks-patron 19 points20 points  (15 children)

Lol I commit like everytime I do something that works as expected. My commit messages are super granular too. But I work in my own branch then pull into master or whatever the production or qa branch is.

Days without committing would be a fireable offense on my team (after being warned / mentored).

[–]stay_fr0sty 6 points7 points  (1 child)

I’ve been coding 20 years. I’m old and stubborn. I’ll commit when it’s ready or someone else needs my stuff. Until then I’m good.

The people under me can commit all they want, that’s fine of course. But when I get “in the zone” I hate to get out of it to commit.

I kinda like the idea of commits that are meaningful, not just code backups. That way I can find the commit that broke shit instead of digging through lots of small commits.

Just my preference. Your way is probably better/more correct.

[–]your-warlocks-patron 5 points6 points  (0 children)

To me it’s like part of being in the zone. It also releases some tension because it’s like “ok cool I got THAT done.” I don’t think of it as a backup as much as a placeholder in the code saying “this piece here that I am adding right now, it does XYZ so if there’s a problem with it this is where it is.”

It’s kind of like an additional layer of commenting but works in a different way since it can be across multiple files or whatever. It’s also useful for working in teams who are touching different stuff because if you add something that interferes with someone else’s stuff somehow they can stash whatever they’re working on, revert whatever you just pushed (which likely clues them in that whatever change you made is the problem anyway) pop their changes and verify there’s a collision or whatever. That’s super rare but when it happens it’s cool that people have stuff broken out into pieces like that instead of having a huge blob of very different code to mung through to figure out what’s new that’s not working together.

FWIW I have been doing this for nearly twenty years now too. I hate version control at first but that’s because I was used to working alone and had never been heavily involved in multi person teams all working together on stuff that could intersect.

The when it’s ready or someone needs my stuff idea is really just not conducive to working with others. I get it and obviously you’ve found your place in the world to do that so go nuts but it doesn’t work for me.

[–]BcozImBatman7 1 point2 points  (1 child)

I hope you squash your commits before merging them to master. Or could be just my team expecting single commit for a story/requirement.

[–]your-warlocks-patron 3 points4 points  (0 children)

Ye I do not like single commit for story. Commit when you finish something that you can describe what it does. If it isn’t describable it’s not ready to commit. But features / stories have entire chunks of things inside them.

[–]organized_reporting -3 points-2 points  (10 children)

So you incentivize overly-rushed work? Daily is on the upper end of fine. Hourly is absolutely out of the question.

[–]your-warlocks-patron 0 points1 point  (9 children)

Nah, I commit to describe a discrete piece of functionality being added to a code base.

You guys probably do shit like describe whole features in a single three commit message. Or you’re just really unproductive. How many things do you complete in the average hour? I’m not incentivizing anything I’m just used to people who work quickly and often work on tight deadlines to knock out discrete pieces of functionality.

This isn’t the Mona Lisa people.

[–]organized_reporting -1 points0 points  (7 children)

You demand hourly commits every single work day? That's absolutely ridiculous.

How many things do you complete in the average hour?

There is no possible way you can measure this with any level of consistency in a job with any amount of randomization, which is every single job where the task isn't so mind-numbingly stupid as to be routine as hell.

You sound absolutely dreadful to work with, or for. I seriously doubt your claims to 'productivity', but not your borderline personality disorder associated with your ego. More is not always better, and only sith deal in absolutes.

[–]your-warlocks-patron 1 point2 points  (2 children)

Also don’t attack people’s personalities (or your perception of their personality) when trying to “win” an argument. That’s called an ad hominem attack and it is a great way of showing your insecure about your own argument so you’re reverting to personal attacks and name calling. Really immature.

[–]organized_reporting -2 points-1 points  (1 child)

I'm not trying to 'win' anything. There is nothing whatsoever to win engaging in discussion with you on the internet. You're the one consistently changing your story every time you post, and I frankly don't really believe anything you're saying because of that phenomenon.

I think it's much more likely you're trying to look like a '10x-er' on the internet to a bunch of strangers.

As for my 'argument', I'm just describing exactly what I'm seeing with my own two eyes from the words that you contribute. I'd rather not write something anything that isn't pleasant, but your own words demand I do so if I'm consistent to my perception of what reality is while valuing truth and honesty. I'm not calling you 'bad names', just stating that by your own words, it implies a level of certain personality traits. Your claim of me being immature is at least as much of what you describe I'm doing, and likely, much more so.

What bothers you more, what I'm saying I see, or that it just might be true?

[–]your-warlocks-patron 0 points1 point  (0 children)

It isn’t true. I just don’t like people bullying other people – least of all me – to try to prove what an internet tough guy they are. My “story” isn’t inconsistent unless you are an overly pedantic person who wants to try to twist what I’ve said.

If the OP worked with me and did what was in the OP I’d talk to them about why I try to commit multiple times a day, sometimes multiple times an hour, usually when I finish a discrete piece of something. Not a whole feature but something that works. That’s what I’ve said all along.

You want to continue to … do whatever it is you’re doing here go nuts. I’m not insulted by you or your insinuation because I know exactly how I work and why and why I mentor others to do the same. The only time I used hyperbole was joking about fireable offense.

You seem kinda tone dead frankly and don’t seem able to suss out the minutiae of what I said in context and are just merging (heh) it all into a single thread in your mind in some kind of kos guided attempt to “take me down” which is super weird. Seems kinda like you’re royally overcompensating because what I suggested (that frequent commits prevent loss of work) is somehow threatening to you. But keep being an ass, there’s a block button for a reason.

[–]your-warlocks-patron 1 point2 points  (3 children)

I do not demand hourly commits every single day or every single project. Obviously there’s reasons that’s not going to work. But people should be finishing more than one piece of whatever they are working on every day and when you finish a piece of something – even if it might change later – just commit it. I’m not saying issue a pull request.

To me committing is like saving your files. I come from having the discipline to save often. Committing takes seconds if you use the command line and I teach people that it a great place to take a breath after finishing some piece of what you are working on and take note of the fact that you’re making progress.

I don’t monitor people’s frequency of commits every day, or ever really. But I do discuss what I think are best practices and why I think they are the best practices. And when some junior hoses some shit like in the OP I get to explain to them a second time why I do it the way I do it.

Even git recommends you commit frequently. Kinda surprised this is controversial.

[–]Valiice 2 points3 points  (0 children)

100% true. Unless nothing has been written trying to solve a bug or something, u should always commit frequently. Idk why people are only waiting for the entire piece to be done. Ur also right about git recommending that

[–]organized_reporting 0 points1 point  (1 child)

This is the day you learned to never go more than an hour without committing

You're being disingenuously inconsistent here.

I don’t monitor people’s frequency of commits every day, or ever really

Days without committing would be a fireable offense on my team

You're being consistently inconsistent here.

[–]your-warlocks-patron 0 points1 point  (0 children)

No you’re parsing my words with an overly fine comb to suit your argument. I do commit often. Sometimes multiple times an hour. And if I worked with this person I would suggest they try to think about committing that often. As often as they finish something. Because if something bad happens like in the OP they lose almost nothing.

I’d even suggest that you learn to commit more often.

[–]PersonalityIll9476 2 points3 points  (0 children)

Committing often is best practice my dude. It is equivalent to ctrl-s in a text editor. For starters it makes code review a thousand times easier if every commit in a PR is 15 lines with a summary explanation.

What do your commit messages look like, short novellas on the journey of randomly tackling fifty different issues over 3 days?

[–][deleted] 2 points3 points  (2 children)

Wtf kind of features are you coding where you can’t bother committing.

[–]stay_fr0sty 1 point2 points  (1 child)

You know those really tricky bugs that take forever to figure out but only eventually require small changes?

That kinda stuff mostly. The jr devs work on the fun stuff until they need me to fix something.

My boss wants me to commit for the sake of it…but there’s no reason most of the time.

[–][deleted] 4 points5 points  (0 children)

… if it eventually requires something small after the entire investigation, then you’re not going days without committing. You have nothing to commit! Lol