How to use ChatGPT? A developer's guide

Article updated on Saturday, March 16, 2024.

How to use ChatGPT? A developer's guide

What is Chat GPT? How do I use it? Find out all the answers to your questions, examples of use and much more in this guide.

Sometimes, technology gradually settles into our lives and we get used to it over time.

And then sometimes technology takes a massive leap forward and it feels like there was a world before and a world after this technology.

On November 30, 2022 ChatGPT arrived on the internet and shook things up by gaining 1 million users in just 5 days!

ChatGPT is an interface that provides access to an intelligence that has a learning model that has been trained by browsing the web. The tool offers a conversational type of chat to best answer all questions.

At the end of this article, you will know:

  • How to use Chat GPT properly?
  • How does artificial intelligence work?
  • How to use Chat GPT to make money?
  • How do developers use Chat GPT to (learn to) code?

Let’s start learning about Chat GPT with this ultimate guide to OpenAI’s revolutionary tool!

How to start using ChatGPT?

To start using ChatGPT there is only one site: the official site of ChatGPT from OpenAI.

⚠️ Be careful not to go to sites that pretend to be OpenAI and ask you for money.

💡 OpenAI is an American company founded by Elon Musk and Sam Altman in 2015 in San Francisco, California. Its goal is to create advances in artificial intelligence. Its most famous services are DALL-E 2, GPT-3 and ChatGPT.

No need to install anything, Chat GPT is a web app that runs exclusively on your internet browser.

Create an OpenAI account if you don’t already have one.

You can start using OpenAI right away once your account has been created and verified.

Go to the official ChatGPT website and you can start asking questions.

ChatGPT is an artificial intelligence called conversational. So you can have a real conversation with ChatGPT. It remembers the questions you just asked and you can bounce back on what it answers.

If you ask a question and you want to go further in your research or you want to clarify your question.

As you can see, I first ask him a question that has no answer “What is the best programming language?“.

To clarify my question, I answer “What about for the web?” and ChatGPT understands that the context is still my search for the best language.

So I didn’t need to ask him what the best language was for developing web sites and applications.

Why use Chat GPT?

ChatGPT is a great learning tool and it can potentially save you time in some of your daily tasks.

With it, you can find inspiration for the content you create, recipes with the food you have, specific answers to concepts with the ability to have a deeper conversation and bounce off answers with other questions.

In short, the limit is your imagination.

I would say that GPT Chat is particularly powerful for finding factual answers that don’t require judgment or human thought.

If you are learning to code or are already a developer, ChatGPT will save you time writing and debugging your code.

How does ChatGPT work?

ChatGPT uses a mix of supervised learning and reinforcement learning to refine ChatGPT. But it is the reinforcement learning that makes ChatGPT truly unique.

The tool works by using a neural network called Transformer.

It is this learning that allows ChatGPT to generate sentences that sound more or less natural and coherent.

How to generate text with ChatGPT?

Simply type text into the text bar (the prompt) in ChatGPT to start generating text.

Once the text is generated, you can ask ChatGPT more questions, ask for more examples, ask for clarification on its answer or just ask more questions.

How do I create images with Chat GPT?

No, you cannot create images with ChatGPT. Chat GPT creates text only. OpenAI’s artificial intelligence image generation service is called DALL-E 2.

💡 Want to learn more about it? Then my article about AI image generators will surely interest you!

How to ask good questions to ChatGPT?

Asking the right questions is the most important skill when using a service like ChatGPT.

It is your ability to know how to ask the right questions to the artificial intelligences that will define the quality of your answers as it is the case for Google search.

What is the prompt on ChatGPT?

A prompt is the text bar where you can ask questions to ChatGPT. When we talk about prompt, we can talk about this text bar or simply about the question you ask ChatGPT.

Asking good questions to ChatGPT is so valuable that marketplaces have started to appear like PromptBase which offers to buy prompts for ChatGPT (GPT-3 on their site) but also for image generators like DALL-E, MidJourney or even Stable Diffusion

How to write a good prompt for ChatGPT ?

To write a good prompt for ChatGPT, there are a few rules to follow:

  • Write a clear and precise prompt: avoid long sentences with several components in them. Prefer shorter sentences expressing a single point, they are easier to understand for AIs (and humans 😁).
  • Explain context: adding specific context will help ChatGPT provide a better response. For example, if you are new to the question being asked, you can tell the AI and it will adapt its answer.
  • The right choice of words: using simple words guarantees a better quality of answer. Do not use slang, or pantonyms like “stuff”.
  • Avoid certain types of questions: ChatGPT is designed to give you factual answers that you can agree on. You may be disappointed if you compose your prompts with questions that require judgmental answers. So avoid closed questions (with yes/no as a possible answer) or questions that are too broad, such as “What is the meaning of life?”, “What do you think about this biased topic that divides humanity?

