This article explores how software engineers can improve their work by clearly defining roles, applying systematic refactoring strategies, and enforcing quality through team consensus, testing practices, and a strong engineering culture, drawing on over two decades of industry experience.
This article explains what makes good code, introduces SOLID and other design principles, defines unit testing, outlines its benefits, provides before‑and‑after Java refactoring examples, and reviews essential testing tools like Fast‑tester, JUnit and Mockito along with coverage metrics.
This article examines common pitfalls in code quality, testing, and development efficiency, analyzes their root causes, and proposes concrete, actionable solutions such as performance optimization, stricter coding standards, regular code reviews, improved testing practices, and enhanced team collaboration to boost overall software project success.
This guide traces ESLint’s evolution from early lint tools, shows how to install and configure it, run auto‑fixes, integrate with editors, enforce quality via Husky, lint‑staged and commit‑lint, and combine these practices into a defensive moat that keeps repositories clean and consistent.
This article introduces Python type annotations, explains why they improve code consistency and readability in collaborative projects, demonstrates simple and advanced usage with code examples and screenshots, and encourages developers to adopt static typing for better maintenance and fewer runtime errors.
A seemingly simple two‑line code change can stretch into days because of unclear bug reports, unfamiliar features, thorough root‑cause analysis, multiple reproduction paths, impact checks, careful solution design, and comprehensive testing, all of which aim to prevent future regressions.
This article explores why massive distributed applications quickly become complex, identifies cognitive load and collaboration cost as the two main dimensions of software complexity, and offers practical design, naming, testing, and documentation strategies to keep systems maintainable over time.
This article explains why clear Git commit messages matter, presents a concrete commit‑message format with type, optional scope, and subject, lists the allowed types, shows examples, and describes a webhook‑based monitoring service that warns or blocks non‑conforming commits while also tracking large changes and file deletions.
The article explains why excessively long classes with many responsibilities hinder readability and extensibility, outlines the problems of redundant code and SRP violations, and provides practical refactoring techniques—such as extracting methods, moving members, and creating new classes—using IntelliJ IDEA.
This article explains how to write robust Java code by applying defensive programming techniques such as guard clauses, proper exception handling, validator usage, assertions, and the DRY principle, while illustrating each concept with clear code examples and practical guidelines.
Refactoring improves code understandability and reduces maintenance costs by reorganizing internal structure without changing behavior, and this guide explains its purpose, timing, principles, common code smells, measurement metrics, and practical techniques across data, statement, subroutine, class, and system levels.
The article explains how defensive programming in Java—using guard clauses, validators, and side‑effect‑free assertions—prevents errors, outlines proper exception handling by distinguishing checked from unchecked exceptions, and reinforces the DRY principle, urging developers to abstract repeated logic after three occurrences.
This comprehensive guide explores the principles of ESLint and abstract syntax trees, providing step-by-step instructions for developing custom linting rules and plugins to enforce coding standards, prevent hardcoded configurations, and maintain high-quality frontend codebases across collaborative development environments.
This article provides a comprehensive guide to GitLab code review, covering environment setup, Git flow basics, review methods, configuration of approvals, templates, issue linking, Code Quality integration with CI/CD, step‑by‑step practice, and recommendations for choosing between Community and Enterprise editions.
This article describes the design, implementation, and operational strategy of a comprehensive code‑metrics platform that standardizes coding standards, automates quality checks, and drives data‑guided improvements across multiple development teams, ultimately enhancing code reliability, maintainability, and CI/CD flow.
This guide explains how to integrate SonarLint into IntelliJ IDEA to perform pre‑commit code quality checks, covering the tool’s objectives, the seven quality dimensions it assesses, required prerequisites, plugin installation steps, and detailed project and server configuration procedures.
This guide explains how to set up SonarLint in IntelliJ IDEA, covering the seven quality dimensions Sonar checks, required prerequisites, plugin installation, server configuration, project selection, and visual verification of the integration within the IDE.
This article examines why excessive if…else statements harm code readability and maintainability, and presents a range of refactoring approaches—including table‑driven mapping, chain‑of‑responsibility, annotation‑driven, event‑driven, state machines, Optional, Assert, and polymorphism—to replace or simplify them, while also addressing deep nesting and complex conditional expressions.
This comprehensive article shares the author's hands‑on experience with unit testing, explains why testing drives better design and lower costs, outlines common misconceptions and obstacles, and provides detailed implementation guidelines—including architecture refactoring, dependency inversion, and a real‑world TV service example—to help developers start writing effective unit tests.
This article outlines frequent programming errors—such as trusting user input, skipping tests, neglecting documentation and logs, hard‑coding values, ignoring rest, and failing to keep learning—and offers practical advice to prevent them and improve software reliability.
code qualitydocumentationprogramming best practices
This article translates Google’s Code Health Guide, explaining how reducing deep nesting with guard‑clauses improves readability and bug detection, and offering concrete, respectful code‑review practices that foster clearer communication and higher software quality.
This article, translated from Google's testing blog, offers practical guidelines on avoiding overly long identifiers, writing clear and precise commit messages, and linking code changes to defect reports to improve code readability and maintainability across software projects.
This article explains how to identify and remove YAGNI code smells, offers guidelines on when to write comments versus refactoring code, and provides practical tips for preparing, conducting, and learning from code reviews to improve software quality.
This article examines the problems caused by overusing if…else statements in code—such as poor readability, maintainability, and violation of design principles—and presents a collection of refactoring patterns, including table‑driven design, chain of responsibility, annotation‑driven, event‑driven, state machines, Optional, guard clauses, and polymorphism, with concrete Java examples.
In this translated talk, Niclas Hedhman examines why poor code proliferates in the software industry, debunks common myths about development, highlights the hidden challenges programmers face, and proposes practical principles such as the KISS rule to gradually raise code quality and developer satisfaction.
This article explains why excessively long classes are hard to read and extend, outlines the problems caused by redundant code and multiple responsibilities, and provides step‑by‑step refactoring techniques using IntelliJ IDEA to extract methods, move members, and create new classes.
The article explains why excessively long classes are hard to read, extend, and maintain, outlines the problems caused by redundant code and multiple responsibilities, and provides step‑by‑step refactoring techniques using IntelliJ IDEA to extract methods, move members, and create new classes.
The article examines the drawbacks of overusing if...else constructs in software, explains why they harm readability and maintainability, and presents ten practical refactoring methods—including table‑driven, chain‑of‑responsibility, annotation‑driven, event‑driven, state machine, Optional, Assert, guard clauses, and method extraction—to simplify or replace complex conditional logic.
This article discusses common challenges encountered when using SonarQube at scale—including data instability across branches, rule configuration for new projects, and project permission management—and presents practical solutions such as branch-specific project naming, Jenkins-driven API automation, and recommendations for purchasing commercial editions.
This article explains why overusing if…else harms code readability and maintainability, outlines ten practical methods—including table‑driven, chain of responsibility, annotation‑driven, event‑driven, state machines, Optional, Assert, and polymorphism—to refactor or replace complex conditional logic, and provides Java code examples for each approach.
The article examines why many software projects deteriorate due to poor code quality, outlines four common pitfalls such as oversized components, low cohesion, tangled logic, and rampant if‑else statements, and presents concrete refactoring strategies—including inverted‑pyramid design, lib/framework separation, Template Method pattern, and rich enums—to dramatically improve maintainability and project success.
This article examines why high‑quality, maintainable code is essential for software projects, outlines four recurring code‑quality problems—including oversized components, low cohesion, tangled logic, and excessive if‑else—and presents concrete refactoring patterns such as inverted‑pyramid design, proper lib/framework reuse, Template Method separation, and rich enum types, while also introducing a CODEX indexing technique for large codebases.
This article explains the fundamentals of static code scanning, reviews popular analysis tools such as Checkstyle, FindBugs, PMD and SonarQube, and details a three‑year evolution of a dealer technology department’s CI/CD integration, automation, metrics, and key success factors for effective code quality assurance.
Long, monolithic Java classes with hundreds of methods become unreadable, hard to extend, and prone to redundant code, so this guide explains the drawbacks of oversized classes and provides step‑by‑step refactoring techniques using IntelliJ IDEA to extract methods, move members, and create new classes.
This tongue‑in‑cheek article enumerates a series of deliberately bad programming practices—from confusing variable names and misleading comments to over‑engineered designs and zero testing—to show how to make code virtually impossible to maintain.
This tutorial walks through configuring GitHub Actions for a Python project to enforce code style, run unit tests, and generate coverage reports using CodeFactor, the wemake‑python‑styleguide action, and Codecov, complete with step‑by‑step instructions and workflow examples.
This article humorously presents a GitHub project's 19 tongue‑in‑cheek guidelines for writing terrible code—from typing less and mixing naming styles to avoiding comments, tests, and documentation—while illustrating each rule with vivid examples and images.
This article presents a tongue‑in‑cheek guide of nineteen "anti‑best‑practice" rules sourced from a GitHub project, illustrating how to deliberately produce unreadable, unmaintainable code by minimizing typing, mixing naming styles, avoiding comments, and other absurd conventions.
An experienced developer recounts how he transformed a cumbersome three‑tier C# data‑center management system from thousands of lines to a concise, maintainable codebase using reflection, generics, and thoughtful refactoring, while sharing practical advice on avoiding code generators, reducing duplication, and embracing unit testing.
This guide explains how to install and configure SonarQube Scanner, set up project analysis parameters, and automate code quality checks within Jenkins pipelines using shared libraries and Groovy scripts, enabling continuous inspection of Java projects.
This guide explains SonarQube's architecture, shows how to deploy it with Docker, and details configuration steps including forced login, LDAP integration, and GitLab authentication, providing code snippets and screenshots for a complete DevOps quality‑management setup.
An overview of eleven essential open-source and commercial tools—including SonarQube, Kritika, DeepScan, Klocwork, CodeSonar, JArchitect, Bandit, Code Climate, Crucible, Fortify, and Codecov—that help developers analyze code quality, detect security vulnerabilities, and integrate seamlessly into CI/CD pipelines across multiple programming languages.
The article explains what technical debt is, how it creates a vicious cycle that slows development, outlines common causes such as rushed releases and copy‑paste coding, and offers practical strategies—including measurement tools, incremental migration and full rewrites—to manage and avoid it.
This article explains how test‑coverage metrics such as line and branch coverage can give a false sense of quality, demonstrates common pitfalls with Java examples and Cobertura reports, and offers practical guidelines for using coverage data to improve testing and code reliability.
The article lists twelve danger signals—ranging from shallow modules and information leaks to vague naming and unreadable code—that reveal hidden complexity in software design and help developers identify and refactor problematic patterns.
This article introduces SonarQube, an open‑source code quality management platform, explains its four main components, integration workflow with IDEs, CI servers and databases, and highlights key features such as rule sets, quality gates, and project dashboards for improving software quality.
This article explains the McCabe metric, the definition and calculation of cyclomatic complexity, its relationship to code quality, and introduces the concept of excessive cyclomatic complexity as a more meaningful indicator for managing software maintainability.
In a candid interview, Linus Torvalds shares his pragmatic engineering mindset, explains why Git was his second major project, and demonstrates how a clean pointer‑indirection technique can simplify linked‑list element removal, contrasting it with a more cumbersome approach.
Effective software testing is essential for SaaS startups to avoid costly failures; this guide outlines five key strategies—aligning quality checks with business goals, detailed test planning, fostering a supportive testing environment, conducting user acceptance testing, and measuring code quality with CISQ metrics—to ensure high‑quality releases.
This article outlines fundamental performance‑optimization principles, the hierarchical stages of optimization (requirements, design, implementation), and practical methods such as caching, concurrency, laziness, batching, efficient implementations, and solution‑space reduction, while stressing the balance with code quality and long‑term maintenance.
This reflective essay shares a Huawei veteran’s journey through ten‑plus years of coding, emphasizing solid fundamentals, clean architecture, performance tuning, rigorous change‑control practices, and continuous curiosity about emerging technologies as the keys to becoming a reliable software engineer.
The article explains how to assess a project's code quality using four key metrics, compare error density between codebases, manage legacy code with the Scout Camp principle, and choose reasonable thresholds such as cyclomatic complexity, providing a practical approach for continuous delivery.
This article explains how to address three common SonarQube challenges—data instability across branches, difficulty assigning quality profiles, and project permission management—by creating per‑branch projects, using Jenkins pipeline scripts with Sonar REST APIs, and applying permission templates to streamline large‑scale code‑quality scanning.
This article compiles practical Java best‑practice tips—from using entrySet() for map iteration and Collection.isEmpty() for emptiness checks to pre‑sizing collections, avoiding magic numbers, employing try‑with‑resources, and cleaning unused code—helping developers write more efficient, readable, and bug‑free code.
This article explains why and how to refactor legacy code by defining refactoring principles, describing common code smells, and presenting concrete techniques such as extracting functions, moving fields, introducing explanatory variables, and reorganizing data and inheritance hierarchies to produce cleaner, more maintainable software.
A graduate student recounts the chaotic state of his research team's C# data‑mining project, highlighting poor naming conventions, oversized classes, overuse of singletons, redundant code, lack of proper inheritance, and other anti‑patterns, while offering concrete suggestions such as using meaningful identifiers, applying the single‑responsibility principle, leveraging LINQ, and adopting MVVM for cleaner, more maintainable code.
Drawing on Ousterhout’s philosophy, the article defines software complexity as cognitive load multiplied by development effort and offers principles such as iterative design, layered architecture, deep modules, information hiding, and purposeful documentation to systematically reduce ripple effects, dependencies, and unknowns in code.
This guide explains how to configure SonarQube scan parameters to automatically include the current GitLab branch name and commit SHA, enabling detailed code‑quality reporting within CI pipelines; it also shows the required command‑line flags and how to set up the Reporting section with GitLab credentials.
This article explores the essential characteristics of clean code, emphasizing high cohesion, low coupling, readability, proper naming, formatting, concise classes and functions, effective comments, error handling, and common code smells, while providing practical guidelines and examples for developers.
This article introduces SonarQube, an open‑source platform for code quality management, explains its seven quality dimensions, provides step‑by‑step installation and configuration instructions (including JDK, MySQL, and scanner setup), demonstrates scanning a project, and summarizes its advantages for developers.
This article explains SonarQube’s architecture, detailing its server, database, plugin library, and scanner components, and describes the typical development workflow from IDE integration and code commit through CI‑triggered analysis, result submission, and code review, including deployment considerations for machines and network placement.
A former intern describes how a top Chinese internet firm suffers from messy code, duplicated libraries, inconsistent logging, poor configuration management, and inefficient development processes, while senior staff defend these practices as necessary adaptations to the company's scale and history.
This article explores four key questions about automated testing: what it is, why it matters, which projects benefit from it, and how to implement it, providing a complete frontend testing framework including unit testing, API testing, functional testing, and benchmark testing.
The article explores what a bug really is, why bugs inevitably appear in software development, and offers practical strategies—such as effective logging, leveraging debugging tools, and keeping iteration sizes small—to locate and resolve bugs more quickly.
This article explores the seven common programming pitfalls—from skipping version control and poor naming to unchecked dependencies, inconsistent formatting, inadequate error handling, and misuse of data types—offering practical advice to write cleaner, more maintainable code.
This guide explains why writing high‑quality code matters, outlines essential principles such as thoughtful design, using tools like SonarQube, proper class, method, variable, and constant naming, and demonstrates refactoring techniques with Java examples to produce more readable and robust software.
This article explains why TSLint is essential for React Native projects, walks through installing and configuring TSLint, demonstrates local and CI checks, and provides a step‑by‑step guide to creating and deploying custom TSLint rules for improved code quality.
A senior engineer reflects on a decade of work at major Chinese tech firms, stressing that clear, responsibility‑driven processes and steady rhythm prevent chaos, while judicious tool choice, appropriate architecture, rigorous bug analysis, consistent style, thorough commenting, security measures, and reusable utilities together boost code quality, maintainability, and development efficiency.
The article shares practical methods for reducing bugs throughout the software development lifecycle, emphasizing early communication with product managers and testers, thorough design and code reviews, mandatory unit testing, continuous integration, and proactive log monitoring to ensure smooth testing and delivery.
The article explores why programmers must continuously adapt to fast‑changing internet technologies, offers practical viewpoints on tracking disruptive trends, deepening fundamentals, and evaluating code quality, and provides guidance on choosing and learning the most valuable skills today.
The article examines the difficulties of developing and sustaining a multi‑million‑line C‑language database, highlighting complex flag‑driven logic, extensive testing pipelines, slow iteration cycles, and the need for automation, modularity, and robust engineering practices to ensure code quality at scale.
This essay explores the history and inevitability of software bugs—from Grace Hopper’s famous moth to today’s massive codebases—examining developer attitudes, debugging practices, and why writing less code may be the only realistic way to reduce bugs.
Pure functions are deterministic, side‑effect‑free routines that always return the same output for identical inputs, and this article explains their definition, observable side effects, practical JavaScript examples of pure and impure functions, and why they improve testability, refactoring, and code quality in modern front‑end development.
This guide outlines key PHP backend practices—including abandoning deprecated mysql_ functions, avoiding unnecessary reference passing, writing efficient queries, validating user input, and embracing modern tools and languages—to help developers produce clean, secure, and high‑performance applications.
The article examines why the software industry produces low‑quality code, identifying three main causes—low expectations, poor programming books, and shortcut‑driven practices—and suggests how developers and leaders can improve code standards.
Improving code quality requires adopting Clean Code principles—clear naming, purposeful comments, consistent formatting, robust error handling, small single‑responsibility classes, shared conventions, and a disciplined workflow that integrates pre‑commit checks, automated static analysis, code reviews, and continuous metric monitoring to ensure each change is cleaner than the last.
This article compiles 75 concise Python coding recommendations covering style, idioms, core language features, standard libraries, design patterns, internal mechanisms, tooling, and performance optimization to help developers write cleaner, more maintainable, and efficient Python code.
The article critiques badly written Spring controller and service code, explains how poor coding habits cause maintenance headaches, and demonstrates a cleaner, AOP‑based approach that reduces boilerplate and improves code quality for backend Java applications.
The article lists 36 common bad habits that hinder programmers' productivity, grouping them into code organization, team work, coding practices, and testing/maintenance, and explains why each habit reduces efficiency and how to overcome them.
This article explains ESLint’s no‑empty and no‑empty-function rules, showing how to fix empty blocks by inverting conditions, adding comments, handling silent failures, and using intentional no‑op functions or proper callbacks to keep JavaScript code clean and readable.
This article explains the ESLint rules no‑return‑assign and no‑constant‑condition, shows why they trigger, provides clear examples of problematic code, and offers practical refactoring techniques to resolve the warnings while keeping JavaScript code clean and intention‑clear.
To become a great programmer, ask clear, well‑prepared questions, learn to solve problems independently, never compromise on quality, write deterministic code, embrace unexpected failures, avoid idolizing tools, practice daily, specialize while staying curious about other domains, and relentlessly strive for simple, maintainable solutions.
This article explains how to handle the ESLint "no-fallthrough" and "no-undef" rules, showing when to add explicit comments, convert globals to locals, and why the comment‑based fix is often the most efficient for legacy JavaScript code.
The article examines why many large, well‑known tech companies suffer from messy code, chaotic development processes, and reliance on outdated technologies, exploring the underlying personnel dynamics, reconstruction costs, and the tension between business and technical value.
The article examines why developers feel compelled to refactor messy code, illustrates common pitfalls such as mixing refactoring with new feature development, and proposes practical strategies—including separating refactoring from feature work, adopting small‑step incremental changes, and integrating test‑driven development—to manage refactoring projects successfully.
This article shares five practical recommendations—cultivating genuine passion, treating code as art, writing massive amounts of quality code, staying curious, and focusing on user needs—to help programmers evolve from novices into highly effective, market‑ready developers.
This article explains how to resolve the ESLint "no‑empty" and "no‑empty‑function" warnings by refactoring empty blocks, adding explanatory comments, using noop helpers, and validating callbacks, providing concrete code examples and step‑by‑step reasoning.
This article lists 36 common bad habits that reduce programmer efficiency—from poor code organization and teamwork to bad coding and testing practices—and offers concrete advice on how to overcome each to boost productivity and advance your career.
This article explains how to set up a PHP project with Composer, PHING, and a suite of quality‑checking tools—including PHPCS for coding standards, PHPCPD for duplicate detection, and Phan for deep static analysis—to automatically enforce code quality and reduce manual review effort.
The Elasticsearch Team Development Constitution outlines a comprehensive set of principles and guidelines—covering design philosophy, code quality, interaction etiquette, and organizational responsibilities—to help the rapidly growing project evolve into a reliable, secure, scalable, and user‑friendly distributed search engine.
Learn how to enhance PHP code quality by implementing unit tests using PHPSpec and PHPUnit, covering SOLID principles, mock objects, test setup, code coverage integration, and best practices for writing maintainable, reliable backend code.
This article outlines the motivation, tool comparison, and detailed step‑by‑step process for implementing static code scanning across Android and iOS codebases, emphasizing the selection of Infer and the integration of scanning results into CI pipelines and issue‑tracking workflows.
This article explains static analysis concepts, why cppcheck was chosen for Baidu's testing workflow, details its architecture, and walks through the creation of custom rules—including a printf misuse detector and a dynamic switch misuse rule—while sharing practical challenges and results.
This article explores why descriptive variable names are crucial for Python code quality, presents practical naming principles, discusses type‑hinting through names, introduces Hungarian notation, and offers actionable tips for defining, using, and cleaning up variables to write clearer, more maintainable code.
This article explains the concept of clean code, why clean code awareness is essential for developers, illustrates common bad‑code patterns with real Java examples, and provides practical guidelines—including formatting, development standards, code‑review rules, Maven conventions, Lombok usage, and refactoring strategies—to help teams write maintainable, readable, and efficient code.
The article explains how to create, configure, and integrate custom Android Lint rules—using Issue, Detector, Scope, and IssueRegistry APIs—to catch crashes, bugs, performance and security problems such as missing Toast.show() or unsafe Log usage, supports incremental git‑based scans, and demonstrates deployment in IDE, builds, pre‑commit hooks and CI for improved code quality.
The article presents five practical concepts—avoiding overly clever tricks, modularizing with divide‑and‑conquer, keeping code IDE‑friendly, ensuring readability through clear architecture and naming, and minimizing branching—to help developers write clean, maintainable code and boost productivity.
This article examines the various programmer archetypes, outlines essential basic, advanced, and auxiliary abilities for backend engineers—including security, performance, architecture, and communication skills—highlights common code smells with examples, and offers concluding advice for continuous self‑improvement.
This article explains key refactoring techniques—Extract Method, Inline Method, Inline Temp, Introduce Explaining Variable, Split Temporary Variable, Remove Assignments to Parameters, and Replace Method with Method Object—showing when to apply each, why they improve code clarity, and providing Java code examples for each transformation.
This article explains what refactoring is, why it improves code quality, readability, and development speed, when to apply or avoid it, the typical refactoring workflow, its relationship with design, and how it impacts software performance.