Coding
327 results
2. Resource Management
Suggest efficient resource management for: - Memory pools - Buffer strategies - Garbage collection optimization
1. Memory Profiling
Review this code for memory optimization: [Code block] Current issues: - Memory leaks - Large allocations - Resource cleanup
Algorithmic Optimization
Help optimize this algorithm: [Code block] Current metrics: - Time complexity: O(n²) - Space complexity: O(n) Target requirements: - Improve time complexity -…
3. Review and Refinement
Review and improve this documentation section: [Paste existing documentation] Please: 1. Check for technical accuracy 2. Improve clarity and readability 3. Add…
2. Drafting Phase
Create an initial draft for this documentation section: Section: Getting Started with the Notification SDK Audience: JavaScript developers Technical level: Int…
1. Planning Phase
Help me plan documentation for a new feature: Feature: Real-time notifications system Components: WebSocket server, client SDK, admin dashboard Users: Develope…
3. Troubleshooting Guides
Write a comprehensive troubleshooting guide for this error: Error: "Connection timeout: Unable to establish database connection" Context: Database connection i…
2. Version-Specific Documentation
Create a comprehensive migration guide: v1.0 -> v2.0 Migration Guide Changes: 1. Authentication header format (Bearer token required) 2. Response structure (ne…
1. Interactive Documentation
Create documentation for an interactive component: Component: Data visualization chart Library: Chart.js Features: Line, bar, and pie chart options Include: 1.…
Configuration Guide
Create a detailed configuration guide for this database connection: const dbConfig = { host: process.env.DB_HOST, port: process.env.DB_PORT, username: process.…
API Endpoint Documentation
Create detailed documentation for this REST API endpoint: Endpoint: POST /api/v1/users Description: Creates a new user account with email verification Request…
Basic Documentation Structure
Help me create comprehensive documentation for a user authentication module: Module features: - Email/password authentication - Social login integration (Googl…
Asynchronous Code
Debug this async/await flow: [Code block] Focus on: - Promise chain issues - Race conditions - Error handling
Database Queries
Optimize and debug this database query: [Query] Current issues: - Performance concerns - Unexpected results
API Integration Issues
Help debug this API integration: - API endpoint: [URL] - Request payload: [data] - Error response: [details] What should I check first?
Testing
Create test cases to verify this bug fix: [Fixed code] Include: - Edge cases - Regression tests - Performance validation
Documentation
Help me document this bug fix: - Original issue: [description] - Root cause: [findings] - Solution implemented: [details] - Prevention measures: [steps]
Debugging Tools Integration
Suggest appropriate debugging tools for: - Language: [programming language] - Platform: [development environment] - Type of issue: [problem category]
Debugging Tools Integration
Help me interpret this debugger output: [Debugger output] What should I investigate next?
Memory Leaks
Analyze this code for potential memory leaks: [Code snippet] Observed symptoms: - Memory usage pattern - When does the issue occur?
Performance Debugging
Help me identify performance bottlenecks in this code: [Code block] Current performance metrics: - Execution time: [details] - Resource usage: [details]
Log Analysis
Analyze these log entries and identify potential issues: [Log excerpt] What patterns or anomalies should I look for?
3. Debug Strategy
Suggest debugging strategies for this issue: - Problem: [Description] - Language/Framework: [Details] - Current debugging attempts: [What you've tried]
2. Analyze the Code
Review this code segment for potential issues: [Code block] Focus on: - Logic errors - Edge cases - Common pitfalls
1. Reproduce the Issue
Help me create a minimal reproducible example for this issue: [Code snippet] The problem occurs when [specific condition]
Understanding the Problem
Analyze this error message and help me understand its root cause: [Error message] Context: - What I was trying to do - Environment details - Steps to reproduce
3. Documentation Review
Review these function comments for clarity and completeness: /* * * Processes user data and updates the database * @param {Object} userData - The user data to…
2. Comparative Analysis
Which implementation is better for handling user authentication? Approach 1: [code snippet 1] Approach 2: [code snippet 2] Consider: - Security - Maintainabili…
Performance Review
Analyze this React component for performance optimization opportunities : const UserList = ( { users } ) => { const [ filteredUsers , setFilteredUsers ] = useS…
Security Review
Review this Node . js authentication middleware for security vulnerabilities : const auth = async ( req , res , next ) => { try { const token = req . header (…
Basic Code Review
Please review this Python function that calculates factorial : def factorial ( n ) : if n < 0 : return None if n == 0 : return 1 return n * factorial ( n - 1 )…
3. Legacy Code Modernization
Help modernize this jQuery code to React : $ ( '#userForm' ) . submit ( function ( e ) { e . preventDefault ( ) ; var userData = { name : $ ( '#userName' ) . v…
2. Complex Refactoring
Help plan refactoring this monolithic class : class OrderProcessor { constructor ( ) { this . db = new Database ( ) ; this . payment = new PaymentGateway ( ) ;…
Performance Optimization
Optimize this React component : const Dashboard = ( ) => { const [ data , setData ] = useState ( [ ] ) ; const [ filters , setFilters ] = useState ( { } ) ; us…
Design Pattern Implementation
Help refactor this code to use the Observer pattern : class UserService { updateUser ( userId , data ) { // Update user db . users . update ( userId , data ) ;…
Basic Code Cleanup
Help refactor this JavaScript function : function processData ( data ) { var result = [ ] ; for ( var i = 0 ; i < data . length ; i ++ ) { if ( data [ i ] . ac…
3. Migration Planning
Help design a migration strategy: Current: Monolithic .NET application Target: Microservices architecture Consider: 1. Phased approach 2. Data migration 3. Fea…
2. Trade-off Analysis
Analyze these approaches for data storage: Option 1: MongoDB - Document-based storage - Horizontal scaling - Schema flexibility Option 2: PostgreSQL - ACID com…
Cloud Architecture Planning
Help design a cloud-native architecture for a video streaming service: Requirements: - Global content delivery - User authentication - Content management - Ana…
System Integration Design
Design an integration architecture for connecting these systems: 1. CRM System (REST API) 2. ERP System (SOAP API) 3. Payment Gateway (GraphQL) 4. Legacy Datab…
Basic Architecture Review
Help me design a microservices architecture for an e-commerce platform: Requirements: - User authentication - Product catalog - Shopping cart - Order processin…
Multi-language Examples
Provide code examples for these API calls in JavaScript, Python, and Go: 1. Authenticate and get token 2. Make GET request with query parameters 3. Make POST r…
Versioning and Migration
Create a migration guide from API v1 to v2: Breaking changes: - [Change 1] - [Change 2] Timeline: - v1 support until: [date] - Recommended migration start: [da…
Interactive Documentation
Create Swagger/OpenAPI specification format for: - API base URL: [url] - Authentication: [type] - Main endpoints: [list] Include: 1. Complete OpenAPI 3.0 spec…
Prompt Strategy to Avoid Issues
When creating API documentation, avoid: 1. Using placeholder values in examples (use real, working examples) 2. Assuming prior knowledge (explain every concept…
SDK Documentation Prompt Template
Create Python SDK documentation: Installation: pip install api-client Authentication: Bearer token Operations to document: 1. client.users.get(id) - Fetch user…
SDK Documentation Prompt Template
Create SDK documentation for [Language]: SDK features: - Installation via [package manager] - Authentication setup - [Main resource 1] operations - [Main resou…
Error Documentation Framework
Use this prompt for comprehensive error documentation: ```markdown Create error documentation for our REST API: Common errors to cover: - 400 Bad Request (miss…
Error Documentation Framework
** Error Code ** : [CODE] ** HTTP Status ** : [Status] ** Message ** : "User-friendly error message" ** Causes ** : - [Cause 1] - [Cause 2] ** Solutions ** : 1…
Authentication Documentation Template
Document OAuth 2.0 authentication for our API: Supported grant types: 1. Authorization Code (user-facing apps) 2. Client Credentials (server-to-server) Endpoin…
Authentication Documentation Template
** Method ** : [OAuth 2.0 / API Key / JWT / Custom] ** Setup Steps ** : 1. Create [account/app/token] at [where] 2. Retrieve [credential name] 3. Store securel…
Essential Endpoint Details
Document this API endpoint in detail: Endpoint: GET /api/v1/users/{id} Purpose: Retrieve a specific user's profile Path parameters: - id (string, required): Th…
Organization Patterns That Work
Create API documentation structure for [your API name]: Follow this format for each section: - Section title (H2) - Brief description (1 sentence) - Key concep…
Key Information to Gather
I need to document a [REST/GraphQL/gRPC] API with the following details: - Base URL: [your base URL] - Authentication: [Bearer tokens/API keys/OAuth 2.0] - Mai…
Testing and Verification
Help create test cases for: [Algorithm description] Include: 1. Edge cases 2. Performance tests 3. Correctness verification 4. Input validation
Dynamic Programming
Help develop a dynamic programming solution for: [Problem description] Provide: 1. State definition 2. Recurrence relation 3. Base cases 4. Optimization approa…
Graph Algorithms
Help design a graph algorithm for: [Graph problem description] Include: 1. Graph representation 2. Traversal strategy 3. Optimization goals 4. Edge cases handl…
Search Algorithms
Design a search algorithm for: [Search problem description] Specify: 1. Search space characteristics 2. Search criteria 3. Performance requirements 4. Expected…
Sorting Algorithms
Help me implement a [sorting algorithm name]: - Input array type and size - Stability requirements - Space constraints - Performance expectations
Optimization Techniques
Help optimize this algorithm: [Current implementation] Focus on: 1. Time complexity improvements 2. Space complexity reductions 3. Code readability and maintai…