News for hackers. Stuff that matters.
Re:At what time of day do famous programmers work? by stinkbug9o on Thursday July 18, 2019 @10:44AM (#20470324)
You’re describing merges, not commits, or pushes to remotes.

One can commit and push to branches all day.

Merging them to master without a heads up is a bad idea, except where teams have implemented a process that can handle it

Re:At what time of day do famous programmers work? by inlined on Thursday July 18, 2019 @10:49AM (#20470387)
Many of us do a “squash merge” (use git rebase to compress to meaningful points in a CR and again before merging to master or feature branches). This creates a clean history at the expense of not being able to stalk others work at high granularity or get as large a score on github’s tracker.
Re:At what time of day do famous programmers work? by testvox on Thursday July 18, 2019 @01:07PM (#20471833)
Git rebase interactive with fixup or squash will combine the commits into the first one. So the timestamp will still be somewhat reflective of when work is done (on average).
Re:At what time of day do famous programmers work? by inlined on Thursday July 18, 2019 @02:42PM (#20472797)
Though I wouldn’t be surprised if there is at least some biasing. E.g. first commits happening relatively soon after regularly scheduled scrum meetings. At least if they’re the type of developer who checkpoints after incremental changes.
Re:At what time of day do famous programmers work? by mandelbrotwurst on Thursday July 18, 2019 @02:39PM (#20472770)
Are you sure?

It seems fairly likely to me that the average time of day that someone makes the initial commit on a new branch would be quite different from the average time of day that they make commits generally. Am I misunderstanding?

Re:At what time of day do famous programmers work? by hinkley on Friday July 19, 2019 @01:54PM (#20480925)
Stalking other workers at high granularity is sometimes the only way I have to figure out what was going through their head (or indeed, my head 2 years ago) when they wrote this... very interesting logic.

The biggest WTF programmer I work with squashes all of his commits. So every commit is 100-400 lines of Rube Goldbergian majesty.

Re:At what time of day do famous programmers work? by MaxBarraclough on Thursday July 18, 2019 @05:13PM (#20473966)
I'm not convinced that a 'clean history' beats a richer more fine-grain history.

There's a reason frequent small commits are generally thought to be the way to go.

Re:At what time of day do famous programmers work? by hoten on Thursday July 18, 2019 @05:45PM (#20474211)
except of my dozens or so commits to a feature branch, most of which are "update" or "fix test" or "oops forgot edge case". But for the one squash commit, it's "some-feature-tag: nice description of the changes (#relevant-pr)".

and there's no way I'm going to write more than one nice commit message for a branch.

You can still get the fine-grained commits if you keep your merges focused on one thing.

Re:At what time of day do famous programmers work? by MaxBarraclough on Thursday July 18, 2019 @06:03PM (#20474363)
> You can still get the fine-grained commits if you keep your merges focused on one thing.

Right. This is what Git Flow does. Best of both worlds.

Re:At what time of day do famous programmers work? by dahart on Thursday July 18, 2019 @10:49AM (#20470391)
> You’re describing merges, not commits, or pushes to remotes.

Both merges and commits can be pushed. I’m not exactly sure what distinction you’re trying to make.

Also, btw, I’m using git terminology, but not everyone uses git. I’m including my experience on teams that use Perforce, for example.

> One can commit and push to branches all day. Merging them to master without a heads up is a bad idea.

Yeah, right, exactly. You agree with me. My policy is about putting anything new in the master branch during off hours, because breaking changes that evade the tests may not get fixed until work hours, and prevent other people from working at night or over the weekend.

Re:At what time of day do famous programmers work? by kragen on Thursday July 18, 2019 @11:35AM (#20470907)
The article is about the times of day Git commits were made, not the times of day they were pushed, nor the times of day people used other source-control systems like Perforce. You said, "I’d be very cautious about assuming that commit time has anything to do with work time," citing your own policy of not pushing at night as an example of how "commit time" may not have anything to do with work time. Now you're saying, "My policy is about putting anything new in the master branch during off hours," which is to say, it's about pushes, not commits.

This means that your original top-level comment is completely irrelevant to the article you are commenting on, which is unfortunate, since it's the top-voted comment on the article. You should edit the top-level comment to reflect that fact, or, if that's not possible, add a second-level comment retracting it.

Re:At what time of day do famous programmers work? by dahart on Thursday July 18, 2019 @11:52AM (#20471081)
I stand by my top comment, avoiding pushes Friday and waiting until Monday often leads to both code commit times on Monday and merge commit times on Monday. (Edit: and BTW I know this for a fact, because we monitored average commit times to make sure the policy was being adhered to.)

If you look at the code from the article, you’ll see that the author did not filter out merge commits. The word merge doesn’t even appear in the article. The OPs data includes merge commits.

You’re trying to draw a hard and idealized line that doesn’t exist in real companies. Squashes often happen right before push. Stashing for the weekend rather than committing is common. People unsafely leaving uncommitted changes in their workspace over the weekend is common. Most devs in my experience are not git experts, and they don’t always use git in best practices kinds of ways. That is made evident every time there’s a git thread on HN.

I am talking about commit time, my push policy affects my commit times. You can’t count on commit times to demonstrate anything.

Re:At what time of day do famous programmers work? by kragen on Thursday July 18, 2019 @12:05PM (#20471207)
You're attempting to defend the relevance of your comments to an article about the development practices of, among other people, Linus Torvalds, by saying, "Most devs in my experience are not git experts, and they don’t always use git in best practices kinds of ways." Perhaps you are not aware that Linus Torvalds originally wrote Git, and did so specifically to mechanize what he considers to be "best practices".

Edited to add: apparently something in my phrasing is leading you to believe that I'm angry with you and wanting to attack you. I'm not sure what that is, but that isn't my intention. I just think what you're saying isn't true, or rather is presumably true of your company but not of this article, and I was trying to explain why. I'm sorry for writing in what is apparently an aggressive tone.

Re:At what time of day do famous programmers work? by dahart on Thursday July 18, 2019 @12:26PM (#20471427)
Thank you, yes I’m well aware that Linus wrote git. I’m not sure what made you so angry, but I’m up for continuing this discussion if you’re really open to discussion, as opposed to proving me wrong no matter what. It currently feels like the latter, but I think you’re not listening or understanding what I’ve said. It seems like you’re making assumptions.

Maybe you missed that I pointed out above that Linus makes a lot of merge commits, and you’ve just ignored my previous point about merge commits which is completely and directly relevant to my comments. The article included Linus’ merge commits in their histogram of his commit times. If Linus is waiting to merge like I do, then the data is skewed. If Linus is code reviewing and emailing in the morning, and writing code at night, then the data is misleading.

Re:At what time of day do famous programmers work? by atq2119 on Thursday July 18, 2019 @01:07PM (#20471829)
The merge commits made by Linus will have as their date and time the time when he made the merge locally on his own machine, which can be different from the time that he pushed those changes out (and given that he specifically designed git to have this capability it seems rather plausible that he uses it).

Merge commits are really the same as non-merge commits. The only difference is the number of parent commits, which is irrelevant for this discussion.

Re:At what time of day do famous programmers work? by haykmartiros on Thursday July 18, 2019 @02:08PM (#20472445)
For what is worth kragan is entirely right here.
Re:At what time of day do famous programmers work? by dahart on Thursday July 18, 2019 @03:57PM (#20473378)
As strawman arguments often are within their own context. That doesn't mean I'm wrong. My point that merge commits were included in the OP's article and data went unanswered by @kragen, and it's directly relevant to what I said at the top; merge commits don't represent work time, but they're being counted here. Code commits also don't necessarily represent work time either, due to squashing, stashing, and general dev practice, so I haven't heard any evidence that convinces me otherwise. Do you have any to add?
Re:At what time of day do famous programmers work? by lolc on Friday July 19, 2019 @07:45AM (#20477804)
Merging is work too. The times of merges are indicators that the person did work at that time.

Obviously the methodology is limited but it does seem to work well in practice. If you have evidence that the statistics are wrong for one of the listed programmers, please do share it.

Re:At what time of day do famous programmers work? by kragen on Thursday July 18, 2019 @04:35PM (#20473691)
Your attack on my integrity here is unwelcome and entirely unwarranted; that does make me angry. I regret having given you so much of my time in this thread and having assumed good faith on your part.
Re:At what time of day do famous programmers work? by dahart on Thursday July 18, 2019 @05:24PM (#20474048)
> Your attack on my integrity here is unwelcome

I absolutely did no such thing. You may wish to consider taking that untrue statement back, for the sake of your integrity. Nothing I said is attacking you personally in any way.

You called for a retraction of my top comment, implying it is flip-flopping and hypocritical, but you misunderstood my argument and made a rebuttal point that didn't address mine. That's a straw man, and since you appear to believe "straw man" is judgemental, it is not. It simply means you're arguing against a different point than the one I made.

It's a fact that you haven't yet responded to the merge commit point I made, and that merge commits in the OPs data are relevant to my original comment.

> I regret having given you so much time

You make it sound like I'm supposed to appreciate you calling my words untrue and "completely irrelevant". How does arguing with me and saying I'm attempting to defend an irrelevant position amount to you extending good faith?

Re:At what time of day do famous programmers work? by gitrebase on Thursday July 18, 2019 @10:33PM (#20475758)
I find kragan's comments to be creating strawman arguments. They are unnecessarily confrontational.
Re:At what time of day do famous programmers work? by erikpukinskis on Thursday July 18, 2019 @12:04PM (#20471188)
> You can’t count on commit times to demonstrate anything.

Very extreme stance! Especially for so deep in thread. Sometimes it’s nice to make your ideas more specific as you go deeper in conversation, not just radicalize and double down.

Re:At what time of day do famous programmers work? by dahart on Thursday July 18, 2019 @12:21PM (#20471379)
Interesting; I don’t consider what I said extreme or radical at all. I’ll rephrase it into a question: what do you claim that commit time demonstrates, considering that commit times can and do in practice very often change immediately prior to push?
Re:At what time of day do famous programmers work? by erikpukinskis on Sunday July 21, 2019 @02:33PM (#20492881)
Commit time has some correlation with when code is written. It’s not perfect, but for me personally it’s usually close.

Whether that correlation models reality closely enough to be useful depends.

My understanding of your “commit time demonstrates nothing” assertion is that you are saying there is no useful information there, which seemed like a radical position for so deep in the thread.

Re:At what time of day do famous programmers work? by irishcoffee on Thursday July 18, 2019 @01:42PM (#20472188)
How can a commit time change?
Re:At what time of day do famous programmers work? by gitrebase on Thursday July 18, 2019 @10:25PM (#20475722)
git commit --amend changes author time.

git commit --amend --reset-author changes both author time and commit time.

git rebase changes commit time.

All three commands can be used just before a merge and push to clean things up. So there is no guarantee that the author time or commit time we see in the final commit history accurately represents the actual time at which the work was done.

Re:At what time of day do famous programmers work? by dahart on Thursday July 18, 2019 @03:53PM (#20473348)
It's a different commit. I was talking about introducing and then pushing new commits with different timestamps than the original, not somehow modifying timestamps on a specific commit. The commit that gets pushed can, and often does, have a different timestamp than the timestamp on the commit when the code was written.
Re:At what time of day do famous programmers work? by vlovich123 on Thursday July 18, 2019 @12:05PM (#20471205)
That to me seems more like a sign that you should be enforcing a policy that pushing the merge button is gated by tests passing (& in successful application pushing the "merge button" should be nothing but a request to automation to apply the merge & do the tests before actually pushing it as a new master). If you're saying that there are breaking changes that are possible that test coverage is insufficient for, I would propose that the test coverage needs to be addressed. Is this advice for small 1 person repos? It can be if you want to develop good habits or be more diligent at preventing defects. It becomes more applicable as more people start contributing.
Re:At what time of day do famous programmers work? by dahart on Thursday July 18, 2019 @12:34PM (#20471492)
Teams I’ve worked on do gate the merges by passing tests. You’re right; test coverage is insufficient. I’ve never worked anywhere with sufficient test coverage, I truly hope to some day, but new features in my experience have always come with new breakage and new tests.

> Is this advice for small 1 person repos?

I’ve never used a wait to push policy on my own repos, I’d say my policy doesn’t make any sense in that scenario. The goal of the policy is to prevent breaking other people, not to prevent breaking myself.

Re:At what time of day do famous programmers work? by stinkbug9o on Thursday July 18, 2019 @04:21PM (#20473577)
Your original comment reads like pushes only goes to master, so you wait to push to a non master branch until working hours.

I found the phrasing abstruse relative to my daily way of thinking of these things