Notice: Function amp_is_available was called incorrectly. `amp_is_available()` (or `amp_is_request()`, formerly `is_amp_endpoint()`) was called too early and so it will not work properly. WordPress is currently doing the `amp_init` hook. Calling this function before the `wp` action means it will not have access to `WP_Query` and the queried object to determine if it is an AMP response, thus neither the `amp_skip_post()` filter nor the AMP enabled toggle will be considered. It appears the plugin with slug `schema-and-structured-data-for-wp` is responsible; please contact the author. Please see Debugging in WordPress for more information. (This message was added in version 2.0.0.) in /home/u885321871/domains/fintechinshorts.com/public_html/wp-includes/functions.php on line 6114

Notice: Function amp_is_available was called incorrectly. `amp_is_available()` (or `amp_is_request()`, formerly `is_amp_endpoint()`) was called too early and so it will not work properly. WordPress is currently doing the `amp_init` hook. Calling this function before the `wp` action means it will not have access to `WP_Query` and the queried object to determine if it is an AMP response, thus neither the `amp_skip_post()` filter nor the AMP enabled toggle will be considered. It appears the plugin with slug `schema-and-structured-data-for-wp` is responsible; please contact the author. Please see Debugging in WordPress for more information. (This message was added in version 2.0.0.) in /home/u885321871/domains/fintechinshorts.com/public_html/wp-includes/functions.php on line 6114

Notice: Function amp_is_available was called incorrectly. `amp_is_available()` (or `amp_is_request()`, formerly `is_amp_endpoint()`) was called too early and so it will not work properly. WordPress is currently doing the `init` hook. Calling this function before the `wp` action means it will not have access to `WP_Query` and the queried object to determine if it is an AMP response, thus neither the `amp_skip_post()` filter nor the AMP enabled toggle will be considered. It appears the plugin with slug `schema-and-structured-data-for-wp` is responsible; please contact the author. Please see Debugging in WordPress for more information. (This message was added in version 2.0.0.) in /home/u885321871/domains/fintechinshorts.com/public_html/wp-includes/functions.php on line 6114

Notice: Function amp_is_available was called incorrectly. `amp_is_available()` (or `amp_is_request()`, formerly `is_amp_endpoint()`) was called too early and so it will not work properly. WordPress is currently doing the `init` hook. Calling this function before the `wp` action means it will not have access to `WP_Query` and the queried object to determine if it is an AMP response, thus neither the `amp_skip_post()` filter nor the AMP enabled toggle will be considered. It appears the plugin with slug `schema-and-structured-data-for-wp` is responsible; please contact the author. Please see Debugging in WordPress for more information. (This message was added in version 2.0.0.) in /home/u885321871/domains/fintechinshorts.com/public_html/wp-includes/functions.php on line 6114
GitHub Copilot can now tell developers when its suggestions match code in a public repository | Fintech InShorts: Latest fintech news, analysis by experts
Monday, December 23, 2024

GitHub Copilot can now tell developers when its suggestions match code in a public repository

GitHub Copilot has changed how developers write their code. However, it can also create issues when it creates code similar to what’s already available in another public repository. In 2022, GitHub launched a feature that allowed users to block suggestions of matching public code automatically. According to a GitHub spokesperson, this system would trigger less than 1% of the time. But sometimes, developers may want to see what these code fragments are — either to use them (within the licensing restrictions set up by their companies) or to maybe use the entire library this snippet came from.

So to find a middle ground, GitHub today launched a private beta of a code referencing feature for GitHub Copilot that will give developers this choice. With code referencing turned on, Copilot won’t automatically block any matching code it generates but instead shows it to developers in a sidebar and lets them decide what to do with it. Over time, this feature will also come to Copilot Chat.

Image Credits: GitHub

GitHub previewed this feature last November but it clearly took a while to release it.

As GitHub CEO Thomas Dohmke told me, Microsoft, GitHub and most Copilot enterprise customers were using the original blocking feature, but he also noted that it’s a bit of a blunt tool. “It gives you little control to decide for yourself whether you actually want to take that code and attribute it back to an open source license. It doesn’t actually let you discover that there might be a library that you could use instead of synthesizing code,” he told me. “It prevents you from exploring these libraries and submitting pull requests. You might be reproducing everything that already exists in some open source repo.”

Image Credits: GitHub

Dohmke pointed out that this often applies to common computer algorithms, like sorting, which tend to exist in many different places. Now, developers can either reject the code, use it directly — assuming the library makes that possible — or have Copilot rewrite the code so it doesn’t match the original code anymore.

As of now, it’s not possible to only see results that match specific licenses, but the team is actively looking for feedback to see if that is a feature users are asking for.

“We’re letting people understand the match and then go on and explore or go and make the right decision,” Dohmke said. “I think it fills the gap that the original solution had.”

The code referencing feature also tends to fire more often when there isn’t a lot of context for Copilot to work with. When Copilot can see a lot of context from the existing code you are working on, it’s unlikely to produce a suggestion that matches public code. But when you’re just getting started, it’s significantly more likely to generate matching code.

At the core of this is a very fast search engine (GitHub says it wants to keep latency down to 10-20ms) that can quickly find the matching code and its license. As of now, the matching code snippets are listed in the order the search engine finds them. In its original announcement from last year, GitHub said that developers should have the “ability to sort that inventory by repository license, commit date, etc.,” so I expect it’ll add this functionality later.

source

Hot this week

Banking as a Service: Meaning, Examples, Benefits and Future

The push for open banking has led to a...

Best fintech blogs and websites

Fintech (financial technology) has been an interesting part of...

What is Fintech?

Fintech: A term used to refer to innovations in...

How to buy shares online

Buying shares online in India has come a long...

Is it worth investing in life insurance over 60?

Is it worth investing in life insurance over 60? As...

Singapore-based fintech start-up WSPN bags $30m seed funding

WSPN (Worldwide Stablecoin Payment Network), a Singapore-based stablecoin...

Mastercard set to lay off around 3% of global workforce

Mastercard plans to cut around 3% of its...

HSBC reportedly considering sale of its South African business

HSBC Holdings is reportedly considering selling its South...

USAA president and CEO Wayne Peacock to retire in 2025

Wayne Peacock, President and CEO of USAA, plans...

Singapore’s Valverde taps Broadridge for investment management solution

Valverde Investment Partners, a new Singapore-based investment firm...

US fintech Amount lands $30m in fresh funding to advance AI capabilities

Funding Round: Amount, a digital origination and decisioning...

Sharon Naidoo named new TransUnion CFO for the UK and Europe

Appointment: Sharon Naidoo has been appointed as the...

Related Articles

Popular Categories

spot_imgspot_img