Using ChatGPT to Write Code

If you are interested in the impacts of AI on productivity, intellectual property rights and cybersecurity, the following video from Dave Plummer on YouTube can provide a brief demonstration from a developer’s perspective of what it is like to interact with ChatGPT to write source code.

In his demo, Dave attempts a few different tasks:

  • creating a program to convert decimal values into Roman numerals using Python - a modern language
  • creating that same program using Commmodore BASIC, a very dated language
  • creating a program to count all prime numbers between 1 and 100 million and time the process
  • doing the same thing but optimizing the process across hardware CPU threads
  • doing the same thing but offloading the calculations to a dedicated GPU chip

The demo will provide a good feel for how much specificity is required in defining the problem. As the examples escalate in complexity, they also make it clear that using ChatGPT is much like “Google hacking”, the process we have all learned since 1998 that improves search results by spicing search terms with enough extra information that is more unique to our preferred answer to eliminate duplicate / unwanted results. Of course, these examples also point out that the semantics of software development atop complex operating systems and hardware capabilities unimaginable even ten years ago require tremendous expertise in posing the prose problem to ChatGPT. In these examples, Dave asks for refinements about use of shared memory between the CPU and GPU that frankly most developers don’t understand in the first place and would not likely request or know how to describe.

The nitty gritty details in the demo are likely to be too technical for most interests here but seeing what the process is like does cut through much of the hype – pro and con – surrounding this technology. It IS here, it is GOING to be used HEAVILY and is GOING to have huge impacts on companies creating software products and companies dependent upon complex software for daily survival. For those in school planning on entering technical fields, this technology is definitely going to alter millions of career arcs – one way or another.

WTH

4 Likes

Holy crap. That’s all I can say about that. Very, very impressive.

Related, he can now use it directly within Visual Studio Code: https://github.com/features/copilot/

I had written this on Facebook just yesterday:

There was once a time, decades ago, when assembly code was thought to be the only way to program efficiently. But then Fortran happened, and for the first time a compiled language, at a higher level of abstraction, could out-perform assembly code written by skilled programmers. And it was easier to write.
Programming languages have evolved to higher and higher levels of abstraction. First with Fortran, then Pascal, C, Python. Then the 4GLs like SQL. They all translate a higher level language into lower level ones, all the way down to executable machine code. We are trending towards a time when natural language will be the ultimate high level programming language.

I feel even more strongly about this now. We are rapidly approaching the era of natural language as a programming language.

2 Likes

What does that do to the career field for such individuals? o.0

If all that would be required to write code is to be articulate…

1 Like

I’m 56, so not personally worried. But daughter is 11. Do I want her to become a programmer too? It’s seriously a difficult question to answer. I do not have an answer. But if “Prompt Engineer” becomes a valid job title…

9 Likes

If that becomes the standard the potential employee list would be reduced by half!!!

Soon after people will ask, “¿What is an ‘employee?’”

The Captain

1 Like