Friend or Foe Can Computer Coders Trust ChatGPT BBC

Friend or Foe: Can Computer Coders Trust ChatGPT? – BBC

  • By Sean McManus
  • technology reporter

1 hour ago

Image source, Justin Johnsonn

picture description,

Pietro Schirano asked ChatGPT to create Pong, Asteroids and Breakout for him

“It felt like magic to me,” says Pietro Schirano. “It scared me a bit because it was so good.”

He talks about the latest version of ChatGPT, an artificial intelligence (AI) tool. You input something and it forms an answer for you.

It is uncanny how human, friendly and intelligent the answers seem. Below that is an AI model called GPT-4.

Mr. Schirano, head of design at corporate finance firm Brex, has used ChatGPT to create computer programs.

“I want to build a Pong-like game,” he typed, referring to Atari’s 1970s table tennis game. “What is the best language for [use] so many people can try?”

ChatGPT not only recommended a programming language that runs in the browser (JavaScript), but also generated the code for a simple version of the game.

What would have taken an experienced developer half an hour to do, ChatGPT took 40 seconds. It worked just as well for the classic arcade games Breakout and Asteroids.

Image source, Getty Images

picture description,

Pong, played here at a trade fair in Cologne in 2019. ChatGPT quickly created a simple version of the game

There are many code samples online for these games, but ChatGPT doesn’t trawl the web for a ready-made answer.

Despite being built with massive amounts of web content, ChatGPT generates new text just for you by predicting the right answer.

“ChatGPT was able to understand my question about how I can promote this game,” says Mr. Schirano. “It has a lot of contextual understanding that someone who never developed couldn’t get from Google.”

With a search engine you would have to find out what programming language you use, how you use it and how to complete incomplete examples online. ChatGPT can give you all the game code along with instructions tailored to your needs.

“Now even someone who has no idea what they are doing can create a simple web app,” says Mr. Schirano.

Some say that recreating these old games was too easy because there are so many examples online.

So Mr. Schirano’s colleague Ammaar Reshi, Design Manager at Brex, pushed ChatGPT further. He asked to recreate an old PC game for which there is no example code online. It’s a 3D game called Skyroads where you drive a car along a road and jump over barriers.

ChatGPT knew about the game from their Wikipedia page and Mr. Reshi explained in detail how the game works. “There was so much back and forth with this one,” says Mr. Reshi. “Literally an hour to tweak this, tweak that.” He had to test the game, tell ChatGPT how to change gameplay, and redo it.

Despite this, Mr. Reshi was able to create an online 3D game despite not knowing the JavaScript language used to create it and without ChatGPT having access to sample code for this game.

These are small games and nobody is suggesting that ChatGPT will develop modern console games. But it could be used to create parts of a large game or to help create other software.

But despite the productivity improvements, some are reluctant to use AI for programming.

“ChatGPT’s risks to software development still outweigh the benefits,” said Tony Smith, chief technology officer at Rightly, an organization that helps people wipe their data from corporate databases. “The code that these AIs generate is often buggy or inefficient.”

Mr Smith asked ChatGPT to create code to find out how many days are in a given month. “The code looks great, but there’s a problem with the UK Daylight Saving Time, so it thinks March has 30 days,” he says. “There’s a subtle bug that pops up once a year.”

Others have found that AI-generated code can have security vulnerabilities. ChatGPT may model bad behavior it saw online, overlook vulnerabilities, or use outdated techniques. Also, ChatGPT has limited knowledge of events after 2021.

Business risk also increases when people are tempted to use code they don’t understand.

Image source, Alex Bartok

picture description,

Kevin Bocek says developers need to be accountable for AI-generated code

Kevin Bocek is Vice President, Security Strategy and Threat Intelligence at Venafi, a company that makes security software for authentication engines. He used ChatGPT to create Excel macros and PowerShell scripts, which are two different ways of giving a computer repeatable instructions. Hackers often use them to launch an attack.

“Now I have code that comes from ‘out there’ and I’m going to run it and I have no idea what it’s doing,” he says. “The possibility of more code coming in that could be malicious is now increased.”

While AI can be used to build code, it is always the developer’s responsibility to verify it at Venafi. “We take that very seriously,” he says. “Code is reviewed multiple times by humans. Ultimately, the professional developers are responsible and accountable.”

picture description,

Matthew Hunt (second from left) asks if ChatGPT could prevent him from expanding his skills

Herd, a performance marketing and web agency, creates slideshow-style elements on some of their websites. “Writing the JavaScript code for each section individually can be tedious, so ChatGPT really speeds up that process,” says Matthew Hunt, a junior web developer at Herd.

However, he worries that ChatGPT could also take away some of the satisfying work. “Part of the joy of development is learning exactly what a file does and how everything works,” he says. “If ChatGPT does this for us, we’re not really growing as developers.”

Dan Ciruli, vice president of technology at cloud management company D2iQ, sees things differently. Previously he worked at Google.

Google’s application programming interfaces (APIs) allow developers to connect their software to Google services. There were 200 APIs and seven supported programming languages, including Python. To provide instructions for each API in each language, Google would need to create 1,400 code examples.

“It’s something we’ve struggled with,” he says. “We just couldn’t create patterns everywhere [programming] Language. But when I got access to ChatGPT, the first thing I asked for was to show me how to call the Google Translate API in Python. Boom – there it was.”

The future of software development is likely to be a partnership between the developer and the AI ​​assistant, reflected in the name of a popular AI tool. GitHub Copilot is a commercial tool that autocompletes code while developers work. Code completion uses a faster but less accurate model than ChatGPT.

“Ideally, when you enter code, you get a new response every time you enter a character,” says GitHub CEO Thomas Dohmke.

Although Copilot has been enhanced to detect and block insecure code, people remain an essential safeguard. “Like any other coding tool, you should always use GitHub Copilot along with human code review, testing, and security tools,” says Mr. Dohmke.

Will AI code generation lead to job losses? Mr. Schirano and Mr. Reshi can both foresee that junior roles could be replaced as AI takes over repetitive programming work.

Manuel Doc is a frontend developer at user experience agency Illustrate Digital. “I was so amazed by ChatGPT’s code-level responses that I was afraid my job would soon be in jeopardy,” he says.

“However, during my 1-2-1 with our lead developer, he helped me understand that I’m not just being hired to write code, but to analyze problems and provide solutions that ChatGPT cannot provide. It was very comforting.”