Skip to content
Awesome Reviewers
expert instructions
Domains
Sources
Raw access
Method
GitHub
domains
/ runtimes
Language Runtimes & Compilers
Interpreters, compilers, async runtimes, parsers and low-level systems code.
406
instructions
17
repositories
2025-10-23
last update
download all 406 as one file
raw access
All topics
API
Algorithms
CI/CD
Caching
Code Style
Concurrency
Configurations
Database
Documentation
Error Handling
Logging
Naming Conventions
Networking
Null Handling
Observability
Performance Optimization
Security
Testing
All languages
C
C#
C++
Css
Go
Html
Java
JavaScript
Json
Kotlin
Markdown
Objective-C
Other
Python
Rust
Shell
Swift
Toml
Txt
TypeScript
Xml
Yaml
All repositories
JetBrains/kotlin
bytedance/sonic
denoland/deno
dotnet/runtime
facebook/yoga
golang/go
llvm/llvm-project
microsoft/typescript
netty/netty
nodejs/node
oven-sh/bun
rust-lang/rust
servo/servo
tokio-rs/tokio
torvalds/linux
tree-sitter/tree-sitter
vlang/v
Recently updated
Most discussed
Title
Use semantically accurate names
Variable, method, and type names should accurately reflect their actual purpose, content, and behavior. Avoid generic or misleading names...
servo/servo
Naming Conventions
Rust
2025-10-23
copy
raw
open
avoid unnecessary work
Identify and eliminate computational work that serves no purpose, particularly for inactive, hidden, or irrelevant elements. This include...
servo/servo
Performance Optimization
Rust
2025-10-23
copy
raw
open
avoid unsafe unwrapping
Replace `.unwrap()` calls and sentinel values with safe null handling patterns to prevent runtime panics and improve code robustness. **K...
servo/servo
Null Handling
Rust
2025-10-23
copy
raw
open
optimize algorithmic complexity
Prioritize algorithmic efficiency by choosing operations and data structures that minimize computational complexity. Look for opportuniti...
servo/servo
Algorithms
Rust
2025-10-22
copy
raw
open
avoid unwrap and panic
Replace `.unwrap()` and `panic!()` calls with proper error handling to prevent crashes and improve robustness. When encountering potentia...
servo/servo
Error Handling
Rust
2025-10-22
copy
raw
open
reduce complexity for readability
Prioritize code readability by reducing complexity through better organization and clearer patterns. Use early returns to avoid deep nest...
servo/servo
Code Style
Rust
2025-10-21
copy
raw
open
Algorithm edge case validation
Ensure algorithmic implementations properly handle edge cases and boundary conditions before considering them complete. Many algorithm fa...
servo/servo
Algorithms
Other
2025-10-21
copy
raw
open
comprehensive API documentation
All public items, struct fields, and methods must have comprehensive documentation. When implementing web specifications, include the act...
servo/servo
Documentation
Rust
2025-10-20
copy
raw
open
conditional CI execution
Use appropriate conditional statements in CI workflows to ensure steps execute under the right circumstances and handle different environ...
servo/servo
CI/CD
Yaml
2025-10-20
copy
raw
open
configuration parameter handling
When working with configuration parameters and values, follow these best practices to ensure maintainable and correct configuration handl...
servo/servo
Configurations
Python
2025-10-20
copy
raw
open
implement security validation
Ensure all security-related functionality includes complete validation checks and proper testing. This applies to both cryptographic oper...
servo/servo
Security
Other
2025-10-19
copy
raw
open
Network request configuration
When creating network requests, ensure all security-sensitive parameters are properly configured including origin, referrer, CORS mode, a...
servo/servo
Networking
Rust
2025-10-17
copy
raw
open
validate external system inputs
When integrating with external systems that receive repository or organizational information, always implement server-side validation to ...
servo/servo
Security
Yaml
2025-10-16
copy
raw
open
enhance testing interfaces
Design testing tool interfaces to be both flexible and discoverable. Support multiple keyword variations for test-related functionality a...
servo/servo
Testing
Python
2025-10-15
copy
raw
open
avoid borrow hazards
Prevent borrow conflicts by collecting or cloning data before operations that may trigger garbage collection, call into JavaScript, or cr...
servo/servo
Concurrency
Rust
2025-10-14
copy
raw
open
API design patterns
Design APIs with appropriate parameter types, place conversion functions as trait implementations in the correct modules, and reuse exist...
servo/servo
API
Rust
2025-10-09
copy
raw
open
Handle unsafe code properly
Methods that access raw memory buffers, perform pointer operations, or interact with foreign function interfaces must be explicitly marke...
servo/servo
Security
Rust
2025-09-29
copy
raw
open
validate subprocess errors comprehensively
When executing external commands via subprocess, don't rely solely on return codes for error detection. Some tools may return 0 even when...
servo/servo
Error Handling
Python
2025-08-29
copy
raw
open
avoid unnecessary Option operations
When working with Option types, prefer efficient and safe access patterns over unnecessary operations. Use `.as_ref().unwrap()` instead o...
tree-sitter/tree-sitter
Null Handling
Rust
2025-08-23
copy
raw
open
Algorithm and data optimization
Choose efficient algorithms and appropriate data structures based on access patterns and computational requirements. Use built-in compari...
tree-sitter/tree-sitter
Algorithms
Rust
2025-08-23
copy
raw
open
Simplify complex expressions
Break down complex code structures into simpler, more readable forms. This includes avoiding deep nesting, extracting complex logic into ...
tree-sitter/tree-sitter
Code Style
Rust
2025-08-10
copy
raw
open
Pin dependency versions
Always specify exact versions for dependencies and avoid pointing to moving targets like "master" branches or "latest" tags in configurat...
facebook/yoga
Configurations
Other
2025-08-04
copy
raw
open
Ensure documentation clarity
Documentation should be clear, accurate, and provide meaningful information to users. Avoid misleading descriptions, template text that d...
tree-sitter/tree-sitter
Documentation
Rust
2025-08-02
copy
raw
open
API type definition consistency
When modifying API type definitions, ensure all related definition files are updated consistently and dependencies are properly managed. ...
tree-sitter/tree-sitter
API
TypeScript
2025-07-30
copy
raw
open
Avoid unnecessary auto
Use explicit types instead of `auto` unless the type is obvious from the right-hand side of the assignment or impossible to spell. The LL...
llvm/llvm-project
Code Style
C++
2025-07-28
copy
raw
open
Use descriptive names
Choose names that clearly describe the purpose, behavior, and content of functions, variables, and constants. Names should be self-docume...
llvm/llvm-project
Naming Conventions
C++
2025-07-28
copy
raw
open
avoid unnecessary allocations
Minimize performance overhead by avoiding unnecessary memory allocations, expensive data structures, and redundant object creation. Choos...
llvm/llvm-project
Performance Optimization
C++
2025-07-28
copy
raw
open
cost-based algorithmic decisions
When implementing algorithmic transformations and optimizations, use cost analysis and profitability heuristics to guide decision-making ...
llvm/llvm-project
Algorithms
Other
2025-07-28
copy
raw
open
minimize header dependencies
Organize code to minimize header dependencies and improve compilation times. Use forward declarations instead of includes when possible, ...
llvm/llvm-project
Code Style
Other
2025-07-28
copy
raw
open
Use descriptive semantic names
Choose specific, meaningful names that clearly convey purpose and follow established codebase patterns. Avoid generic terms that could ap...
llvm/llvm-project
Naming Conventions
Other
2025-07-28
copy
raw
open
Configuration completeness validation
Ensure configuration options are complete and properly validated before use. When implementing configuration parsing or option handling, ...
llvm/llvm-project
Configurations
C++
2025-07-28
copy
raw
open
optimize computational complexity
When implementing algorithms, be mindful of computational complexity and optimize for efficiency by avoiding expensive operations and reu...
llvm/llvm-project
Algorithms
C++
2025-07-28
copy
raw
open
minimize test complexity
Tests should be minimal and focused on the specific functionality being verified. Remove unnecessary passes, tools, or operations that ar...
llvm/llvm-project
Testing
Other
2025-07-28
copy
raw
open
Choose appropriate string types
Select the most efficient string type based on ownership and lifetime requirements to optimize memory usage and prevent safety issues. Us...
llvm/llvm-project
Performance Optimization
Other
2025-07-28
copy
raw
open
explicit invalid value handling
When designing enums or working with type casting, explicitly define and handle invalid states rather than relying on undefined behavior....
llvm/llvm-project
Null Handling
Other
2025-07-28
copy
raw
open
match API complexity appropriately
Design APIs with complexity that matches their actual use cases and adopt established patterns that improve clarity. Avoid over-engineeri...
llvm/llvm-project
API
Other
2025-07-28
copy
raw
open
preserve known test issues
When tests exhibit known false positives or false negatives, preserve these test cases with clear documentation rather than removing them...
llvm/llvm-project
Testing
C
2025-07-28
copy
raw
open
specify network protocol endianness
Always explicitly specify byte order (endianness) in network protocol documentation and implementations. Even when a specification mandat...
llvm/llvm-project
Networking
Markdown
2025-07-28
copy
raw
open
structure contextual log messages
Log messages should include sufficient contextual information and structured formatting to enable effective debugging and filtering. This...
llvm/llvm-project
Logging
Other
2025-07-28
copy
raw
open
Write accessible documentation
Documentation should be written with clarity and completeness to serve readers who may not have deep domain expertise. Use precise, unamb...
llvm/llvm-project
Documentation
Markdown
2025-07-28
copy
raw
open
parameter type clarity
Design API parameters using specific, intention-revealing types rather than generic or ambiguous ones. This improves code readability, pr...
tree-sitter/tree-sitter
API
Rust
2025-07-27
copy
raw
open
Explicit configuration requirements
Always specify explicit configuration parameters rather than relying on default settings that may vary across different build environment...
llvm/llvm-project
Configurations
C
2025-07-27
copy
raw
open
improve code readability
When code expressions become complex or difficult to understand at first glance, refactor them for better readability. This can be achiev...
llvm/llvm-project
Code Style
Python
2025-07-27
copy
raw
open
Provide contextual code documentation
Code should include documentation that explains the purpose, rationale, and context behind implementation decisions, not just what the co...
llvm/llvm-project
Documentation
C++
2025-07-25
copy
raw
open
Design thoughtful API interfaces
When designing APIs, prioritize clarity, appropriate abstraction levels, and user experience. Avoid magic numbers or unclear parameters b...
llvm/llvm-project
API
C++
2025-07-25
copy
raw
open
Eliminate redundant null checks
Avoid unnecessary null checks when the called function already handles null cases, and use references instead of pointers when null value...
llvm/llvm-project
Null Handling
C++
2025-07-25
copy
raw
open
proper error propagation
Ensure errors are properly propagated to callers rather than handled locally with exits or fatal errors. Library functions should return ...
llvm/llvm-project
Error Handling
C++
2025-07-25
copy
raw
open
comprehensive test coverage
Tests should comprehensively cover all relevant scenarios, including return values, edge cases, different compilation modes, and abnormal...
llvm/llvm-project
Testing
C++
2025-07-24
copy
raw
open
environment loading order
Environment files and variables must be loaded before creating any factories, services, or components that depend on them. This ensures t...
denoland/deno
Configurations
Rust
2025-07-24
copy
raw
open
network address validation
When validating network addresses and interfaces, properly handle special address values and use protocol-specific prefixes to avoid ambi...
denoland/deno
Networking
Rust
2025-07-24
copy
raw
open
protect shared data
Always protect shared data that can be accessed by multiple threads using appropriate synchronization mechanisms. Identify potential race...
llvm/llvm-project
Concurrency
C++
2025-07-24
copy
raw
open
Validate boundary conditions
Ensure algorithms handle boundary conditions and edge cases correctly by adding explicit validation for all input ranges. Special attenti...
rust-lang/rust
Algorithms
Rust
2025-07-23
copy
raw
open
Keep documentation purposefully minimal
Documentation should be concise, focused, and maintainable. Follow these principles: 1. Keep examples short and demonstrate one concept a...
rust-lang/rust
Documentation
Rust
2025-07-23
copy
raw
open
Document function behavior completely
Functions should be documented with comprehensive JSDoc comments that cover: 1. Purpose and behavior description 2. All parameters with t...
microsoft/typescript
Documentation
TypeScript
2025-07-23
copy
raw
open
Benchmark before optimizing code
Always validate performance optimizations with benchmarks before implementation. Ensure measurements account for: 1. Platform-specific ch...
rust-lang/rust
Performance Optimization
Rust
2025-07-23
copy
raw
open
Provide actionable errors
Error messages should not only identify problems but also guide developers toward solutions. Include specific steps, alternatives, or con...
microsoft/typescript
Error Handling
TypeScript
2025-07-23
copy
raw
open
Default over unsafe initialization
Prefer using safe initialization methods like `Default::default()` over unsafe alternatives like `MaybeUninit::uninit()` or null values w...
rust-lang/rust
Null Handling
Rust
2025-07-23
copy
raw
open
Standardize configuration value handling
Implement robust and type-safe configuration handling to avoid fragile hardcoding and improve maintainability. Key guidelines: 1. Use typ...
rust-lang/rust
Configurations
Rust
2025-07-22
copy
raw
open
Match function names to behavior
Function names and their documentation must accurately reflect what the function actually does. When a function handles more data than it...
llvm/llvm-project
Naming Conventions
TypeScript
2025-07-22
copy
raw
open
Conditional CI resource management
Configure CI workflows to intelligently manage system resources through conditional execution rather than duplicating steps. Use matrix v...
rust-lang/rust
CI/CD
Yaml
2025-07-22
copy
raw
open
Ensure complete test coverage
Write comprehensive tests that cover all relevant cases and variations while maintaining proper organization and structure. Key practices...
rust-lang/rust
Testing
Rust
2025-07-21
copy
raw
open
Name for semantic meaning
Choose names that clearly convey the semantic meaning and purpose of the identifier, rather than using clever or ambiguous names. Names s...
rust-lang/rust
Naming Conventions
Rust
2025-07-21
copy
raw
open
Optimize dependency configurations
When configuring project dependencies, be mindful of feature flags that may introduce unnecessary build dependencies or slow down compila...
rust-lang/rust
Configurations
Toml
2025-07-21
copy
raw
open
Document lock behavior
When implementing or documenting synchronization primitives, always clearly specify how locks behave under exceptional conditions, partic...
rust-lang/rust
Concurrency
Rust
2025-07-20
copy
raw
open
Guard against undefined
Always protect against potential null or undefined values before attempting property access or method calls to prevent runtime errors. Th...
microsoft/typescript
Null Handling
TypeScript
2025-07-19
copy
raw
open
Structure validation algorithms
When implementing or modifying parsing and validation algorithms, carefully consider both the correctness and user experience aspects: 1....
rust-lang/rust
Algorithms
Other
2025-07-18
copy
raw
open
Use descriptive names
Choose variable, function, and parameter names that clearly communicate their purpose and avoid confusion. Names should be descriptive en...
vlang/v
Naming Conventions
Other
2025-07-16
copy
raw
open
Clear helpful error messages
Create user-friendly error messages that guide developers toward solutions. Error messages should: 1. Include the problematic value in th...
rust-lang/rust
Error Handling
Rust
2025-07-16
copy
raw
open
Extract complex logic helpers
Complex or duplicated logic should be extracted into well-named helper functions to improve code readability and maintainability. This ap...
rust-lang/rust
Code Style
Rust
2025-07-15
copy
raw
open
avoid expensive repeated operations
Cache results of expensive computations and order operations from cheapest to most expensive to minimize performance overhead. This inclu...
vlang/v
Performance Optimization
Other
2025-07-14
copy
raw
open
Consistent descriptive identifiers
Use camelCase for all variables, parameters, methods, and functions in JavaScript/TypeScript code to maintain consistency with language c...
oven-sh/bun
Naming Conventions
TypeScript
2025-07-14
copy
raw
open
Follow naming conventions
Maintain consistent naming conventions across the codebase: - Use PascalCase for class methods (e.g., `All()`, `Get()`, `Run()` instead o...
nodejs/node
Naming Conventions
Other
2025-07-14
copy
raw
open
Limit environment variable scope
When working with environment variables for configuration: 1. **Reuse existing environment variables** rather than creating new ones. Lev...
nodejs/node
Configurations
JavaScript
2025-07-14
copy
raw
open
Optimize frequent operations
Identify code paths that execute frequently (loops, hot functions, repeated calls) and optimize them by avoiding redundant computations, ...
tree-sitter/tree-sitter
Performance Optimization
Rust
2025-07-13
copy
raw
open
Technical documentation accuracy
Documentation must precisely reflect the current state of the codebase to prevent confusion and ensure developers can rely on it. Ensure ...
oven-sh/bun
Documentation
Markdown
2025-07-13
copy
raw
open
Resource-aware programming patterns
When optimizing application performance, be mindful of system resource constraints and use appropriate patterns to handle different scena...
nodejs/node
Performance Optimization
Markdown
2025-07-13
copy
raw
open
Descriptive behavior-based tests
Tests should be named to describe the expected behavior or outcome being verified, not the input parameters or implementation details. Th...
nodejs/node
Testing
Other
2025-07-13
copy
raw
open
Validate loop boundary conditions
When implementing iterative algorithms, ensure comprehensive handling of edge cases and boundary conditions. This includes: 1. Using whil...
oven-sh/bun
Algorithms
Other
2025-07-12
copy
raw
open
Evolve return values
When extending APIs with new capabilities, carefully consider how changes to return values affect consumers. Avoid creating polymorphic r...
nodejs/node
API
Markdown
2025-07-11
copy
raw
open
Informative error messages
Error messages should be specific, actionable, and include context that helps developers understand and fix the issue. Use standard error...
nodejs/node
Error Handling
JavaScript
2025-07-11
copy
raw
open
Version APIs with care
When introducing new API features or changes, implement proper versioning to maintain stability and backward compatibility. Key practices...
nodejs/node
API
Other
2025-07-11
copy
raw
open
prefer compile-time configuration
Use compile-time configuration checks with `cfg!` macros instead of runtime environment variable parsing when the configuration decision ...
tree-sitter/tree-sitter
Configurations
Rust
2025-07-11
copy
raw
open
Follow consistent naming patterns
Maintain consistent naming conventions throughout the codebase to improve readability and reduce confusion. Adhere to these guidelines: 1...
nodejs/node
Naming Conventions
Markdown
2025-07-11
copy
raw
open
Use consistent test patterns
Standardize testing by leveraging established patterns and helper functions throughout your test suite. Extract repetitive test setup int...
oven-sh/bun
Testing
TypeScript
2025-07-11
copy
raw
open
Target-aware configuration handling
When implementing features that depend on specific compilation targets or modes, design configuration mechanisms that gracefully handle t...
llvm/llvm-project
Configurations
Other
2025-07-11
copy
raw
open
Use modern nullish operators
When dealing with potentially null or undefined values, use optional chaining (`?.`) and nullish coalescing (`??`) operators instead of v...
nodejs/node
Null Handling
JavaScript
2025-07-11
copy
raw
open
Initialize default values
Always initialize class attributes with default values to prevent AttributeError exceptions when accessing potentially undefined values. ...
oven-sh/bun
Null Handling
Python
2025-07-11
copy
raw
open
Synchronize configuration files
Ensure all related configuration files are updated consistently when making changes to dependencies, versions, or other configuration set...
rust-lang/rust
Configurations
Json
2025-07-11
copy
raw
open
Thread-safe resource management patterns
Ensure thread-safe access to shared resources while following proper resource management patterns. When implementing concurrent operation...
nodejs/node
Concurrency
Other
2025-07-10
copy
raw
open
Contextual error messages
Error messages should provide specific context about the error and guide users toward solutions. When reporting syntax errors like mismat...
rust-lang/rust
Error Handling
Other
2025-07-10
copy
raw
open
Never swallow errors
Always ensure errors are properly surfaced rather than silently ignored. Silent error handling can lead to confusing behavior where featu...
oven-sh/bun
Error Handling
TypeScript
2025-07-10
copy
raw
open
Respect existing configurations
When integrating with external services or tools, design your configuration options to respect users' existing environment settings rathe...
oven-sh/bun
Configurations
TypeScript
2025-07-10
copy
raw
open
Verify assertions properly
Ensure test assertions correctly validate the intended behavior by: 1. **Awaiting promise assertions** when testing async code: ```javasc...
oven-sh/bun
Testing
JavaScript
2025-07-10
copy
raw
open
Path comparison precision
When implementing file path matching or exclusion algorithms, use precise comparison techniques that respect directory boundaries rather ...
oven-sh/bun
Algorithms
TypeScript
2025-07-10
copy
raw
open
Validate workflow files
Ensure all CI/CD workflow configuration files are validated for accuracy and consistency. Small errors in workflow files can prevent auto...
oven-sh/bun
CI/CD
Yaml
2025-07-10
copy
raw
open
prefer efficient built-ins
When multiple built-in methods can accomplish the same algorithmic task, prefer the single comprehensive method over combining multiple o...
denoland/deno
Algorithms
TypeScript
2025-07-10
copy
raw
open
Maintain consistent style
Maintain consistent style patterns throughout the codebase to improve readability, reduce maintenance overhead, and prevent errors. Key a...
oven-sh/bun
Code Style
Other
2025-07-08
copy
raw
open
Use memory pools
Reuse memory with buffer pools for temporary allocations instead of creating new buffers each time. This reduces memory allocation overhe...
oven-sh/bun
Performance Optimization
Other
2025-07-08
copy
raw
open
avoid implementation detail leakage
APIs should provide clean abstraction boundaries without exposing internal implementation details or creating unwanted dependencies betwe...
denoland/deno
API
Rust
2025-07-08
copy
raw
open
Validate operation permissions
Ensure appropriate permission checks are implemented before performing security-sensitive operations that access files, networks, or syst...
denoland/deno
Security
Rust
2025-07-08
copy
raw
open
Maintain portable config values
Always use portable, environment-agnostic values in configuration files. Avoid hardcoded absolute paths, system-specific values, or misma...
oven-sh/bun
Configurations
Other
2025-07-08
copy
raw
open
Hide implementation details
When designing APIs, carefully consider which elements of your implementation become part of the public interface. Avoid exposing interna...
oven-sh/bun
API
TypeScript
2025-07-08
copy
raw
open
Clean all error paths
Ensure all error paths properly clean up resources and handle errors appropriately. This includes: 1. Using errdefer for cleanup when all...
oven-sh/bun
Error Handling
Other
2025-07-07
copy
raw
open
Validate network request parameters
Always validate and sanitize all network request parameters to prevent injection attacks. This includes: 1. **URL validation**: Consider ...
nodejs/node
Security
JavaScript
2025-07-07
copy
raw
open
informative error messages
Error messages should be specific, contextual, and include relevant information to aid debugging and user understanding. Avoid generic me...
vlang/v
Error Handling
Other
2025-07-06
copy
raw
open
Use appropriate metric types
When instrumenting applications with metrics, choose the correct metric type based on what you''re measuring to ensure accurate and usefu...
nodejs/node
Observability
Markdown
2025-07-06
copy
raw
open
Descriptive identifier names
Choose clear, consistent, and accurate identifiers that precisely reflect behavior and follow established patterns. This applies to funct...
oven-sh/bun
Naming Conventions
C++
2025-07-04
copy
raw
open
Secure credentials handling
When handling credentials or secrets in code, avoid passing them directly through command substitution or template literals in shell comm...
oven-sh/bun
Security
TypeScript
2025-07-04
copy
raw
open
Optimize allocation hotspots
Identify and optimize object allocation in performance-critical paths by applying appropriate allocation strategies based on usage patter...
netty/netty
Performance Optimization
Java
2025-07-03
copy
raw
open
Release locks before waking
In concurrent systems, it's critical to release locks before performing operations that might trigger reentrancy or block the current thr...
tokio-rs/tokio
Concurrency
Rust
2025-07-03
copy
raw
open
Descriptive function names
Function and method names should precisely describe their purpose and behavior. Choose names that explicitly communicate what the functio...
nodejs/node
Naming Conventions
JavaScript
2025-07-03
copy
raw
open
Control cache lifecycle
Design cache systems so that higher-level components control when cache entries are invalidated or cleaned up, rather than having cache o...
denoland/deno
Caching
Rust
2025-07-03
copy
raw
open
Explain non-obvious decisions
When code contains non-obvious parameter choices, conditional logic, or unexpected implementation changes, add comments explaining the re...
denoland/deno
Documentation
Rust
2025-07-03
copy
raw
open
Match API conventions
Ensure API implementations match established conventions and reference implementations to maintain compatibility and predictability. When...
oven-sh/bun
API
Other
2025-07-03
copy
raw
open
Optimize for readability
Write code that clearly communicates intent by using appropriate naming and formatting techniques. Improve readability by: 1. Replacing m...
dotnet/runtime
Code Style
C#
2025-07-02
copy
raw
open
Specific exceptions with context
Always throw the most specific exception type appropriate for the error condition and include contextual information in the error message...
dotnet/runtime
Error Handling
C#
2025-07-02
copy
raw
open
Validate nullability explicitly
Always validate null or undefined values before using them to prevent crashes and undefined behavior. When implementing null-handling cod...
oven-sh/bun
Null Handling
Other
2025-07-02
copy
raw
open
Design error handling carefully
When implementing error handling, balance between propagation and recovery. Design error types to preserve context while providing users ...
tokio-rs/tokio
Error Handling
Rust
2025-07-02
copy
raw
open
Follow import style
Tokio projects follow specific import conventions for consistency and readability. Adhere to these guidelines: 1. Use separate `use` stat...
tokio-rs/tokio
Code Style
Rust
2025-07-02
copy
raw
open
Use appropriate synchronization mechanisms
Select and implement synchronization primitives that match your concurrency requirements and avoid unsafe patterns. Consider the number o...
denoland/deno
Concurrency
Rust
2025-07-02
copy
raw
open
Avoid busy waiting
When implementing concurrent code that waits for conditions to be met, avoid busy-wait loops that continuously consume CPU resources. Bus...
dotnet/runtime
Concurrency
C#
2025-07-02
copy
raw
open
Maintainable test structure
Write tests that are maintainable, self-documenting, and that promote good testing practices: 1. **Use proper assertion mechanisms**: Pre...
dotnet/runtime
Testing
C#
2025-07-02
copy
raw
open
Design flexible APIs
When designing APIs, prioritize flexibility, ergonomics, and intuitiveness to create better user experiences. APIs should accept the most...
tokio-rs/tokio
API
Rust
2025-07-02
copy
raw
open
Choose appropriate error mechanisms
Use the right error handling mechanism for each scenario: exceptions for recoverable situations, assertions only for true programming bug...
dotnet/runtime
Error Handling
C++
2025-07-02
copy
raw
open
Preserve naming consistency
Maintain consistent naming patterns and casing across all related code entities to ensure clarity and prevent errors. This includes: 1. U...
microsoft/typescript
Naming Conventions
Other
2025-07-02
copy
raw
open
Choose appropriate containers
Select data structures based on expected collection size and usage patterns. For small collections (typically fewer than 30 elements), co...
nodejs/node
Algorithms
Other
2025-07-02
copy
raw
open
Normalize variable test output
When writing tests that capture output (like UI tests, stderr, or stdout), ensure you normalize any variable content that might change be...
rust-lang/rust
Testing
Other
2025-07-02
copy
raw
open
Simplify code expressions
Strive for clarity by simplifying code expressions and reducing unnecessary complexity. Complex or verbose expressions decrease readabili...
dotnet/runtime
Code Style
C++
2025-07-01
copy
raw
open
Abstract traversal patterns
When implementing algorithms that operate on complex data structures (trees, graphs, dominator structures), abstract the traversal mechan...
dotnet/runtime
Algorithms
C++
2025-07-01
copy
raw
open
Cache expensive computations
Avoid recomputing expensive operations by caching results when they will be used multiple times. This applies to method calls, property a...
dotnet/runtime
Performance Optimization
C#
2025-07-01
copy
raw
open
Prevent null references
Use defensive coding practices to prevent null reference exceptions\ \ by properly handling potentially null values throughout your code....
dotnet/runtime
Null Handling
C#
2025-07-01
copy
raw
open
Always await promises
Consistently use the `await` keyword when working with Promise-returning functions to ensure proper execution flow and prevent race condi...
oven-sh/bun
Concurrency
TypeScript
2025-07-01
copy
raw
open
Choose descriptive names
Names should clearly convey purpose and meaning. Parameter, variable, and method names should be self-explanatory and accurately reflect ...
dotnet/runtime
Naming Conventions
C++
2025-07-01
copy
raw
open
Memory ordering matters
When working with shared data in multithreaded environments, memory ordering is critical to prevent race conditions and ensure thread saf...
dotnet/runtime
Concurrency
C++
2025-07-01
copy
raw
open
Optimize build dependency chains
When configuring build and test processes in CI/CD pipelines, ensure proper dependency chains with clear inputs and outputs to avoid unne...
dotnet/runtime
CI/CD
Other
2025-07-01
copy
raw
open
Honor API contracts
When implementing or modifying APIs, carefully preserve the historical behavior and semantic contracts of existing interfaces, even when ...
dotnet/runtime
API
C#
2025-07-01
copy
raw
open
Constant-time cryptographic validation
Always use constant-time comparison methods when validating cryptographic values to prevent timing side-channel attacks. Operations like ...
dotnet/runtime
Security
C#
2025-07-01
copy
raw
open
Structure conditional compilation
Use organized structural patterns for conditional compilation to improve code maintainability and readability. Avoid applying `#[cfg]` at...
tokio-rs/tokio
Configurations
Rust
2025-06-30
copy
raw
open
Structural configuration approaches
When working with feature flags and conditional compilation, prefer structural approaches over scattered configuration attributes through...
tokio-rs/tokio
Configurations
Rust
2025-06-30
copy
raw
open
Standardize null pointer checks
Always use standard null-checking patterns like CHECK_NOT_NULL for pointer validation instead of manual null checks. This ensures consist...
nodejs/node
Null Handling
Other
2025-06-30
copy
raw
open
Maintain consistent formatting
Ensure consistent formatting and organization throughout the codebase to improve readability and maintainability. This includes: 1. **Con...
dotnet/runtime
Code Style
Other
2025-06-30
copy
raw
open
Validate before access
Always validate parameters and initialize variables before access to prevent null dereference and undefined behavior. When handling array...
dotnet/runtime
Null Handling
C
2025-06-30
copy
raw
open
Idempotent error-safe disposers
When implementing resource cleanup logic, especially disposers for explicit resource management, always design for resilience during erro...
nodejs/node
Error Handling
Markdown
2025-06-29
copy
raw
open
Use modern C++ features
Embrace modern C++20 features throughout the codebase to improve code readability, maintainability, and performance. Specifically: 1. Use...
nodejs/node
Code Style
Other
2025-06-29
copy
raw
open
Benchmark before optimizing code
Performance optimizations should be validated through benchmarks before implementation. This helps prevent premature optimization and ens...
nodejs/node
Performance Optimization
JavaScript
2025-06-28
copy
raw
open
Model actual hardware costs
Base optimization decisions on accurate hardware cost models rather than outdated assumptions. Modern architectures have different perfor...
dotnet/runtime
Performance Optimization
C++
2025-06-28
copy
raw
open
Explicit API versioning
When extending interfaces with new methods or functionality, always implement proper versioning to ensure compatibility across different ...
dotnet/runtime
API
Other
2025-06-28
copy
raw
open
Document with precise accuracy
Maintain precise and accurate documentation through both JSDoc annotations and explanatory comments. Ensure all technical documentation m...
nodejs/node
Documentation
JavaScript
2025-06-27
copy
raw
open
Document code meaningfully
Provide meaningful documentation that enhances code maintainability and understanding. Follow these practices: 1. **Explain the "why"** -...
dotnet/runtime
Documentation
C#
2025-06-27
copy
raw
open
Optimize search operations
Enhance search algorithm performance by prioritizing common cases, using appropriate data structures, and avoiding unnecessary operations...
netty/netty
Algorithms
Java
2025-06-27
copy
raw
open
Follow naming patterns
Maintain consistent naming patterns throughout your code to improve readability and maintainability. Follow these guidelines: 1. Use Pasc...
dotnet/runtime
Naming Conventions
C#
2025-06-26
copy
raw
open
Optimize memory access
When implementing performance-critical algorithms, carefully consider memory access patterns. Document alignment assumptions when using l...
dotnet/runtime
Algorithms
C#
2025-06-26
copy
raw
open
avoid panics gracefully
Replace panic-prone operations like `unwrap()` and `expect()` with graceful error handling that provides meaningful feedback. When encoun...
denoland/deno
Error Handling
Rust
2025-06-26
copy
raw
open
Prevent TOCTOU vulnerabilities
Time-of-Check-to-Time-of-Use (TOCTOU) race conditions occur when a program checks a condition and then uses the result of that check, but...
rust-lang/rust
Security
Rust
2025-06-26
copy
raw
open
Scope security settings
Avoid modifying global security state in favor of connection-specific or context-bound security settings. Global security state changes c...
nodejs/node
Security
Markdown
2025-06-26
copy
raw
open
Optimize common paths
Design algorithms that optimize for the most common execution paths by prioritizing frequent scenarios in conditional logic, data structu...
dotnet/runtime
Algorithms
Other
2025-06-25
copy
raw
open
Match filenames to contents
Files should be named to clearly reflect their primary contents:\n\n\ 1. When a file contains a single primary type:\n - Name the file ...
oven-sh/bun
Naming Conventions
Other
2025-06-25
copy
raw
open
Propagate errors with context
Always propagate errors with their original context instead of swallowing them or throwing new errors that hide the original cause. This ...
nodejs/node
Error Handling
Other
2025-06-25
copy
raw
open
Eliminate unnecessary constructs
Remove redundant or unnecessary code constructs to improve readability and maintainability. This includes avoiding empty blocks, blocks c...
microsoft/typescript
Code Style
JavaScript
2025-06-25
copy
raw
open
comprehensive validated examples
Documentation examples should be self-sufficient, comprehensive, and use proper syntax tags to enable automated validation. Examples must...
vlang/v
Documentation
Markdown
2025-06-25
copy
raw
open
Optimize aligned SIMD operations
Always use proper memory alignment for SIMD (Single Instruction, Multiple Data) operations to maximize performance. When implementing vec...
dotnet/runtime
Performance Optimization
C
2025-06-25
copy
raw
open
Prefer clarity over cleverness
Write code that prioritizes readability and maintainability over cleverness or excessive optimization. Avoid overly clever techniques tha...
nodejs/node
Code Style
JavaScript
2025-06-24
copy
raw
open
Document configuration intent
Configuration settings should be self-documenting with clear intent. When adding temporary workarounds, conditional flags, or platform-sp...
dotnet/runtime
Configurations
Other
2025-06-24
copy
raw
open
Reuse computed values efficiently
Move variable declarations and computations outside of loops when their values don't change between iterations. This reduces memory alloc...
nodejs/node
Performance Optimization
Other
2025-06-24
copy
raw
open
Platform-agnostic network APIs
When implementing networking functionality, ensure code uses platform-agnostic APIs and appropriate abstraction layers to handle differen...
dotnet/runtime
Networking
C++
2025-06-24
copy
raw
open
Names reflect actual purpose
Name variables, properties, and functions to accurately reflect their purpose and actual usage in code, not just their technical classifi...
dotnet/runtime
Naming Conventions
Other
2025-06-24
copy
raw
open
Streamline workflow configurations
Maintain efficient and properly structured CI/CD workflows by removing unnecessary dependencies and using consistent formatting patterns....
microsoft/typescript
CI/CD
Yaml
2025-06-24
copy
raw
open
Avoid ambiguous naming
Choose names that clearly convey their purpose and avoid ambiguous identifiers that can be misinterpreted. This applies to methods, varia...
denoland/deno
Naming Conventions
Rust
2025-06-23
copy
raw
open
Assert before cast
Always validate values before performing unsafe operations like dynamic casting. When a value could be null, zero, or undefined, store it...
oven-sh/bun
Null Handling
C++
2025-06-23
copy
raw
open
Document non-intuitive code
Add clear comments to explain complex logic, function differences, and non-obvious implementation details. This is especially important f...
nodejs/node
Documentation
Other
2025-06-23
copy
raw
open
Await all promises
Always explicitly await all asynchronous operations, especially in cleanup code paths and resource management. Failing to properly await ...
nodejs/node
Concurrency
JavaScript
2025-06-22
copy
raw
open
Behavior-focused test design
Tests should focus on verifying behavior rather than implementation details to ensure they remain robust during refactoring. Avoid depend...
nodejs/node
Testing
JavaScript
2025-06-21
copy
raw
open
Check exceptions consistently
Always check for exceptions immediately after operations that might throw them, especially before using the results in control flow decis...
oven-sh/bun
Error Handling
C++
2025-06-20
copy
raw
open
Format docs for readability
Documentation should follow consistent formatting and structural patterns to maximize readability and maintainability. Key guidelines: 1....
nodejs/node
Documentation
Markdown
2025-06-20
copy
raw
open
Structure configuration options
Design and document configuration options (feature flags, environment variables, conditional compilation) to be clear, consistent, and ma...
dotnet/runtime
Configurations
C++
2025-06-20
copy
raw
open
Minimize configuration dependencies
Keep configuration dependencies minimal and platform-aware. Avoid including unnecessary configuration files or external tools that can in...
nodejs/node
Configurations
Other
2025-06-19
copy
raw
open
Ensure comprehensive documentation
Documentation should be complete, properly formatted, and clearly explain purpose with adequate examples. When writing documentation, ens...
llvm/llvm-project
Documentation
Other
2025-06-19
copy
raw
open
Maintain configuration compatibility
When modifying configuration systems, prioritize backward compatibility unless there's an explicit breaking change planned. If a breaking...
dotnet/runtime
Configurations
Txt
2025-06-19
copy
raw
open
Public over internal APIs
When designing or implementing APIs, always prefer publicly documented APIs over internal ones. Internal APIs may change without notice a...
nodejs/node
API
JavaScript
2025-06-18
copy
raw
open
explicit dependency configuration
Ensure dependency configurations are explicit and predictable to avoid confusion and unexpected build behavior. Avoid package aliases tha...
denoland/deno
Configurations
Toml
2025-06-18
copy
raw
open
Document algorithm behavior
When implementing or documenting algorithms, clearly specify their behavior, expected outputs, and usage patterns. This includes document...
vlang/v
Algorithms
Markdown
2025-06-18
copy
raw
open
Use TypeScript-specific tests
Always use fourslash tests (for IDE/language service features) or compiler tests (for TypeScript compilation behavior) instead of direct ...
microsoft/typescript
Testing
Markdown
2025-06-18
copy
raw
open
Actionable error messages
When designing APIs, provide error messages that are contextually accurate, descriptive, and actionable. Generic error suggestions can co...
microsoft/typescript
API
JavaScript
2025-06-17
copy
raw
open
Consistent module resolution
Configure consistent module resolution strategies across related projects and ensure package.json files are properly set up for the chose...
microsoft/typescript
Configurations
JavaScript
2025-06-17
copy
raw
open
consistent error diagnostics
When implementing attributes, language features, or compiler diagnostics, always provide explicit error diagnostics rather than default w...
llvm/llvm-project
Error Handling
Other
2025-06-15
copy
raw
open
consistent formatting preferences
Maintain consistent formatting and use concise, standard syntax throughout the codebase. This includes several specific formatting rules:...
tree-sitter/tree-sitter
Code Style
Other
2025-06-14
copy
raw
open
Clear accurate documentation
Documentation should be both technically accurate and contextually helpful for developers. Comments and JSDoc entries must correctly desc...
oven-sh/bun
Documentation
TypeScript
2025-06-14
copy
raw
open
defensive null handling
Use defensive programming patterns to prevent null-related issues before they occur. This includes creating safe object copies to prevent...
denoland/deno
Null Handling
JavaScript
2025-06-13
copy
raw
open
Cache repeated accesses
When accessing the same property or calling the same function multiple times, especially in loops or performance-critical sections, cache...
oven-sh/bun
Performance Optimization
C++
2025-06-13
copy
raw
open
Function invocation syntax
Use the appropriate invocation syntax for functions based on their intended usage. Regular functions should be called directly without th...
oven-sh/bun
Code Style
JavaScript
2025-06-13
copy
raw
open
Platform-aware algorithm optimization
When implementing performance-critical algorithms, design your code to detect and utilize platform-specific hardware features while maint...
dotnet/runtime
Algorithms
Txt
2025-06-13
copy
raw
open
Document function contracts
Always document function contracts completely, even when surrounding code lacks documentation. Include header comments that describe the ...
dotnet/runtime
Documentation
C++
2025-06-12
copy
raw
open
Optimize hot paths
Identify and optimize frequently executed code paths to improve performance. Hot paths have a significant impact on overall application p...
tokio-rs/tokio
Performance Optimization
Rust
2025-06-10
copy
raw
open
Add comprehensive test coverage
When adding functionality or fixing bugs, always add new test functions rather than modifying existing ones to preserve test coverage. En...
vlang/v
Testing
Other
2025-06-09
copy
raw
open
Extract complex logical expressions
Complex logical expressions should be extracted into well-named variables or functions to improve code readability and maintainability. T...
microsoft/typescript
Code Style
TypeScript
2025-06-09
copy
raw
open
Choose efficient data structures
Select data structures and algorithms based on performance characteristics and actual usage patterns rather than convenience or familiari...
vlang/v
Algorithms
Other
2025-06-08
copy
raw
open
Deterministic lock management
Always ensure locks are acquired and released in a deterministic manner in concurrent code. Use `defer` statements immediately after lock...
oven-sh/bun
Concurrency
Other
2025-06-06
copy
raw
open
Optimize database interactions
When working with database operations, prioritize efficiency by avoiding redundant query executions. Instead of executing statements mult...
oven-sh/bun
Database
C++
2025-06-06
copy
raw
open
Validate buffer boundaries
When calling functions that process buffers, especially external C functions, always provide explicit buffer size parameters to prevent b...
oven-sh/bun
Security
Other
2025-06-06
copy
raw
open
minimize memory allocations
Identify and eliminate unnecessary memory allocations in performance-critical code paths. This includes pre-allocating collections when t...
denoland/deno
Performance Optimization
Rust
2025-06-05
copy
raw
open
Use backticks for identifiers
Wrap all code identifiers, method names, interface names, class names, and API references in JSDoc comments with backticks (`) for proper...
denoland/deno
Documentation
TypeScript
2025-06-03
copy
raw
open
Judicious move semantics
Apply C++ move semantics and lambda modifiers only when necessary. The `mutable` keyword should only be used in lambdas when you need to ...
oven-sh/bun
Code Style
C++
2025-06-03
copy
raw
open
Validate network inputs
Network code must validate all inputs and handle error conditions properly to prevent security vulnerabilities and reliability issues. Th...
oven-sh/bun
Networking
C++
2025-06-03
copy
raw
open
Defensive error handling
Implement defensive checks when managing error state to prevent overwriting existing errors and add safeguards even when theoretically un...
bytedance/sonic
Error Handling
Go
2025-06-03
copy
raw
open
Semantic over generic names
Choose specific, descriptive names that clearly convey purpose over generic or abbreviated identifiers. Names should be self-documenting ...
netty/netty
Naming Conventions
Java
2025-06-02
copy
raw
open
Follow standard API specifications
Ensure API implementations strictly adhere to published specifications, even when adding features or optimizations. Deviating from standa...
oven-sh/bun
API
C++
2025-06-02
copy
raw
open
Names reveal semantic purpose
Choose names that clearly communicate the semantic purpose and behavior of code elements. Variable and function names should precisely re...
microsoft/typescript
Naming Conventions
TypeScript
2025-05-31
copy
raw
open
organize code structure
Maintain clean code organization by moving implementation details to appropriate locations, extracting reusable functionality, and keepin...
denoland/deno
Code Style
Rust
2025-05-30
copy
raw
open
Document non-obvious logic
Add clear comments explaining the purpose and reasoning behind complex or non-obvious code logic. Comments should explain 'why' certain i...
dotnet/runtime
Documentation
C
2025-05-30
copy
raw
open
Use utility macros
Use predefined utility macros for common operations instead of repeating manual calculations throughout your code. This improves readabil...
dotnet/runtime
Code Style
C
2025-05-30
copy
raw
open
Use appropriate error types
Functions should use specific, appropriate error handling mechanisms rather than generic or brittle approaches. This includes returning p...
denoland/deno
Error Handling
TypeScript
2025-05-29
copy
raw
open
Parameterize configuration values
Extract hard-coded configuration values into variables, parameters, or templates to improve reusability and simplify maintenance. When th...
dotnet/runtime
Configurations
Yaml
2025-05-29
copy
raw
open
remove unnecessary prefixes
Remove vendor prefixes from CSS properties that have achieved sufficient browser support across modern browsers. Before removing prefixes...
denoland/deno
Code Style
Css
2025-05-29
copy
raw
open
Network API compatibility
When implementing networking APIs that mirror Node.js functionality, ensure both behavior and error patterns match Node.js exactly. This ...
oven-sh/bun
Networking
TypeScript
2025-05-28
copy
raw
open
Thread-safe state transitions
When modifying shared state in multithreaded code, implement proper checks and state transitions to prevent race conditions. This applies...
oven-sh/bun
Concurrency
C++
2025-05-28
copy
raw
open
Enable configurable instrumentation
Always provide configurable options for performance instrumentation and hardware acceleration in your codebase. These options should be c...
dotnet/runtime
Performance Optimization
Other
2025-05-28
copy
raw
open
Consistent dependency declarations
Ensure dependency declarations in build configuration files use concrete values rather than variables that may not resolve properly at bu...
netty/netty
Configurations
Xml
2025-05-27
copy
raw
open
Document configuration variations
When documenting or implementing configuration options, always include variations needed for different environments and use cases. Ensure...
oven-sh/bun
Configurations
Markdown
2025-05-27
copy
raw
open
Improve code clarity
Write code that clearly expresses intent through explicit patterns, simplified logic, and readable structure. Avoid unnecessary complexit...
vlang/v
Code Style
Other
2025-05-26
copy
raw
open
Cross-platform configuration examples
Ensure configuration examples and documentation work across different operating systems and clearly distinguish between required and opti...
tree-sitter/tree-sitter
Configurations
Markdown
2025-05-25
copy
raw
open
Memory barrier pairing
When implementing low-level synchronization mechanisms in multi-threaded code, ensure that memory barriers are correctly paired between r...
dotnet/runtime
Concurrency
Other
2025-05-23
copy
raw
open
Structure feature flags strategically
Design feature flags to minimize dependency bloat while maximizing flexibility for users. Each optional dependency should be tied to a sp...
tokio-rs/tokio
Configurations
Toml
2025-05-20
copy
raw
open
Preserve backward compatibility
When evolving APIs in minor versions, always maintain backward compatibility to avoid breaking client code. Follow these principles: 1. *...
netty/netty
API
Java
2025-05-20
copy
raw
open
Simplify configuration flags
Keep configuration flags, feature toggles, and build settings concise and well-organized. Use simpler names where appropriate and consoli...
tokio-rs/tokio
Configurations
Yaml
2025-05-20
copy
raw
open
Preserve pointer authentication
When implementing Pointer Authentication (PAC) for security, maintain signed pointers throughout their entire lifecycle to prevent potent...
dotnet/runtime
Security
C++
2025-05-19
copy
raw
open
explicit null checks
Always verify that pointers and function return values are not null before dereferencing or using them. This prevents crashes and undefin...
vlang/v
Null Handling
Other
2025-05-18
copy
raw
open
Use descriptive identifiers
Choose names that clearly communicate the purpose, functionality, and usage context of variables, methods, and types. Avoid ambiguous or ...
denoland/deno
Naming Conventions
TypeScript
2025-05-16
copy
raw
open
Enable header validation
Always enable HTTP header validation to prevent request/response splitting vulnerabilities. These attacks can occur when untrusted data c...
netty/netty
Security
Java
2025-05-16
copy
raw
open
Verify cryptographic function behavior
When implementing cryptographic algorithms, always verify the exact behavior and return values of security-critical functions. Misinterpr...
oven-sh/bun
Security
C++
2025-05-16
copy
raw
open
Optimize algorithmic complexity
Always consider the time and space complexity implications of your code. Choose data structures and algorithms that minimize computationa...
tokio-rs/tokio
Algorithms
Rust
2025-05-08
copy
raw
open
Use Option methods idiomatically
When dealing with Optional values, prefer Rust's built-in Option methods over manual null checks. This makes code more concise, self-docu...
tokio-rs/tokio
Null Handling
Rust
2025-05-08
copy
raw
open
Write focused single-purpose tests
Break down large test cases into smaller, focused tests that each verify a single feature or behavior. Each test should have a clear purp...
tokio-rs/tokio
Testing
Rust
2025-05-07
copy
raw
open
Export environment variables once
When writing shell scripts, set and export all environment variables at the top of the script rather than modifying them repeatedly throu...
nodejs/node
Configurations
Shell
2025-05-04
copy
raw
open
Configurable over hardcoded
Make configuration parameters configurable rather than hardcoding values, especially for limits, sizes, and thresholds. Provide reasonabl...
netty/netty
Configurations
Java
2025-04-30
copy
raw
open
prefer safe optional returns
When designing APIs and handling potentially missing or unavailable values, prefer returning optional types (Option
, Result
) ove...
denoland/deno
Null Handling
Rust
2025-04-29
copy
raw
open
Add comprehensive test coverage
Ensure that all functionality, especially complex or quirky features, has corresponding unit tests. When adding new features or modifying...
denoland/deno
Testing
Rust
2025-04-29
copy
raw
open
Choose appropriate algorithms
When implementing functionality, carefully evaluate different algorithmic approaches and data structures to choose the most appropriate s...
denoland/deno
Algorithms
Rust
2025-04-29
copy
raw
open
Document public APIs
All public-facing APIs must be thoroughly documented with clear javadocs. This includes: 1. **Classes and interfaces**: When creating or ...
netty/netty
Documentation
Java
2025-04-28
copy
raw
open
Document configuration changes
When modifying configuration files (tsconfig.json, environment configs, build settings, etc.), always provide clear explanations for why ...
tree-sitter/tree-sitter
Configurations
Json
2025-04-22
copy
raw
open
Document network APIs comprehensively
Network APIs and interfaces should include comprehensive documentation with clear descriptions, practical examples, and proper configurat...
denoland/deno
Networking
TypeScript
2025-04-17
copy
raw
open
Granular feature flags
Feature flags should be designed with granularity to ensure dependencies are only required when absolutely necessary. When adding functio...
tokio-rs/tokio
Configurations
Toml
2025-04-16
copy
raw
open
Cache expensive computed values
Cache frequently accessed or computed values to avoid redundant calculations and property lookups. This applies to: 1. Loop invariant val...
microsoft/typescript
Performance Optimization
TypeScript
2025-04-16
copy
raw
open
Use standard API interfaces
Always prefer established API interfaces and patterns over custom or alternative approaches. This ensures compatibility, maintainability,...
denoland/deno
API
TypeScript
2025-04-16
copy
raw
open
optimize memory usage patterns
Focus on reducing memory footprint and improving cache efficiency through careful data structure design and function parameter optimizati...
tree-sitter/tree-sitter
Performance Optimization
C
2025-04-15
copy
raw
open
avoid tooling workarounds
Avoid code patterns that require workarounds for tooling limitations or create maintenance burdens. This includes using contextual keywor...
denoland/deno
Code Style
JavaScript
2025-04-13
copy
raw
open
Optimize algorithmic efficiency
Pay careful attention to operations inside loops and recursive functions to avoid unexpected algorithmic complexity. Be particularly vigi...
tokio-rs/tokio
Algorithms
Rust
2025-04-11
copy
raw
open
Minimize unnecessary work
Optimize performance by reducing the amount of computation performed, especially on data that won''t appear in the final result. Apply th...
JetBrains/kotlin
Performance Optimization
Kotlin
2025-04-09
copy
raw
open
Memory ordering needs barriers
Ensure proper memory ordering in concurrent code by using appropriate memory barriers and atomic operations based on the access pattern. ...
netty/netty
Concurrency
Java
2025-04-01
copy
raw
open
comprehensive test verification
Write tests that comprehensively verify functionality by covering related scenarios and testing complete outputs rather than partial matc...
denoland/deno
Testing
Other
2025-03-29
copy
raw
open
Simplify control flow
Streamline code by simplifying control flow structures to improve readability. Eliminate unnecessary nesting and verbosity by applying th...
netty/netty
Code Style
Java
2025-03-20
copy
raw
open
Flexible consistent API patterns
Design APIs with flexibility and consistency by leveraging established patterns and avoiding unnecessary constraints. Accept generic type...
tokio-rs/tokio
API
Rust
2025-03-12
copy
raw
open
avoid redundant observability data
When implementing observability features like tracing and monitoring, avoid exposing redundant information that can be inferred from exis...
denoland/deno
Observability
TypeScript
2025-03-12
copy
raw
open
Manage async operation lifecycle
When working with async operations, carefully manage execution context and resource references across await boundaries to prevent context...
denoland/deno
Concurrency
TypeScript
2025-03-12
copy
raw
open
null checks before operations
Always check for null or undefined values before performing operations on objects, accessing properties, or calling methods. This prevent...
denoland/deno
Null Handling
TypeScript
2025-03-12
copy
raw
open
Effective API samples
Create clear, comprehensive, and properly structured code samples to\ \ document API usage. Follow these principles:\n\n1. **Organize sam...
JetBrains/kotlin
Documentation
Kotlin
2025-03-10
copy
raw
open
Test edge cases
Ensure tests verify both basic functionality and edge cases. Tests that only cover the happy path can miss critical bugs in boundary cond...
JetBrains/kotlin
Testing
Kotlin
2025-03-10
copy
raw
open
Use branch prediction
Optimize performance-critical algorithms by using branch prediction hints to guide the CPU. Add `UNLIKELY` macros for error conditions, b...
oven-sh/bun
Algorithms
C++
2025-03-07
copy
raw
open
function documentation standards
All public functions and methods must be documented with comments that `v doc` can understand. Documentation should start with the functi...
vlang/v
Documentation
Other
2025-03-05
copy
raw
open
Optimize build configurations
When configuring CMake builds, carefully select compiler and linker flags that optimize for performance while maintaining cross-platform ...
facebook/yoga
Performance Optimization
Txt
2025-03-05
copy
raw
open
Optimize memory allocation
Be deliberate about memory allocation patterns to improve performance. Implement these practices: 1. **Pre-allocate collections when the ...
tokio-rs/tokio
Performance Optimization
Rust
2025-02-27
copy
raw
open
Secure unsafe code
When working with unsafe code, follow these practices to minimize security vulnerabilities: 1. **Minimize scope**: Limit unsafe blocks to...
tokio-rs/tokio
Security
Rust
2025-02-27
copy
raw
open
Minimize unsafe code
When writing code that requires unsafe operations, follow these critical security practices: 1. Minimize the scope of unsafe blocks to on...
tokio-rs/tokio
Security
Rust
2025-02-27
copy
raw
open
Empty vs nil distinction
Always distinguish between nil and empty values when handling nullable types, as they carry different semantic meanings and can affect pr...
bytedance/sonic
Null Handling
Go
2025-02-25
copy
raw
open
Graceful error handling
Prioritize graceful error handling over panicking by providing fallbacks and propagating rich context. When operations can fail: 1. For n...
tokio-rs/tokio
Error Handling
Rust
2025-02-24
copy
raw
open
validate configuration schemas
Configuration schemas should be actively validated, well-documented, and kept up-to-date through automated testing. Use appropriate schem...
denoland/deno
Configurations
Json
2025-02-23
copy
raw
open
Socket configuration guidance
When implementing networking APIs, always clearly document socket modes, configuration options, and platform-specific behaviors. Be expli...
tokio-rs/tokio
Networking
Rust
2025-02-21
copy
raw
open
comprehensive test coverage
Ensure tests cover both happy path scenarios and edge cases, including error conditions and boundary behaviors. Always wrap test code in ...
denoland/deno
Testing
TypeScript
2025-02-18
copy
raw
open
Protect network buffer lifecycle
When handling network buffers in protocol implementations, ensure proper lifecycle management to prevent memory leaks and data corruption...
netty/netty
Networking
Java
2025-02-12
copy
raw
open
Optimize critical loops
When implementing algorithms with nested loops or recursive operations, carefully analyze the computational complexity and optimize the c...
microsoft/typescript
Algorithms
TypeScript
2025-02-05
copy
raw
open
benchmark performance assumptions
Always validate performance assumptions with concrete benchmarks rather than making optimization decisions based on intuition. When consi...
denoland/deno
Performance Optimization
JavaScript
2025-01-29
copy
raw
open
Structure API doc blocks
Each public API documentation block should follow a consistent structure: 1. Start with a single-line summary that concisely describes th...
tokio-rs/tokio
Documentation
Rust
2025-01-28
copy
raw
open
descriptive naming patterns
Use descriptive names that clearly indicate the expected format, convention, or constraints. This applies to template variables, configur...
tree-sitter/tree-sitter
Naming Conventions
Json
2025-01-23
copy
raw
open
Use null validation utilities
Consistently use utility methods like `ObjectUtil.checkNotNull()` or `Objects.requireNonNull()` to validate that parameters are not null....
netty/netty
Null Handling
Java
2025-01-21
copy
raw
open
Network API design consistency
When designing networking APIs, maintain consistency with existing interfaces while ensuring proper cross-platform compatibility. Follow ...
tokio-rs/tokio
Networking
Rust
2025-01-20
copy
raw
open
Release resources consistently
Always ensure resources are properly released, especially in exception paths. Use try-finally blocks to guarantee cleanup of buffers, str...
netty/netty
Error Handling
Java
2025-01-20
copy
raw
open
Runtime configurable defaults
Prefer runtime-configurable values over hardcoded constants to allow users to customize behavior without recompilation. Use environment v...
vlang/v
Configurations
Other
2025-01-20
copy
raw
open
Check feature compatibility
When using kernel-specific networking features like io_uring, always implement runtime detection of feature support before enabling them....
netty/netty
Networking
C
2025-01-20
copy
raw
open
API documentation synchronization
Ensure that all API documentation, including code examples and integration guides, accurately reflects the current API state. When API ch...
tree-sitter/tree-sitter
API
Markdown
2025-01-20
copy
raw
open
Ensure semantic naming clarity
Names should clearly convey their semantic purpose and avoid conflicts that reduce code readability. This applies to imports, types, vari...
tree-sitter/tree-sitter
Naming Conventions
TypeScript
2025-01-20
copy
raw
open
Conditional compilation guards
Always use appropriate preprocessor directives to guard platform-specific, version-dependent, or feature-specific code. Ensure that condi...
tree-sitter/tree-sitter
Configurations
C
2025-01-18
copy
raw
open
Avoid breaking API changes
When modifying existing public APIs, always maintain backward compatibility to avoid breaking existing users. Breaking changes include al...
vlang/v
API
Other
2025-01-18
copy
raw
open
Optimize CI workflow syntax
Write cleaner and more maintainable CI/CD workflows by following established syntax patterns and best practices. Use GitHub Actions' buil...
tree-sitter/tree-sitter
CI/CD
Yaml
2025-01-17
copy
raw
open
Consistent message terminology
Use clear, consistent terminology in all error messages and user-facing text. Avoid technical jargon that might confuse users, and mainta...
microsoft/typescript
Naming Conventions
Json
2025-01-16
copy
raw
open
Document cryptographic requirements
Security-critical functions, especially those involving cryptographic operations, must include clear and accurate documentation about the...
vlang/v
Security
Other
2025-01-16
copy
raw
open
explicit cryptographic parameters
Always explicitly specify security-critical parameters in cryptographic operations rather than relying on default values. This prevents v...
vlang/v
Security
Markdown
2025-01-16
copy
raw
open
use `-prod` for performance
Always use the `-prod` compiler flag when building performance-critical code or running benchmarks. The `-prod` flag automatically enable...
vlang/v
Performance Optimization
Markdown
2025-01-14
copy
raw
open
Organize code logically
Group related code elements together with a consistent and logical structure. Place stable fields and functionality first, followed by co...
tokio-rs/tokio
Code Style
Rust
2025-01-13
copy
raw
open
Document null safety assumptions
When writing code that handles potentially null, undefined, or uninitialized values, always document safety assumptions with clear commen...
tokio-rs/tokio
Null Handling
Rust
2025-01-06
copy
raw
open
Strategic configuration exclusions
When configuring build exclusions in package manifests or configuration files, be strategic and minimal. Only exclude files that cause ac...
tree-sitter/tree-sitter
Configurations
Swift
2025-01-04
copy
raw
open
Use descriptive identifiers
Choose identifiers that clearly communicate their purpose, content, or role rather than using generic or abbreviated names. Names should ...
tree-sitter/tree-sitter
Naming Conventions
Rust
2025-01-03
copy
raw
open
Provide clear error context
Always provide meaningful, specific error messages that help users understand what went wrong and why. Use descriptive language that indi...
tree-sitter/tree-sitter
Error Handling
Rust
2025-01-03
copy
raw
open
Optimize CI job structure
Structure your CI workflows to maximize performance and clarity. Each job should have a single, clear responsibility with these guideline...
tokio-rs/tokio
CI/CD
Yaml
2025-01-01
copy
raw
open
Optimize job structure
Structure CI jobs for clarity, parallelism, and efficiency. Each job should have a single, well-defined purpose to prevent confusion abou...
tokio-rs/tokio
CI/CD
Yaml
2025-01-01
copy
raw
open
optimize algorithms by characteristics
When implementing algorithms, make optimization decisions based on the specific characteristics of your data types and usage patterns rat...
bytedance/sonic
Algorithms
Go
2024-12-31
copy
raw
open
API pattern consistency
When designing new API functions, maintain consistent patterns across the codebase and avoid creating precedents that lead to function pr...
tree-sitter/tree-sitter
API
Other
2024-12-28
copy
raw
open
measure performance implications
When making design decisions that could impact performance, evaluate resource implications and provide concrete measurements rather than ...
tree-sitter/tree-sitter
Performance Optimization
Other
2024-12-28
copy
raw
open
Numeric API completeness
When designing APIs that handle numeric values, ensure comprehensive support for different integer types (Int64, Uint64) based on range r...
bytedance/sonic
API
Go
2024-12-20
copy
raw
open
Fast deterministic tests
Avoid using real sleeps or delays in tests as they significantly slow down the test suite and can introduce flakiness. Instead, use simul...
tokio-rs/tokio
Testing
Rust
2024-12-16
copy
raw
open
verify configuration completeness
Always verify that configuration files completely and accurately specify their requirements. This includes ensuring all related files are...
facebook/yoga
Configurations
Json
2024-12-09
copy
raw
open
Verify algorithm correctness
Ensure algorithms produce expected results by validating data flow and checking that all execution paths return meaningful values rather ...
denoland/deno
Algorithms
JavaScript
2024-11-23
copy
raw
open
Clear technical writing
Ensure technical documentation uses clear, grammatically correct language with consistent formatting when explaining naming conventions a...
vlang/v
Naming Conventions
Markdown
2024-11-20
copy
raw
open
Complete technical documentation
When documenting technical features, APIs, or data structures, provide comprehensive coverage that includes related functionality and det...
tree-sitter/tree-sitter
Documentation
Markdown
2024-11-19
copy
raw
open
Secure resource loading
Always validate and securely load external resources like libraries, configuration files, and modules to prevent tampering and hijacking ...
nodejs/node
Security
Other
2024-11-11
copy
raw
open
Extract complex inline logic
When functions contain complex inline logic or duplicated code, extract this logic into separate functions or shared utilities to improve...
denoland/deno
Code Style
TypeScript
2024-11-07
copy
raw
open
Clarify API documentation
API documentation should provide clear, unambiguous explanations of function behavior, return values, and edge cases. Avoid vague or obsc...
tree-sitter/tree-sitter
Documentation
Other
2024-11-02
copy
raw
open
validate inputs early
Functions should validate input parameters at the beginning and return appropriate error indicators (like false, null, or error codes) ra...
tree-sitter/tree-sitter
Error Handling
C
2024-11-02
copy
raw
open
validate algorithm boundaries
Always validate boundary conditions and termination criteria in algorithms to prevent infinite loops, out-of-bounds access, and incorrect...
tree-sitter/tree-sitter
Algorithms
C
2024-10-27
copy
raw
open
Keep code clearly organized
Maintain code readability and organization by extracting focused, well-named functions and using appropriate scoping. Break down complex ...
JetBrains/kotlin
Code Style
Kotlin
2024-10-21
copy
raw
open
Module resolution hierarchy
When configuring TypeScript projects, establish a clear understanding of module and type resolution hierarchies, especially when using di...
microsoft/typescript
Configurations
TypeScript
2024-10-17
copy
raw
open
optimize memory layout
Prioritize memory-efficient data structures and algorithms by favoring stack allocation over heap allocation, utilizing bit packing for c...
facebook/yoga
Algorithms
Other
2024-10-15
copy
raw
open
Consistent type algorithms
Implement consistent algorithms for type compatibility and comparison across different data structures. When developing type checking log...
microsoft/typescript
Algorithms
Txt
2024-10-13
copy
raw
open
Test diverse configurations
Configure test suites to run under multiple specialized environments to catch issues that might not appear in standard test runs. This in...
tokio-rs/tokio
Testing
Yaml
2024-10-10
copy
raw
open
Test production configurations too
Include testing configurations that mirror production environments to catch issues that might only manifest in release builds. For exampl...
tokio-rs/tokio
Testing
Yaml
2024-10-10
copy
raw
open
target-specific CMake configurations
Use target-specific CMake commands instead of global ones to ensure proper scoping and avoid polluting the global build environment. This...
tree-sitter/tree-sitter
Configurations
Txt
2024-10-05
copy
raw
open
CMake custom command design
When implementing CMake build automation for code generation, carefully choose between `add_custom_command` and `add_custom_target` based...
tree-sitter/tree-sitter
CI/CD
Txt
2024-09-29
copy
raw
open
Use semantic identifiers
Choose semantically appropriate identifiers and types that clearly represent their purpose. This includes using the correct data type (e....
torvalds/linux
Naming Conventions
C
2024-09-18
copy
raw
open
Use defensive null checks
When working with properties or methods that could potentially be null, use Kotlin's null safety features defensively even if you believe...
JetBrains/kotlin
Null Handling
Kotlin
2024-08-19
copy
raw
open
Use absolute paths
When specifying file paths in configuration files (like ESLint or TypeScript configs), use absolute paths rather than relative paths to a...
microsoft/typescript
Configurations
Other
2024-08-15
copy
raw
open
Use semantic naming
Choose names that clearly communicate the purpose, meaning, and scope of variables, functions, constants, and files. Names should be self...
bytedance/sonic
Naming Conventions
Go
2024-07-18
copy
raw
open
Prefer descriptive errors
When handling errors in your code, always provide detailed context in error messages to aid debugging. Use Kotlin's standard error handli...
JetBrains/kotlin
Error Handling
Kotlin
2024-07-05
copy
raw
open
Simplify conditional logic
Improve code readability by simplifying complex conditional expressions and control flow structures. Factor out repeated boolean expressi...
tree-sitter/tree-sitter
Code Style
C
2024-07-05
copy
raw
open
Follow naming conventions
Choose names that follow established API conventions and guidelines\ \ to create a consistent, intuitive codebase:\n\n1. For conversions ...
tokio-rs/tokio
Naming Conventions
Rust
2024-07-01
copy
raw
open
Prefer explicit over concise
Choose explicit and unambiguous names over concise but unclear ones. When a method, type, or variable has a specific behavior or purpose,...
tokio-rs/tokio
Naming Conventions
Rust
2024-07-01
copy
raw
open
Decompose complex algorithms
When implementing algorithms, break down complex methods that handle multiple concerns into smaller, more focused methods. This improves ...
dotnet/runtime
Algorithms
C
2024-06-27
copy
raw
open
Mirror related API methods
When designing APIs with related method pairs (such as send/receive, input/output, or request/response), ensure their signatures and para...
denoland/deno
API
JavaScript
2024-06-26
copy
raw
open
Copy external string inputs
When storing string pointers from external sources (like command-line arguments), always validate the input and create managed copies to ...
JetBrains/kotlin
Null Handling
C++
2024-06-06
copy
raw
open
optimize dependency configurations
When configuring dependencies in package manifests, prioritize efficiency and maintainability by avoiding redundant dependencies, using f...
tree-sitter/tree-sitter
Configurations
Toml
2024-05-31
copy
raw
open
Use modern test infrastructure
Always add new tests to the current recommended test infrastructure rather than legacy systems that are being phased out. This reduces te...
JetBrains/kotlin
Testing
Other
2024-04-30
copy
raw
open
maintain backward compatibility
When modifying existing APIs, preserve original parameter types and return signatures to avoid breaking client code. Even when internal i...
golang/go
API
Go
2024-04-13
copy
raw
open
Code block formatting standards
When documenting code examples and shell commands in project documentation, follow these formatting standards to ensure consistency and c...
tokio-rs/tokio
Documentation
Markdown
2024-04-12
copy
raw
open
Clear command documentation
When documenting shell commands in technical documentation, use the `shell` language identifier instead of `bash` as commands are typical...
tokio-rs/tokio
Documentation
Markdown
2024-04-12
copy
raw
open
Write explicit concrete tests
Tests should be written explicitly with concrete examples and clear assertions rather than being generated programmatically or hidden in ...
tree-sitter/tree-sitter
Testing
Rust
2024-02-17
copy
raw
open
Memory ordering needs justification
When using atomic operations, explicitly justify the choice of memory ordering. Each use of a memory ordering should be documented with a...
tokio-rs/tokio
Concurrency
Rust
2024-02-15
copy
raw
open
Names express clear intent
Choose names that clearly express intent and follow established conventions. Prefer explicit, descriptive names over abbreviations or amb...
JetBrains/kotlin
Naming Conventions
Kotlin
2024-01-31
copy
raw
open
Design extensible stable APIs
When designing public APIs, prioritize extensibility while maintaining backward compatibility and implementation hiding. This ensures API...
JetBrains/kotlin
API
Kotlin
2024-01-30
copy
raw
open
Configure socket blocking behavior
Always explicitly configure socket blocking behavior when creating TCP connections, and provide compile-time flags for backwards compatib...
vlang/v
Networking
Other
2024-01-10
copy
raw
open
Use semantic naming
Choose semantic, logical names that describe purpose and intent rather than physical characteristics or implementation details. This impr...
facebook/yoga
Naming Conventions
TypeScript
2023-12-13
copy
raw
open
avoid eval() function
The eval() function executes arbitrary JavaScript code from strings, creating significant security vulnerabilities including code injecti...
facebook/yoga
Security
TypeScript
2023-12-13
copy
raw
open
Use benchmarked thresholds
Base performance-critical constants, limits, and thresholds on empirical benchmarking rather than arbitrary values. When implementing opt...
golang/go
Performance Optimization
Go
2023-11-22
copy
raw
open
prevent off-by-one errors
When implementing algorithms that involve spacing, gaps, or iterative calculations, carefully verify loop bounds and edge cases to preven...
facebook/yoga
Algorithms
C++
2023-10-14
copy
raw
open
Enhance error message clarity
Error messages should be both specific about what went wrong and provide contextual information to help developers locate and fix the iss...
denoland/deno
Error Handling
JavaScript
2023-09-14
copy
raw
open
Consider operation time complexity
When implementing operations that manipulate collections or perform repeated actions, carefully consider the time complexity implications...
JetBrains/kotlin
Algorithms
Kotlin
2023-09-12
copy
raw
open
Respect environment overrides
Build systems and configuration scripts must respect standard environment variables and provide proper override mechanisms. This ensures ...
tree-sitter/tree-sitter
Configurations
Other
2023-07-20
copy
raw
open
Function documentation standards
Function documentation comments must follow Go conventions by starting with the function name, and all parameters should have clear expla...
bytedance/sonic
Documentation
Go
2023-07-02
copy
raw
open
validate memory bounds
Always validate array and string bounds before accessing memory to prevent out-of-bounds access and potential crashes. When working with ...
bytedance/sonic
Null Handling
C
2023-06-27
copy
raw
open
Consistent semantic naming
Maintain consistent naming conventions throughout the codebase and use semantically clear identifiers that clearly indicate their purpose...
bytedance/sonic
Naming Conventions
C
2023-06-27
copy
raw
open
bounds checking first
Always validate array and buffer bounds before accessing elements to prevent out-of-bounds access and potential security vulnerabilities....
bytedance/sonic
Algorithms
C
2023-06-27
copy
raw
open
consistent code formatting
Maintain consistent indentation and brace alignment throughout the codebase to improve readability and code organization. Use 4-space ind...
bytedance/sonic
Code Style
C
2023-06-27
copy
raw
open
Meaningful comment practices
Comments should explain the reasoning behind code decisions rather than restating what the code obviously does. Focus on the "why" rather...
bytedance/sonic
Documentation
C
2023-06-27
copy
raw
open
Keep configuration versions current
Regularly review and update version specifications in configuration files to align with current standards and internal practices. When up...
facebook/yoga
Configurations
Swift
2023-06-16
copy
raw
open
Improve code readability
Enhance code clarity and maintainability by applying several readability techniques: extract repeated expressions into well-named variabl...
facebook/yoga
Code Style
C++
2023-05-12
copy
raw
open
Preserve API compatibility first
When modifying existing APIs, maintain backwards compatibility by adding new overloads rather than directly changing existing signatures....
microsoft/typescript
API
TypeScript
2023-04-13
copy
raw
open
wrap errors properly
When creating error messages that include information from underlying errors, use fmt.Errorf with the %w verb instead of string concatena...
golang/go
Error Handling
Go
2023-03-28
copy
raw
open
Standardize build configurations
Maintain consistent and standardized build configurations across the project to improve maintainability and reduce errors: 1. **Centraliz...
JetBrains/kotlin
Configurations
Other
2023-02-02
copy
raw
open
standardize build configurations
Ensure build configurations are consistently propagated through all build steps and output directories follow standardized patterns. This...
facebook/yoga
CI/CD
Other
2023-01-08
copy
raw
open
Use appropriate CI toolchains
Ensure CI/CD workflows use technology-specific setup actions and execute commands in the correct working directories. Avoid using generic...
facebook/yoga
CI/CD
Yaml
2023-01-07
copy
raw
open
Measure optimization trade-offs
Always measure and document the impact of performance optimizations before implementing them. When making optimization decisions, quantif...
facebook/yoga
Performance Optimization
Other
2022-12-22
copy
raw
open
prevent prototype pollution
When implementing security measures around JavaScript's `__proto__` property, disable the setter to prevent prototype pollution attacks w...
denoland/deno
Security
JavaScript
2022-11-23
copy
raw
open
automate frequent releases
Implement automated release workflows to publish updates frequently and consistently across all distribution channels. Manual release pro...
tree-sitter/tree-sitter
CI/CD
Markdown
2022-10-19
copy
raw
open
Use proper network constants
When writing network-related code, always use named constants from system packages instead of magic numbers, and ensure complete protocol...
golang/go
Networking
Go
2022-10-17
copy
raw
open
Enforce style in CI
Configure automated formatting tools in CI/CD pipelines to enforce code style standards rather than silently fix violations. Use validati...
facebook/yoga
Code Style
Yaml
2022-10-14
copy
raw
open
Evaluate synchronization necessity
Before implementing thread safety mechanisms like atomic operations or mutexes for global variables, critically assess whether perfect sy...
facebook/yoga
Concurrency
C++
2022-10-03
copy
raw
open
Design familiar APIs
Design APIs that align with platform conventions and user expectations rather than creating novel patterns. APIs should feel natural to d...
facebook/yoga
API
Other
2022-10-03
copy
raw
open
Maintain consistent formatting
Ensure all code follows the established project formatting standards consistently across the codebase. This includes adhering to specific...
bytedance/sonic
Code Style
Go
2022-09-27
copy
raw
open
Minimize not-null assertions
Avoid using not-null assertions (`!!`) when safer alternatives exist. Instead: 1. Use safe calls (`?.`) when accessing properties or meth...
JetBrains/kotlin
Null Handling
Java
2022-07-21
copy
raw
open
Use meaningful identifiers
Choose identifiers that accurately represent their purpose, semantics, and relationship to the codebase. Names should be self-documenting...
tree-sitter/tree-sitter
Naming Conventions
C
2022-01-12
copy
raw
open
Use meaningful prefixed names
Names should be semantically meaningful and properly prefixed to prevent namespace conflicts. In C, enum variants and global identifiers ...
tree-sitter/tree-sitter
Naming Conventions
Other
2021-12-24
copy
raw
open
Cache expensive computations
Identify and cache the results of expensive computations to avoid redundant calculations, especially in performance-critical code paths. ...
facebook/yoga
Performance Optimization
C++
2021-12-23
copy
raw
open
Prevent test resource leaks
Always ensure proper cleanup of resources in tests to prevent memory leaks. When using EmbeddedChannel, call readOutbound() to process al...
netty/netty
Testing
Java
2021-07-12
copy
raw
open
Centralize platform configurations
Platform-specific code and API usage should be centralized in designated configuration files rather than scattered throughout the codebas...
dotnet/runtime
Configurations
C
2021-06-16
copy
raw
open
Dependency verification configuration
When adding new dependencies to build.gradle.kts files, always update the corresponding verification metadata to prevent build failures. ...
JetBrains/kotlin
Configurations
Xml
2021-06-15
copy
raw
open
Document security implementations
Always document non-obvious security implementations, especially authentication mechanisms, with explanatory comments and references to u...
JetBrains/kotlin
Security
Kotlin
2021-05-17
copy
raw
open
go:build directive syntax
Ensure go:build directives follow correct syntax with no space between "//" and "go", and use proper logical operators for multiple condi...
golang/go
Configurations
Go
2021-04-11
copy
raw
open
Documentation quality standards
Ensure all documentation comments follow proper formatting conventions and are placed where developers will most likely read them. Docume...
golang/go
Documentation
Go
2021-02-21
copy
raw
open
consolidate related logging
When logging information about the same operation or context, combine multiple related log statements into a single, comprehensive messag...
tree-sitter/tree-sitter
Logging
C
2021-02-08
copy
raw
open
Use conventional descriptive names
Variable names should follow established language conventions and clearly communicate their purpose and context. Avoid abbreviated or cry...
golang/go
Naming Conventions
Go
2020-12-15
copy
raw
open
Use configuration property providers
Always use Gradle's Provider API when accessing project, system, or Gradle properties in your build configuration. This ensures proper ha...
JetBrains/kotlin
Configurations
Kotlin
2020-07-17
copy
raw
open
Safe configuration definitions
When defining configuration flags and options, use practices that ensure compatibility across different preprocessors and build environme...
facebook/yoga
Configurations
C++
2020-04-08
copy
raw
open
Prefer early returns
When a function can determine an early result based on input validation or special cases, return immediately rather than assigning to a t...
torvalds/linux
Code Style
C
2019-09-02
copy
raw
open
understand undefined value semantics
Before modifying initialization patterns or removing static variables, investigate the semantic meaning of undefined values and object li...
facebook/yoga
Null Handling
C++
2019-03-05
copy
raw
open
explicit code declarations
Always make code declarations explicit and consistent to improve readability and maintainability. This includes specifying all property a...
facebook/yoga
Code Style
Other
2019-01-04
copy
raw
open
Go module configuration
Ensure Go projects use modern module configuration instead of legacy GOPATH setup. Projects should be created outside of GOPATH directory...
golang/go
Configurations
Html
2018-10-17
copy
raw
open
Add safety checks
Always add appropriate safety checks before operations that could result in undefined behavior, null references, or memory issues. This i...
facebook/yoga
Null Handling
Objective-C
2018-07-26
copy
raw
open
optimize parser development strategy
When developing parsers or grammars, apply strategic optimization by prioritizing commonly used language features and choosing appropriat...
tree-sitter/tree-sitter
Algorithms
Markdown
2018-02-15
copy
raw
open
Document complex logic
Add clear explanatory comments to complex calculations, platform-specific behavior, or non-obvious code sections. Use NOTE comments to ex...
facebook/yoga
Code Style
Objective-C
2018-01-20
copy
raw
open
Analyze performance trade-offs
Before implementing convenience features or making architectural decisions, carefully evaluate their performance implications and hidden ...
facebook/yoga
Performance Optimization
Objective-C
2017-07-29
copy
raw
open
Assert null before access
When asserting conditions on potentially null pointers, always check for null first before accessing the pointer's properties or members....
tree-sitter/tree-sitter
Null Handling
C
2017-06-14
copy
raw
open
validate algorithmic inputs
Always validate inputs and handle edge cases before performing algorithmic operations, especially when dealing with indices, state transi...
tree-sitter/tree-sitter
Algorithms
Other
2017-06-09
copy
raw
open
Avoid configuration side effects
Configuration properties should behave predictably without hidden side effects that override explicitly set values. When a developer sets...
facebook/yoga
Configurations
Objective-C
2017-05-24
copy
raw
open
separate formatting from logging
Design logging utility functions to return formatted strings rather than directly performing logging operations. This separation of conce...
facebook/yoga
Logging
Other
2017-04-26
copy
raw
open
Choose meaningful identifiers
All identifiers including parameters, files, functions, and categories should clearly communicate their purpose and role. Avoid generic o...
facebook/yoga
Naming Conventions
Other
2017-03-14
copy
raw
open
Use descriptive function names
Function names should clearly convey their purpose and behavior, not just their signature or implementation details. Avoid names that cou...
facebook/yoga
Naming Conventions
C
2017-03-01
copy
raw
open
Control structure formatting
Always use braces for control structures (if, for, while, etc.) even for single statements, and maintain consistent spacing around parent...
facebook/yoga
Code Style
Java
2017-02-27
copy
raw
open
Explicit undefined state handling
Always use explicit, well-defined representations for undefined, uninitialized, or invalid states instead of magic values or allowing und...
facebook/yoga
Null Handling
C
2017-02-23
copy
raw
open
Extract complex conditions
When encountering complex conditional expressions or generic variable references, extract them into clearly named variables or use explic...
facebook/yoga
Code Style
C
2017-02-23
copy
raw
open
Manage resource lifecycles
Ensure proper resource allocation and cleanup pairing, and maintain clear ownership semantics to prevent memory leaks and null reference ...
facebook/yoga
Null Handling
C#
2017-02-13
copy
raw
open
Write focused single-purpose tests
Tests should focus on validating one specific behavior or scenario rather than combining multiple test cases into complex, multi-purpose ...
facebook/yoga
Testing
Html
2017-02-02
copy
raw
open
Algorithm specification compliance
When implementing layout algorithms, ensure strict adherence to web standards and specifications, particularly regarding control flow and...
facebook/yoga
Algorithms
C
2017-01-05
copy
raw
open
Follow language naming conventions
Ensure all identifiers (properties, methods, classes, variables) follow the established naming conventions of the programming language be...
facebook/yoga
Naming Conventions
C#
2016-10-04
copy
raw
open
Strict null checks
Use explicit strict equality checks when testing for null or undefined values. Prefer `x === undefined` over `typeof x === 'undefined'` w...
facebook/yoga
Null Handling
JavaScript
2015-10-07
copy
raw
open
consistent formatting choices
Maintain consistent formatting and structural choices throughout the codebase to improve readability and maintainability. This includes a...
facebook/yoga
Code Style
JavaScript
2015-10-04
copy
raw
open
Reset algorithm state internally
Algorithms should handle their own state initialization and cleanup internally rather than relying on callers to manage it. This prevents...
facebook/yoga
Algorithms
JavaScript
2015-10-04
copy
raw
open
benchmark performance optimizations
Always measure and validate performance optimizations through benchmarking before assuming they provide benefits. Performance changes can...
facebook/yoga
Performance Optimization
JavaScript
2015-09-07
copy
raw
open
avoid build side effects
Build scripts should avoid performing operations as side effects and instead use explicit, dedicated tasks for each operation. Side effec...
facebook/yoga
CI/CD
JavaScript
2015-08-13
copy
raw
open
Centralize configuration values
Consolidate all configuration variables, constants, and settings into a centralized configuration object rather than declaring them as sc...
facebook/yoga
Configurations
JavaScript
2015-08-13
copy
raw
open
Feature flag implementation
When implementing feature flags, ensure consistency between runtime and compiled scenarios. Feature switches marked with `FeatureSwitchDe...
dotnet/runtime
Configurations
C#
copy
raw
open