Home Artificial Intelligence 3 Effective Ways I Use ChatGPT And GPT-4 To Higher My Coding Table of Contents No. 1: The Cold Start Problem No. 2: Conversational Coding No. 3: ChatGPT Like A Function GPT-4 Vs. Previous Versions

3 Effective Ways I Use ChatGPT And GPT-4 To Higher My Coding Table of Contents No. 1: The Cold Start Problem No. 2: Conversational Coding No. 3: ChatGPT Like A Function GPT-4 Vs. Previous Versions

0
3 Effective Ways I Use ChatGPT And GPT-4 To Higher My Coding
Table of Contents
No. 1: The Cold Start Problem
No. 2: Conversational Coding
No. 3: ChatGPT Like A Function
GPT-4 Vs. Previous Versions

I’ve been working with ChatGPT for the previous couple of months and GPT-4 for the last month. I can truthfully say, the way in which I approach writing code has been ceaselessly modified, I feel for the higher. This technology has the facility to revolutionize programming as we understand it.

A GIF showing the future of faster programming
Okay, it isn’t that easy, but it surely is getting closer. Image by writer

My efficiency has increased, the period of time I spend debugging has also dramatically gone down, and I’m probably saving 5 hours each week in comparison with the coding process I used to be previously doing.

So, how has my coding process change into greater? The next are the three most important ways.

Hopefully, you may learn easy methods to use ChatGPT and GPT-4 to boost your programming efficiency from my industry experience and illustrated examples!

In case you prefer a video format, click here.

First, my work style not suffers from the cold start problem. Somewhat than generating code from scratch, I can virtually all the time start with a template or some boilerplate code.

How to use ChatGPT to write starter code
Image by writer

Let’s say I desired to do an exploratory data evaluation where I desired to have histograms for every variable, box plots, a correlation matrix, and testing for the way many nulls were in each column of the dataset.

I can have ChatGPT generate this boilerplate code and just tweak it for my my specific data. Writing this code myself would probably take about 20 minutes, but I can do that in just 5 minutes with ChatGPT.

The cold start problem happens if you don’t have momentum.You’ve gotten trouble getting began because you realize you could have to tackle a really large task and taking step one is a bit terrifying.

example is a marathon. In case you know you could have to run 26.2 miles, you may be hesitant to take even step one, since the whole challenge seems so large and also you anticipate a whole lot of pain and struggle.

For me, sometimes a blank notebook gives me this same feeling. I do know I even have a whole lot of work to do before my project even starts to take shape.

Example to illustrate how starting  a long marathon is as terrifying as beginning a massive coding project
Image by writer

Something I’ve talked about previously for solving this problem is copying a few of your personal code from one other project and using it as a origin.

Truthfully, I type of like using ChatGPT for this even higher. The way in which it outputs the code to the screen somewhat makes me feel like I’m writing it and that makes me feel like I’m contributing lots more work than I actually am. This in my mind really does give me good momentum. I can pick up where ChatGPT left off and I can create a whole lot of change really fast.

Do you ever know exactly what you must do, but don’t necessarily know easy methods to put it into code?

Image by writer

I suffer from this on a regular basis, and ChatGPT is solving this problem for me. Specifically, I find that GPT-4 is lots higher at handling my random jiberish that I throw into it and turning it into code than the previous iterations.

I call this “conversational coding,” and this might be the largest way that my overall coding process has modified.

Before, I might have to go looking everywhere in the web for an inexpensive code snippet based on an idea. Then strip it down for my use case and I’d eventually must debug it.

Now, I say what I need to create, and see how close ChatGPT gets. If there’s something flawed with the code, I can tell this to ChatGPT and it is going to make the corrections.

Using ChatGPT to write code for a Python machine learning project
Image by writer

For instance, let’s say I desired to create a function that added two numbers. I understand it’s type of basic, but let’s pretend I’m latest to this.

After ChatGPT generates this code, I could ask it to rewrite the identical function so as to add an inventory of numbers or create the sum of two lists which are fed in as parameters. That is pretty cool. It’s evolving with the feedback I gave it.

A good example of ChatGPT being great at making corrections to its written code
Image by writer

I find that I feel lots faster than I code. Once I am in a position to have conversations about my code with ChatGPT, I find that I can more purely exercise my critical pondering ability and I’m not limited by the speed at which I can convert my very own thoughts into code.

This also helps me not break my critical pondering train of thought; I don’t cycle between fascinated with the issue and coding.

Let’s compare the 2 processes:

How ChatGPT changes my thought process to make me faster at coding
Image by writer

I used to do these think-code repetitions. Nowadays, I feel, I chat with ChatGPT, implement, after which repeat. These iteration loops are shorter.

How ChatGPT changes my thought process to make me faster at coding
Image by writer

Within the above image, you may see how far more progress I make in the identical period of time and what number of fewer gaps there are in my pondering process.

Let’s speak about functions, one of the fundamental programming concepts. The entire idea is that you simply write code once (and write it well) so that you don’t must repeat all of it yet again.

In my work as a knowledge scientist, I find myself not using them as much as I should. Especially when testing, it makes more sense to run code in-line relatively than putting it into functions at first. I’m doing a whole lot of iteration. So, putting things in functions requires me to do lots more debugging, because I even have to debug the code after which debug the function.

I find that I now use ChatGPT like a function. I recently used some code for training a SVM regression. Somewhat than rewriting all the identical code for a unique model and even copying the code and replacing all of the variable names, I had ChatGPT do this for me.

On this case, I pasted the code into ChatGPT and asked it to jot down code in the identical style but for a choice tree, a random forest, and a XGBoost. This worked unbelievably well! It even replaced all of the variable names properly for me, which I used to be not expecting.

A mind-blowing example of ChatGPT being used effectively to write code
Image by writer

Higher yet, I could ask it to place all of this code right into a function that takes within the model as a parameter and outputs the relevant model metrics.

While conversational coding might be the largest change in my process, this “functionality” was by far the largest time saver.

Obviously, time saving is very important for me, and I need you realize that I’m not wasting your time. The duvet image of this text wasn’t clickbait. I realize most of this text could possibly be about general ChatGPT, but I’m going to speak about how GPT-4 plays into all of this.

I discovered that the majority of those changes I made were very difficult or inconceivable before GPT-4. Before this release, conversational coding and the functionalization of code that I discussed were clunky at best. I might spend almost as much time debugging the ChatGPT code as I might have spent doing all of the work alone without it.

I actually think GPT-4 is an enormous jump in model performance for the coding use case. Still, it isn’t without its flaws.

Undoubtedly and much and away, the one biggest improvement on this model is that it now knows who I’m! Unfortunately its data on me just isn’t correct. The model still hallucinates, providing misinformation around 20% of the time.

A good example of ChatGPT showing why it can’t replace human programmers as it can misinform
Image by writer

Because of this we still all the time need to ascertain our code for bugs and errors after we run it through ChatGPT.

It isn’t all sunshine, rainbows, and ideal code. There are another drawbacks to contemplate. By counting on AI-generated code, we risk losing a number of the personal touch and human creativity that make our work unique.

Moreover, we must be careful about potential ethical concerns and the propagation of biased algorithms. It’s essential to double-check the code generated by GPT-4 and ensure it aligns with our values and principles.

A GIF showing the concerning future of humans in an AI era
Image by writer

LEAVE A REPLY

Please enter your comment!
Please enter your name here