Skip to main content

Is canvas + ChatGPT a problem or an opportunity: Coding part 1


OpenAI has just announced canvas (https://openai.com/index/introducing-canvas/ ) with ChatGPT as a beta in ChatGPT Plus. Canvas is an extra interface along with the standard prompt interface which we have got used to. In an earlier post, I started discussing using Canvas for reports, but what about coding? People have been using generative AIs for coding, including code generation from prompts, but what does it do when we use canvas.


So let's play. The new interface for canvas does support coding (as does ChatGPT) - could it be a programmer's friend/assistant? 

In the example below ChatGPT was asked via an initial prompt to produce a pseudo-code for the start of a murder-mystery style game, but to also use canvas. 




What it produces is a form pseudo-code in the style of Python; not a great surprise there, as ChatGPT is not bad at generating Python code.

So, can it convert the pseudo-code to something other than Python? The two examples below show conversion to C and JavaScript






You can edit in the canvas window, and just as in the report-generating application (see  reports ); also, inside the window, you can highlight and get a prompt request. In the javascript version a few lines are highlighted, now let us get canvas to add more locations and characters by using ask ChatGPT that comes up when the text is highighted.
It has added two of each to the code.

Converting it to Python, and asking it for features to add to createCharacters()


The suggestions have been shown of the canvas screen and comes with apply button. The figure below shows the addition of the new features.

A feature I like about ChatGPT and coding is getting it to add in extra comments for a persona for example "now add in extra comments to explain the code for a beginner to python"

It feels more like a programmer's assistant than standard ChatGPT.

In part 2 I want to explore its ability to: 
- review code
- bug fixing 


All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon

Comments

Popular posts from this blog

GenAI Productivity: Ideas to project proposal 1

One of the ways I use Generative AI with students is to take basic ideas for projects, usually a title, and get these tools to greater ideas and start of a project proposal. This is with all the usual caveats  Check the references (if any); It is going to be basic, so extend it. In this example I am going to use Co-pilot but the ChatGPT, etc can be used, employing a few basic prompt engineering basics: personas (who is the target audience?) and Templates (how do I want it to look?) to start this process. Example:  Project ideas for MSc Data Intelligence students (persona)  on a particular topic. The reply will include subheadings and relevant (hopefully) content for  TITLE, INTRODUCTION, PROBLEM STATEMENT. The prompt: " Taking the topic "Leveraging open-source tools to measure and present academics publications automatically from public domain data.". Give five innovative projects for a Master's level student dissertation in Data Intelligence. Each project example wi...

GenAI Productivity: Ideas to project proposal ideas from Google Scholar

Generated as well by Google Gemini In previous blog posts, I have looked at generating project ideas for project ideas. These can be used with many different GenAI platforms. As an idea/challenge, I want to come up with a way for students to generate ideas for projects based on knowing who they would like to work with and that person's Google Scholar profile. Here is the catch: often, it can be difficult to access Google Scholar to do this. One solution  is to use Google Gemini, a Google product, to access another Google product. Going to apply this to my own profile - ego rides again . It went and did much when I click on it and deep research, it did a full research report. Prompt used :  " Using this as a starting point https://scholar.google.com/citations?user=ghQedZAAAAAJ&hl=en from the research here provide 10 project ideas suitable for a final year Computer Science student project with this supervisor. For each provide title, 100 word summary, possible outcome s...

Analysis of Websites using Generative AI - compare poltical websites usability

Image created using DALL-E - love the bad spelling I want to explore using Generative AI to explore and compare websites. So I used using Google Gemini because of it its ability to work easily with websites.I choose UK three political party websites purely to compare like with like. Prompt 1: Analyse the following webpages website 1 https://www.conservatives.com/ , website 2 https://www.libdems.org.uk/  and website 3 https://labour.org.uk/ from a web user's perspective. For each website produce a report containing 2 tables. The first Table list issues with the site; for each issues provide at least three examples and then provide a list of potential solutions. Table 2 strengths of the site with each strength provide at least three examples. Add in any commentary Results It produced two tables per website and provided a summary comparing them at the end. Direct political statements were not produce. Now trying out personas and testing the website the politics side not filtered out ...