Best-Practices
19 posts
Prove the Test Can Fail: Mutate the Fix
A regression test is unverified until you have watched it fail against the unfixed code. The procedure, and three shapes that survive a naive check.
Running GitHub Actions Efficiently
A macOS runner costs ten times a Linux one, and that multiplier reorders every other CI decision. How to cut Actions minutes without weakening the gate.
Managing Bandit False Positives Without Breaking Security
How to handle false positives in Bandit without accidentally silencing the real vulnerabilities hiding among them. A practical guide.
Verification and Validation: Building the Right Thing Right
The difference between verification and validation, and why software teams should care about this systems engineering distinction.
Refactoring Library Interfaces
Discover techniques for improving library interfaces through thoughtful refactoring, using real-world examples while maintaining backward compatibility.
Context-Aware Library Design: Build for Your Users
Learn to design Python libraries that adapt to various user needs and experience levels, ensuring simplicity and effectiveness for all users.
Handling Deprecation: Gracefully Retiring Features
Learn to deprecate Python library features gracefully with warnings, clear communication, and migration paths that minimize disruption to your users.
McCabe Complexity: The Python Metric You Should Care About
Learn about McCabe Complexity, a key metric for code complexity. Understand, measure with tools like Ruff, and manage complexity in Python projects.
Python Logging Best Practices for Library Developers
A comprehensive guide to implementing logging in Python libraries - from basic setup to advanced patterns and common pitfalls to avoid
Documenting Your Library's API: Best Practices
Build a clear, comprehensive API reference with Sphinx & autodoc. Learn best practices for structure, content, cross-referencing your Python library docs.