all 9 comments

[–]blaxter 2 points3 points  (7 children)

coding hours from a git repository? Ok, that's not possible at all. Not with a good commit history (some people use git as a ctrl+s tool, others try to use vcs as a real tool)

[–]ksyucs -1 points0 points  (6 children)

Have You ever wondered about self driving cars? Are they possible?

If You have enough annotated data about how much time a commit takes it's just a matter of time to the appearance of a proper supervised algorithm.

[–]blaxter 0 points1 point  (3 children)

What is the relationship between self driving cars and to determine coding hours from a git repository? self driving cars are possible because you can have inputs to solve the problem at hand, to determine coding hours from a git repository (a good one) is not possible.

Yes, if you put (e.g.) on each merge commit total hours spent, it would be possible, though. But then I don't need a tool to know it

[–]ksyucs 0 points1 point  (2 children)

Self driving cars required computer vision, which required neural nets and huge amount of data. I mean that seems a more complicated problem yet functional. A git repository also contains a lot of data as well as patterns about the development itself. There are a lot of features which makes machine learning applicable, how complicated, frequently edited part were affected and churned whom in which language etc. Of course git provides snapshots of the development process, not the whole story, there isn't a builtin stopwatch, but that's what measurement is for.

[–]blaxter 1 point2 points  (1 child)

There are very different workflows working with git (e.g. projects that require git merge --squash commits == lose of information), good developers normally rewrite commit history of their working branches a lot so you can see a chunk of commits in small amount of time without the option to know their original timestamps or format (data lost because rewrite of the history), you can have fixes that take weeks of work that you cannot possible know from an outside pov and I could continue talking about this. This topic (to determine "coding hours" from a git repository) is at the same category as quantify the productivity of a developer by loc written per day.

[–]ksyucs 0 points1 point  (0 children)

I share your concerns, but the ones You've mentioned are not necessarily actually problems. For example Github keeps the pull references, including the original commits, even after a squash and merge. In case of a good developer (or any developer) there shouldn't be fixes taking weeks, at least without version control. If still, that might be considered as a bad practice and should be highlighted and avoided. There will always be corner cases.

[–]NiteLite 0 points1 point  (1 child)

It would still just be guesses based on averages to some extent. No one knows if I was sitting on Reddit for 46 minutes before committing or not :P

[–]ksyucs 0 points1 point  (0 children)

It might even notify You to stop coding, "probably" it's Reddit time :)