Clean code in very long prompts

I have code with more than 4096 characters to clean unnecessary code . How I can make that prompt to chatgpt?

1 Like

Break up your code block into smaller modules / methods :slight_smile:

Go modular :slight_smile:

Hi @danielf1692

It is a basic software engineering / programming task to manually review large code blocks and reduce the code block sizes to a collection of smaller size modules / subroutines / methods.

What programming language are you working on?

See Also, examples:

1 Like

Is HTML with css javascript and SVG. Javascript are are in external files separarated from html + SVG. HTM and SVG are in one html file. The stress is that SVG occupies a a lot of characters

Well, I agree; but you can simply do something like create references to external CSS, JS and IMAGE files and not include them directly in the ChatGPT validation.

Normally, when I write HTML I always host the CSS and JS files (and images, etc) somewhere outside of the HTML and just reference them in the HTML file. This approach is easier to maintain over time, debug, and make changes as well :slight_smile:

See, for example: