After getting backlash for my AI tool that generates commit messages, I tried to improve it
Posted by TheGreaT1803@reddit | programming | View on Reddit | 22 comments
omgpop@reddit
My advice to people building with AI is stop shoving the word AI in people’s faces. People don’t care for it. People want things that solve problems for them. If it happens to use AI, cool, but if you’re trying to offer a solution, focus on the solution, not the buzzword tech you employed to build it. It’s like the “X in Rust” trend, which is tedious, but at least sometimes effective since Rust has a good reputation. “AI”, for better or worse, has a terrible reputation among many users right now, so there’s no upside to putting it front and centre. I’m someone who’s generally optimistic about AI, but saying those two letters and hearing them 500 times a day is getting really old.
TheGreaT1803@reddit (OP)
I used it twice, once in the title, and once in the description. Not using the word AI for this project would be a lie. I don't see how your general frustration with seeing too many posts about AI is related to my tool.
palparepa@reddit
"After getting backlash for my tool that generates commit messages, I tried to improve it"
omgpop@reddit
I really couldn’t be assed to type that out to this guy, thanks lol
padawan-6@reddit
How does it fair with larger changes? Not to say that one should change 1k files in a PR on a regular basis but in the case of a lot of changes in one file can it correctly summarize those changes?
I would love to integrate this with my code base to add a summary of a diff in our team's GitHub comments.
TheGreaT1803@reddit (OP)
It depends on the provider you are using. The free provider 'phind' just gives up lol and I have to throw an error.
I have tested the OpenAI provider with large changes (30-40 files) and it seems to handle it well. Haven't gone further
I have not officially added support for PRs because of this reason. I suspect I'll have to do some optimizations (maybe something like grouping commits in chunks and sending multiple requests) to truly support large PRs
padawan-6@reddit
Thanks for the reply! I'm interested in this tool because most folks on my team just open large PRs and then fail to summarize it in the PR comment. It would help us a lot to have at least some automation around this. 😄
But just getting this to work in the first place sounds like it was a huge challenge and I appreciate it. I like where this is going!
TheGreaT1803@reddit (OP)
Appreciate it! A lot of comments on the post disagree with the idea of this tool. But I have seen messages like "add code", "fixed bug", "minor change" way too many times, and I would take a barely accurate AI description over that anyday
Support for summarising PRs is on the table. I'll just have to figure out the best way to do it
padawan-6@reddit
The people that don't see the point are missing the point of git commit messages, entirely, then. They're really powerful when you leverage them and don't just write stuff like "adding the changes."
DavidJCobb@reddit
If a commit message isn't worth your time to write, why is it worth anyone's time to read?
TheGreaT1803@reddit (OP)
I place a lot of importance in good commit messages. They are necessary and have saved me a bunch of times. You can technically asses this based on the project's commit history.
I wouldn't post this if I dint think it dint do a good job at writing messages that do the job well.
DoppelFrog@reddit
Isn't this just writing your own commit messages bur with extra steps?
TheGreaT1803@reddit (OP)
The reason I built the tool was there was more than once I thought - ah, wouldn't it be nice if an AI could write this message instead of me writing the name of
user-workspace-account-settings-component
for the 3rd time in the last 10 minutes.Here you would only need to (optionally) communicate the intent.
I consider it a win if the average time spent writing a commit reduces. It can also help a new developer learn how to write better commits
You can always try it out to see if it's for you or not!
etc_d@reddit
….do you typically spend a lot of time writing a commit message? buddy personally i wouldn’t brag about such a large skill issue lol.
TheGreaT1803@reddit (OP)
Lol gotta give that one to you.
But if you can spend less time writing better commits, and it's free...then what's the harm?
etc_d@reddit
and for what it’s worth, typing a CLI command, traversing a list of commit suggestions, and evaluating the accuracy of each takes a LOT more time than typing a message i copied verbatim from a jira ticket description. lol - who is this tool for? industry professionals or literal children?
TheGreaT1803@reddit (OP)
There is no list to parse from. It's just one output, take it or leave it.
And if you were anywhere near competent enough with using CLI tools then you would know that nobody would type out the whole command every time. You would automate it to fit your own workflow.
Moreover, to each their own. You don't have to use it if it's not for you. I even specified that in the description. But to say it's not useful "at all for anyone ever" would be wild
etc_d@reddit
it’s not free though. when you use AI you waste energy and generate CO2, on top of legitimizing generative AI which is the worst cost to pay of all.
ozyx7@reddit
A commit message should explain why the changes are being made and what led to certain design decisions. A commit message that explains what changes are made is not very useful; someone can just look at the diff and discern that themselves.
I don't see how an AI tool is going to explain the "why" part without hallucinating it.
saggingrufus@reddit
This is the problem with most attempts to automate documentation including commits.
The AI will never understand your intentions or why you chose A over B unless you give it input to do so. If you're going to provide that input, why not just write the commit message.
TheGreaT1803@reddit (OP)
Because the input could be "improve perf" And the output could be
perf(carousel.tsx): Improve carousel performance by deferring jQuery load
TheGreaT1803@reddit (OP)
Previous post: link
Disclaimer: I understand that this tool is not for everyone, and might only be saving some precious keystrokes. In my testing, I have found it to be useful and pretty accurate. Thanks to everyone who engaged in feedback and discussion. I hope someone might find it useful as well.
I had posted about a free AI tool that I built, and one of the things it could do was generating commit messages using AI. I got a lot of criticism for it, and I now believe it to be valid. A good commit message is very important, regardless of the team's or codebase's size.
While trying out my own tool, I noticed that the AI was able to do a good job at generating messages, but couldn't deal with nuance. It knows about the changes, but the intent may not be clear.
For example, I could modify a function, and it could fall under either "refactor" or "performance improvement" based on the changes. While both are correct objectively if you just look at the changes, only one can be correct if you include intent.
So I decided to make an improvement. Now you can provide context for the staged changes. Here's an example
This effectively allows for writing "lazy" commit messages, and turning them into well-formed and useful ones.