News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Anthony Ferrara:
Beyond Clean Code
November 26, 2013 @ 13:12:41

Anthony Ferrara has posted the latest in his "Beyond" series today with this new post - "Beyond Clean Code". In it he looks at the idea of "clean code" and proposed a different way to think about its creation.

This is the fourth post in my "Beyond" series. The previous three posts focused on re-imagining OOP and questioning some of the core beliefs that we have come to take for granted. This one is going to be slightly different, in that I want to talk about another angle of writing code: the process itself. We always talk about how code should be clean, but how do you write clean code?

He starts with an overview of what it means for code to be "clean" with some of the common criteria including clear code flow, short routines and using libraries for complex tasks. He proposes that a change in perspective is needed away from "pretty code" and more towards code that contributes to the business value of the product. Following through on this pattern of thought, he proposes a more effective method than focusing on just clean code - DIRTI (Develop, Isolate, Refactor, Test and Integrate).

The real beauty of this approach is that it assumes that you don't know your abstractions before you start. This will help you understand the problem (and the solution) as you write it. [...] Initially, when you don't fully understand the solution, you will develop, isolate and refactor over and over until you fully understand the solution that you're building. Once that understanding solidifies, you're going to tend to spend more time in the later parts (Refactor Test and Integrate).
0 comments voice your opinion now!
clean code dirti structure dependencies perspective

Link: http://blog.ircmaxell.com/2013/11/beyond-clean-code.html

blog comments powered by Disqus

Similar Posts

SitePoint.com: Best Practice for Code Examples

Richard Smaizys' Blog: Improve your code style with simple tips

Anthony Ferrara's Blog: PHP's Source Code For PHP Developers - Part 3 - Variables

XpertDeveloper.com: Abstract in PHP

Zend Developer Zone: Improving Code Quality with Flash Builder 4 and PHPUnit


Community Events





Don't see your event here?
Let us know!


library language composer series list release symfony tool framework introduction conference opinion voicesoftheelephpant security laravel community version interview podcast artisanfiles

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework