-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Estimated development time. #1276
Comments
Fun idea! First we'll probably want a utility in place to detect files that are generated or vendored, so that committing e.g. After that, I'd assume we'd get work from an estimated lines of code per hour or bytes per hour (there are pros and cons to each). The simplest way would be to check the current files, but this won't take deletions into account. If a project is rewritten, we'd miss a lot of the work hours! The most accurate way would probably be to compare all the deltas of the commits discoverable in the current branch, but this will be more expensive and time-consuming. |
Thanks for expressing interest. That's a lot of ideas for first comment. We can start simple by hardcoding the exclusion of cache files and generated code. There are good tools that identify such files for all types of projects, e.g., This repo has implementation. The README refers to I tried installing it but it didn't work. This one worked but it vastly overestimated the time. The unreasonable numbers are probably due to the caveats that you discerned in your first line of reasoning. At the end of README, the author refers to the first repo as source of inspiration and quotes the overuse of dependencies (js libraries) in it as a reason to hack together a standalone binary in golang. |
🤔 As I understand it, both of those use the time between commits to estimate the time worked. TBH I think this is a mistake. For example, I will often use IMO any tool that estimates time worked in a git repository would need to take code size into account (lines of code, file size, or something else). A quick Google search told me that the average developer writes 20 lines of code per hour, so that might be a good starting point. |
I see. I like the irreducibly simple algroithm of dividing numbe of lines by 20 to get number of hours. I just used the provided
|
I'm glad you're thinking about this! For the sake of a reasonable estimate, I wonder if "development time" should be reimagined as "coding time" -- i.e. the actual time spent writing code for the project. "Development" is a broad subject, and can include responding to issues, reviews, planning, etc. 🤔 I think that calculating time spent can be a serious undertaking with a lot of code complexity. Additionally, it would have a lot of utility outside of this project. For this reason, I believe it shouldn't necessarily be part of the onefetch project, but a completely separate crate/project that maybe onefetch can add as a dependency. @o2sh Thoughts? |
I love the idea, thanks for the suggestion @thisismygitrepo. Personally, I'm okay with it being a rough estimate as long as the logic is sound and well-documented.
For the sake of simplicity in review, integration, and testing, we could start by incubating it within onefetch for the first iteration, and then later on extract it into its own crate. Alternatively, we could begin with it as a separate crate from the outset. Both approaches are feasible. @thisismygitrepo If you're up for it, feel free to give it a try! |
Summary 💡
Can we add an extra output line where we mention an estimate of how many hours went into development?
I'm afraid there is no well-maintained library that implements this, but I believe any simple formula with simple assumptions will do.
The text was updated successfully, but these errors were encountered: