Improve the following code

Improve the following code

Reviews a selected code snippet and suggests improvements to readability, performance, patterns and error handling, with explanations.

Prompt

Improve the following code ``` ${selectedText} ``` Please suggest improvements for: 1. Code readability and maintainability 2. Performance optimization 3. Best practices and patterns 4. Error handling and edge cases Provide the improved code along with explanations for each enhancement.

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0ย followers ยท 2,873ย prompts

More by @OpenSourceBuffGuy

See all
Ethereum Developer prompt image

Ethereum Developer

Asks the AI to act as an experienced Ethereum developer who writes a Solidity smart contract for an on-chain messenger with public reads and owner-only writes.

act-as, crypto, coding

1 view
Linux Terminal prompt image

Linux Terminal

Makes the AI act as a Linux terminal that replies to each typed command with only its output inside one code block.

simulator, linux, coding

5 views
English Translator and Improver prompt image

English Translator and Improver

Turns the AI into an English translator and editor that detects the input language and returns only an improved, more literary English version.

act-as, translation, rewriting, proofreading

2 views

Reviews

Loading reviewsโ€ฆ

Discussion

Loading commentsโ€ฆ