PHP in Action Rotating Header Image

Posts under ‘Refactoring’

Don’t refactor without unit tests

Image by niallkennedy via Flickr

Brandon Savage is writing a series on code improvement using a code example (starting with Peer Review: Taking Code And Making It Better). In other words, it’s about refactoring, which is practically my favorite subject. Although I don’t agree with all of it, it’s mostly good advice. I recommend it.
That said, [...]

Most confused discussion in the known universe

Image by B Tal via Flickr

How confused can a discussion get? As confused as the discussion in the comments to Benjamin Eberlei’s Explicit Code requires no comments – Only bad code does. This discussion has a fake identity, and nobody seems to notice. As you can see, the blog post claims to be about code [...]

Show me your code comments and I’ll show why you don’t need them

Brandon Savage has written a blog post On Code Commenting And Technical Debt. He believes that code comments are a good way to minimize technical debt.

I’m surprised to find the term technical debt mentioned without being accompanied by the term refactoring. Refactoring is generally recognized (outside the PHP world) as the way to pay down [...]

How code comments deteriorate

There was a lot of disagreement on the value of code comments after my earlier post Comments considered harmful. Perhaps the most important objection that was raised was the idea that it’s OK to improve the code, but it’s even better to keep the comments in addition to the improved code.
As one [...]

Beautiful code

Max Horwath has published his slides on Making Selenium Test Writing easier using a DSL onlinefrom IPC 2008. Let me quote the whole short description:
Implementing automated tests by using Seleniums API methods has several [...]

Refactoring is design

Refactoring is by definition a design actitivity, since the definition of refactoring is “improving the design of existing code”. But is this generally and fully recognized? After attending my friendly local agile conference (Smidig2008—sorry, it’s in Norwegian), I’m getting more of a feel for how different people think about it. And I’m wondering whether [...]