Refactoring is Worth the Time

Code grows over time, as developers add features, take care of special cases, and fix bugs. Functions that started out simple can grow to outrageous size. The bigger and clumsier they get, the harder they are to maintain. It’s necessary to take the time occasionally to make changes and keep the code manageable.

It may be tempting to do a full rewrite, but that’s a large amount of work. All that code is there for a reason, and it mostly works, doesn’t it? A more sensible approach is to rearrange the code so that it comes in more manageable pieces, has less redundancy, and is easier to understand. We call thisĀ refactoring. Continue reading Refactoring is Worth the Time

Utilizing Refactoring

Refactoring code is a useful process for all software developers, and now there are reliable tools to help you in the process. In basic terms refactoring your code means that you make changes to your code, usually small ones, which will make it easier to read and generally more simple. The goal is not to change the functionality of the code, only to make it easier to understand. This can be valuable in many instances especially if you are working on a large project, working with other developers on a team, and want to keep your code clean and reusable. Refactoring is not something that every developer knows about or utilizes, particularly when starting out, but if you familiarize yourself with the process it can be a powerful tool. Continue reading Utilizing Refactoring

Refactoring Email Template Formatting

Almost every website I’ve built has a contact page, which sends out an email to a list of people.

For many years I was using string based HTML templates with either String.Replace with [KEY] style placeholders, or String.Format and {0} placeholders. Both of these methods are rather ugly when you have to go back and update an email template. Continue reading Refactoring Email Template Formatting