What are the limitations of ChatGPT?

As I write this article, in early 2023, ChatGPT is still quite limited in some respects.

First of all you should know that all the knowledge of Chat GPT stops somewhere in 2021, the learning model had access to the content of the internet only until this year. So you will not find all the results for 2022 and beyond.

Also, we can feel in his answers that ChatGPT gives us average answers, that someone average could give. The answers remain politically correct and without real interesting nuances.

When asked “Why is X programming language so popular?”, the AI gives us similar answers for each language, no matter if it is Python, JavaScript, Java, …

Don’t think that you can type in the statement of the essay you have to write or the title of a blog post and ChatGPT will give you content that you can just copy and paste. Its content is going to be classified as AI-generated directly by either Google or your teacher 😛.

What are the advantages of ChatGPT?

  • ChatGPT works particularly well for code (more on that below)
  • ChatGPT is free as I write this article
  • You can have real conversations with ChatGPT

What are the drawbacks of ChatGPT?

  • ChatGPT will give you average answers, fair answers but not amazing answers
  • Google does not like the content generated by ChatGPT
  • Tools are already able to see if text was written by a human or by an AI
  • StackOverflow prohibits replies with text and/or code from ChatGPT

What learning model does Chat-GPT use?

ChatGPT uses a series of models and is known as “GPT 3.5”, it is composed of learning models text-davinci-003 for text and code-davinci-002 for code.

So we have different AIs for code and for text. This may be why ChatGPT is so powerful in helping us with code but sometimes leaves something to be desired in its textual responses 🤷.

What version of GPT does ChatGPT use?

The version of GPT (Generative Pretrained Transformer-3) used by ChatGPT is GPT-3.5 which finished training in early 2022.

💡 Incidentally, it is because ChatGPT finished running through text and code sources in early 2022 that ChatGPT is said to give valid results only until 2021 (inclusive).

The predecessor of ChatGPT is called InstructGPT which uses the GPT-3 learning model. The difference between Instruct GPT and Chat GPT is impressive, look forward to the next OpenAI conversational AI release that uses GPT-4!

What is GPT-4?

GPT-4 is the next version of GPT. The AI will have been trained on over 100,000 billion parameters (compared to 175 billion for GPT-3). **GPT-4 should arrive in the first half of 2023.

How to make money with ChatGPT?

It is quite possible to make money online with ChatGPT. You can offer services that you automate with artificial intelligence or offer products coded with Chat GPT or using AI in general.

Here are some ideas to make money with ChatGPT 💰:

  • 1. Create a mobile app with ads: You can ask ChatGPT to code a simple app like a currency converter or a simple calculator (of BMI for example). You just have to add your Google AdMob banner and publish the application on the Google Play Store and Apple App Store.

  • 2. Use ChatGPT or GPT-3 API to create your own product: Another way to make money by leveraging artificial intelligence is to create your own product or application that uses AI. You can be sure that many coders are creating revolutionary projects using the various AIs that have emerged in recent months. So it is possible to create a SaaS based on AI or other products that can benefit from this technology.

  • 3. Offer services with the help of ChatGPT: The service provider industry will certainly be altered with the use of AI. Specifically, there are those who will be able to use Chat GPT and other artificial intelligence as a real leverage and offer ever more competent services on sites like Fiverr. And then there are the others who won’t get on board and will be left behind by the competition.

  • 4. Become an expert on AI tools and sell your prompts: Knowing what the right questions to ask ChatGPT are is the real skill that allows you to have useful results or end up totally off the mark. You can become an AI prompt expert and sell the question titles you ask on marketplaces like PromptBase.

How to use Chat GPT to learn to code?

You can use ChatGPT to learn to code by asking it specific questions based on your level. It is the conversational aspect that makes AI a powerful tool for learning to code. You can ask for an explanation of code snippets or even computer science concepts.

So it’s a really useful tool for people who are learning to code or when you want to get help to code small programs. It is particularly interesting for coding. Artificial intelligence can serve as a real “Pair programming” partner except that this learning partner never gets tired 😁 !

How does Chat-GPT help developers?

AI can save us time but it’s not really revolutionary if we take into account that it’s been months since GPT3 is available and we also have access to Github Copilot for years now.

Don’t expect too much from Chat GPT even if it’s a great tool to save time and simplify our daily life.

Also, if like me you systematically forget the exact syntax to make loops in Shell language 🤯 or you want to make quite complex regexes, then ChatGPT can save you time by giving you a precise answer directly!

