{"id":623114,"date":"2023-03-29T09:49:39","date_gmt":"2023-03-29T14:49:39","guid":{"rendered":"https:\/\/news.sellorbuyhomefast.com\/index.php\/2023\/03\/29\/how-chatgpt-will-become-a-programmers-best-friend\/"},"modified":"2023-03-29T09:49:39","modified_gmt":"2023-03-29T14:49:39","slug":"how-chatgpt-will-become-a-programmers-best-friend","status":"publish","type":"post","link":"https:\/\/newsycanuse.com\/index.php\/2023\/03\/29\/how-chatgpt-will-become-a-programmers-best-friend\/","title":{"rendered":"How ChatGPT will become a programmer\u2019s best friend"},"content":{"rendered":"<div>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.computerweekly.com\/rms\/onlineimages\/ai_a205627811_searchsitetablet_520X173.jpg\" data-credit=\"sdecoret - stock.adobe.com\"  width=\"520\" height=\"173\" alt><\/p>\n<p>sdecoret &#8211; stock.adobe.com<\/p>\n<\/p><\/div>\n<div id=\"content-header\">\n<h2>ChatGPT has shown it can produce code. It can also identify bugs and even figure out what a code snippet is trying to do<\/h2>\n<\/div>\n<div id=\"content-center\">\n<ul>\n<li><i data-icon=\"1\"><\/i><\/li>\n<li><i data-icon=\"2\"><\/i><\/li>\n<\/ul>\n<div id=\"contributors-block\">\n<p><img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/rms\/computerweekly\/Cliff-Saran-Sep-2022-140x180px.jpg\" alt=\"Cliff Saran\">\n\t\t\t\t\t<\/p>\n<p><span>By<\/span><\/p>\n<ul>\n<li>\n\t\t\t\t\t<a href=\"https:\/\/www.techtarget.com\/contributor\/Cliff-Saran\">Cliff Saran,<\/a><br \/>\n\t\t\t\t\t\t<span>Managing Editor<\/span>\n\t\t\t\t\t\t<\/li>\n<\/ul>\n<p>\n\tPublished: <span>28 Mar 2023 15:00<\/span>\n<\/p>\n<\/div>\n<section id=\"content-body\">\n<p>Researchers from Trustwave\u2019s Spiderlabs have tested how well ChatGPT can analyse source code and its suggestions for making the code more secure.<\/p>\n<p>The initial tests involved looking at whether ChatGPT can <a href=\"https:\/\/www.techtarget.com\/searchsecurity\/tip\/ChatGPT-cybersecurity-benefits-for-the-enterprise\">uncover buffer overflows in code<\/a>, which occurs when the code fails to allocate enough space to hold input data. \u201cWe provided ChatGPT with a lot of code to see how it would respond,\u201d the researchers said. \u201cIt often responded with mixed results.\u201d<\/p>\n<p>When asked how to make the code more secure, they said ChatGPT suggested increasing the size of the buffer. Other recommendations made by ChatGPT include using a more secure function for inputting data and dynamically allocating memory. The researchers found that ChatGPT could refactor the code based on any of the fixes it suggested, such as by using dynamic memory allocation.<\/p>\n<p>According to the researchers, ChatGPT did quite a good job at <a href=\"https:\/\/www.computerweekly.com\/news\/365534082\/Europol-warns-cops-to-prep-for-malicious-AI-abuse\">identifying potential issues<\/a> in the sample code. \u201cThese examples were chosen because they are relatively unambiguous, so ChatGPT would not have to infer much context beyond the code that it was given,\u201d they said.<\/p>\n<p>However, When supplying it with larger code blocks or less straightforward issues, it didn\u2019t do very well at spotting them. Nevertheless, the researchers noted that human programmers would have similar issues tackling errors in more complex code. They said that for the best results, ChatGPT needs more user input to elicit a contextualised response to illustrate the code\u2019s purpose. In spite of the limitations, the researchers believe it can be used to support analysis of source code.<\/p>\n<p>Trustwave said that while static analysis tools have been used for years to identify vulnerabilities in code, such tools have limitations in terms of their ability to assess broader security aspects \u2013 sometimes reporting vulnerabilities that are impossible to exploit. The researchers reported that ChatGPT demonstrates greater contextual awareness and is able to generate exploits that cover a more comprehensive analysis of security risks. \u201cThe biggest flaw when using ChatGPT for this type of analysis is that it is incapable of interpreting the human thought process behind the code,\u201d they warned.<\/p>\n<p>Karl Sigler, threat intelligence manager at Trustwave, said: \u201cChatGPT is OK at code. It\u2019s better than a junior programmer and can be a programmer\u2019s best friend.\u201d He added that since very few developers start building applications from scratch, ChatGPT offers a way for them to supplement the software development process. For instance, he believes it could help developers understand the application programming interfaces and functionality available in new programming libraries. Given it has been designed to understand human language, Sigler sees an opportunity for ChatGPT to sit behind meetings between business people and developers.<\/p>\n<p>Microsoft recently demonstrated integration of <a href=\"https:\/\/www.computerweekly.com\/news\/365532874\/Microsoft-trials-ChatGPT-to-boost-enterprise-productivity\">ChatGPT with its Copilot<\/a> product running with the Teams collaboration tool, where the AI keeps track of the discussion, and takes notes and action points. Sigler believes such technology could be applied to help generate a formal specification for an application development project.<\/p>\n<p>This would avoid any misunderstanding that can easily creep in during such discussions. ChatGPT could be used, in theory, to check submitted code against the formal specification and help both the client and the developer to see if there are deviations between what has been delivered and their understanding of the formal specification. Given its ability to understand human language, Sigler said there is a lot of potential to use ChatGPT to help to check misinterpretation in specification documentation and compliance policies.<\/p>\n<p>The researchers from Trustwave said ChatGPT could be particularly useful for generating skeleton code and unit tests since those require a minimal amount of context and are more concerned with the parameters being passed. This, they pointed out, is a task ChatGPT excelled at in their tests. \u201cIt is flexible enough to be able to respond to many different requests, but it is not necessarily suited to every job that is asked of it,\u201d they said.<\/p>\n<p>Over the next two to five years, Sigler expects ChatGPT, and other generative AI systems, to become part of the software development lifecycle. One example of how this is being used today is a plugin for the IDA binary code analysis tool. IDA Pro converts binary code into human-readable source code.<\/p>\n<p>However, without documentation, it can take a long time to reverse engineer the source code to understand what it has been designed to do. A <a href=\"https:\/\/github.com\/JusticeRage\/Gepetto\">Github project, called Gepetto<\/a>, runs a Python script, using OpenAI\u2019s gpt-3.5-turbo large language model, which the project\u2019s maintainer said is able to provide meaning to functions decompiled by IDA Pro. For instance, it can be used to ask gpt-3.5-turbo to explain what a function in the decompiled code does.<\/p>\n<p>According to Sigler, ChatGPT also allows the open source community to automate some of the auditing effort needed to maintain secure and manageable code.<\/p>\n<\/section>\n<section id=\"DigDeeperSplash\">\n<h4>\n\t\t\t<i data-icon=\"m\"><\/i>Read more on Artificial intelligence, automation and robotics<\/h4>\n<ul>\n<li><a id=\"DigDeeperItem-1\" href=\"https:\/\/www.techtarget.com\/searchenterpriseai\/news\/365533412\/ServiceNows-latest-Now-Platform-focuses-on-AI-automation\"><br \/>\n\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/rms\/onlineimages\/ai_a194810146_searchsitetablet_520X173.jpg\" srcset=\"https:\/\/cdn.ttgtmedia.com\/rms\/onlineimages\/ai_a194810146_searchsitetablet_520X173.jpg 960w,https:\/\/cdn.ttgtmedia.com\/rms\/onlineimages\/ai_a194810146.jpg 1280w\" alt ><\/p>\n<h5>ServiceNow&#8217;s latest Now Platform focuses on AI, automation<\/h5>\n<div>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/rms\/dataCenter-Virtualization\/scannell_ed.jpg\" alt=\"EdScannell\">\n\t\t\t\t\t\t\t\t\t<\/p>\n<p><span>By: <span>Ed\u00a0Scannell<\/span><\/span>\n\t\t\t\t\t\t\t<\/p>\n<\/div>\n<p>\t\t\t\t<\/a><\/li>\n<li><a id=\"DigDeeperItem-2\" href=\"https:\/\/www.techtarget.com\/searchsecurity\/tip\/ChatGPT-cybersecurity-benefits-for-the-enterprise\"><br \/>\n\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/rms\/onlineimages\/ai_a205627811_searchsitetablet_520X173.jpg\" srcset=\"https:\/\/cdn.ttgtmedia.com\/rms\/onlineimages\/ai_a205627811_searchsitetablet_520X173.jpg 960w,https:\/\/cdn.ttgtmedia.com\/rms\/onlineimages\/ai_a205627811.jpg 1280w\" alt ><\/p>\n<h5>4 ChatGPT cybersecurity benefits for the enterprise<\/h5>\n<div>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/rms\/onlineImages\/krishnan_ashwin.jpg\" alt=\"AshwinKrishnan\">\n\t\t\t\t\t\t\t\t\t<\/p>\n<p><span>By: <span>Ashwin\u00a0Krishnan<\/span><\/span>\n\t\t\t\t\t\t\t<\/p>\n<\/div>\n<p>\t\t\t\t<\/a><\/li>\n<li><a id=\"DigDeeperItem-3\" href=\"https:\/\/www.techtarget.com\/whatis\/definition\/ChatGPT\"><br \/>\n\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/visuals\/digdeeper\/3.jpg\" srcset=\"https:\/\/cdn.ttgtmedia.com\/visuals\/digdeeper\/3_searchsitetablet_520X173.jpg 960w,https:\/\/cdn.ttgtmedia.com\/visuals\/digdeeper\/3.jpg 1280w\" alt ><\/p>\n<h5>ChatGPT<\/h5>\n<div>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/rms\/onlineimages\/hetler_amanda.jpg\" alt=\"AmandaHetler\">\n\t\t\t\t\t\t\t\t\t<\/p>\n<p><span>By: <span>Amanda\u00a0Hetler<\/span><\/span>\n\t\t\t\t\t\t\t<\/p>\n<\/div>\n<p>\t\t\t\t<\/a><\/li>\n<li><a id=\"DigDeeperItem-4\" href=\"https:\/\/www.techtarget.com\/searchsoftwarequality\/news\/365531781\/ChatGPT-API-sets-stage-for-new-wave-of-enterprise-apps\"><br \/>\n\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/rms\/onlineimages\/chatbot_g1077519886_searchsitetablet_520X173.jpg\" srcset=\"https:\/\/cdn.ttgtmedia.com\/rms\/onlineimages\/chatbot_g1077519886_searchsitetablet_520X173.jpg 960w,https:\/\/cdn.ttgtmedia.com\/rms\/onlineimages\/chatbot_g1077519886.jpg 1280w\" alt ><\/p>\n<h5>ChatGPT API sets stage for new wave of enterprise apps<\/h5>\n<div>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/rms\/dataCenter-Virtualization\/pariseau_beth.jpg\" alt=\"BethPariseau\">\n\t\t\t\t\t\t\t\t\t<\/p>\n<p><span>By: <span>Beth\u00a0Pariseau<\/span><\/span>\n\t\t\t\t\t\t\t<\/p>\n<\/div>\n<p>\t\t\t\t<\/a><\/li>\n<\/ul>\n<\/section>\n<\/div>\n<p><a href=\"https:\/\/www.computerweekly.com\/news\/365534138\/How-ChatGPT-will-become-a-programmers-best-friend\" class=\"button purchase\" rel=\"nofollow noopener\" target=\"_blank\">Read More<\/a><br \/>\n Camellia Byron<\/p>\n","protected":false},"excerpt":{"rendered":"<p>sdecoret &#8211; stock.adobe.com ChatGPT has shown it can produce code. It can also identify bugs and even figure out what a code snippet is trying to do By Cliff Saran, Managing Editor Published: 28 Mar 2023 15:00 Researchers from Trustwave\u2019s Spiderlabs have tested how well ChatGPT can analyse source code and its suggestions for making<\/p>\n","protected":false},"author":1,"featured_media":623115,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[116428,27054,46],"tags":[],"class_list":["post-623114","post","type-post","status-publish","format-standard","has-post-thumbnail","category-chatgpt","category-programmers","category-technology"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/posts\/623114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/comments?post=623114"}],"version-history":[{"count":0,"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/posts\/623114\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/media\/623115"}],"wp:attachment":[{"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/media?parent=623114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/categories?post=623114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/newsycanuse.com\/index.php\/wp-json\/wp\/v2\/tags?post=623114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}