Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Using coding assistants to help with Keycloak development?

63 views
Skip to first unread message

tero....@gmail.com

unread,
Nov 5, 2024, 4:24:05 PM11/5/24
to Keycloak Dev
Hi,

A question about hot LLM topic:  

What is Keycloak maintainer's policy on using tools like GitHub Copilot or other coding assistants while working on Keycloak code?  Obviously developers are always fully responsible for their contributions and for making sure the code follows the project's guidelines.  My perspective is the use-case where code assistant acts as small helpers to speed up the programming work when implementing code submissions.  

What do you think about this kind of use in Keycloak contributions?

Best regards,
Tero / @tsaarni


Stian Thorgersen

unread,
Nov 6, 2024, 5:28:44 AM11/6/24
to tero....@gmail.com, Keycloak Dev
I'm not really sure to be honest, and this is more my personal take on it than the official take from the project, and I'm one of those folks that are generally against coding assistants ;)

When submitting a PR to Keycloak you need to sign the Developer Certificate of Origin [1], and as you don't know the source of origin of the code that GitHub Copilot is trained on I'm not sure if you can actually sign-off properly on the code.

There's also the second part that GitHub Copilot does not create the most maintainable or smart code, so the code quality may not be quite up to par, and when as a contributor you haven't written the code yourself it may complicate the review process.


--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/keycloak-dev/3bdf81f2-625e-41ec-a453-f41e78fd9a43n%40googlegroups.com.

Jon Koops

unread,
Nov 6, 2024, 6:31:49 AM11/6/24
to stho...@redhat.com, tero....@gmail.com, Keycloak Dev
Personally, I am against writing large swaths of code using code assistants. They are error prone due to the nature of their design, and simply try to predict what comes next, even if it is factually wrong. That being said, I use GitHub Copilot in my IDE to write code faster, for the next couple of lines it generally offers suggestions that are superior to what regular code completion can offer. This is however just to more rapidly write code that I had in mind anyways. Sometimes it is also useful to query an assistant to see if a section of code can be improved in some way, I do this in places where I don't want to spend 15 minutes digging through Stack Overflow or documentation and there is already a high level of certainty.

So basically, as usual "it depends". I don't trust predictive text algorithms to write good code, I see it as a tool that can be used for very specific use cases that accelerate my daily workflow.


Tero Saarni

unread,
Nov 16, 2024, 2:06:09 AM11/16/24
to Jon Koops, stho...@redhat.com, Keycloak Dev
Thanks Jon and Stian for great answers!

I agree with the use cases Jon mentioned.  Assistans can be useful when you already know what you are going to do, and use it to help you arrive there faster.  It is a bit like being able to recall details in a blink of an eye and being able to write super fast with "auto-complete on steroids" that automatically adapts to the context. 

I also believe generating larger chunks of code isn’t a good idea and I doubt it will ever be possible with the LLM approach, given how programming works today - which is more than repeating known patterns of text.  In addition, the developer needs to be able to explain and justify any part of their code, which would not be likely for this use case.

While not directly addressing the DCO question, a related safeguard with GitHub Copilot is the option to block suggestions that match known code.  A similar feature could also be useful for handwritten code! :-)

--
Tero

Reply all
Reply to author
Forward
0 new messages