top of page

Exploring the magic and limitations of ChatGPT in generating Python code for acoustic design - Day 5

  • Writer: INAcoustical
    INAcoustical
  • Jun 6, 2023
  • 1 min read

Day 5: Writing effective prompts for coding

Task: Divide the audience plane into segments and assign colours from a colour palette based on the received percentage of sound power

The following is a summary of the prompts I found useful for coding. They have been frequently employed in creating the Grasshopper components for the task demonstrated in the video:

  1. For finding structures and functions: Create a structure template to achieve this objective.

  2. For better understanding of function usage: What is the purpose of this function?

  3. For debugging: What is the issue with this code?

  4. For code optimization: Simplify this code.

  5. For code optimization: Refactor this code to improve efficiency.

  6. For code optimization: Is there a more effective approach to achieve the desired outcome?

  7. For code testing: Test this function using 5 cases.

  8. For code documentation: Include a detailed and high-quality docstring for the code below.

  9. For code documentation: Provide an explanation for this code to document its functionality.





 
 
 

Comments


bottom of page