Refactoring with NDepend (1 of N)
 

by Sameera on September 08, 2009 16:37

Almost for the last 2 years, I’ve been working on a substantially large and complex project. And like in any long haul project, some areas of the project’s code has been developing their own distinct smell. Much of the project is in good condition however, thanks mostly to my OCD. But, there’s this one library of code that’s been haunting me in my dreams, begging me to refactor it out of it’s misery. Then again, this is working code…

Refactoring a 2 year old code base is never going to be easy or pleasant. Without the right tools to help you, the task could be pretty daunting. NDepend is one such awesome tool. One glance at the many testimonials the tool has received is enough to realize that this no ordinary app. Check out what the Scott Hanselman’s got to say:

“NDepend is giving me insight into my applications that I haven't had before (...) Once I realized the depth and breadth of the information I was looking at it, I was like a kid in a candy shop.”

Personally however, I was a little intimidated by the complexity of NDepend at first. It’s definitely not the kind of app with which you can jump first and figure out on the way down. You might want to invest a couple of hours going through the documentation first. This post from Andre Loker is probably a good place to start.

Step 1: Figuring out where to start

When you have a large code base to refactor, the hardest thing to do is to figure out where to start. Generally, you’d want to start with the simplest steps. The built in CQL queries in NDepend are probably the best guides for this.BuiltIn_CQL

With just one click (“Run Analysis”), NDepends have come back with a report of how crappy the project’s code is. Not only that, it has made a quick list of 10 methods that I should look in to refactoring. So, there it is… my starting point.

Dear Comment Spammers,
 

by Sameera on July 11, 2009 12:40

First of all thank you very much for trying to boost my  ego with all your "Nice Wok!", "Appreciate the effort you put in to this" comments. But, the fact of the matter is, it's getting a bit old and really annoying. So, cut it out.

k?

tx,

- Sameera.

Tags:

Filed Under: Insanity Strikes | Management/Strategy

Getting ASP.NET Development Server (WebDev.WebServer.exe) on Vista
 

by Sameera on April 04, 2009 12:51

I came across a weird issue today with my ASP.NET Dev Server. I’m running Vista Home Premium with Firefox set as the default browser. I was consistently getting a “Failed to Connect: Firefox can't establish a connection to the server at localhost:<port>.” error. Little bit of Goolge pointed me to several posts suggesting that I turn off IPV6 on my network adapter. Hmmm… Nope! Idea I know a better way to fix this (fingers crossed). Navigated to %SystemRoot%\system32\drivers\etc (C:\Window\system32\drivers\etc on mine). Opened up hosts file in notepad. Commented out the following line:

::1             localhost

 

It now it looks like

#::1             localhost

Save the file, restarted Firefox and Dev Server (not sure whether I needed to even do that). Presto! It works! High Five!

Trying out NDepend...
 

by Sameera on March 07, 2009 21:13

The good folks at NDepend were kind enough to ship me a Pro license last week. Interestingly, they had offered me a license back in 2007 and I had unfortunately missed it back then (long story short, BE.NET never delivered me that email). Anyway, after all these time when contacted the guys were more than helpful to grant me a license (Thanks Patrick!). Anyway, I'm now taking baby steps in trying to harness the power of NDepend. I know I'm gonna end up addicted this app :)

I will keep you posted!

Unboxing ASUS U-75HA 750W Power Supply Unit
 

by Sameera on December 26, 2008 23:16

Here you have it, pics of my new PSU. PSUs are hardly stuff to get excited over but, this one's an exception. Check out the review.

IMG_0742 IMG_0745

IMG_0748

Tags: , ,

Filed Under: Gadgets

About Me

Sameera Perera

Sameera Perera

Log in

RecentComments

Comment RSS

Calendar

<<  February 2010  >>
MoTuWeThFrSaSu
25262728293031
1234567
891011121314
15161718192021
22232425262728
1234567

Archive

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

All forms of source code published on Codoxide.com are distributed under the Apache License, Version 2.0 unless otherwise stated.
The rest of the content are published under a Creative Commons Attribution 3.0 License.
Creative Commons License

CodoxideTM

Copyright © 2010  codoxide.com. All rights reserved. Designed by Sameera Perera