DEV Community

Jan Küster
Jan Küster

Posted on

What if your apps get rebuilt, only from reading the commit messages?

Just imagine a highly trained AI with super coding powers is trained to write an app just from reading your commit messages. How would your apps look like?

Would it be

  • a stable running app, running according to the specs
  • empty page (with thousand times updated output to the console)
  • a complete mess of unrelated files that won't even compile?
  • core parts are working and milestone-critical features are either blank (added or updated) or just don't work (got it done in time)
  • what else?

Discussion (15)

Collapse
vpgmackan profile image
Mackan

It would be nothing because my commit messages suck.

Collapse
ben profile image
Ben Halpern

This is funny to think about.

Realistically, commit messages probably are a really useful labelling tool of some kind for AI, whether or not this task is accomplishable. Whether good or bad, they say something about an app.

I wonder what the correlation between commit message quality and project success is. They are probably correlated, but I could imagine scenarios where maybe some form of sloppiness might have personality trait crossover which helps get a project to market faster? Just spitballing.

Collapse
jankapunkt profile image
Jan Küster Author

Also question is, where concise commit messages are really important (and not just a formality): CI/CD? Onboarding? Revision/Audits? Refactoring?

The idea behind the thought experiment is to me that, if we have enough context and a hypothetical ai that can perfectly transform such context it should be able to recreate the code from the commit messages (a little bit like with event sourcing).

However the gap between this and reality is that we don't even know when commit messages are relevant and what/how much context is relevant.

Maybe this leads to a few creative ideas in the process.

Collapse
sherrydays profile image
Sherry Day

It would result in a very angry program.

Collapse
capz profile image
Leroy

Not much if it's from company code, probably quite a bit if from my private git.

Either way it wouldn't run, nobody describes their git commit messages THAT well. It would be missing context and all changes not worth mentioning

Collapse
jankapunkt profile image
Jan Küster Author

Let's assume a hypothetical scenario where our ai is super powered. How much verbosity and context is required to make this work?

Collapse
joelbonetr profile image
JoelBonetR • Edited on

Commit messages are good just when there's someone using

git log --oneline --decorate
Enter fullscreen mode Exit fullscreen mode

to extract the changelog plus there is a commit template for the team😂

Otherwise I get crappy cryptic messages that you can't understand without reading the issue and sometimes even a 'No messages for this commit' while doing CR and evaluating the commit history of the branch😒

Collapse
alinp25 profile image
Alin Pisica

Can't wait for it to figure out the "TODO: solve bug" commit.

Collapse
jankapunkt profile image
Jan Küster Author

Our super AI could do that, the question is how it would do it :-D

Collapse
wiseai profile image
Mahmoud Harmouch

Imagine an AI can build an entire app/website by only reading your thoughts. That would be scary. Elon who?

Collapse
andrewbaisden profile image
Andrew Baisden

They would probably break the app 😂

Collapse
dev001 profile image
dev-001

My app:
while(true)
Print(“wip”)

Collapse
mrtj profile image
Janos Tolgyesi

Kind of opposite use case, but this stuff creates documentation from source code, and it is creepy. marketplace.visualstudio.com/items...

Collapse
jankapunkt profile image
Jan Küster Author

This is very interesting since this is where my thoughts went when thinking about verbosity in commit messages. How much context is required to make commits reproducible by reading their messages.

Collapse
jcubic profile image
Jakub T. Jankiewicz

This doesn't make any sens, you will need to make trival changes just to commit something. Will you write app with just readme where you add and remove space? Why do you need commit messages for this?