Skip to content
Velloreth

#best practices

Posts tagged with “best practices”.

27 posts

01

Code Coverage Myths: What the Number Really Tells You

Coverage measures which lines ran, not whether they were verified. Learn what it is good for, what it hides, and how to use it sensibly.

02

A Code Review Checklist That Actually Helps

Good code review catches bugs and shares knowledge without slowing the team down. Learn what to look for, what to skip, and how to give feedback.

03

CSS Specificity Explained: How Conflicts Are Resolved

Specificity decides which CSS rule wins when several match. Learn the scoring, the cascade layers, and how to avoid specificity wars.

04

Debugging With Breakpoints: A Practical Guide

Breakpoints let you pause a program and inspect its state. Learn conditional breakpoints, watch expressions, and how to debug without print statements.

05

Dockerfile Best Practices for Smaller, Faster Images

A good Dockerfile builds fast and produces a small image. Learn layer caching, multi-stage builds, and the common mistakes.

06

DRY, KISS and YAGNI: Three Principles, One Goal

DRY, KISS and YAGNI are three heuristics for simpler code. Learn what each really means, how they conflict, and how to apply them sensibly.

07

Environment Variables: Best Practices and Pitfalls

Environment variables configure an application without changing code. Learn the patterns, the security rules, and the traps.

08

Error Handling Patterns That Actually Work

Good error handling is a design decision, not a try/catch afterthought. Learn patterns for propagating, wrapping, and recovering from failures.

09

Fixing Flaky Tests: Causes and Cures

A flaky test passes and fails without code changes. Learn the common causes, how to find them, and how to fix them properly.

10

Gitignore Patterns: How to Ignore the Right Files

A .gitignore is a set of patterns, and the rules are subtle. Learn the syntax, the precedence, and the mistakes to avoid.

11

Integration vs Unit Tests: What Each One Catches

Unit tests isolate one piece; integration tests verify pieces work together. Learn the trade-offs and how to balance the two.

12

JavaScript Dates: The Traps and How to Avoid Them

The Date object has real pitfalls: timezones, month indexing, and parsing. Learn the traps and the modern alternatives.

13

JavaScript Object Methods: A Practical Reference

Object.keys, entries, assign, freeze and the rest. Learn what each does, the shallow-copy trap, and the modern alternatives.

14

JavaScript Performance: Practical Optimisation Tips

Most JavaScript is fast enough. Learn where the real bottlenecks are, how to measure, and the optimisations that actually matter.

15

Logging Best Practices for Production Systems

Good logs make incidents short and bad logs make them long. Learn log levels, structured logging, what to log, and what never to log.

16

Mocking and Stubbing: Test Doubles Explained

Mocks, stubs, fakes and spies are different test doubles. Learn what each is for, when to use them, and why over-mocking makes tests brittle.

17

Naming Conventions: How to Name Things in Code

Good names make code readable without comments. Learn the conventions for variables, functions, classes and files, and the habits that produce them.

18

Property-Based Testing: Testing Rules, Not Examples

Property-based tests assert invariants that hold for all inputs, and the framework generates the cases. Learn how it finds bugs example tests miss.

19

How to Read a Stack Trace Without Panicking

A stack trace tells you exactly where a program failed and how it got there. Learn to read one top to bottom and find the cause fast.

20

Refactoring Basics: Improving Code Without Breaking It

Refactoring changes code structure without changing behaviour. Learn the core techniques, how to stay safe, and when to refactor.

21

Regression Testing: Making Sure Bugs Stay Fixed

Regression tests guard against old bugs returning. Learn how to write them, what to cover, and how to keep the suite from growing forever.

22

Rubber Duck Debugging: Why Explaining Code Finds Bugs

Explaining your code out loud often reveals the bug before you finish. Learn why it works and how to use it deliberately.

23

Test-Driven Development: A Practical Introduction

TDD is a short red-green-refactor cycle that shapes design as much as it verifies code. Learn the loop, the benefits, and the common objections.

24

The Twelve-Factor App: A Practical Summary

The twelve factors describe how to build a service that deploys cleanly. Learn each factor and what it means in practice.

25

Unit Testing Basics: What to Test and How

Unit tests verify one piece of behaviour in isolation. Learn what makes a good test, the arrange-act-assert structure, and common mistakes.

26

When to Write Code Comments (and When Not To)

Comments explain why, not what. Learn which comments earn their place, which are noise, and how to write ones that stay accurate.

27

Writing Clean Functions: Small, Focused, Testable

Clean functions do one thing, have clear names, and few parameters. Learn the rules, the trade-offs, and how to refactor messy functions.