July 8th, 2024

The Transformation Priority Premise (2013)

The Clean Coder Blog discusses Transformations in code development, distinguishing them from Refactorings. It emphasizes maintaining a preferred order of Transformations to enhance the red/green/refactor cycle efficiency. Examples illustrate transitioning from specific to generic code.

Read original articleLink Icon
The Transformation Priority Premise (2013)

The Clean Coder Blog by Robert C. Martin, also known as Uncle Bob, discusses the concept of Transformations in code development. Refactorings are operations that change code structure without altering behavior, while Transformations change behavior. The blog emphasizes the importance of maintaining a preferred order of Transformations to prevent delays in the red/green/refactor cycle. The author highlights the evolution of code from specific to generic through examples like the Prime Factors Kata and the Bowling Game Kata. By showcasing how code transformations lead to more generic implementations, the blog challenges the perception of TDD as brainless and emphasizes the significance of transitioning from specific solutions to more generalized forms. The author suggests that every code change is either a behavior-changing transformation from specific to generic or a refactoring, providing guidance on test selection and code implementation.

Related

Optimizing JavaScript for Fun and for Profit

Optimizing JavaScript for Fun and for Profit

Optimizing JavaScript code for performance involves benchmarking, avoiding unnecessary work, string comparisons, and diverse object shapes. JavaScript engines optimize based on object shapes, impacting array/object methods and indirection. Creating objects with the same shape improves optimization, cautioning against slower functional programming methods. Costs of indirection like proxy objects and function calls affect performance. Code examples and benchmarks demonstrate optimization variances.

Mix-testing: revealing a new class of compiler bugs

Mix-testing: revealing a new class of compiler bugs

A new "mix testing" approach uncovers compiler bugs by compiling test fragments with different compilers. Examples show issues in x86 and Arm architectures, emphasizing the importance of maintaining instruction ordering. Luke Geeson developed a tool to explore compiler combinations, identifying bugs and highlighting the need for clearer guidelines.

Readability: Google's Temple to Engineering Excellence

Readability: Google's Temple to Engineering Excellence

Google's strict readability process involves code approval by maintainers and readability mentors, shaping coding standards. Despite criticism, it enhances skills, maintains quality, and fosters global code consistency. A proposed "Readability Lite" aims for mentorship and quality without strict enforcement.

TDD is Not Hill Climbing (except where it is)

TDD is Not Hill Climbing (except where it is)

The article explores the analogy between Test-Driven Development (TDD) and hill climbing algorithms, discussing TDD's limitations, alternative strategies, and the importance of understanding code fitness functions. It emphasizes thoughtful consideration of TDD's effectiveness and potential refinements.

Using the 5S Principle in Coding

Using the 5S Principle in Coding

The article explores applying the 5S principle from lean manufacturing to coding with JavaScript examples. It covers sorting, organizing, maintaining, standardizing, and sustaining code for efficiency and maintainability using tools like ESLint and Git.

Link Icon 1 comments
By @nickpeterson - 3 months
I used to listen to these on my long commute years ago. I honestly don’t know if I took much from them, but I always fondly remember uncle Bob talking about astronomy for 3-4 minutes in the beginning of each episode.