Alex Kumar

Alex Kumar

Machine learning engineer

3 prompts

Visit Website

Prompt template for getting AI to analyze and suggest improvements for your code structure and patterns.

Analyze the following code and suggest improvements:
```[language]
[paste code here]
```

Consider:
1. Code organization and structure
2. Design patterns and best practices
3. Performance optimizations
4. Error handling
5. Documentation and readability
Here's my analysis of your code:

1. Code Organization:
- Consider splitting the large function into smaller, focused functions
- Move helper functions to a separate utility file

2. Best Practices:
- Use meaningful variable names instead of x, y, z
- Add type annotations for better maintainability
- Follow the Single Responsibility Principle

3. Performance:
- Cache repeated calculations
- Use Set instead of Array for lookups

4. Error Handling:
- Add try-catch blocks around file operations
- Validate input parameters

5. Documentation:
- Add JSDoc comments for functions
- Document complex algorithms
- Include usage examples

Here's the refactored code:
```typescript
// Refactored version with improvements...
```

Prompt template for getting AI to analyze and suggest improvements for your code structure and patterns.

Analyze the following code and suggest improvements:
```[language]
[paste code here]
```

Consider:
1. Code organization and structure
2. Design patterns and best practices
3. Performance optimizations
4. Error handling
5. Documentation and readability
Here's my analysis of your code:

1. Code Organization:
- Consider splitting the large function into smaller, focused functions
- Move helper functions to a separate utility file

2. Best Practices:
- Use meaningful variable names instead of x, y, z
- Add type annotations for better maintainability
- Follow the Single Responsibility Principle

3. Performance:
- Cache repeated calculations
- Use Set instead of Array for lookups

4. Error Handling:
- Add try-catch blocks around file operations
- Validate input parameters

5. Documentation:
- Add JSDoc comments for functions
- Document complex algorithms
- Include usage examples

Here's the refactored code:
```typescript
// Refactored version with improvements...
```

Prompt template for getting AI to analyze and suggest improvements for your code structure and patterns.

Analyze the following code and suggest improvements:
```[language]
[paste code here]
```

Consider:
1. Code organization and structure
2. Design patterns and best practices
3. Performance optimizations
4. Error handling
5. Documentation and readability
Here's my analysis of your code:

1. Code Organization:
- Consider splitting the large function into smaller, focused functions
- Move helper functions to a separate utility file

2. Best Practices:
- Use meaningful variable names instead of x, y, z
- Add type annotations for better maintainability
- Follow the Single Responsibility Principle

3. Performance:
- Cache repeated calculations
- Use Set instead of Array for lookups

4. Error Handling:
- Add try-catch blocks around file operations
- Validate input parameters

5. Documentation:
- Add JSDoc comments for functions
- Document complex algorithms
- Include usage examples

Here's the refactored code:
```typescript
// Refactored version with improvements...
```