Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. Deconstructing a mess

Deconstructing a mess

Scheduled Pinned Locked Moved Design and Architecture
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jack Vanderhorst
    wrote on last edited by
    #1

    Hi all, I've recently inherited a couple of projects that I am having a terrible time getting my head around. As I stare at a method of 600+ lines that is doing all manner of unrelated things, trying to make sense of it I wonder: Is there a formal name for what I am doing here? Surely this has a name, surely thousands of people have done this sort of thing before, surely there are resources to be had. Any pointers I could get here? A generic approach maybe? Point me in a direction? blah, -Jack

    P M 2 Replies Last reply
    0
    • J Jack Vanderhorst

      Hi all, I've recently inherited a couple of projects that I am having a terrible time getting my head around. As I stare at a method of 600+ lines that is doing all manner of unrelated things, trying to make sense of it I wonder: Is there a formal name for what I am doing here? Surely this has a name, surely thousands of people have done this sort of thing before, surely there are resources to be had. Any pointers I could get here? A generic approach maybe? Point me in a direction? blah, -Jack

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Is this a .NET project? If it is, you can refactor it - there are tools that help. You could look at Resharper or Refactor!Pro to help you out.

      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

      As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

      My blog | My articles | MoXAML PowerToys | Onyx

      1 Reply Last reply
      0
      • J Jack Vanderhorst

        Hi all, I've recently inherited a couple of projects that I am having a terrible time getting my head around. As I stare at a method of 600+ lines that is doing all manner of unrelated things, trying to make sense of it I wonder: Is there a formal name for what I am doing here? Surely this has a name, surely thousands of people have done this sort of thing before, surely there are resources to be had. Any pointers I could get here? A generic approach maybe? Point me in a direction? blah, -Jack

        M Offline
        M Offline
        Moak
        wrote on last edited by
        #3

        Hi Jack, here is my basic approach: - write initial documentation (basic design and information flow) - write unit tests (at least a few, because you will need them after next step) - refactor (there are many books about it, see also code refactoring[^]) - test extensively that functionality is still working and you haven't broken anything - complete your documentation (to the extend needed) Now you are ready to redesign and extend where needed. Btw, in some cases it is easier to just rewrite the whole mess from scratch, in any case keep the outer interfaces in the first refactoring round so you don't end up rewriting the whole application. Hope this helps! :) /M

        Chat in Europe :java: Now with 24% more Twitter

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups