Archive for the ‘Code Refactoring’ Category

  • C/C++ Refactoring – Clone detection

    on Nov 12, 10 • in Code Refactoring • with 1 Comment

    C/C++ Refactoring – Clone detection

    As we have posted in the past, refactoring is a very useful technology to help developers become more productive.  I wanted to take a deeper look at how certain refactorings such as “Extract Function/Method” and “Introduce Variable” can be further enhanced with clone detection.   For the focus of this post I will concentrate just on Extract Function/Method.  Say I create some code that I know I will use frequently.  It would make more sense to create a reusable function/method.  Of course I can add a function to my file then pass the proper parameters

    Read More »
  • C/C++ Refactoring – optimize headers

    on Nov 2, 10 • in Code Refactoring • with No Comments

    C/C++ Refactoring – optimize headers

    Today I wanted to talk about new kinds of benefits you can get from Refactoring.  Everyone knows that refactoring is the process of simplifying and clarifying code without changing the program’s behavior.  The benefits include making the developer more productive by providing tools to automatically clean up the code.  Some of you may be aware of the common refactoring such as “Rename” to rename a variable, parameter or function in your code. Or Extract Function to create a function call and body based on some selected code. These are great and provide important value but

    Read More »
  • Refactoring – if it ain’t broken, don’t fix it

    on Oct 14, 10 • in Code Refactoring • with 1 Comment

    Refactoring – if it ain’t broken, don’t fix it

    I recently read a book by Peter Ritchie called “Refactoring with Microsoft Visual Studio 2010” and thought I would give my review. Great book to really help you get started with Refactoring.  Ritchie first goes into an introduction of refactoring and some of the tools available in Visual Studio 2010.  He then provides techniques to help you identify code that might need to be refactored along with examples and step by step procedures to refactor the code. The focus of this book is not necessarily with Visual Studio 2010, as many of the refactoring examples

    Read More »
  • Refactoring vs. Rewriting: Why it matters

    on Aug 31, 10 • in Code Refactoring • with 3 Comments

    Refactoring vs. Rewriting: Why it matters

    As new words and concepts diffuse in to wider use, their definitions become simpler or broaden to cover more scope.  Like the kid’s telephone game, each time the concept is passed to another developer, the information gets a little more muddled. In software development, declaration, macros, syntax and other programming constructs have to be exact or the compilers will fail.  Yet, when developers discuss concepts about programming, most of the time, that precision of language is lost. The telephone game  seems to have happened to refactoring.  I subscribe to what would be consider the  ”classic” definition of  refactoring

    Read More »
  • Refactoring vs. Refuctoring

    on Feb 2, 10 • in Code Refactoring • with 2 Comments

    Refactoring vs. Refuctoring

    Refactoring is a vital component for software developers, helping to prevent their projects from becoming unusable, and unmaintainable spaghetti code. Equally important to some developers, is the notion of refuctoring…check out this tongue in cheek look at Refactoring vs. Refuctoring. Be sure to check out the slide deck at the end. Refuctoring describes the process of making your code unmaintainable by anybody but yourself.  I love some of the examples of Refuctoring such as “Pig Latin”, “Treasure Hunt” and my personal favorite “Stating the Bleeding Obvious”: For example: //initialize a to 1 int a=1; Not

    Read More »
Scroll to top