Translations
Code | Language | Translator | Run | |
---|---|---|---|---|
Credits
This email address is being protected from spambots. You need JavaScript enabled to view it.; Francisco Esquembre; Felix J. Garcia Clemente
Sample Learning Goals
Can chatGPT code for you in JavaScript for use in Easy JavaScript Simulation toolkit and should you be using it?
I tested ChatGPT and the answer is yes but these are limits.
Response from ChatGPT: "Yes, I can generate code in JavaScript. However, my capabilities are limited to generating code snippets based on the examples and information provided to me, and it is ultimately up to the user to ensure that the generated code is correct and functional. "
I had to ask a series of questions on chatGPT, to help me create a functional collision of 2 balls with 4 walls simulation, and I reference the functions but the logic i still had to piece them into the appropriate places in the simulation such as Evolution and Fixed Relationship and Custom function etc. There was also a general need to sync up with what the simulation toolkit can do with what chatGPT can generate.
I have always been using easy java simulation authoring toolkit to keep to make simulations, so I want to test whether ChatGPT can help me with this aspect.
The answer is yes, but it still requires some amount of human intelligence to figure out how to appropriate the codes into a simulation.
link Elastic and Inelastic Collision of 2 Balls in 2D inspired by ChatGPT JavaScript Simulation Applet HTML5 |
The functional simulation assisted by ChatGPT codes in here https://sg.iwant2study.org/ospsg/index.php/interactive-resources/physics/02-newtonian-mechanics/02-dynamics/1151-chatgpt click on download model to have a copy of the simulation to run on your hard disk, or simply click on the icon to run it off the server.
What are some of the advantages of using chatGPT to generate JavaScript?
- It can save time and effort by automating the process of writing repetitive or boilerplate code. (Agreed!)
- It can help to increase productivity and efficiency by allowing developers to focus on more complex or higher-level tasks. (Agreed!)
- It can help to reduce the risk of errors or bugs in the code by automating the process of writing and testing code. (Agreed!)
- It can be used to quickly generate code snippets, or even complete functions or modules, based on a set of examples or specifications provided by the user. (Agreed!)
- It can be used to generate code for a wide range of programming languages and platforms, making it a versatile tool for developers. (Agreed!)
There are several potential pitfalls to be aware of when using GPT-3 or other language models to generate code in JavaScript or any other programming language:
- The generated code may not be syntactically or semantically correct, and may not run without error. (Agreed!)
- The generated code may not be efficient or optimized for performance. (cannot tell)
- The generated code may not adhere to best practices or industry standards.
- The generated code may not be secure or free of vulnerabilities.
- The generated code may not be maintainable or easy to understand and modify in the future. (it is pretty good to me!)
- The codes generated can still have some errors sometimes. After I copy and paste the court, I still perhaps will need to correct some errors generated by chatGPT.
It's important to understand that the output generated by GPT-3, is based on the training data it was given, and it may not be able to generate the optimal solution or follow all the best practices. It is always recommended to review the generated code and test it before using it in any production environment.
Overall Comments:
Overall, GPT-3 or other language models, such as chatGPT, can be powerful tools for generating code in JavaScript or any other programming language. They can save time and effort by automating the process of writing repetitive or boilerplate code, and can help to increase productivity and efficiency by allowing developers to focus on more complex or higher-level tasks. However, it's important to understand that the output generated by GPT-3 is based on the training data it was given, and it may not always generate the optimal solution or follow all the best practices. Therefore, it is important to review the generated code and test it before using it in any production environment. Additionally, GPT-3 can generate code snippets, functions or modules but it's not capable of developing a full application or a software from scratch, it needs human supervision and intervention to make sure the generated code is correct, efficient and secure.
Inspired to explore by an email by DGE, a message of hope and lets learn to use the new tool, which all of us should!
For Teachers
Version:
Other Resources
https://www.geogebra.org/m/SW4cYT5H by Juan Carlos Ponce Campuzano
end faq
{accordionfaq faqid=accordion4 faqclass="lightnessfaq defaulticon headerbackground headerborder contentbackground contentborder round5"}
- Details
- Written by Fremont
- Parent Category: 03 Motion & Forces
- Category: 02 Dynamics
- Hits: 3098