ChatGPT saves me a lot of time on a daily basis, here’s how I use it in my business as a professional developer:

Explain code

You have legacy code written by a developer you can’t ask questions to? Don’t understand a piece of code? Chat GPT can explain it to you.

Prompt 👇

Explain this code to me:

(The code you want him to explain to you)

2. Write comments

Adding comments when working in a team is important.

Writing your own comments will be more effective but you can use AI when you are not very inspired.

Prompt 👇

Write comments for this code:

(The code)

3. Writing unit tests

Don’t like writing tests much? ChatGPT can generate them for you! You may need to refine the unit tests it gives you, but Chat GPT should give you a good base to start with.

Unit tests often fall by the wayside due to lack of time (or priority 🤔 ).

You have no more excuses with ChatGPT! Ask it to write test suites from your code. And who knows, maybe you’ll be inspired to write more tests or improve the ones generated by the AI.

Prompt 👇

Write unit tests to check (what you want to test) with (the test library) for this code:

(the code)

4. optimize your code

Much like a spell checker for text, you can use ChatGPT to find bugs and check the style of your code.

You can ask Chat GPT how to optimize code and it will probably find a way to optimize your coding.

Prompt 👇

Check and rewrite this code following (the style):

(The code you want him to check)

5. Find errors in your code

In addition to optimizing your code, ChatGPT allows you to find errors. If you’ve ever pulled your hair out because you couldn’t find an obvious error once debugged, then the AI will bring you a fresh look and find your bug instantly.

Prompt 1 👇

What is the problem in my Python code: prin("Hello, world!")

You can also Bounce on what Chat GPT just told you

Prompt 2 👇

So the prin function doesn’t exist in Python?

6. Generate program bases (or entire programs!)

Rather than starting with an empty file, you can ask ChatGPT to create a code base by specifying the language and libs or frameworks you want to use.

Prompt 1 👇

How to make a “Hello, world!” in Python?

Prompt 2 👇

Generate a boilerplate for (do what you want) in (programming language + libraries you need)

7. Write regex or shell scripts

Most devs don’t use regexes and shell scripts every day. It becomes easy to forget their syntax that you will forget as soon as your task is done.

Prompts 1 👇

Create a shell script for (what you want to do)

Prompts 2 👇

Create a regex for (what you want to match)

8. Learn to code with ChatGPT

Finally, ChatGPT can really help you learn to code.

If you are an absolute beginner, you can ask simple questions to get simple explanations of code or computer concepts.

If you are learning a new programming language, you can ask the AI to explain this new language to you by comparing it to a language you already know.

Prompt 👇

  • Explain (what you want to understand) to someone who doesn’t know anything about it

  • How does (concept) work in (language you are learning) compared to (language you already know)?

9. Generate product ideas

Chat-GPT can generate business ideas, start-ups, applications, exercises and projects that you can code. If you already have a product, you can also ask it how to improve it or monetize it for example. ChatGPT will give you advice based on similar projects that already exist!

⚠️ Never use code as it is generated by ChatGPT in production, the license and rights that we have on the content created remains unclear.

Do not post the code of the company where you work in ChatGPT for intellectual property reasons.

Also, don’t give sensitive content like your API keys and passwords, we don’t know how they are stored and used.

What programming language was ChatGPT coded in?

ChatGPT was coded in Python.

What are the alternatives to ChatGPT?

There is no serious alternative to ChatGPT at the time of writing this article.

There are AI text generators but no real interactive chat like ChatGPT.

What is my developer opinion about ChatGPT?

As a developer, I find the ChatGPT technology fascinating. It’s super useful to be able to type in bits of code and ask what’s wrong with it. Or ask for a code base for a little program you’re trying to code.

ChatGPT will make learning programming easier and more accessible and that’s great news!

As a blogger, I will not be using content generated by Chat GPT. From what I’ve seen, the content is not human, qualitative, lively or dogmatic enough. We try to bring value with our unique voice when we create content on the internet.

What do you think of ChatGPT?

There you go, you know pretty much everything there is to know about ChatGPT! 🎉

From how developers use ChatGPT to how to make money with it, it’s now up to you to play around with your imagination.

Understanding artificial intelligence and knowing how to use it are essential skills in 2023.

It’s not too late to get started and apply your ChatGPT knowledge to come up with project ideas, optimize your code, and become much more efficient.


Thomas Collart

Hey, I'm Thomas 👋 Here, you'll find articles about tech, and what I think about the world. I've been coding for 20+ years, built many projects including Startups. Check my About/Start here page to know more :).