Review of 7 Ways to Run Code in ChatGPT.... 6 Failed :-(
I really love using ChatGPT for code development. It is able to take ideas and other things and at least get started in the right direction... But, I've wanted to be able to run the code inside of my web browser easily. I figured if I did Javascript, this shouldn't be too hard.... Well, I guess I was wrong....
I had asked ChatGPT to make a simple set of concentric circles based on the Bands of Belonging model used in Education SystemONE. This is the code that was produced:
<!DOCTYPE htm
<html lang="en">
<head>
??? <meta charset="UTF-8">
??? <meta name="viewport" content="width=device-width, initial-scale=1.0">
??? <title>Bands of Belonging</title>
</head>
<body>
??? <canvas id="belongingCanvas" width="500" height="500"></canvas>
??? <script>
??????? const canvas = document.getElementById('belongingCanvas');
??????? const ctx = canvas.getContext('2d');
??????? const bandsOfBelonging = [
????????? 'Core', 'Consciousness', 'Clan', 'Companions', 'Culture',
????????? 'Country', 'Career', 'Collective', 'Creatures', 'Cosmos'
??????? ];
??????? const centerX = canvas.width / 2;
??????? const centerY = canvas.height / 2;
??????? for (let i = 0; i < bandsOfBelonging.length; i++) {
????????? const radius = (i + 1) * 25; // Adjust the spacing between the circles here
????????? ctx.beginPath();
????????? ctx.arc(centerX, centerY, radius, 0, 2 * Math.PI);
????????? ctx.stroke();
????????? ctx.fillText(bandsOfBelonging[i], centerX + radius + 5, centerY); // Positioning the text labels
??????? }
??? </script>
</body>
</html>
Here are all the ways I tried to run the code directly with ChatGPT:
Using a ChatGPT Plugin or Native Feature
First I wondered what ChatGPT can do on its own, or with its own plugins, and so there were three ways I found. (If you know of others, let me know!)
CoderPad ChatGPT Plugin
My friend Corbin Crutchley used to work for CoderPad, and so I wanted to give their plugin for ChatGPT a go first. Here is my review:
Pros:
Cons:
Code Runner
The Code Runner plugin by Haseeb M. looked like it might work. So I tried it... Here is my quick review:
Pros:
Cons:
Use ChatGPT's Native Code Interpreter
I went ahead and also tried ChatGPT's Code Interpreter, but since it only does Python, it couldn't help me.
Pros:
Cons:
Use a Chrome Extension
Since none of the native ways worked, I thought there probably was a Chrome Extension that would work.... So this is what I tried:
领英推荐
RunGPT
The RunGPT browser extension also by Haseeb M. seemed the most popular, and so I thought I'd try it first.. And this is what I found:
Pros:
Cons:
ChatGPT Code Previewer
This extension by Yangguang Li looked like it might work, but it didn't either...
Pros:
Cons:
ChatGPT Code Runner (Extension)
This should not be confused with the ChatGPT Plugin, although it was also written by Haseeb M. But one is a plugin right in ChatGPT and the other is a browser extension. Although, they share a similar goal, and both require "credits" from an API.
Pros:
Cons:
The Old Fashioned Way
Ok, so NONE of these worked... So I'm now reviewing the 7th way... The way that ChatGPT tells you to do... Save the code block, then run it in a browser.. This WORKED. But I would really prefer a method that was quicker and easier... Yet all the methods that seemed like they would be... Well, you know now, none of them worked...
BTW, I know the words are on top of each other... That was going to be my next iteration to fix... But I never got to it, because I got tired by trying all the ways that were supposed to help me see this quicker!
Software Engineer | Fullstack | Game Dev | Ex Rockstar Games
1 年Thanks for the article here are some corrections. The Code Runner Plugin and Extensions are free. * It offers vast variety of languages. *It offers Graph generations and Sharing code Snippet screenshots. It offers file management for your code . It supports documents analysis. These things are good for basic data analysis. And the RunGpt extension is not created by me its from different developers.