Will ChatGPT replace StackOverflow?
Tags: gpt3, ai, stackoverflow, news
Published: 2022-12-05 07:30:00

If you are a developer, you already know StackOverflow.

### StackOverflow

The site that lets you find best practices for implementing certain features, or the solution to that obscure bug that only happens at 4 am on full moon days. Its takeover by Prosus for 1.8 billion dollars had made people cringe, but it is clear that so far no functionality or change that would degrade the user experience. has not been added.

### OpenAI & GPT-3

But, you may be less familiar with OpenAI and GPT-3. OpenAI is an AI research lab, which created GPT, an autoregressive language model that uses deep learning to produce human-like text. GPT-3 (the third iteration of GPT) can absorb billions of references, articles, images and data on different topics and then re-serve them in a form very close to human language.

Several services like Dall-E (a generator of images from text in English) have already been unveiled, the result each time being quite impressive.

### GPT-Chat

The latest service launched by OpenAI is GPT-Chat: accessible free of charge, it provides an answer to any type of question, in any field. The answers are each time precise and very detailed, as would be those of an expert in the field.

So when you ask GPT-Chat, how to browse an array of keys & values in JavaScript, here is its answer:


![Browse an array of keys & values in JavaScript](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kwayr561tley3vx37gap.png)

With a supporting example and explanation, the AI tells you the best solution to this common problem in JavaScript. The icing on the cake completes with a second solution.


![Use instead Object.entries](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7hg4ha9xvx6u61e2r6o0.png)

### Comparison GPT-Chat & StackOverflow

So why not systematically use it because unlike StackOverFlow, where you can sometimes be overwhelmed by the number of responses and differing opinions, GPT-Chat offers a complete, detailed solution, with more time running between the answer and the question. After entering your question, a few seconds are enough for the AI to offer you an answer; no need to navigate between several pages, and you have the possibility of directly copying the codes offered.

At the moment I see 3 main downsides to wider adoption:

### 1\. Greater rigor in typed text.

With GPT-Chat, you have to be precise. Because with one word, the answer changes completely. Let's ask the same question as before, but omitting a pronoun.


![A missed pronoun changes all. The solution only matches Javascript values arrays.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hyhl2z8pi6csojl01ri8.png)

To find you:

*   First question: How to iterate over <mark>a</mark> keys and values array in Javascript?
    
*   Second question: How to iterate over keys and values array in Javascript?
    

The proposed solution is valid only for simple arrays, consisting of a uniform list of elements, and with a little analysis, one can find inconsistency in it, even if the proposition is valid and will not throw exceptions.

Thanks to search engines, this situation is less frequent, because very often they redirect us to the right solution even in the event of a typo, or convoluted sentences.

### 2 - A less human explanation.

Consider the question with the most votes on StackOverflow.

*<mark>Why are operations on a sorted array faster than those on an unsorted array?</mark>*

Here is the answer from GPTChat.


![COncise but verbous and a little mechanic/scientific from GPTChat](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sxs2zn2a4ecemu0kh44b.png)

This answer is correct, but nothing more. If we understand the answer, it means that we didn't need to ask the question.

Comparing with the answer on StackOverflow.


![Answer with context explanationation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pou82lb8i046cuf07wyb.png)

Supporting image, the interlocutor first takes the time to pose the general context, with non-technical terms, before gradually bringing the subject back to the initial and final question to deepen the reflection.

Not all answers on StackOverFlow are (and do not need) to be so qualitative and well-detailed. But this example illustrates the interpretation of the question and can modify the way of answering.

The biggest difference is that the AI ​​is not able to determine the level of understanding of the interlocutor to adapt its response. It will probably explain in the same way and with the same terms, the theory of relativity; it does not matter if the interlocutor is a professor/researcher in physics, a student in physics, or a college student who wishes to document himself.

### 3 - Community, debate & contradictions.

Like it or not, StackOverFlow's greatest strength is its community. The platform is created and operates in such a way as to encourage and encourage the contribution of the greatest number.

On particular themes, the solution depends on many parameters. And this is where the multiple answers, the different opinions and the confrontation are useful because they allow the visitor to situate himself and choose by taking into account all the advantages and constraints of each solution.

The other strong point of StackOverFlow is peer validation. A solution proven and tested by thousands of other developers offers a greater guarantee.

### Different use cases.

StackOverFlow will never be dethroned.

Like Copilot, Intellisense, and advanced IDEs, GPTChat (even if it is not limited only to code) is only one more tool, in the increasingly rich palette of tools of the developer. Like any self-learning model, it will learn and self-correct and improve over time.

StackOverFlow, or the GitHub Issues, will always be the best place for the trickier questions that require a less impersonal explanation, or more community endorsement.

But next time, instead of waiting for the **magic answer** on StackOverFlow for an hour, or days for *relatively simple questions* (How do I trigger HookConsumerWidget rebuild in Flutter?), ask to [GPT-Chat](https://chat.openai.com/).


![It will offer you the beginning of a solution.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5fwua30i0r95objbjocq.png)