Skip to main content

158 posts tagged with "python"

python tag description

View All Tags

Beyond Shift Left. Development Paradigms Every Programmer Should Know

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

I'm continuing the paradigms circle. The Shift Left paradigm is well-known in the DevOps and QA communities for its philosophy of catching bugs, security issues, and integration problems early in the development lifecycle. But Shift Left is not the only valuable philosophy out there. In fact, in some contexts, other paradigms can be even more effective.

This article introduces several software development paradigms that complement or enhance Shift Left-and may even be more impactful depending on your context.

Testing in Python for Beginners. Using `unittest` and `pytest` with Fun Examples

· 3 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Writing tests in Python helps ensure that your code works correctly. In this guide, we'll use two popular testing tools: the built-in unittest module and the third-party library pytest. We'll walk through both using examples related to vegetables and AI model names.

How to Remove Text Under Barcode with `python-barcode`

· 3 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

By default, the python-barcode library renders human-readable text (usually the encoded number) under the barcode. If you're building a minimal barcode-only label or want to embed the barcode without additional text, you'll need to disable that feature.

Here's how to do it.

flake8 or ruff - Detects Unused Variables, Bad Patterns, and Syntax Errors Early

· 4 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Writing clean and correct code is critical for every Python programmer, especially beginners. Tools like flake8 and ruff help catch issues like unused variables, potential bugs, syntax errors, and styling problems early - often before you even run the code.

Black - Auto-Format Your Python Code Like a Pro

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Writing clean and consistent code is a mark of professionalism, and it also makes collaboration easier. But keeping formatting consistent manually is hard. That’s where Black, the Python code formatter, shines.

Black automatically formats your code according to PEP 8 (Python’s style guide), with minimal configuration and zero fuss. This guide will show you how to install it, use it, and why it's helpful - especially if you're new to Python programming.

What is Pyright and Why You Should Use It

· 6 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Python is known for being dynamic, fast to prototype with, and easy to write. But these same characteristics can introduce bugs that are only caught at runtime.

Static type checking-validating code without running it-helps you catch bugs earlier. This is where Pyright enters the stage.

What is Mypy, How to Use It, and Why It Matters

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Python is known for being a dynamically typed language - you don’t have to declare variable types, and everything works at runtime. But as your codebase grows, undetected type errors can creep in. That’s where Mypy comes in.

Mypy is a static type checker for Python. It checks your Python code for type errors without running it.