zzzprojects/zzzcode.ai

Issue with the output

Opened this issue · 1 comments

**Jon
Isssue with the code generate by the AI engine. There is hard coding, it is one of the bad practise in programming and should be discouraged by any religion, programmer or automated tools....

Here is an example of the code generated by Python AI engine.
This is first warning to avoid this type of output that the program is generating, going forward.
Please take care of this in future**


import matplotlib.pyplot as plt

Parcel attributes

length = 10
breadth = 5
depth = 3
weight = 2

Plotting the parcel at City X

plt.text(0, 0, 'City X\nParcel\nL:{} B:{} D:{} W:{}'.format(length, breadth, depth, weight), fontsize=12, ha='center')
plt.plot(0, 0, marker='s', markersize=20, label='City X')

Plotting the movement to City Y

plt.text(10, 0, 'City Y\nParcel\nL:{} B:{} D:{} W:{}'.format(length, breadth, depth, weight), fontsize=12, ha='center')
plt.plot(10, 0, marker='s', markersize=20, label='City Y')

plt.legend()
plt.axis('off')
plt.show()

Hello @sabina1122 ,

Thank you for reporting, but we do not control what the AI generates. We can surely give some hints about what to create, but they must be global enough. Many examples require a few hard coding steps to make them simpler.

Surely, it should not be found in your program, but you can ask for it when creating your prompt.

Best Regards,

Jon