Urgent.News

What's breaking now, across thousands of outlets.

Tech

Naming Things Without Pain: A Practical Guide

Naming Things Without Pain We've all been there: staring at a variable called data or a function called process() and wondering what the original author was thinking. Naming is one of the hardest parts of programming, but it doesn't have to be a constant source of frustration. Here's a practical approach I've refined over years of writing and reviewing code. 1. Name for the Reader, Not the Writer…

Good naming practices are crucial in programming, yet they often cause frustration. This guide presents a practical approach to effective naming. The first principle is to prioritize the reader's understanding, as the future self or a team member will likely be the reader. The second principle involves using names that clearly distinguish one from another, avoiding vague qualifiers.

The third principle is to ensure names don't mislead; a function's name should accurately reflect its output. The fourth principle is about selecting the appropriate level of abstraction, ensuring names match the context. The fifth principle urges against names that could be confused with each other or built-in keywords. The sixth principle promotes using pronounceable and searchable names for easy discussions in code reviews.

The seventh principle suggests using one word per concept to maintain consistency. The eighth principle recommends using positive names for booleans when possible. The ninth principle encourages renaming if a name no longer fits. The tenth principle advises seeking clarification if unsure about a name. A key heuristic is that if a good name can't be found within a few minutes, it may indicate a lack of understanding of the problem.

Ultimately, naming is a skill that improves with practice and intentionality, leading to code that reads like a well-structured story.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

24 Hours of Zero Posts: The 46GB Compressed-Memory Bomb That RSS Couldn't See

The day my social media automation posted exactly zero times in 24 hours was the day I stopped trusting Activity Monitor. RSS said 264MB. Reality was 47GB.

  • Automated social media agent stopped posting on August 9, 2026
  • Compressed memory pages in dasd process consumed 46GB
  • Script monitored memory usage, restarted daemons, notified via Discord

Scaling from Solo to Stellar: The Tech Stack for a One-Person Dev Agency

Scaling from Solo to Stellar: The Tech Stack for a One-Person Dev Agency Burnout is the silent killer in the solo tech game. You don't need to read a self-help book to know that.

  • Tech stack transforms solo developer into high-capacity agency
  • Automation and orchestration tools enhance productivity
  • Humanware balance essential for sustainable growth

More from Saturday 5 September →