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.

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!

Warning to Students/Researchers: HighBeam.com is a scam
 

by Sameera on December 13, 2008 15:24

I have always been very careful as to which sites I trust with my credit card. But unfortunately, working under stress to complete an assignment for my MBA, I gave out my CC number in order to signup for a 7 day trial account for the seemingly legit HighBeam.com. There was one article which was interested in and the site was preventing me from reading the rest without a membership. So I signed up, read the article, had the membership around for 2-3 days till I completed the assignment. Then I went ahead and canceled it. First time I tried, the site stopped responding. So, I refreshed the page went ahead and clicked on the Cancel Account button again. This time the site, logged me off and returned me to the general articles page. So, I assumed everything was fine.

Just yesterday, my Credit Card company called me up and informed me that HighBeam has billed me $199. I immediately informed them to block any other transactions from the card and went ahead and checked the account. And sure enough the account was active. They have not canceled the account, nor had they sent any emails informing the end of trial period was coming up. Worse yet, I have not received a mail informing me of the money they charged me. I have dealt with many companies over the Internet and it's standard practice of each to send out clear messages informing you before they proceed with routine billing.

A section of their help reads 'If you are not able to successfully use the online tool, please contact our 24-hour toll-free customer support line at 1-800-860-9227.' So they run this 'trial' acknowledging their online cancellation is failing at times?? Isn't that exactly why they should be sending emails before they bill trial users?

Little bit of Googling suggested that I'm not the only person who's been ripped off by this dodgy company.

http://www.ripoffreport.com/searchresults.asp?q5=highbeam

http://www.ripoffreport.com/searchresults.asp?q5=highbeam.com

Amazon's SimpleDB - Dude! That's what I've been trying to tell you!!!
 

by Sameera on January 27, 2008 21:45

More than two years ago, I was working on a highly experimental project called Project ZNIX. This was for my final year project for the Bachelor's degree in Information Technology. The project was like my baby; I loved it, nurtured it it and spent a lot of time on it. Whenever I could, I would slip the topic about it into day to day conversation so much so that it got annoying. But back then, nobody understood a lick about what the project "meant". With the exception of few elite professors who read the dissertation and listen to my presentation, everyone used to give me blank stares when I explained it. I had to explain the project twice, on two different days to the examiner in charge before he finally gave up and gave me an 'A'. I even wrote a CodeProject article about it: All that got me was pointless comment from a random looney. And while I was hell bent on following up the project after graduation, with a job to worry about the commitment simply faded away. And all that remains of that ambitious project is the initial articles and the specifications I wrote.

Well, today I'm proud to say that I've discovered Amazon is trying to do something very similar to ZNIX with it's SimpleDB. Of course, I'm not trying to claim that Amazon got the idea from ZNIX. But as an innovator, I'm simply glad that similar concepts are finally going main stream. Amazon's data model will undoubtedly generate lots of commercial interest. ZNIX on the other hand was project focused more on individuals and PIM needs. Mine was a dream to make personal computing more personal. I wanted to build a system where my mom or my 6yr old niece can use a computer without having to spend months learning it before hand. Hopefully, with SimpleDB I can keep that dream alive.

PS: I recommend that you check out Ralf's SimpleDB implementation.

About Me

Sameera Perera

Sameera Perera

Log in

RecentComments

Comment RSS

Calendar

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

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