Tagged articles
cyclomatic complexity
10 articles · Page 1 of 1
The article demonstrates how deep if nesting (over 3 levels) obscures bugs using a payment callback example where error messages are swapped, then refactors with guard clauses to flatten logic; it also addresses loop nesting by extracting methods to reduce cognitive load, emphasizing keeping conditions close to their handling.
Clean Codebug preventioncode nesting
0 likes · 10 min read

The article outlines seven counter-intuitive principles for maintaining code quality when using AI coding agents, arguing that faster AI generation demands stronger engineering discipline, automated quality gates over long prompts, context isolation via short-lived agents, human-defined architecture boundaries, iterative development over detailed planning, junior developers mastering fundamentals before directing agents, and adapting principle thresholds to AI workflows.
AI AgentsCRAP analysisTDD
0 likes · 10 min read


大转转FEJan 23, 2025 · Frontend Development
This article explains cyclomatic complexity concepts, industry standards, calculation methods, and how a custom ESLint rule can be used to assess both single‑function and nested‑function complexity in front‑end projects, including scoring thresholds and practical implementation details.
ASTESLintcode quality
0 likes · 19 min read

The article explains that cyclomatic complexity harms code quality and testability, and shows how using IDEA’s CodeMetrics plugin together with purposeful function extraction—splitting long, complex, or duplicated code into well‑named, reusable methods—reduces complexity, improves readability, and supports maintainable, testable software.
code qualitycyclomatic complexityfunction extraction
0 likes · 10 min read

This article introduces four widely‑accepted code‑quality indicators—cyclomatic complexity, function length, file duplication rate, and class fan‑in/fan‑out ratio—explains how to set thresholds, compare error density across codebases, and apply practical management strategies without degrading quality.
code duplicationcode qualitycyclomatic complexity
0 likes · 4 min read

This article explains cyclomatic complexity, its calculation formulas, practical examples, and how to measure and improve code quality using tools like SonarQube, ESLint, and codeMetrics, while also presenting refactoring techniques such as single‑responsibility, open‑closed, polymorphism, early returns, and functional programming to reduce complexity.
JavaScriptSonarQubecode metrics
0 likes · 13 min read

This article details a systematic performance‑boost and maintenance‑cost reduction effort for a 230,000‑line Vue3 + Vite PC web project, covering page‑load analysis, bundle visualization, code‑duplication detection, cyclomatic‑complexity measurement, and concrete optimization steps such as on‑demand imports, manual chunking, gzip and image compression, and ESLint rules, resulting in a 52% faster load time and a 3.43 MB smaller bundle.
Bundle SplittingGZIPVue
0 likes · 12 min read

This article examines the root causes of software complexity, explains how to quantify it using metrics such as Halstead, cyclomatic and Ousterhout complexity, showcases real code examples, and offers practical strategies—including high cohesion, low coupling, strategic design, documentation, and refactoring—to prevent and reduce complexity in large systems.
Halsteadcode metricscyclomatic complexity
0 likes · 22 min read

This article explains how to automatically monitor and analyze cyclomatic complexity of software projects with the Lizard tool, covering its definition, thresholds, reduction techniques, multi-language support, configuration options, scheduled execution, and result visualization to guide refactoring decisions.
cyclomatic complexitylizardsoftware metrics
0 likes · 8 min read

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.
McCabe metriccode qualitycyclomatic complexity
0 likes · 7 min read
