Re-re-re-refactoring...

The wikipedia defines refactoring as:

part of code maintenance which doesn't fix bugs or add new functionality. Rather it is designed to improve the understandability of the code or change its structure and design, and remove dead code, to make it easier for human maintenance in the future. In particular, adding new behavior to a program might be difficult with the program's given structure, so a developer might refactor it first to make it easy, and then add the new behavior.

Ok so... it turns out I've been doing this all along. I have a tendancy to self edit as I write. I do it in emails, blog posts and most certainly in my code. I don't think there's an untouched line of code left anywhere in HA! at this point. Thing is, I always just thought of it as "cleaning it up".

Also from the wikipedia: the term refactoring is often used to describe modifying source code without changing its external behavior, and is sometimes informally referred to as "cleaning it up".

Don't you love it when you find out you're following a good (best?) practice without even realizing it?

Oh and btw, this blog post was refactored at least 3 times before you ever saw it.

This article is part of the GWB Archives. Original Author: Chris G. Williams

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.