8ChatGPT Prompts for Programming
ALONG WITH THE skills you've read about in other chapters, ChatGPT is pretty good at programming. That might seem strange; but ChatGPT is a large language model, and programs are written in various programming languages, most of which obey far more formal structures than English and the other human languages that ChatGPT handles so well.
If you're a programmer or you work in software development, try integrating ChatGPT into your workflow and see what it can do for you. Even if your interest in programming is casual and you just need to hack together a quick-and-dirty Word VBA macro or a Python script to perform a one-time task, ChatGPT may be able to save you time and effort.
Let's start with the $64 million question …
Which Programming Languages Can ChatGPT Help You With?
The short answer is: most of them. Python, Java, JavaScript, C, C++, C#, Ruby, PHP, Swift, Go, R, SQL, TypeScript, VBA, Rust, and MATLAB—ChatGPT is happy to help you with all of these, and more.
Beyond these programming languages, ChatGPT can help with shell scripting using tools such as Bash and PowerShell. It can also assist you with HTML and CSS, which aren't really programming languages but are universally used for websites. (Look back to Chapter 7 for more on HTML and CSS.)
As of this writing, ChatGPT's training data runs up to September 2021, so ChatGPT is best informed about programming languages that were current then and before. If you're working with newer programming ...
Get Killer ChatGPT Prompts now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.