This article explains the purpose and principles of refactoring, enumerates common code smells, and provides concrete refactoring techniques—including extracting functions, inlining, moving features, reorganizing data, simplifying conditionals and calls—illustrated with Java code examples.
The article shows how to refactor a tangled Xianyu detail‑page built on legacy MVC by isolating each vertical business with the Strategy pattern, extracting shared services, packaging them as libraries or JARs, and then applying domain‑driven design to create a clean, layered, maintainable architecture.
Business Isolationarchitecturedomain-driven design
Software architecture defines the structural skeleton of a system, encompassing components, connectors, constraints, and guiding principles; this article explains its essence, various classifications—from business to deployment—and offers practical criteria for assessing stability, efficiency, and security in modern server‑based applications.
The article examines the nuanced challenges of microservices—including governance trade‑offs, reuse considerations, complexity versus complication, and the risks of multi‑master data—while arguing for pragmatic, centrally‑guided design to harness their potential without over‑marketing.
The article critiques the core pillars of object‑oriented programming—inheritance, encapsulation, and polymorphism—illustrating their practical pitfalls with real‑world analogies and code examples, and proposes containment and delegation as safer alternatives before urging a shift toward functional programming.
This article explains how treating software projects as disciplined design processes—using shared language, realistic estimation, systematic system modeling, and test‑first development—helps create clean, maintainable code while avoiding the pitfalls of over‑engineering and rushed delivery.
This article explores the philosophy of clean code, emphasizing disciplined design, clear domain language, realistic estimation, collaborative system modeling, and test‑first development to produce maintainable, efficient software that meets client needs while avoiding unnecessary complexity.
UML class diagrams feature six primary relationships—Generalization, Realization, Dependency, Association, Aggregation, and Composition—each with distinct visual notations and semantics, and this guide explains their definitions, code representations in Java, and practical examples to help developers model system structures accurately.
The article explains why clear separation of responsibilities among controller, service, manager, and DAO layers is essential for maintainable backend code, outlines Alibaba's layered architecture guidelines, proposes an optimized layering model, and discusses domain model conversions across layers to avoid excessive object transformations.
This article explains the core concepts of microservice architecture, outlines its components and pros‑and‑cons, and uses Uber's evolution from a monolithic system to a distributed microservice platform as a detailed case study.
From the basics of three‑tier architecture to the challenges of scaling, this article explains why monolithic designs become problematic, how fine‑grained and coarse‑grained microservices address complexity, and offers practical refactoring steps for high‑concurrency systems.
This guide explains UML's core relationship notations, the nine essential diagram types and their purposes, detailed insights into class, object, use‑case, sequence, collaboration, state, activity, component, and deployment diagrams, and how they map to fundamental object‑oriented concepts such as boundary, entity, and control classes.
This article explores the concept of software architecture for mobile apps, sharing personal reflections, industry case studies, design principles, modularization strategies, development practices, testing, risk management, and agile processes to help developers build maintainable, scalable, and high‑quality applications.
This article explains the common maintenance challenges in UI automation, introduces the PageObject pattern as a solution, describes its layered architecture—including appium, pages, operation, and test layers—and highlights how it improves code reuse, readability, and reduces effort when UI changes occur.
The Story Scenario Tree is presented as a practical tool that guides developers to apply simple design principles—defining tasks, external interfaces, and upfront test cases—to create isolated, high‑quality code that evolves healthily, with progress measured objectively and defects minimized across changes.
This article presents a curated list of twelve influential programming books—ranging from classic software design and algorithms to practical coding guides—explaining why each title is essential for developers seeking to deepen their craft regardless of language or experience level.
The article shares practical experiences on writing high‑quality code by emphasizing logical correctness, the necessity of handling the else branch, techniques for lowering logical complexity, and strategies for decoupling business logic from implementation, all illustrated with clear Java examples.
This article enumerates twenty‑two typical code smells—from duplicated code and long methods to speculative generality—and provides concrete refactoring tactics such as Extract Method, Pull Up Method, Introduce Parameter Object, and Move Method to improve design, readability, and maintainability of object‑oriented software.
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.
This article explains the concept of software architecture, its definition, lifecycle, importance, characteristics of good and bad designs, essential technical knowledge for Java architects, functional versus non‑functional requirements, types of architects, required hard and soft skills, and guidance on becoming and maintaining an effective software architect.
The article shares a developer's hard‑won lessons from refactoring a ten‑year‑old core system, emphasizing the crucial role of mindset, careful business‑logic analysis, selective task handling, and the use of design patterns to achieve clean, extensible code.
The article reflects on a decade of programming experience to demystify object‑oriented programming, arguing that OOP should be taught as a practical tool for reducing complexity rather than an abstract doctrine, and discusses how to organize functions into classes, avoid misuse of inheritance and design patterns, and focus on solving real problems.
This article traces the evolution of application architectures—from vertical monolithic designs through RPC and SOA to modern microservices—explaining the motivations, key characteristics, deployment patterns, and trade‑offs of each approach for scalable, maintainable backend systems.
This article outlines the historical evolution of application architecture—from early vertical monolithic designs through RPC and SOA approaches to modern microservice architectures—highlighting their characteristics, deployment models, and the motivations behind each transition.
This article presents thirty practical Java coding guidelines covering naming conventions, class design, method granularity, encapsulation, documentation, error handling, and performance considerations to help developers produce clean, robust, and maintainable software.
This article explores the blurry line between development and software architecture, outlines the responsibilities and evolution of a software architect, and provides practical guidance on defining architecture, managing non‑functional requirements, selecting technologies, evaluating designs, and leading teams toward successful releases.
This article explains why refactoring is essential for maintaining legacy systems, defines refactoring, outlines when to start and stop, describes the step‑by‑step process, discusses code smells and techniques, and offers resources for mastering clean, maintainable software.
The article explains why refactoring is essential for maintaining and evolving legacy code, defines refactoring, outlines when to start and stop, lists prerequisites, describes a step‑by‑step process with testing and version control, and connects refactoring to design principles and large‑scale systems.
This guide outlines the key components, step‑by‑step process, and quality‑assurance measures for evaluating software and hardware system architectures to ensure reliability, scalability, security, and cost‑effectiveness while reducing risk and guiding future design decisions.
This article explains the core concepts of a .NET plugin framework, illustrates its structure with diagrams, demonstrates practical development and deployment workflows, enumerates its advantages for team collaboration and modularity, and compares OSGi.NET with other popular .NET plugin solutions.
The article explores whether effective software architecture stems from upfront design or gradual evolution, presenting viewpoints from senior architects, discussing stakeholder concerns, non‑functional requirements, real‑world evolution cases like 58.com and Google, and urging readers to share their own conclusions.
The article outlines twenty‑five practical principles for becoming an excellent software model designer, emphasizing the importance of people over technology, thorough requirement analysis, humility, low coupling, high cohesion, portability, scalability, performance, proper documentation, and continuous learning to build robust, maintainable systems.
This article explains the nine GRASP patterns and key object‑oriented design principles—such as Information Expert, Creator, Low Coupling, High Cohesion, Controller, Polymorphism, Pure Fabrication, Indirection, and Protected Variations—showing how they form the foundation for effective software architecture.
The article reflects on the shift from pure coding to embracing requirement analysis, testing, and especially diagramming, explaining how visual representations externalize information, foster exploration, support global thinking, and make abstract concepts intuitive, ultimately improving software quality and collaboration.
This article explains core OO architecture principles such as low coupling and high cohesion, outlines methods to reduce coupling, advocates composition over inheritance, and provides concise overviews of widely used design patterns like MVC, MVVM, Factory, Singleton, Builder, and many others.
The article argues that treating lines of code as a cost rather than a product encourages writing disposable, loosely‑coupled software, and it walks through practical stages—from avoiding code entirely to using feature flags—to build systems that are easier to modify, replace, or discard.
This article identifies why most code remains low‑quality despite many guidelines and presents four practical principles—single abstraction level, minimized indentation, clear expressions, and effective use of helper classes—that dramatically improve a team's coding standards.
The article explains how to design clean, decoupled system architectures by isolating concerns, using AOP, dependency injection, factory methods, and DSLs, while illustrating concepts with city‑building analogies and Java code examples.
This article explores how an ideal web framework—featuring a unified data model, reusable code, event‑driven logic, and language‑agnostic architecture—can be realized in practice, discussing frontend and backend realities, graph‑based data modeling, and the benefits for maintainability and extensibility.
Data ModelingWeb Frameworkevent-driven architecture
The article explains how building low‑latency applications relies on simplicity, minimizing data transformations, using lightweight libraries, and separating business from infrastructure code to achieve high performance, maintainability, and reduced operational costs.
The article reveals four common programming pitfalls—premature or late optimization, over‑complex abstractions, misuse of tools, and misguided cross‑platform efforts—and provides practical patches to keep developers from sinking into endless deadlines and frustration.
The article examines why software architectures inevitably degrade over time in long‑running projects, analyzes the stages of decay, and presents practical strategies—including environment upgrades, phased and distributed builds, component isolation, and platform‑plus‑app designs—to keep systems maintainable and performant.
While many languages recommend importing specific classes and programming to interfaces, these practices often add maintenance overhead without tangible benefits, especially in Java, and can even hinder readability; the article critiques such rules, urging developers to evaluate the real value of coding conventions.
Coding Best Practicesimport statementsinterface programming
This article presents eighteen core programming principles—from DRY and KISS to the Open/Closed and Law of Demeter—that help developers write cleaner, more maintainable code, reduce bugs, and adapt to change effectively.
This article explains the Extract Method refactoring technique, its definition, benefits, and step‑by‑step PHP examples that show how to split a long method into smaller, well‑named methods, improving readability, reusability, and adherence to the Single Responsibility Principle.
This article provides a comprehensive checklist for code reviewers, covering formatting, design, readability, functionality, security, testing, performance, and resource usage, while explaining why many of these aspects can be automated and how to balance manual inspection with tooling.
Learning the core programming language rather than relying on heavy frameworks, building small independent modules, and keeping code minimal and readable improves flexibility, performance, maintainability, and reduces bugs, ultimately leading to higher productivity and better collaboration among developers.
This article compiles ten provocative programming viewpoints—from the primacy of using your brain over rigid best‑practice checklists to the limits of unit testing—offering practical reflections on mindset, learning, tooling, and design that can sharpen any developer’s approach.
The article examines the evolution from traditional SOA and ESB to modern microservices, outlining key characteristics such as componentization via services, business‑aligned team structures, treating services as products, lightweight communication, decentralization, automation, failure‑tolerance, and evolutionary design, while discussing practical adoption challenges.
The article explains how over‑complex mental models, poor translation of semantic ideas into code, inadequate naming, missing design chunks, unclear usage patterns, and lack of smooth model transitions cause code to decay, and offers practical principles such as DDD, SRP, good naming, testing, and reusing existing algorithms to maintain readability.
After a rushed fix for a division‑by‑zero bug caused incorrect results, the team learns to validate data at its source, adopt proper validation frameworks, and step back to understand underlying requirements, emphasizing that thoughtful design outweighs quick code patches.