Skip to content
Awesome Reviewers
expert instructions
Domains
Sources
Raw access
Method
GitHub
domains
/ data-systems
Databases & Data Platforms
Query engines, storage, replication, streaming, ORMs and analytics backends.
2026-05-09
last update
download all instructions
raw access
All topics
AI
API
Algorithms
CI/CD
Caching
Code Style
Concurrency
Configurations
Database
Documentation
Error Handling
Logging
Migrations
Naming Conventions
Networking
Null Handling
Observability
Performance Optimization
React
Security
Temporal
Testing
All languages
C
C++
Css
Csv
Dockerfile
Go
Html
Java
Json
Markdown
Other
Python
Rust
Sql
TSX
Toml
Txt
TypeScript
Xml
Yaml
All repositories
ClickHouse/ClickHouse
PostHog/posthog
apache/kafka
apache/spark
drizzle-team/drizzle-orm
duckdb/duckdb
elastic/elasticsearch
influxdata/influxdb
neondatabase/neon
pola-rs/polars
prisma/prisma
redis/redis
rocicorp/mono
supabase/supabase
vitessio/vitess
Recently updated
Most discussed
Title
Improve Readability Style
Adopt a “review-first” style for complex C code: keep control flow and conditions small, make side effects explicit, and avoid duplicatio...
redis/redis
Code Style
C
2026-05-09
copy
raw
open
Explicit Build Flags
Ensure build configuration explicitly sets (1) include paths and (2) required language/toolchain modes to prevent environment-dependent h...
redis/redis
Configurations
Other
2026-05-09
copy
raw
open
Correct Fast-Path Semantics
When implementing algorithmic optimizations (fast paths, binary search vs linear, prefetch/slot routing, realloc/compaction shortcuts), r...
redis/redis
Algorithms
C
2026-05-07
copy
raw
open
Fail/Clamp Error Contracts
When implementing commands with numeric failure modes (overflow, out-of-range, NaN/Inf) or multi-option parsing, define an explicit error...
redis/redis
Error Handling
C
2026-05-06
copy
raw
open
Bounded Prefetch Batches
When adding performance optimizations (prefetch/batching/fast paths), make them bounded, gated, and semantics-correct: - **Bound the work...
redis/redis
Performance Optimization
C
2026-05-05
copy
raw
open
Fail Fast Input Validation
Apply a single security rule: validate arity, lengths, ranges, and invariants before using inputs to index arrays, dereference pointers, ...
redis/redis
Security
C
2026-05-05
copy
raw
open
API Contracts And Compatibility
When adding or evolving APIs (commands, module interfaces, persistence callbacks), make the contract explicit and stable: define lifecycl...
redis/redis
API
C
2026-05-04
copy
raw
open
Targeted, Non-Bloated Tests
When adding/modifying tests, ensure they are (a) semantically aligned to the behavior under test, (b) precise enough to prove the intende...
redis/redis
Testing
Other
2026-05-02
copy
raw
open
Atomic Contracts Enforcement
Define and enforce atomicity as an explicit contract: if correctness depends on thread/writer invariants, encode it in the API name/docs ...
redis/redis
Concurrency
Other
2026-05-02
copy
raw
open
Consistent TTL Pre-check
When handling TTL/expiration, decide “already expired?” (and validate expiry inputs) before performing DB mutations or expensive work, an...
redis/redis
Caching
C
2026-05-01
copy
raw
open
CI/CD Workflow Guardrails
When building or modifying CI/CD GitHub Actions workflows, structure them as an explicit DAG of artifact-driven jobs and guard execution ...
redis/redis
CI/CD
Yaml
2026-04-30
copy
raw
open
Doc Semantics Consistency
Ensure comments and public-facing documentation precisely match the actual behavior and contract. Apply this standard by checking: - **No...
redis/redis
Documentation
C
2026-04-29
copy
raw
open
Intentional Error Handling
Handle errors based on intent: make operations idempotent for known conflicts, and explicitly classify/propagate errors for known transie...
redis/redis
Error Handling
Other
2026-04-28
copy
raw
open
Maintain algorithmic invariants
When implementing algorithms that depend on “current state” (client context, cached slot/client, etc.) or on custom data structures (stac...
redis/redis
Algorithms
Other
2026-04-27
copy
raw
open
Clear Semantic Identifier Naming
Adopt naming conventions that are (1) case-consistent by identifier kind and (2) semantically self-documenting (what it represents/includ...
redis/redis
Naming Conventions
C
2026-04-23
copy
raw
open
Consistent Clear Naming
Use naming that is (1) safe per language rules, (2) semantically explicit, and (3) consistent with existing symbol families. Practical ch...
redis/redis
Naming Conventions
Other
2026-04-16
copy
raw
open
Null-safe Free Wrappers
When a free/cleanup API may receive NULL (or an invalid handle), don’t rely on ad-hoc checks at call sites. Instead, define a NULL-safe w...
redis/redis
Null Handling
Other
2026-04-16
copy
raw
open
Nullable Contracts Enforcement
Adopt explicit, consistent nullability contracts for pointer/optional-field parameters and honor them at every call site. Practical rules...
redis/redis
Null Handling
C
2026-04-15
copy
raw
open
Version Compatibility First
When changing serialized/wire formats (RDB/DUMP/RESTORE or module metadata), treat it as a data migration: define compatibility behavior ...
redis/redis
Migrations
Other
2026-04-07
copy
raw
open
Secure Workflow Permissions
Apply two security practices to GitHub Actions workflows: 1) Enforce least privilege - Set `permissions: {}` at the workflow level (or de...
redis/redis
Security
Yaml
2026-03-30
copy
raw
open
Performance-first Structure
When optimizing, treat performance as a design constraint: prevent contention/cache inefficiency, ensure server-side work is bounded per ...
redis/redis
Performance Optimization
Other
2026-03-27
copy
raw
open
Validate security-critical data
When code consumes security-critical data—either to perform privileged state changes at runtime or to download/execute external artifacts...
redis/redis
Security
Other
2026-03-26
copy
raw
open
Header Organization And Comments
Keep header edits readable and durable: 1) Don’t write brittle comments - Avoid referencing exact line numbers or file offsets (they drif...
redis/redis
Code Style
Other
2026-03-24
copy
raw
open
Clear API Contracts
Public APIs must make their guarantees and caller responsibilities explicit—especially around encapsulation, lifecycle/ownership, and cal...
redis/redis
API
Other
2026-03-23
copy
raw
open
Thread Ownership Discipline
When code can run on both main and IO threads, require an explicit ownership + synchronization rule for every shared piece of state (flag...
redis/redis
Concurrency
C
2026-03-22
copy
raw
open
Semantic Naming Accuracy
Ensure names and naming-related metadata are semantically accurate and unambiguous. - Don’t reuse a helper/identifier whose name is tied ...
redis/redis
Naming Conventions
Json
2026-03-20
copy
raw
open
prioritize code readability
Write code that prioritizes clarity and readability over cleverness or brevity. This includes several key practices: **Extract static fun...
rocicorp/mono
Code Style
TSX
2025-08-27
copy
raw
open
Optimize React performance patterns
Prioritize React performance by avoiding expensive operations and using proper React patterns. Key practices include: 1. **Avoid unnecess...
rocicorp/mono
React
TSX
2025-08-27
copy
raw
open
API parameter design
When designing API functions and types, prioritize maintainability and extensibility through proper parameter and type design patterns. F...
rocicorp/mono
API
TSX
2025-08-27
copy
raw
open
API consistency patterns
Maintain consistent patterns across similar APIs to improve developer experience and reduce cognitive overhead. When designing related AP...
rocicorp/mono
API
TypeScript
2025-08-21
copy
raw
open
Use descriptive names
Names should be descriptive and unambiguous, clearly communicating their purpose and intent. Avoid abbreviations and ambiguous terms that...
duckdb/duckdb
Naming Conventions
Other
2025-08-19
copy
raw
open
validate before executing operations
Always validate inputs and preconditions before executing database operations, and fail explicitly rather than silently ignoring invalid ...
ClickHouse/ClickHouse
Database
C++
2025-08-19
copy
raw
open
Add missing test coverage
Identify and address gaps in test coverage by requesting specific tests for untested functionality. When reviewing code changes, look for...
rocicorp/mono
Testing
TypeScript
2025-08-19
copy
raw
open
eliminate code duplication
Actively identify and eliminate code duplication in all its forms to improve maintainability and reduce bugs. This includes removing redu...
PostHog/posthog
Code Style
TSX
2025-08-19
copy
raw
open
API response standardization
Ensure API responses follow established patterns and use proper typing. Always use standardized response types like `PaginatedResponse` f...
PostHog/posthog
API
TypeScript
2025-08-19
copy
raw
open
Verify database state changes
When testing database operations that modify schema, data, or metadata, always add comprehensive assertions to verify the expected state ...
ClickHouse/ClickHouse
Database
Python
2025-08-19
copy
raw
open
Add monitoring metrics
Critical code paths, especially error handling and exception scenarios, should include metrics or counters to enable monitoring and alert...
PostHog/posthog
Observability
TypeScript
2025-08-19
copy
raw
open
Configuration naming clarity
Ensure configuration variable names, display labels, and feature flag names accurately reflect their actual purpose and behavior. Mislead...
PostHog/posthog
Configurations
TSX
2025-08-19
copy
raw
open
leverage framework capabilities
Structure workflows and activities to take full advantage of the orchestration framework's built-in capabilities for fault tolerance, ret...
PostHog/posthog
Temporal
Python
2025-08-19
copy
raw
open
Optimize database query patterns
Avoid N+1 query problems and overly complex conditional SQL construction. When loading related data, prefer batch operations or dedicated...
PostHog/posthog
Database
TypeScript
2025-08-19
copy
raw
open
Test edge cases comprehensively
Ensure your tests cover not just the happy path, but also edge cases, empty states, error conditions, and boundary scenarios. This includ...
PostHog/posthog
Testing
Python
2025-08-19
copy
raw
open
Use descriptive semantic names
Names should accurately reflect their purpose, behavior, and semantic meaning to avoid confusion and improve code readability. Avoid misl...
ClickHouse/ClickHouse
Naming Conventions
C++
2025-08-18
copy
raw
open
Use descriptive names
Choose names that clearly communicate purpose and accurately represent what they describe. Avoid ambiguous or misleading names that requi...
PostHog/posthog
Naming Conventions
Python
2025-08-18
copy
raw
open
semantic naming accuracy
Ensure that method, variable, and class names accurately reflect their actual behavior, purpose, or content. Names should semantically ma...
ClickHouse/ClickHouse
Naming Conventions
Other
2025-08-18
copy
raw
open
Cache invalidation consistency
Ensure comprehensive and consistent cache invalidation patterns across all models that affect cached data. Every model that can impact ca...
PostHog/posthog
Caching
Python
2025-08-18
copy
raw
open
validate inputs comprehensively
Ensure thorough input validation and comprehensive edge case handling in database operations. This includes checking parameter validity, ...
duckdb/duckdb
Database
C++
2025-08-18
copy
raw
open
Split complex migrations incrementally
Break complex schema changes into multiple, sequential migrations to ensure deployment safety and proper data handling. Each migration sh...
PostHog/posthog
Migrations
Python
2025-08-18
copy
raw
open
Documentation completeness standards
Ensure all documentation meets completeness and formatting standards. This includes: (1) Adding language specifications to all fenced cod...
ClickHouse/ClickHouse
Documentation
Markdown
2025-08-18
copy
raw
open
Comprehensive database testing
Database tests should verify both query execution and optimization behavior through comprehensive scenario coverage. When testing query o...
ClickHouse/ClickHouse
Database
Sql
2025-08-18
copy
raw
open
Document implementation rationale
When implementing networking or system-level functionality where multiple approaches exist, always document the rationale behind your imp...
ClickHouse/ClickHouse
Networking
Other
2025-08-18
copy
raw
open
preserve existing environment variables
When modifying environment variables in code, always preserve existing values by appending or merging rather than overwriting. This preve...
ClickHouse/ClickHouse
Configurations
Python
2025-08-18
copy
raw
open
Verify error handling paths
When implementing error handling logic, ensure that both the behavior and reasoning are clear, and that error paths are properly tested a...
PostHog/posthog
Error Handling
TypeScript
2025-08-18
copy
raw
open
Document authentication precedence
When implementing systems that support multiple authentication methods, always clearly document which authentication method takes precede...
ClickHouse/ClickHouse
Security
Markdown
2025-08-18
copy
raw
open
Eliminate code duplication
Actively identify and eliminate code duplication to improve maintainability and reduce the risk of inconsistent behavior. This includes s...
duckdb/duckdb
Code Style
C++
2025-08-17
copy
raw
open
Validate before unsafe operations
Always validate values before performing operations that could result in undefined behavior, particularly dynamic casts and arithmetic on...
ClickHouse/ClickHouse
Null Handling
C++
2025-08-17
copy
raw
open
break down large functions
Large functions that handle multiple responsibilities should be decomposed into smaller, focused functions to improve readability, mainta...
PostHog/posthog
Code Style
Python
2025-08-16
copy
raw
open
Document non-obvious code
Add explanatory comments for any code element that is not self-explanatory, including complex return types, method parameters, classes, a...
ClickHouse/ClickHouse
Documentation
Other
2025-08-15
copy
raw
open
Database schema consistency
Ensure database operations maintain consistent behavior and ordering, especially in distributed systems. When working with data structure...
ClickHouse/ClickHouse
Database
Other
2025-08-15
copy
raw
open
Extract common patterns
Identify and extract repeated code patterns into reusable functions or methods to improve maintainability and reduce duplication. When yo...
ClickHouse/ClickHouse
Code Style
C++
2025-08-15
copy
raw
open
Documentation precision standards
Ensure API documentation uses precise type specifications, proper formatting, and clear language to improve developer understanding and u...
ClickHouse/ClickHouse
Documentation
C++
2025-08-15
copy
raw
open
Document mutex responsibilities
Use Thread Safety Analysis (TSA) annotations to explicitly document which mutexes protect which variables, making thread safety relations...
ClickHouse/ClickHouse
Concurrency
Other
2025-08-15
copy
raw
open
Enrich telemetry context
Always include relevant contextual metadata when capturing telemetry data (events, exceptions, logs, metrics) to improve debugging and op...
PostHog/posthog
Observability
Python
2025-08-15
copy
raw
open
optimize algorithmic complexity
Always consider the algorithmic complexity and performance implications of data structure choices, memory allocation patterns, and contai...
ClickHouse/ClickHouse
Algorithms
C++
2025-08-14
copy
raw
open
Cache expensive operations
Identify and eliminate redundant expensive operations by implementing caching, memoization, or conditional execution. Look for repeated d...
PostHog/posthog
Performance Optimization
Python
2025-08-14
copy
raw
open
Maintain naming consistency
Ensure consistent naming conventions, terminology, and identifiers across the entire codebase. Names should be uniform between frontend/b...
PostHog/posthog
Naming Conventions
TSX
2025-08-14
copy
raw
open
Constructor configuration injection
Prefer injecting configuration objects through constructors rather than passing them as ad-hoc parameters or using global instances. This...
duckdb/duckdb
Configurations
Other
2025-08-14
copy
raw
open
Check existence before operations
Always verify that keys, IDs, indices, or other required values exist before performing operations that depend on them. This prevents run...
PostHog/posthog
Null Handling
Python
2025-08-14
copy
raw
open
RESTful endpoint organization
API endpoints should be properly organized around resources and follow RESTful principles. Avoid placing aggregation or utility endpoints...
PostHog/posthog
API
Python
2025-08-14
copy
raw
open
optimize data loading
Review data loading operations to ensure they are properly scoped, filtered, and batched to prevent performance issues. Large datasets sh...
PostHog/posthog
Performance Optimization
TypeScript
2025-08-14
copy
raw
open
Test complex logic thoroughly
When implementing complex business logic, state management, or algorithms with multiple edge cases, ensure comprehensive test coverage. C...
PostHog/posthog
Testing
TypeScript
2025-08-14
copy
raw
open
Write focused, clear tests
Tests should be simple, focused on a single concern, and easy to understand. When a test combines multiple potential failure conditions o...
ClickHouse/ClickHouse
Testing
Sql
2025-08-14
copy
raw
open
Avoid unnecessary allocations
Minimize memory allocations, data copying, and expensive operations by implementing early exits, using move semantics, and choosing appro...
ClickHouse/ClickHouse
Performance Optimization
C++
2025-08-13
copy
raw
open
Capture broad exceptions
When using broad exception handlers like `except Exception:`, always capture and log the exception to avoid silent failures that are diff...
PostHog/posthog
Error Handling
Python
2025-08-13
copy
raw
open
Configuration constants management
Extract configuration values into well-named constants instead of using magic numbers or inline values. Use consistent naming patterns ac...
PostHog/posthog
Configurations
Python
2025-08-13
copy
raw
open
Add explanatory tooltips
When UI elements have unclear functionality or purpose, add tooltips to provide immediate context and explanation. This is especially imp...
PostHog/posthog
Documentation
TSX
2025-08-13
copy
raw
open
Keep state in Kea
React components should focus on presentation and user interaction, not state management logic. All state logic should be contained withi...
PostHog/posthog
React
TSX
2025-08-13
copy
raw
open
Local configuration exclusion
Exclude personal and local configuration files from version control while ensuring they are properly handled during environment setup. Pe...
PostHog/posthog
Configurations
Other
2025-08-13
copy
raw
open
two-phase filtering algorithms
When working with large datasets or complex matching operations, implement algorithms that use a two-phase approach: first filter candida...
PostHog/posthog
Algorithms
Python
2025-08-13
copy
raw
open
optimize ORM queries
Optimize Django ORM queries to prevent performance issues and unnecessary database load. Avoid N+1 query problems by using appropriate pr...
PostHog/posthog
Database
Python
2025-08-12
copy
raw
open
Avoid duplicate HTTP headers
Ensure HTTP headers are sent only once per response to prevent network protocol violations and connection errors. Sending headers multipl...
ClickHouse/ClickHouse
Networking
C++
2025-08-12
copy
raw
open
consistent formatting rules
Maintain consistent formatting throughout the codebase to improve readability and maintainability. This includes standardizing function d...
ClickHouse/ClickHouse
Code Style
Other
2025-08-12
copy
raw
open
Consistent naming conventions
Maintain consistent naming conventions within your codebase, even when external specifications or APIs use different naming patterns. Int...
ClickHouse/ClickHouse
Naming Conventions
Markdown
2025-08-12
copy
raw
open
prefer simple optimizations
When implementing performance optimizations, favor simple, straightforward approaches over complex solutions unless the complexity is cle...
ClickHouse/ClickHouse
Performance Optimization
Other
2025-08-12
copy
raw
open
Validate inputs recursively
Always implement recursive validation and sanitization for user inputs, especially when dealing with encoded content or external data sou...
PostHog/posthog
Security
Python
2025-08-12
copy
raw
open
Recognize nullable type context
Before adding nullable casts or special null handling logic, verify whether the type or context already provides the necessary nullabilit...
ClickHouse/ClickHouse
Null Handling
Other
2025-08-12
copy
raw
open
optimize algorithm selection
Choose algorithms and data structures based on actual performance characteristics rather than defaulting to standard library implementati...
ClickHouse/ClickHouse
Algorithms
Other
2025-08-11
copy
raw
open
AI context efficiency
When providing context to LLMs, choose the most efficient method based on the nature and size of the context data. For bounded, static co...
PostHog/posthog
AI
Python
2025-08-11
copy
raw
open
consistent mutex protection
Ensure consistent mutex usage across all access points to shared data structures and clearly document what each mutex protects. Inconsist...
ClickHouse/ClickHouse
Concurrency
C++
2025-08-11
copy
raw
open
Use error chain iterators
When traversing error chains in Rust, prefer using the `chain()` iterator method over manual source traversal with while loops. The `chai...
PostHog/posthog
Error Handling
Rust
2025-08-11
copy
raw
open
avoid repeated expensive operations
Identify and eliminate repeated expensive computations, especially in loops and frequently executed code paths. This optimization princip...
duckdb/duckdb
Performance Optimization
C++
2025-08-08
copy
raw
open
Setting declaration practices
Always declare settings before using them and optimize access patterns for performance. Settings must be properly declared in the appropr...
ClickHouse/ClickHouse
Configurations
C++
2025-08-08
copy
raw
open
API parameter semantics
Ensure API parameters have clear semantic meaning and avoid sending null values for optional fields. When designing API endpoints, use pa...
PostHog/posthog
API
TSX
2025-08-08
copy
raw
open
minimize expensive operations
Avoid triggering expensive operations (queries, API calls, computations) on every user input or state change. Instead, use appropriate tr...
PostHog/posthog
Performance Optimization
TSX
2025-08-08
copy
raw
open
Verify HTML escaping
Always verify that user-controlled content in templates is properly HTML-escaped to prevent XSS attacks. Don't just assume framework defa...
PostHog/posthog
Security
Html
2025-08-08
copy
raw
open
Explicit error handling
Always handle error conditions explicitly rather than silently ignoring them or using generic error responses. Use specific error codes t...
ClickHouse/ClickHouse
Error Handling
C++
2025-08-07
copy
raw
open
remove unnecessary code
Eliminate unnecessary code elements that add complexity without providing value. This includes removing redundant function wrappers, unne...
rocicorp/mono
Code Style
TypeScript
2025-08-07
copy
raw
open
Optimize algorithm complexity
Choose efficient algorithms and data structures to avoid unnecessary computational complexity. Replace manual loops with optimized librar...
duckdb/duckdb
Algorithms
Other
2025-08-07
copy
raw
open
validate before use
Always validate that values are truthy or defined before using them, even when they are expected to exist. This prevents runtime errors a...
PostHog/posthog
Null Handling
TypeScript
2025-08-07
copy
raw
open
Guard expensive logging operations
Avoid executing expensive operations in logging code paths when logging is disabled or not needed. Always check if logging should occur b...
duckdb/duckdb
Logging
C++
2025-08-06
copy
raw
open
Environment-based configuration management
Prefer environment variables over file mounting for configuration values, and avoid hardcoded environment-specific conditionals like `isC...
PostHog/posthog
Configurations
TypeScript
2025-08-06
copy
raw
open
maintain codebase consistency
Ensure new code follows established patterns, conventions, and standards already present in the codebase. This includes adhering to param...
duckdb/duckdb
Code Style
Other
2025-08-05
copy
raw
open
Environment variable handling
When working with environment variables, follow consistent naming conventions, properly check for their presence, and preserve the enviro...
duckdb/duckdb
Configurations
Python
2025-08-05
copy
raw
open
Follow CSS naming patterns
Maintain consistency with established CSS naming conventions already used in the codebase. For CSS classes, follow BEM methodology when t...
PostHog/posthog
Naming Conventions
Css
2025-08-05
copy
raw
open
validate schema decisions
When reviewing database schema changes or data structure modifications, ensure that field inclusion/exclusion decisions are explicitly ju...
PostHog/posthog
Database
Other
2025-08-05
copy
raw
open
avoid unnecessary computations
Optimize algorithms by eliminating redundant work and intermediate data structures. Look for opportunities to use lazy evaluation, condit...
rocicorp/mono
Algorithms
TypeScript
2025-08-01
copy
raw
open
avoid global state
Avoid global state in concurrent environments where multiple instances, workers, or clients may share the same JavaScript context. Global...
rocicorp/mono
Concurrency
TypeScript
2025-08-01
copy
raw
open
Use allowlists over blocklists
When filtering data for security purposes, prefer allowlists (explicitly defining what is permitted) over blocklists (explicitly defining...
PostHog/posthog
Security
TypeScript
2025-07-31
copy
raw
open
maintain API backward compatibility
When evolving APIs, prioritize backward compatibility by creating new methods or overloads rather than modifying existing function signat...
duckdb/duckdb
API
Other
2025-07-30
copy
raw
open
Document API parameters inline
When designing APIs, prioritize clarity and self-documentation by adding inline comments for non-obvious parameters and choosing descript...
ClickHouse/ClickHouse
API
Other
2025-07-30
copy
raw
open
Use proper authorization attributes
Avoid using Django framework attributes like `is_staff` and `is_impersonated` for application role checking, as these serve different pur...
PostHog/posthog
Security
TSX
2025-07-30
copy
raw
open
Use descriptive naming
Choose names that clearly communicate intent and purpose rather than being generic, abbreviated, or potentially misleading. Names should ...
duckdb/duckdb
Naming Conventions
C++
2025-07-29
copy
raw
open
consistent null validation
Ensure null checks and input validation are applied consistently across similar functions and code paths. When one function in an API per...
duckdb/duckdb
Null Handling
C++
2025-07-29
copy
raw
open
Use semantically accurate names
Choose names that accurately reflect the purpose, scope, and semantics of variables, methods, and classes. Names should be self-documenti...
apache/kafka
Naming Conventions
Java
2025-07-28
copy
raw
open
Session-specific configuration access
Always access configuration through the appropriate session context rather than using global configuration access. This ensures that sess...
apache/spark
Configurations
Other
2025-07-28
copy
raw
open
Validate configurations early
Perform comprehensive configuration validation as early as possible in the execution flow, before any state modifications occur. This pre...
apache/kafka
Configurations
Other
2025-07-28
copy
raw
open
context-independent schema design
Database schema elements (views, constraints, tables) should be designed to be context-independent and self-contained. This means all ide...
apache/spark
Database
Java
2025-07-28
copy
raw
open
avoid unnecessary computations
Prevent performance degradation by avoiding unnecessary expensive operations such as premature execution, redundant iterations, and costl...
apache/spark
Performance Optimization
Other
2025-07-26
copy
raw
open
optimize data structures
Choose appropriate data structures and algorithms to optimize computational complexity and performance. Consider the specific use case an...
apache/spark
Algorithms
Other
2025-07-25
copy
raw
open
prefer simple APIs
Design APIs with simplicity in mind by avoiding unnecessary method overloads, reducing configuration options, and preferring single well-...
apache/spark
API
Other
2025-07-25
copy
raw
open
validate configuration dependencies
Validate configuration dependencies and constraints at initialization time rather than allowing invalid combinations to cause runtime fai...
apache/kafka
Configurations
Java
2025-07-25
copy
raw
open
validate user inputs
Always validate and properly escape user-controlled input before incorporating it into structured data formats like JSON, SQL, XML, or co...
ClickHouse/ClickHouse
Security
C++
2025-07-25
copy
raw
open
optimize expensive operations
Before executing computationally expensive operations, implement conditional checks to determine if the operation is actually necessary. ...
apache/spark
Algorithms
Python
2025-07-25
copy
raw
open
avoid unnecessary object creation
Minimize object allocation in performance-critical code paths by reusing existing objects, caching expensive operations, and choosing eff...
apache/kafka
Performance Optimization
Java
2025-07-24
copy
raw
open
Ensure complete JavaDoc coverage
All public classes, methods, and parameters must have comprehensive JavaDoc documentation. This includes: 1. **Class-level JavaDoc**: Eve...
apache/kafka
Documentation
Java
2025-07-24
copy
raw
open
optimize data structures
When working with data structures and collections, optimize for performance and correctness by using modern APIs, proper sizing, result f...
apache/kafka
Database
Java
2025-07-24
copy
raw
open
validate network state
Always validate network connectivity and cluster state before attempting network operations. Check for leader availability, partition exi...
apache/kafka
Networking
Java
2025-07-24
copy
raw
open
comprehensive test coverage
Ensure test suites provide comprehensive coverage by including edge cases, boundary conditions, and input variations while verifying that...
apache/spark
Testing
Sql
2025-07-24
copy
raw
open
Document configuration constraints
Configuration documentation must explicitly specify when settings should or should not be used, including conditional requirements and mu...
apache/kafka
Configurations
Html
2025-07-24
copy
raw
open
optimize database operations
When working with database operations, prioritize batching multiple statements and pushing operations down to the database level for opti...
apache/spark
Database
Other
2025-07-23
copy
raw
open
comprehensive test coverage
Ensure tests cover not only the happy path but also edge cases, error scenarios, and complete workflows. Many code reviews reveal gaps wh...
apache/kafka
Testing
Java
2025-07-23
copy
raw
open
Consistent clear naming
Use consistent terminology across similar concepts and choose names that clearly indicate their purpose. Avoid overloaded terms that caus...
prisma/prisma
Naming Conventions
TypeScript
2025-07-23
copy
raw
open
API completeness validation
Ensure APIs are complete by validating that all necessary cases are handled, all required arguments are properly validated, and response ...
apache/kafka
API
Java
2025-07-23
copy
raw
open
Structure components with clarity
Maintain clean and logical component organization by following these guidelines: 1. Keep related files together - place test files beside...
supabase/supabase
Code Style
TSX
2025-07-23
copy
raw
open
catch specific exceptions
Avoid catching overly broad exception types like `Throwable` or `Exception` when you can be more specific about the expected failure mode...
apache/kafka
Error Handling
Java
2025-07-23
copy
raw
open
Externalize configuration values
Avoid hardcoding configuration values directly in code. Instead, make them externally configurable through appropriate mechanisms based o...
apache/spark
Configurations
Python
2025-07-23
copy
raw
open
parameterize configuration values
Replace hardcoded configuration values with parameterized variables in build files and configuration management. This enables flexible en...
apache/spark
Configurations
Xml
2025-07-23
copy
raw
open
Complete method documentation
All public methods, especially in interfaces and APIs, must have comprehensive JavaDoc documentation that clearly describes their purpose...
apache/spark
Documentation
Java
2025-07-23
copy
raw
open
prefer modern collection APIs
Use modern collection creation methods instead of legacy alternatives for improved readability and conciseness. Replace older patterns wi...
apache/kafka
Code Style
Java
2025-07-22
copy
raw
open
Include contextual information
Log messages should include comprehensive contextual information to support debugging and system monitoring. This includes relevant ident...
apache/spark
Logging
Other
2025-07-22
copy
raw
open
Protect shared state
Always protect shared mutable state with appropriate synchronization mechanisms to prevent race conditions and data corruption in multi-t...
duckdb/duckdb
Concurrency
C++
2025-07-22
copy
raw
open
self-documenting code practices
Write code that explains itself through clear structure and meaningful names, while adding targeted comments only where necessary for fut...
apache/spark
Documentation
Other
2025-07-22
copy
raw
open
Use parameter-based paths
When designing API routes and interfaces, always use parameter-based path syntax instead of hardcoded literals. This approach provides be...
supabase/supabase
API
TSX
2025-07-22
copy
raw
open
avoid manual error handling
Prefer centralized error handling mechanisms and specialized utilities over manual error handling in individual components. Instead of im...
rocicorp/mono
Error Handling
TSX
2025-07-22
copy
raw
open
ensure test isolation
Tests must properly clean up resources and avoid side effects that can impact other tests, especially when running in parallel. This prev...
apache/spark
Testing
Python
2025-07-22
copy
raw
open
validate before data access
Always validate for null or None values before accessing data elements, especially when working with collections or optional parameters. ...
apache/spark
Null Handling
Python
2025-07-22
copy
raw
open
Simplify conditional structures
Organize complex conditional logic using clear, sequential patterns rather than nested structures or multiple early returns. This improve...
apache/spark
Code Style
Other
2025-07-21
copy
raw
open
optimize algorithmic complexity
Replace inefficient algorithms with more optimal data structures and approaches to improve computational complexity. Look for opportuniti...
apache/kafka
Algorithms
Java
2025-07-21
copy
raw
open
Clear, descriptive identifiers
Choose variable, component, and parameter names that clearly describe their purpose and avoid ambiguity. Names should fully reflect funct...
supabase/supabase
Naming Conventions
TSX
2025-07-21
copy
raw
open
comprehensive database testing
Database tests should execute actual queries and verify results comprehensively, not just check query plans or use hash comparisons. Alwa...
duckdb/duckdb
Database
Other
2025-07-21
copy
raw
open
API initialization side effects
When initializing API clients, prefer bootstrap/configuration patterns over method calls that may trigger unintended side effects like bi...
PostHog/posthog
API
Html
2025-07-21
copy
raw
open
Use parameterized logging
Use parameterized logging with placeholders (`{}`) instead of string concatenation for better performance and readability. When logging e...
apache/kafka
Logging
Java
2025-07-20
copy
raw
open
avoid null in Scala
Avoid using null values in Scala code and prefer Option types for representing optional values. Null usage can lead to NullPointerExcepti...
apache/spark
Null Handling
Other
2025-07-19
copy
raw
open
Maintain code consistency
Ensure consistent code organization, naming conventions, and structure throughout the codebase: 1. Use identical parameter names for simi...
supabase/supabase
Code Style
Other
2025-07-18
copy
raw
open
Maintain consistent naming patterns
Ensure all new functions, files, and identifiers follow established naming conventions within the codebase. This prevents naming conflict...
duckdb/duckdb
Naming Conventions
Json
2025-07-18
copy
raw
open
thoughtful configuration design
When designing configuration options, environment variables, and build settings, follow established patterns and ensure they serve a clea...
duckdb/duckdb
Configurations
Txt
2025-07-18
copy
raw
open
Verify CI build consistency
Ensure CI pipelines thoroughly verify build outputs and maintain consistency across different build tools and configurations. This preven...
apache/spark
CI/CD
Yaml
2025-07-18
copy
raw
open
API response completeness
Ensure API responses contain all necessary data fields and provide mechanisms for clients to verify operation results. When building API ...
apache/kafka
API
Other
2025-07-18
copy
raw
open
avoid stale ref values
When using React refs in hooks like useLayoutEffect or useEffect, pass the ref object itself rather than ref.current to avoid stale value...
rocicorp/mono
React
TypeScript
2025-07-18
copy
raw
open
prefer system properties directly
When detecting operating system or environment characteristics, prefer direct access to system properties over external library dependenc...
apache/spark
Configurations
Java
2025-07-18
copy
raw
open
explicit null handling
Prefer explicit null and undefined handling over optional or nullable types. When possible, provide default values or objects instead of ...
prisma/prisma
Null Handling
TypeScript
2025-07-17
copy
raw
open
Defensive null validation
Always validate null parameters and dependencies early with proper ordering to prevent NullPointerExceptions and provide clear error mess...
apache/kafka
Null Handling
Java
2025-07-17
copy
raw
open
Improve code readability
Write code that prioritizes readability through clear string formatting, descriptive method calls, and well-organized structure. Use stri...
apache/kafka
Code Style
Other
2025-07-17
copy
raw
open
Centralize configuration values
Extract and centralize configuration values instead of duplicating or hardcoding them throughout the codebase. This improves maintainabil...
supabase/supabase
Configurations
TypeScript
2025-07-17
copy
raw
open
Explicit CI configurations
CI/CD workflows should use explicit, named configurations rather than wildcards, globs, or implicit behaviors to improve maintainability ...
duckdb/duckdb
CI/CD
Yaml
2025-07-16
copy
raw
open
Environment variable patterns
Use consistent patterns for environment variable handling and configuration validation. Access environment variables directly where they'...
rocicorp/mono
Configurations
TypeScript
2025-07-16
copy
raw
open
enforce database constraints properly
Database schemas should use appropriate constraints to enforce business rules and prevent data inconsistencies. When designing tables, id...
rocicorp/mono
Database
Sql
2025-07-16
copy
raw
open
avoid overly specific examples
When documenting configuration options, use generic examples that don't unnecessarily tie documentation to specific versions, environment...
apache/kafka
Configurations
Markdown
2025-07-16
copy
raw
open
Centralize configuration values
Avoid duplicating configuration values across multiple files by maintaining a single source of truth for environment variables, build arg...
apache/kafka
Configurations
Dockerfile
2025-07-16
copy
raw
open
Eliminate unnecessary complexity
Remove unnecessary default parameters and consolidate related conditional logic to improve code clarity and maintainability. When paramet...
apache/spark
Code Style
Python
2025-07-16
copy
raw
open
Use appropriate HTTP methods
Choose HTTP methods that align with the actual operation being performed. Use GET for retrieving data with query parameters, and POST for...
supabase/supabase
API
TypeScript
2025-07-16
copy
raw
open
explicit null handling
Use explicit null and undefined checks with assertions to validate assumptions and maintain type safety. Prefer `!= null` for checking bo...
rocicorp/mono
Null Handling
TypeScript
2025-07-15
copy
raw
open
Prevent hardcoded secrets
Never store sensitive information such as API keys, passwords, tokens, or credentials directly in your source code. These hardcoded secre...
supabase/supabase
Security
TypeScript
2025-07-15
copy
raw
open
minimize public API surface
Only expose APIs that are truly necessary for external consumers and avoid creating public interfaces that may become maintenance burdens...
apache/spark
API
Java
2025-07-15
copy
raw
open
Abstract user-facing errors
Error messages displayed to end users should abstract away implementation details while providing actionable information. Avoid exposing ...
supabase/supabase
Error Handling
TSX
2025-07-15
copy
raw
open
Use configuration over hardcoding
Always use configuration constants instead of hardcoding values directly in the code. This improves maintainability and reduces errors wh...
supabase/supabase
Configurations
TSX
2025-07-15
copy
raw
open
consistent null handling
Maintain consistency in null handling patterns across the codebase. When multiple approaches exist for representing absent or disabled va...
apache/spark
Null Handling
Java
2025-07-15
copy
raw
open
Synchronization safety patterns
Ensure proper synchronization mechanisms to prevent deadlocks and race conditions in concurrent code. When designing thread-safe componen...
apache/kafka
Concurrency
Java
2025-07-14
copy
raw
open
condition-based network synchronization
When waiting for network state propagation or distributed system synchronization, avoid using fixed sleep times and instead implement con...
apache/kafka
Networking
Other
2025-07-13
copy
raw
open
Use condition-based waiting
Replace fixed-time delays with condition-based waiting mechanisms to ensure reliable synchronization and avoid timing-dependent race cond...
apache/kafka
Concurrency
Other
2025-07-12
copy
raw
open
maintain naming consistency
Ensure consistent naming conventions and parameter ordering throughout the codebase. This includes maintaining consistent parameter order...
apache/kafka
Naming Conventions
Other
2025-07-11
copy
raw
open
sequence data state updates
When working with distributed data systems, ensure that state updates are performed in the correct conceptual order to maintain data cons...
apache/kafka
Database
Other
2025-07-11
copy
raw
open
maintain API backwards compatibility
Never modify existing stable API versions in ways that could break backwards compatibility. When adding new functionality, always introdu...
duckdb/duckdb
API
Json
2025-07-11
copy
raw
open
Resource cleanup responsibility
Ensure proper resource management by clearly defining cleanup responsibilities and implementing robust cleanup patterns. Resources should...
apache/spark
Error Handling
Other
2025-07-10
copy
raw
open
Handle external operations safely
Always implement explicit error handling for external operations such as network requests, database queries, and API calls. When errors o...
supabase/supabase
Error Handling
TypeScript
2025-07-10
copy
raw
open
Prevent re-render triggers
Avoid creating new object/array references in component render functions and carefully manage state updates to prevent unnecessary re-ren...
supabase/supabase
Performance Optimization
TSX
2025-07-10
copy
raw
open
Document precise security requirements
Security documentation must specify exact permission requirements with clear scope and timing details. Vague or outdated security require...
apache/kafka
Security
Html
2025-07-10
copy
raw
open
type-safe database operations
Implement proper type conversion and validation when working with different database systems to prevent runtime errors and data corruptio...
rocicorp/mono
Database
TypeScript
2025-07-09
copy
raw
open
Optimize collection conversions
When converting between Java and Scala collections or performing set operations, choose methods that minimize temporary collection creati...
apache/kafka
Algorithms
Other
2025-07-09
copy
raw
open
Handle all error paths
Ensure comprehensive error handling throughout the codebase by implementing proper error handling blocks, defensive validation, and thoro...
neondatabase/neon
Error Handling
C
2025-07-09
copy
raw
open
Meaningful consistent naming
Use descriptive, semantically clear names that follow consistent patterns throughout the codebase. Names should convey purpose and follow...
vitessio/vitess
Naming Conventions
Go
2025-07-08
copy
raw
open
Minimize unnecessary allocations
Avoid allocations and cloning when they don''t provide sufficient benefit relative to their performance cost. Balance optimization effort...
neondatabase/neon
Performance Optimization
Rust
2025-07-08
copy
raw
open
Design metrics for insights
Design metrics that provide actionable insights while maintaining system efficiency. Follow these key principles: 1. Track success and fa...
neondatabase/neon
Observability
Rust
2025-07-08
copy
raw
open
Connection pooling with pipelining
Implement connection pooling with request pipelining for network services to optimize resource usage and improve throughput. Pool should ...
neondatabase/neon
Networking
Rust
2025-07-08
copy
raw
open
Ensure algorithm robustness
When implementing algorithms, ensure they handle all edge cases correctly and robustly. Code should gracefully manage exceptional conditi...
neondatabase/neon
Algorithms
Rust
2025-07-08
copy
raw
open
Document API specs completely
When designing and implementing APIs, always provide comprehensive specifications that clearly document all endpoints, methods, parameter...
neondatabase/neon
API
Markdown
2025-07-08
copy
raw
open
Environment-specific config defaults
Define appropriate configuration defaults for different environments (development, testing, production) using dedicated configuration cla...
neondatabase/neon
Configurations
Python
2025-07-08
copy
raw
open
use modern Java syntax
Prefer modern Java language features and constructs to write more concise, readable code. Since Apache Spark 4.0.0, the project recommend...
apache/spark
Code Style
Java
2025-07-08
copy
raw
open
Explicit null handling
Use explicit patterns when dealing with potentially null or undefined values to prevent runtime errors and improve code clarity: 1. **Mar...
supabase/supabase
Null Handling
TSX
2025-07-08
copy
raw
open
Handle network interrupts safely
Network code must properly handle interrupts and maintain consistent connection state at all potential interruption points. When implemen...
neondatabase/neon
Networking
C
2025-07-08
copy
raw
open
Document structure consistency
Maintain consistent document structure and formatting in documentation to improve readability and user experience. Follow these key princ...
supabase/supabase
Documentation
Other
2025-07-07
copy
raw
open
prefer settings over pragmas
When implementing configuration options, prefer database settings over pragma functions to maintain consistency and better user experienc...
duckdb/duckdb
Configurations
C++
2025-07-07
copy
raw
open
Avoid code duplication
Maintain clean, maintainable code by avoiding duplication and following proper code organization principles: 1. Place utility functions i...
supabase/supabase
Code Style
TypeScript
2025-07-07
copy
raw
open
Use descriptive identifiers
Choose clear, meaningful names for variables, parameters, and constants that convey their purpose without requiring additional documentat...
neondatabase/neon
Naming Conventions
Python
2025-07-04
copy
raw
open
dependency management practices
Ensure comprehensive dependency management in package.json files by following these practices: 1. **Evaluate necessity**: Before adding d...
rocicorp/mono
Configurations
Json
2025-07-04
copy
raw
open
Add proactive null checks
Always add null checks before accessing methods or properties on objects that can potentially be null, especially when dealing with Java ...
apache/kafka
Null Handling
Other
2025-07-04
copy
raw
open
Clear consistent identifier names
Choose clear, consistent, and non-redundant names for identifiers across the codebase. Follow these guidelines: 1. Use specific, descript...
neondatabase/neon
Naming Conventions
Rust
2025-07-03
copy
raw
open
Manage output streams carefully
Always consider the destination and lifecycle of output streams to prevent protocol interference, data loss, and unexpected behavior. Cho...
prisma/prisma
Logging
TypeScript
2025-07-03
copy
raw
open
Pin GitHub action versions
Always pin GitHub Actions to specific commit hashes instead of using major/minor version tags (like @v4). This ensures reproducible build...
neondatabase/neon
CI/CD
Yaml
2025-07-03
copy
raw
open
Protect sensitive API keys
Never expose keys with elevated privileges (such as `service_role` or secret keys) in client-side code. These keys can bypass Row Level S...
supabase/supabase
Security
Other
2025-07-03
copy
raw
open
Avoid flaky tests
Tests should be designed to be deterministic and reliable to prevent\ \ wasted developer time and false confidence. \n\nTwo common causes...
neondatabase/neon
Testing
Python
2025-07-03
copy
raw
open
Optimize data structures
When implementing algorithms, prioritize data structure choices that minimize resource usage while maintaining functionality. Consider if...
neondatabase/neon
Algorithms
C
2025-07-03
copy
raw
open
comprehensive test assertions
Write test assertions that are both comprehensive and maintainable. Ensure all relevant fields and behaviors are validated, while using g...
apache/kafka
Testing
Other
2025-07-03
copy
raw
open
Extract for clarity
Extract complex or reused logic into focused, well-named methods with single responsibilities. This improves code readability, testabilit...
elastic/elasticsearch
Code Style
Java
2025-07-02
copy
raw
open
Name reflects meaning
Choose names that clearly communicate the intent, behavior, and semantics of code elements. Names should be accurate, consistent, and fol...
elastic/elasticsearch
Naming Conventions
Java
2025-07-02
copy
raw
open
Prevent redundant operations
In distributed database systems, prevent redundant operations that can overload cluster resources. When implementing update operations th...
elastic/elasticsearch
Database
Java
2025-07-02
copy
raw
open
Clarity over uncertainty
Technical documentation should use precise language that clearly differentiates between product behavior and user configuration options. ...
elastic/elasticsearch
Documentation
Markdown
2025-07-02
copy
raw
open
Configure type serialization
When working with databases that exchange data with other systems, ensure proper serialization and deserialization of data types like UUI...
elastic/elasticsearch
Database
Markdown
2025-07-02
copy
raw
open
Maintain network controls
Create maintainable and clearly documented network access controls. Instead of hardcoding network restrictions, use dedicated tables that...
supabase/supabase
Networking
Other
2025-07-02
copy
raw
open
Design for evolution
When designing APIs, prioritize flexibility and independent evolution of components. Avoid tightly coupling related services or wrapping ...
elastic/elasticsearch
API
Java
2025-07-02
copy
raw
open
Specify explicit REST formats
Always specify explicit request formats in REST API tests rather than relying on default behaviors. This includes: 1. Set appropriate Con...
elastic/elasticsearch
API
Yaml
2025-07-02
copy
raw
open
Measure before optimizing performance
Before implementing performance optimizations, measure and validate the impact through benchmarks. This applies especially to: 1. Changes...
elastic/elasticsearch
Performance Optimization
Java
2025-07-01
copy
raw
open
Use configuration access methods
When accessing configuration settings, always use the appropriate type-safe accessor methods provided by the configuration framework rath...
elastic/elasticsearch
Configurations
Java
2025-07-01
copy
raw
open
Keep files focused small
Maintain code organization by keeping files focused on a single responsibility and splitting large files into smaller, well-organized mod...
neondatabase/neon
Code Style
Rust
2025-07-01
copy
raw
open
Hierarchical semantic naming
Use hierarchical prefixes and clear descriptive names to indicate the domain, source, and purpose of code elements. This improves code or...
neondatabase/neon
Naming Conventions
Other
2025-07-01
copy
raw
open
Proactive cache warming
Implement proactive cache warming strategies to minimize performance degradation after system restarts or during cold starts. Rather than...
neondatabase/neon
Performance Optimization
Markdown
2025-07-01
copy
raw
open
Ensure concurrent resource cleanup
Always ensure proper cleanup of concurrent resources like semaphores, transactions, and async operations, even when exceptions occur. Use...
prisma/prisma
Concurrency
TypeScript
2025-07-01
copy
raw
open
Adaptive cache expiration strategy
Design cache expiration policies that align with actual workload patterns rather than arbitrary timeframes. For systems with varying acce...
neondatabase/neon
Caching
Markdown
2025-07-01
copy
raw
open
Database before memory
When working with database systems that also maintain in-memory state, always update the persistent database state before updating the in...
neondatabase/neon
Database
Rust
2025-07-01
copy
raw
open
Feature flag implementation clarity
When implementing feature flags in the system, clearly document both the evaluation strategy and its performance implications. For HTTP e...
neondatabase/neon
Configurations
Markdown
2025-07-01
copy
raw
open
Enforce least privilege
Always assign the minimum permissions necessary for functionality when implementing role-based access controls. This fundamental security...
elastic/elasticsearch
Security
Java
2025-07-01
copy
raw
open
Optimize before implementing
Before implementing algorithms, evaluate their efficiency implications, especially for operations that may be executed frequently or with...
elastic/elasticsearch
Algorithms
Java
2025-06-30
copy
raw
open
Dynamic configuration needs validation
When implementing dynamic configuration options, validate that the system actually supports runtime changes for that setting. A configura...
vitessio/vitess
Configurations
Go
2025-06-30
copy
raw
open
Robust test assertions
Use precise, informative assertions in tests to provide clear feedback when tests fail and verify the correct behavior rather than implem...
elastic/elasticsearch
Testing
Java
2025-06-30
copy
raw
open
Log level appropriately
Select the appropriate log level based on operational significance and ensure messages are clear, accurate, and formatted for human reada...
neondatabase/neon
Logging
Rust
2025-06-30
copy
raw
open
Defensive null handling
Always handle null references and values defensively to prevent NullPointerExceptions and unexpected behavior. Follow these practices: 1....
elastic/elasticsearch
Null Handling
Java
2025-06-30
copy
raw
open
Parallel branch traceability
When implementing algorithms with parallel processing branches, ensure proper traceability and data consistency across all branches to fa...
elastic/elasticsearch
Algorithms
Markdown
2025-06-30
copy
raw
open
Stage intensive operations carefully
When implementing operations that consume significant system resources (CPU, memory, I/O), introduce changes gradually while monitoring p...
elastic/elasticsearch
Performance Optimization
Markdown
2025-06-30
copy
raw
open
Prefer callbacks over blocking
Always structure concurrent code to use asynchronous callbacks instead of blocking operations. Blocking calls like CountDownLatch, Thread...
elastic/elasticsearch
Concurrency
Java
2025-06-29
copy
raw
open
Optimize memory allocation patterns
Minimize memory allocations and optimize allocation patterns to improve performance. Key practices: 1. Pre-allocate collections with know...
pola-rs/polars
Performance Optimization
Rust
2025-06-29
copy
raw
open
Exceptions for critical errors
Use exceptions rather than assertions for handling critical error conditions that need to be caught in production. Assertions should only...
elastic/elasticsearch
Error Handling
Java
2025-06-27
copy
raw
open
Scope and document configurations
When designing and implementing configuration options, carefully consider two key aspects: 1. **Choose appropriate configuration scope**:...
elastic/elasticsearch
Configurations
Markdown
2025-06-27
copy
raw
open
Appropriate error handling
Distinguish between implementation errors (invariant violations) and expected failure cases. For implementation errors that should never ...
pola-rs/polars
Error Handling
Rust
2025-06-26
copy
raw
open
Database provider compatibility
Ensure database code properly handles provider-specific differences and capabilities. Different database providers have varying syntax re...
prisma/prisma
Database
TypeScript
2025-06-26
copy
raw
open
Optimize cargo dependencies
Maintain clean and efficient dependency configurations in Cargo.toml files by following these practices: 1. **Use workspace inheritance**...
neondatabase/neon
Configurations
Toml
2025-06-26
copy
raw
open
Extract duplicated code
Identify and extract duplicated code into reusable functions or move common fields to parent structures. This makes the codebase more mai...
pola-rs/polars
Code Style
Rust
2025-06-25
copy
raw
open
Hide implementation details
Design public APIs to hide implementation details and focus on the user's mental model of the system. Avoid exposing internal classes, im...
pola-rs/polars
API
Python
2025-06-25
copy
raw
open
Avoid unnecessary allocations
Minimize memory allocations by avoiding intermediate objects, sharing underlying buffers, and eliminating unnecessary array operations. T...
prisma/prisma
Performance Optimization
TypeScript
2025-06-25
copy
raw
open
Prevent deadlock conditions
Carefully manage resource acquisition and release to prevent deadlocks in concurrent code. Deadlocks typically occur when multiple thread...
pola-rs/polars
Concurrency
Rust
2025-06-25
copy
raw
open
validate inputs early
Validate function inputs, preconditions, and assumptions as early as possible in the execution flow, preferably during binding or initial...
duckdb/duckdb
Error Handling
C++
2025-06-24
copy
raw
open
Structure endpoints for REST
Organize API endpoints hierarchically by resource type and use appropriate HTTP methods based on operation semantics. Group related opera...
neondatabase/neon
API
Rust
2025-06-23
copy
raw
open
Prevent cryptic errors
Always implement proper validation and type checking to prevent cryptic error messages. When errors do occur, provide clear, actionable g...
pola-rs/polars
Error Handling
Python
2025-06-23
copy
raw
open
Secure authentication handling
Always implement proper authentication checks and protect sensitive credentials throughout your codebase. This includes: 1. **Validate al...
neondatabase/neon
Security
Rust
2025-06-23
copy
raw
open
Proper metrics design
When designing metrics for observability systems like Prometheus, follow established best practices to ensure your metrics are useful, qu...
neondatabase/neon
Observability
Other
2025-06-23
copy
raw
open
Sync environment variables
When converting hardcoded values to environment variables in configuration files (like docker-compose.yml), always update corresponding e...
supabase/supabase
Configurations
Yaml
2025-06-23
copy
raw
open
Safe null handling
Always implement robust null handling patterns to prevent unexpected behavior and crashes. Consider all edge cases where null values migh...
pola-rs/polars
Null Handling
Rust
2025-06-22
copy
raw
open
Optimize memory allocation
Always allocate data structures with appropriate initial capacity and use memory-efficient data types to reduce memory pressure and impro...
vitessio/vitess
Performance Optimization
Go
2025-06-22
copy
raw
open
Configuration context consistency
Ensure configuration names, values, and settings accurately reflect their intended context and usage. Configuration mismatches can lead t...
drizzle-team/drizzle-orm
Configurations
TypeScript
2025-06-22
copy
raw
open
preserve error context
When propagating errors through promise rejections, catch blocks, or error transformations, always preserve the original error informatio...
rocicorp/mono
Error Handling
TypeScript
2025-06-20
copy
raw
open
Flexible documented configurations
Create configuration interfaces that are flexible, well-documented, and future-proof. When designing configuration parameters: 1. **Prefe...
neondatabase/neon
Configurations
Other
2025-06-20
copy
raw
open
Optimize what matters
Focus optimization efforts on performance-critical paths rather than applying micro-optimizations everywhere. Balance code clarity and ma...
neondatabase/neon
Performance Optimization
C
2025-06-20
copy
raw
open
Design for operation flexibility
When implementing algorithms that operate on data structures (particularly arrays, lists, or collections), design them to handle both con...
pola-rs/polars
Algorithms
Python
2025-06-19
copy
raw
open
Use specialized sensitive types
When handling sensitive data like encryption keys, choose data types based on the data's lifecycle and security requirements. Use special...
duckdb/duckdb
Security
Other
2025-06-19
copy
raw
open
Document parameter choices
Always add explanatory comments for parameters or configuration options that aren''t self-explanatory from their names or context. These ...
neondatabase/neon
Documentation
Python
2025-06-17
copy
raw
open
Validate environment configurations
Ensure that all environment-specific configurations work properly across all target environments, particularly when managing multiple arc...
vitessio/vitess
Configurations
Yaml
2025-06-17
copy
raw
open
dependency classification standards
Ensure proper classification and versioning of package dependencies in package.json files. Dependencies should be classified based on the...
prisma/prisma
Configurations
Json
2025-06-16
copy
raw
open
Names reveal clear intent
Choose names that clearly communicate intent and context, avoiding ambiguity or confusion. Variable and function names should be self-doc...
pola-rs/polars
Naming Conventions
Rust
2025-06-16
copy
raw
open
Proper Option type usage
Use Option
only for truly optional values that can meaningfully be None. Avoid using Option when a value is always required or when de...
neondatabase/neon
Null Handling
Rust
2025-06-16
copy
raw
open
Guard against race conditions
When working with concurrent operations, always implement proper guards to prevent race conditions between processes. This includes: 1. A...
neondatabase/neon
Concurrency
C
2025-06-16
copy
raw
open
Test algorithmic performance scaling
When implementing or modifying algorithms, especially data structures like hash tables, bloom filters, or pattern matching logic, ensure ...
apache/spark
Algorithms
Java
2025-06-16
copy
raw
open
Verify dependency integrity
Always verify the integrity of external dependencies, especially those downloaded from non-official or personal repositories. This helps ...
vitessio/vitess
Security
Yaml
2025-06-16
copy
raw
open
avoid cosmetic formatting changes
Avoid including purely cosmetic formatting changes in pull requests that serve a functional purpose. Automatic formatter changes (like Pr...
drizzle-team/drizzle-orm
Code Style
TypeScript
2025-06-15
copy
raw
open
minimize hot path allocations
Reduce memory allocations and garbage collection pressure in frequently executed code paths. Object creation through functional methods l...
rocicorp/mono
Performance Optimization
TypeScript
2025-06-13
copy
raw
open
Avoid flaky tests
Design tests to be deterministic and reliable across different environments. Tests that occasionally fail due to timing, race conditions,...
elastic/elasticsearch
Testing
Yaml
2025-06-13
copy
raw
open
Use current configuration patterns
Always use the current recommended configuration patterns for your project, avoiding deprecated approaches. When configuring tests, featu...
elastic/elasticsearch
Configurations
Yaml
2025-06-13
copy
raw
open
Justify CI resource additions
Before adding new resources (Dockerfiles, jobs, images) to CI/CD pipelines, provide clear justification for their necessity and document ...
vitessio/vitess
CI/CD
Other
2025-06-13
copy
raw
open
explicit null state management
Make null state checks explicit and comprehensive rather than using implicit return values or redundant fields. Use dedicated methods lik...
duckdb/duckdb
Null Handling
Other
2025-06-12
copy
raw
open
Explicit null handling
Always be explicit and consistent about how null values are handled in operations and documentation. This clarity prevents confusion and ...
pola-rs/polars
Null Handling
Python
2025-06-11
copy
raw
open
preserve serialization compatibility
When making changes to serialized data structures, always preserve backward and forward compatibility to prevent breaking existing databa...
duckdb/duckdb
Migrations
Other
2025-06-11
copy
raw
open
Use parameterized queries
Always use parameterized queries with bind variables instead of string concatenation or formatting when constructing SQL statements. This...
vitessio/vitess
Database
Go
2025-06-11
copy
raw
open
generate test data dynamically
Instead of adding static test data files to the repository, generate test data programmatically within test cases. This approach improves...
duckdb/duckdb
Testing
Csv
2025-06-11
copy
raw
open
Extract and reuse
Create focused utility functions for repeated or complex operations instead of duplicating logic across the codebase. When implementing f...
neondatabase/neon
Code Style
C
2025-06-11
copy
raw
open
Consistent case style
Use consistent case styles in your codebase, adapting to the conventions of the ecosystem you're interacting with. When working with syst...
supabase/supabase
Naming Conventions
TypeScript
2025-06-11
copy
raw
open
Escape SQL parameters
Always escape parameters in database connection strings to prevent SQL injection attacks. Direct string concatenation with user-provided ...
neondatabase/neon
Security
Sql
2025-06-11
copy
raw
open
Design domain-specific error types
Create and use domain-specific error types instead of generic errors or anyhow. This improves error handling clarity and ensures proper e...
neondatabase/neon
Error Handling
Rust
2025-06-10
copy
raw
open
Comprehensive code documentation
Properly document code with clear, accurate, and useful comments using the correct syntax based on context: 1. Use `///` to document item...
neondatabase/neon
Documentation
Rust
2025-06-10
copy
raw
open
secure sensitive data handling
When handling sensitive data like encryption keys, passwords, or authentication tokens, avoid using standard string types that can be eas...
duckdb/duckdb
Security
C++
2025-06-10
copy
raw
open
Use descriptive names
Choose names that clearly communicate intent and purpose, avoiding vague or misleading terms. Names should be self-documenting and accura...
rocicorp/mono
Naming Conventions
TypeScript
2025-06-09
copy
raw
open
Reliable concurrency synchronization
When handling concurrent operations, prefer completion signals and proper thread management over arbitrary timeouts. This improves code r...
neondatabase/neon
Concurrency
Python
2025-06-05
copy
raw
open
Choose appropriate abstractions
When designing APIs, select data types and patterns that match how they will be consumed while facilitating long-term maintainability: 1....
pola-rs/polars
API
Rust
2025-06-04
copy
raw
open
Optimize data transformations
When implementing data processing operations, avoid unnecessary data transformations, copies, and conversions that can impact query perfo...
pola-rs/polars
Database
Rust
2025-06-04
copy
raw
open
Configuration context alignment
Choose the appropriate configuration context based on how changes will be handled by the system. When defining custom configuration varia...
neondatabase/neon
Configurations
C
2025-06-04
copy
raw
open
Use descriptive names
Choose names that clearly convey purpose and context rather than generic or vague terms. Names should be self-documenting and provide suf...
apache/spark
Naming Conventions
Java
2025-06-04
copy
raw
open
Database entity configuration
Configure database entities with appropriate defaults and clear type distinctions. For triggers, prefer AFTER/ROW over BEFORE/STATEMENT a...
supabase/supabase
Database
TSX
2025-06-04
copy
raw
open
Harden CI/CD runners
All CI/CD workflow jobs must implement security controls for network traffic, particularly using the step-security/harden-runner action o...
neondatabase/neon
Security
Yaml
2025-06-04
copy
raw
open
Follow API conventions
Design APIs following modern conventions and best practices to improve usability, maintainability, and consistency across your codebase. ...
influxdata/influxdb
API
Rust
2025-06-03
copy
raw
open
Descriptive semantic naming
Create identifiers that clearly convey meaning through descriptive names and appropriate types. Two key practices improve code readabilit...
influxdata/influxdb
Naming Conventions
Rust
2025-06-03
copy
raw
open
Prefer explicit nullability
Always make nullable states explicit in your code by leveraging Rust's type system. Use `Option
` rather than sentinel values (like emp...
influxdata/influxdb
Null Handling
Rust
2025-06-03
copy
raw
open
Use structured logging fields
Always use structured logging with descriptive field names rather than string interpolation. Include relevant context variables such as i...
influxdata/influxdb
Logging
Rust
2025-06-03
copy
raw
open
Performance-conscious metrics implementation
Implement metrics collection that is both comprehensive and minimally impactful on system performance. Design your metrics system to avoi...
influxdata/influxdb
Observability
Rust
2025-06-02
copy
raw
open
Database replica promotion safeguards
When implementing database replica promotion logic, avoid temporary workarounds that bypass validation checks. Instead, design a comprehe...
neondatabase/neon
Database
Other
2025-06-02
copy
raw
open
Mind transaction boundaries
Be conscious of implicit transaction boundaries when working with databases. Programming constructs can create unexpected transaction sco...
neondatabase/neon
Database
Python
2025-06-02
copy
raw
open
maintain clean CI configuration
Keep CI/CD configuration files clean and self-documenting by removing outdated comments, using descriptive parameter names, and avoiding ...
prisma/prisma
CI/CD
Yaml
2025-05-27
copy
raw
open
Minimize critical path allocations
Avoid unnecessary memory allocations in performance-critical code paths. These allocations not only consume memory but also trigger expen...
influxdata/influxdb
Performance Optimization
Rust
2025-05-26
copy
raw
open
Feature flag compatibility
Design code to work correctly with any combination of feature flags. When implementing conditional compilation with feature flags: 1. Use...
pola-rs/polars
Configurations
Rust
2025-05-26
copy
raw
open
Modern shell syntax
Prefer double brackets (`[[ ]]`) over single brackets (`[ ]`) in shell scripts for improved functionality and consistency. While double b...
neondatabase/neon
Code Style
Yaml
2025-05-23
copy
raw
open
Document intent clearly
Add clear documentation that explains not just what code does, but why certain approaches were chosen. This applies to: 1. **Complex code...
supabase/supabase
Documentation
TSX
2025-05-22
copy
raw
open
prefer nullish coalescing operator
Use the nullish coalescing operator (`??`) instead of the logical OR operator (`||`) when you specifically want to provide fallback value...
drizzle-team/drizzle-orm
Null Handling
TypeScript
2025-05-21
copy
raw
open
Maintain code readability
Ensure code remains readable and maintainable by following these practices: 1. **Combine case statements with identical outcomes** to red...
influxdata/influxdb
Code Style
Go
2025-05-21
copy
raw
open
Document concurrency design decisions
Always document key concurrency design decisions in code, including: 1. Locking protocols and ordering between multiple locks 2. Assumpti...
neondatabase/neon
Concurrency
Rust
2025-05-21
copy
raw
open
Follow hooks rules
Adhere strictly to React hooks rules and best practices to ensure your components behave correctly and predictably. Common issues include...
supabase/supabase
React
TSX
2025-05-21
copy
raw
open
Metric design best practices
Design metrics to be reliable and maintainable by following these key principles: 1. Initialize metrics with zero values to ensure consis...
vitessio/vitess
Observability
Go
2025-05-21
copy
raw
open
Configurable cache parameters
Cache configurations should be runtime-configurable rather than hardcoded, with support for dynamic resizing when configuration changes. ...
neondatabase/neon
Caching
Rust
2025-05-21
copy
raw
open
use default serialization methods
When adding new properties to serialization methods, use `WritePropertyWithDefault` and `ReadPropertyWithDefault` instead of `WriteProper...
duckdb/duckdb
Migrations
C++
2025-05-19
copy
raw
open
avoid redundant computations
Move loop-invariant conditions and computations outside of iteration blocks to improve performance and reduce redundant processing. When ...
duckdb/duckdb
Performance Optimization
Python
2025-05-19
copy
raw
open
Centralize workspace configurations
Centralize configuration settings like dependency versions and feature flags at the workspace level rather than duplicating them across i...
influxdata/influxdb
Configurations
Toml
2025-05-19
copy
raw
open
Consistent naming standards
Maintain consistent and standardized naming throughout the codebase: 1. **Use snake_case for multi-word identifiers**: Separate words in ...
pola-rs/polars
Naming Conventions
Python
2025-05-18
copy
raw
open
Extract duplicate code
When you notice code patterns being repeated across multiple locations, extract them into reusable functions or constants to improve main...
prisma/prisma
Code Style
TypeScript
2025-05-16
copy
raw
open
Secure authentication flows
Design APIs with secure authentication flows by following proper error handling and documentation practices. Avoid non-null assertions in...
supabase/supabase
API
Other
2025-05-16
copy
raw
open
Use null strategically
When handling empty or missing values, be intentional about using `null`, `undefined`, or empty strings based on how downstream systems i...
supabase/supabase
Null Handling
TypeScript
2025-05-16
copy
raw
open
Balance flexibility with performance
When designing APIs, carefully balance flexibility against performance constraints. More flexible APIs often come with implementation com...
neondatabase/neon
API
Other
2025-05-15
copy
raw
open
Secure token lifecycle
Implement comprehensive lifecycle controls for authentication tokens to maintain security throughout token creation, usage, and deletion ...
influxdata/influxdb
Security
Rust
2025-05-14
copy
raw
open
Performance test pragmatism
When designing performance tests, focus on efficiency and meaningful insights rather than exhaustive combinations. Consider these princip...
neondatabase/neon
Performance Optimization
Python
2025-05-13
copy
raw
open
Pin dependency versions
Always specify exact versions for dependencies in your configuration files and import statements to ensure consistent behavior across dif...
supabase/supabase
Configurations
Other
2025-05-11
copy
raw
open
Stage configuration changes gradually
When introducing configuration changes that affect multiple system components, implement them in stages to ensure smooth transitions and ...
neondatabase/neon
Configurations
Rust
2025-05-09
copy
raw
open
Safe database operations
When modifying database structures or executing dynamic SQL queries, prioritize both performance and safety: 1. **Use non-blocking operat...
supabase/supabase
Database
TypeScript
2025-05-07
copy
raw
open
Connection resilience patterns
Implement resilient networking connections with retry mechanisms for all client-service interactions. When establishing connections to ex...
supabase/supabase
Networking
TypeScript
2025-05-06
copy
raw
open
Preserve API backward compatibility
When modifying existing APIs, ensure that current usage patterns continue to work unchanged. This applies to command-line interfaces, lib...
duckdb/duckdb
API
Python
2025-05-05
copy
raw
open
Proper synchronization patterns
When implementing synchronization mechanisms, avoid common anti-patterns that can lead to performance issues or incorrect behavior. Use p...
apache/spark
Concurrency
Other
2025-05-02
copy
raw
open
maintain formatting consistency
Ensure consistent formatting patterns and styles throughout the codebase, both when writing new code and refactoring existing code. When ...
duckdb/duckdb
Code Style
Python
2025-05-02
copy
raw
open
Size fields appropriately
When designing database schemas, choose field types and sizes that accommodate both current and anticipated future data volumes. Undersiz...
vitessio/vitess
Database
Sql
2025-05-02
copy
raw
open
consistent error object usage
Always use proper Error objects when throwing exceptions, maintain consistent error handling contracts, and ensure type safety in error s...
prisma/prisma
Error Handling
TypeScript
2025-04-29
copy
raw
open
Optimize data structures
Choose and implement data structures with careful consideration of algorithmic complexity, memory usage, and Go''s specific performance c...
vitessio/vitess
Algorithms
Go
2025-04-28
copy
raw
open
Prefer opt-in security
When implementing security features that modify data presentation or alter normal data access patterns (like anonymization, masking, or r...
neondatabase/neon
Security
Dockerfile
2025-04-28
copy
raw
open
Explicit nil handling
Always handle nil values explicitly in your code to improve clarity and prevent subtle bugs. When a function needs to deal with potential...
vitessio/vitess
Null Handling
Go
2025-04-27
copy
raw
open
Defer expensive operations
Avoid triggering expensive computations prematurely in your code. Operations like `collect()`, intensive IO operations, or algorithms wit...
pola-rs/polars
Performance Optimization
Python
2025-04-25
copy
raw
open
CI workflow configuration best
Configure GitHub Actions workflows to maximize reliability and maintainability. Follow these key practices: 1. **Always test with latest ...
pola-rs/polars
CI/CD
Yaml
2025-04-21
copy
raw
open
Structured logging best practices
Use structured logging with appropriate field types and context to make logs more useful for troubleshooting. Choose specific field types...
influxdata/influxdb
Logging
Go
2025-04-18
copy
raw
open
Clear configuration parameters
Configuration parameters should be descriptively named, well documented, and have sensible defaults that are visible to users. This makes...
influxdata/influxdb
Configurations
Rust
2025-04-16
copy
raw
open
Prioritize searchable names
Choose names that are easily searchable and immediately understandable, avoiding unclear abbreviations and symbols that hinder discoverab...
prisma/prisma
Naming Conventions
Yaml
2025-04-14
copy
raw
open
proper async error testing
When testing for expected errors in async code, use Jest's built-in async error testing patterns instead of try-catch blocks with expecta...
prisma/prisma
Testing
TypeScript
2025-04-11
copy
raw
open
Document configuration alternatives
When documenting configuration setup, provide multiple formats and approaches to accommodate different tools, platforms, and environments...
prisma/prisma
Configurations
Markdown
2025-04-09
copy
raw
open
Avoid unnecessary work
When optimizing performance-critical code paths, eliminate redundant operations and unnecessary processing: 1. **Exit loops early** when ...
influxdata/influxdb
Performance Optimization
Go
2025-04-07
copy
raw
open
Prefer configurable values
Always use configurable values instead of hardcoded defaults when available. This ensures that user preferences are respected throughout ...
influxdata/influxdb
Configurations
Go
2025-04-07
copy
raw
open
Use descriptive names
Names in code should be self-documenting, accurately reflect purpose, and follow consistent conventions. Apply these principles throughou...
influxdata/influxdb
Naming Conventions
Go
2025-04-04
copy
raw
open
WebSocket lifecycle management
Ensure proper WebSocket connection lifecycle management by using `once()` instead of `on()` for cleanup operations and separating initial...
rocicorp/mono
Networking
TypeScript
2025-04-04
copy
raw
open
Design runtime-specific API exports
When designing APIs that need to work across different JavaScript runtimes (Node.js, edge environments, browsers), create explicit export...
prisma/prisma
API
Json
2025-04-02
copy
raw
open
Extract shared code patterns
Identify and extract repeated code patterns into reusable functions to improve maintainability and reduce duplication. When similar code ...
vitessio/vitess
Code Style
Go
2025-03-31
copy
raw
open
comprehensive test coverage
Ensure thorough test coverage by systematically testing edge cases, boundary conditions, failure scenarios, and different data types. Whe...
duckdb/duckdb
Testing
Other
2025-03-28
copy
raw
open
avoid quadratic complexity
When processing collections, be mindful of time complexity and avoid accidentally creating O(N²) algorithms, especially when simpler O(N)...
prisma/prisma
Algorithms
TypeScript
2025-03-28
copy
raw
open
Centralize configuration logic
Avoid scattering configuration defaults, validation, and loading logic across multiple functions. Instead, centralize these concerns in d...
prisma/prisma
Configurations
TypeScript
2025-03-28
copy
raw
open
prefer environment variables
When configuring behavior that needs to work across different execution contexts (CI workflows, manual runs, different build systems), pr...
duckdb/duckdb
Configurations
Yaml
2025-03-28
copy
raw
open
Validate sensitive operations
Always implement safety checks before performing operations that could expose sensitive data or cause destructive changes. This includes ...
prisma/prisma
Security
TypeScript
2025-03-28
copy
raw
open
optimize algorithmic performance
Prioritize algorithmic efficiency and avoid unnecessary computational overhead, especially in type-level operations and validation logic....
drizzle-team/drizzle-orm
Algorithms
TypeScript
2025-03-26
copy
raw
open
Explicit role security management
Always be explicit about role privileges when configuring database security. Remember that both `authenticated` and `anon` roles typicall...
supabase/supabase
Database
Other
2025-03-26
copy
raw
open
intuitive API method design
Design API methods with intuitive names and signatures that follow established conventions and provide good ergonomics. Avoid method name...
drizzle-team/drizzle-orm
API
TypeScript
2025-03-26
copy
raw
open
Concise performance documentation
When documenting performance metrics, benchmarks, or scalability information, prioritize clarity and conciseness. Avoid redundant wording...
supabase/supabase
Performance Optimization
Other
2025-03-26
copy
raw
open
Organize tests efficiently
Write maintainable, well-structured tests that are easy to understand and extend. Tests should remain simple and focused on their specifi...
pola-rs/polars
Testing
Python
2025-03-24
copy
raw
open
Cache performance preservation
When implementing database failover or restart mechanisms, ensure performance consistency by preserving and prewarming caches. Database p...
neondatabase/neon
Database
Markdown
2025-03-24
copy
raw
open
Document connection transitions
When implementing systems that involve network connection state changes (such as during failovers, restarts, or component promotions), ex...
neondatabase/neon
Networking
Markdown
2025-03-24
copy
raw
open
Scope JWT authentication tokens
Always include tenant, timeline, and endpoint identifiers in JWT tokens used for service authentication. This ensures proper isolation be...
neondatabase/neon
Security
Markdown
2025-03-23
copy
raw
open
optimize hot path performance
Avoid expensive operations in frequently executed code paths by implementing performance optimizations such as lookup tables, result cach...
duckdb/duckdb
Performance Optimization
Other
2025-03-21
copy
raw
open
Optimize large field queries
When working with database queries that process large text fields or arrays, choose operations that minimize data conversion and processi...
supabase/supabase
Performance Optimization
TypeScript
2025-03-21
copy
raw
open
Avoid skipping e2e tests
Do not use the `skip_e2e` flag to bypass end-to-end tests that fail. Instead, fix the test implementation by providing appropriate test d...
vitessio/vitess
Testing
Json
2025-03-20
copy
raw
open
verify authorization before operations
Always verify that users have proper authorization to access and modify resources before performing any data operations. This prevents pr...
rocicorp/mono
Security
TypeScript
2025-03-19
copy
raw
open
avoid redundant cache lookups
When implementing cache functionality, avoid performing the same cache lookup multiple times. Instead, store and reuse the result from th...
ClickHouse/ClickHouse
Caching
C++
2025-03-19
copy
raw
open
Document versioning strategies
Establish and clearly document versioning strategies in configuration files, both for your application and its dependencies. For applicat...
influxdata/influxdb
Configurations
Yaml
2025-03-19
copy
raw
open
Pin environment versions
Always use explicit version tags for CI/CD environments (runners, containers, images, tool versions) instead of floating references like ...
vitessio/vitess
CI/CD
Yaml
2025-03-19
copy
raw
open
Manage complete cache lifecycle
Implement comprehensive cache lifecycle management focusing on three key aspects: 1. Idempotent Creation: Make cache creation idempotent ...
influxdata/influxdb
Caching
Rust
2025-03-14
copy
raw
open
API abstraction levels
Functions and utilities should operate at appropriate abstraction levels without being aware of higher-level concepts or implementation d...
prisma/prisma
API
TypeScript
2025-03-12
copy
raw
open
Favor clarity over brevity
Always prioritize code readability and maintainability over concise but cryptic implementations. Extract repeated logic into well-named h...
pola-rs/polars
Code Style
Python
2025-03-11
copy
raw
open
Database API abstraction
When designing database interaction layers, carefully consider when to create wrapper methods versus allowing direct use of underlying li...
pola-rs/polars
Database
Python
2025-03-05
copy
raw
open
avoid password conversions
When handling sensitive data like passwords, avoid unnecessary type conversions that create additional copies in memory. Pass char[] arra...
apache/kafka
Security
Java
2025-03-05
copy
raw
open
Explicit configuration precedence
Implement a clear configuration resolution chain that follows a consistent precedence pattern: explicit parameters first, then environmen...
pola-rs/polars
Configurations
Python
2025-03-04
copy
raw
open
Evaluate algorithmic complexity tradeoffs
When implementing algorithms, carefully evaluate tradeoffs between performance optimizations and code maintainability. Consider: 1. Early...
pola-rs/polars
Algorithms
Rust
2025-03-03
copy
raw
open
ensure comprehensive test coverage
Tests should validate all relevant code paths and actually exercise the functionality they claim to test. When adding tests for new featu...
duckdb/duckdb
Testing
Python
2025-03-01
copy
raw
open
Promote code clarity
Write code that prioritizes clarity and maintainability over brevity. This involves several key practices: 1. **Extract repeated code blo...
influxdata/influxdb
Code Style
Rust
2025-02-28
copy
raw
open
Prevent concurrent access races
When sharing data across goroutines, always use proper synchronization mechanisms to prevent race conditions. Race conditions are difficu...
vitessio/vitess
Concurrency
Go
2025-02-28
copy
raw
open
Clear metric documentation
When adding, modifying, or deprecating metrics, ensure comprehensive and clear documentation. Include: 1. Descriptive names for new metri...
vitessio/vitess
Observability
Markdown
2025-02-28
copy
raw
open
Prevent nil dereferences
Always verify that pointers, slices, or arrays are non-nil and have sufficient elements before attempting to access their members. Use ap...
influxdata/influxdb
Null Handling
Go
2025-02-26
copy
raw
open
Use testify assertion libraries
Replace manual if-error checks with `testify`'s `assert` and `require` packages to make tests more readable, maintainable, and with bette...
vitessio/vitess
Testing
Go
2025-02-25
copy
raw
open
Robust network handling
Always implement proper network timeout handling and address formatting to ensure robust connectivity across different network conditions...
vitessio/vitess
Networking
Go
2025-02-24
copy
raw
open
Explicit security parameters
Security-critical features should be implemented as required parameters rather than optional parameters or option functions. This forces ...
influxdata/influxdb
Security
Go
2025-02-21
copy
raw
open
verify authorization permissions
Ensure that authorization checks use the appropriate permission level for the specific operation being performed. Operations that only re...
apache/kafka
Security
Other
2025-02-18
copy
raw
open
Log levels and clarity
Choose appropriate log levels and write clear, meaningful log messages that provide necessary context without creating noise. Follow thes...
vitessio/vitess
Logging
Go
2025-02-14
copy
raw
open
Lock with defer unlock
Always follow the lock-defer-unlock pattern when protecting shared resources with mutexes. Acquire the lock, immediately use defer to ens...
influxdata/influxdb
Concurrency
Go
2025-02-12
copy
raw
open
Vet security-critical dependencies
When introducing new dependencies, especially those handling sensitive operations like language interpreters, perform comprehensive secur...
influxdata/influxdb
Security
Toml
2025-01-31
copy
raw
open
Document complete data flows
When documenting database systems, ensure all documentation includes complete end-to-end data flows. Both diagrams and textual descriptio...
influxdata/influxdb
Database
Markdown
2025-01-24
copy
raw
open
Environment-portable configuration management
Ensure all configurations are environment-portable and follow current best practices for the target platforms. This includes: 1. Using en...
vitessio/vitess
Configurations
Other
2025-01-21
copy
raw
open
Standardize error wrapping patterns
Use consistent error wrapping patterns to preserve error context and ensure proper error code propagation. Always: 1. Use vterrors.New/Er...
vitessio/vitess
Error Handling
Go
2025-01-21
copy
raw
open
Limit concurrent access slots
Design concurrency mechanisms based on actual usage patterns rather than theoretical maximum connections. When implementing locking or st...
neondatabase/neon
Concurrency
Other
2025-01-20
copy
raw
open
Handle errors by criticality
Choose error handling strategies based on operation criticality:\n\n\ 1. For critical operations that could corrupt data or state:\n - ...
influxdata/influxdb
Error Handling
Rust
2025-01-17
copy
raw
open
Avoid flaky test patterns
Write reliable tests by avoiding common patterns that can lead to flaky behavior. Specifically: 1. Avoid arbitrary timeouts and sleeps in...
influxdata/influxdb
Testing
Rust
2025-01-17
copy
raw
open
Use testify assertions
Always use the testify package (require/assert) in tests instead of standard Go testing assertions. The testify library provides more des...
influxdata/influxdb
Testing
Go
2025-01-14
copy
raw
open
Manage workflow state transitions
When working with temporal workflows, always implement explicit state transitions rather than abrupt deletions. Workflows should proceed ...
vitessio/vitess
Temporal
Go
2025-01-14
copy
raw
open
Document configuration precedence
When implementing multiple configuration methods (e.g., config files, command-line flags, environment variables), clearly document the pr...
vitessio/vitess
Configurations
Txt
2025-01-13
copy
raw
open
Redact sensitive credentials
When implementing authentication or handling credentials, always redact sensitive information (keys, tokens, passwords) in logs and debug...
pola-rs/polars
Security
Rust
2025-01-10
copy
raw
open
Wrap errors with context
Always wrap errors with meaningful context using fmt.Errorf and %w verb. Include relevant identifiers (filenames, IDs, paths) in error me...
influxdata/influxdb
Error Handling
Go
2025-01-07
copy
raw
open
Consistent database APIs
Design database APIs with consistent patterns for response structures and error handling. Follow established conventions in your codebase...
vitessio/vitess
Database
Other
2025-01-04
copy
raw
open
Include explanatory examples
Always enhance documentation with concrete, illustrative examples that demonstrate expected inputs, formats, or outputs. Examples signifi...
influxdata/influxdb
Documentation
Rust
2025-01-03
copy
raw
open
consistent naming patterns
Maintain consistent naming conventions across similar constructs in your codebase. This includes using consistent prefixes for related me...
drizzle-team/drizzle-orm
Naming Conventions
TypeScript
2024-12-26
copy
raw
open
Cross-platform feature flags
When documenting package installation commands with feature flags, ensure compatibility across different operating systems. Windows handl...
pola-rs/polars
Configurations
Markdown
2024-12-20
copy
raw
open
Database type consistency
Ensure database-specific types, imports, and serialization are used consistently throughout the codebase. This prevents runtime errors, i...
drizzle-team/drizzle-orm
Database
TypeScript
2024-12-16
copy
raw
open
Document function signatures
Always document function parameters and return values in the function header comment or interface definition. This is particularly import...
influxdata/influxdb
Documentation
Go
2024-12-16
copy
raw
open
avoid redundant lookups
When working with associative containers (sets, maps, unordered_set, unordered_map), avoid performing redundant lookups by using single o...
duckdb/duckdb
Algorithms
C++
2024-12-15
copy
raw
open
Database configuration best practices
When implementing or modifying database-related configurations, follow these principles: 1. Use semantically appropriate types for config...
vitessio/vitess
Database
Markdown
2024-12-10
copy
raw
open
Create demonstrative examples
Include clear, concise examples in documentation that effectively demonstrate functionality. Follow these principles for better documenta...
pola-rs/polars
Documentation
Python
2024-12-04
copy
raw
open
Use consistent temporal types
When implementing or modifying temporal operations, maintain consistent data types that align with existing temporal functions. Specifica...
pola-rs/polars
Temporal
Rust
2024-12-04
copy
raw
open
Edge case algorithm handling
When implementing algorithms, pay special attention to edge cases, particularly empty collections. Define and document how your algorithm...
pola-rs/polars
Algorithms
Markdown
2024-11-12
copy
raw
open
track migration state immediately
Ensure migration state is recorded in the database immediately after each migration file is successfully applied, rather than batching al...
drizzle-team/drizzle-orm
Migrations
TypeScript
2024-11-06
copy
raw
open
Choose optimal data structures
Select data structures based on specific access patterns and performance requirements. When both fast lookup and predictable iteration or...
influxdata/influxdb
Algorithms
Rust
2024-11-01
copy
raw
open
Stable schema identifiers
Use persistent identifiers for schema elements rather than relying on positional information or enumeration, which can break when schema ...
influxdata/influxdb
Database
Rust
2024-10-10
copy
raw
open
Choose appropriate lock primitives
Select lock types based on access patterns - prefer RWLock over Mutex for read-heavy operations to enable concurrent reads while allowing...
influxdata/influxdb
Concurrency
Rust
2024-10-03
copy
raw
open
Type over primitives
Use domain-specific types instead of primitives (like strings, []byte, or generic maps) to represent domain concepts in algorithms. This ...
influxdata/influxdb
Algorithms
Go
2024-09-13
copy
raw
open
Complete schema management
When working with database systems that have flexible schemas (like InfluxDB), ensure complete schema discovery and proper merging from a...
influxdata/influxdb
Database
Go
2024-09-05
copy
raw
open
Secure GPG verification
When downloading and verifying packages using GPG signatures, follow secure practices to ensure authenticity and prevent security vulnera...
apache/kafka
Security
Dockerfile
2024-08-13
copy
raw
open
Document network configuration
When configuring network settings in containerized services, always document the reasoning behind specific choices, especially for port m...
prisma/prisma
Networking
Yaml
2024-08-02
copy
raw
open
Precise algorithm terminology
When implementing and documenting algorithms, use precise terminology and be explicit about metrics, operations, and data structures to a...
neondatabase/neon
Algorithms
Markdown
2024-07-30
copy
raw
open
Document performance tradeoffs
Always explicitly document the performance implications of API parameters, limit changes, and features that could significantly impact re...
elastic/elasticsearch
Performance Optimization
Other
2024-06-24
copy
raw
open
Research configuration format support
When migrating configuration files to newer formats, research current ecosystem support before defaulting to compatibility layers. Many t...
prisma/prisma
Configurations
Other
2024-05-24
copy
raw
open
Complete API parameter documentation
API endpoints must include comprehensive documentation for all parameters. For each parameter, clearly specify: 1. Whether it''s required...
elastic/elasticsearch
API
Other
2024-04-23
copy
raw
open
Official product naming
When referencing external products, libraries, or services in documentation and code, always use their official names exactly as specifie...
prisma/prisma
Naming Conventions
Markdown
2024-03-13
copy
raw
open
Document configuration decisions
Add explanatory comments to configuration files that clarify the reasoning behind non-obvious choices, feature exclusions, conditional lo...
prisma/prisma
Configurations
Yaml
2024-01-15
copy
raw
open
Deterministic Control-Plane Protocols
When multiple agents participate in cluster control-plane updates (e.g., TD, FC, nodes), treat the protocol as an algorithm and make its ...
redis/redis
Algorithms
Markdown
2023-07-06
copy
raw
open
Structured configuration management
Avoid using global configuration singletons that rely on string-based lookups, as they lead to brittle code that's hard to maintain. Inst...
vitessio/vitess
Configurations
Markdown
2023-05-19
copy
raw
open
Document security requirements explicitly
Always document security-related configurations, permissions, and behaviors explicitly and comprehensively. When documenting security fea...
elastic/elasticsearch
Security
Other
2023-05-03
copy
raw
open
vet third-party actions
Before using third-party GitHub Actions or similar external dependencies, thoroughly review their security implications. Specifically: 1)...
prisma/prisma
Security
Yaml
2023-01-16
copy
raw
open
Control-plane connectivity rules
Define a single, deterministic networking contract between data-plane nodes and the control plane (TD/FC), and make it resilient to CP re...
redis/redis
Networking
Markdown
2022-08-29
copy
raw
open
Required API Partitioning
When designing cluster APIs/specs, explicitly partition endpoints into categories by *actor* and *compatibility obligation*, and document...
redis/redis
API
Markdown
2022-07-20
copy
raw
open
Define Non-Ack Behavior
For any control-plane action that depends on acknowledgement (epochs/status updates, joins/removes, metadata propagation), the codebase m...
redis/redis
Error Handling
Markdown
2022-07-18
copy
raw
open
Evidence-Based Failover Targets
When proposing performance/SLA goals (e.g., failover completion time), require an evidence-based rationale and a repeatable way to valida...
redis/redis
Performance Optimization
Markdown
2022-07-16
copy
raw
open
Accurate method descriptions
API documentation must precisely describe method behavior, especially return values and cardinality. Inaccurate descriptions mislead deve...
prisma/prisma
Documentation
TypeScript
2022-05-23
copy
raw
open