Tag

DRY principle

0 views collected around this technical thread.

DaTaobao Tech
DaTaobao Tech
Oct 21, 2024 · Fundamentals

The True Purpose of Classes and Functions: Beyond Reuse

The article argues that classes and functions serve as fundamental structural elements rather than mere tools for reuse, contending that excessive reuse can increase complexity while intentional redundancy simplifies maintenance, and advocating deep modules over shallow ones, illustrated by examples from Supercell, DingTalk, and a trivial shallow‑module code snippet.

DDDDRY principlecode reuse
0 likes · 8 min read
The True Purpose of Classes and Functions: Beyond Reuse
DaTaobao Tech
DaTaobao Tech
Oct 11, 2024 · Fundamentals

Rethinking Code Reuse: Balancing DRY, YAGNI, and Maintenance Costs

The article argues that while code reuse and DRY can boost productivity, over‑abstracted, duplicated logic often inflates maintenance costs, so developers should apply DRY cautiously, favor YAGNI and heuristics like the Rule of Three, and prefer clean‑architecture boundaries to keep complexity manageable.

DRY principleSoftware MaintenanceTechnical Debt
0 likes · 12 min read
Rethinking Code Reuse: Balancing DRY, YAGNI, and Maintenance Costs
Youku Technology
Youku Technology
Jul 17, 2020 · Backend Development

Defensive Programming, Exception Handling, and DRY Principle in Java

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.

DRY principleException HandlingJava
0 likes · 18 min read
Defensive Programming, Exception Handling, and DRY Principle in Java
Qunar Tech Salon
Qunar Tech Salon
Sep 16, 2015 · Fundamentals

A Programming Language Is a System for Encoding, Naming, and Organizing Algorithms

The article explains that a programming language serves as a system to encode, name, and organize algorithms, discusses the misuse of the term “algorithm,” illustrates classic algorithms like Dijkstra’s and Euclid’s with code examples in Forth, PostScript, and Python, and emphasizes the DRY principle and efficiency concerns in software development.

AlgorithmsDRY principlealgorithm efficiency
0 likes · 8 min read
A Programming Language Is a System for Encoding, Naming, and Organizing Algorithms