DaedTech

Stories about Software

By

Calculating the ROI of NDepend

Editorial note: I originally wrote this post for the NDepend blog.  Head over to their site and check out the original.  While you’re there, take a look at the other posts and the offering to be had.

Years ago, I discovered NDepend and downloaded it for a trial.  At the time, I found myself working in a .NET shop where a lot of developers worked in the same large WPF codebase.  Code reviews were mandated, debates were frequent and impassioned, and global variables were everywhere, to the dismay of only some of us.  There was an entrenched majority that favored (or at least didn’t mind) a highly procedural style of writing object-oriented software, and nobody seemed able to put their fingers on why most feature development there had slowed to a crawl.

ScaryComputer

I was new to the group and had to pick my battles, particularly with people that had been there a long time.  Developers who favored automated testing and craftsmanship principles were in the minority there and had a history of leaving out of frustration, so I knew it’d be a challenge, and I went looking for help.  Among other things, I found NDepend and, after installing a trial, I recognized the power of the tool.

I recognized that it could help me as an objective, unbiased partner in making my arguments, but I also recognized that the way I approached code and architecture would never be the same.  The ability to visualize architecture in real time, the ability to treat code as queryable data, the metrics, the statistics, the well thought-out code warnings… it was a game-changer for me.  I just needed to convince my manager to let me spend a few hundred dollars to convert my trial version into a paid version.

It turned out this wasn’t hard, at least for me.  I had the good fortune of working for a company that appropriated a tools and learning budget for each individual developer, meaning all I had to do was declare that I wanted some of my total spend to go toward NDepend.  I did it without blinking.  But it might be that you aren’t as lucky.  Maybe you find yourself in a similar position to mine back then, but wanting to convince your manager that this powerful tool is indispensable because you don’t have a discretionary tools budget.

ROI: The Language of Management

I think I can help you here.  After all, I did leverage my experience running an IT department into a Plurlasight course about how to lobby your managers for practices and tools.  And the key to making a business case for anything, NDepend included, is to talk in terms of profits and losses, rather than in terms of, “it’s awesome, and it has all these graphs, and it shows me these rules, and CQLinq is the coolest thing ever, and…”  You get the idea.  NDepend’s coolness factor isn’t going to convince your manager to buy it for you.

When making a business case, two of the most important terms you should know are Return on Investment (ROI) and Payback Period.  Return on investment, formally, is (G – C)/C where G is the gain from the investment and C is the cost of the investment.  Thus, if you buy a tool and it helps you make your money back, ROI is zero.  If you profit, it is positive, and if you don’t recoup your money, it’s negative.  Expressed qualitatively, ROI is simply an answer to the question of, “is this worth the cost?”

Payback period is the length of time before ROI is realized.  For example, if I were selling a tool for $100 that would save you $10 per day, the payback period for you would be 10 days.  After 10 days, you’re in the black, as they say.

These two concepts frame the discussion perfectly for a manager.  Managers almost always deal with budgets in some capacity or another, and, even if they don’t, their boss almost certainly does, so translating your wishes into budgetary concerns is critical to winning them over.  ROI is how you tell them that something is worth buying.  Payback period is how you tell them when they’ll see the payoff.

The ROI of NDepend

With this in mind, how would one express the value of NDepend, a static analysis tool?  Perhaps concrete reasons occur to you right off the top of your head, but then again, perhaps not.  After all, it can be hard to translate general goodness like “shows us where code is getting too complex” into specific financial outcomes like “will save us $300 this month.”  So in case you can’t easily think of some ways that NDepend can help your group’s bottom line, I’ll offer a few.

If your company is in the habit of paying for learning activities such as training courses, books, Pluralsight, etc, you can make the case that NDepend fits neatly into that category.  If the company is willing to spend money on these things, why not spend money on something that will not only explain good development practice, but actually show you where in your code you’re missing the mark?  How many books or courses actually point places in your code that should be fixed?  If you make this argument, you don’t need to address ROI and Payback Period, per se, since your company already accepts that learning has ROI.  You just need to demonstrate that NDepend is a great learning tool.

RobotWithMoney

But if that’s not enough or if you don’t have a learning budget, there are other arguments that area easy to make.  Take the subject of code review.  If you don’t have code review, present NDepend as an automated code review tool and talk about the ROI on defect reduction, since code review is arguably the most effective way to reduce defect counts.  Figure out the cost of defects in terms of hours spent debugging (and, if you’re feeling adventurous, include an estimation of the actual, external cost of defects as far as brand/reputation goes), and then speak to your manager about payback period if you could eliminate just a few per month.  “Look — if NDepend helps us eliminate 4 defects a month, it will pay for itself in 2 months.”

If you do have code review, go a different route.  Observe some of these reviews and see what the most common items that come up during review are.  Are they things like “too many parameters to that method” or “man, that class looks way too complex?”  Tabulate these review action items and see how many of them could be detected with CQLinq.  Once you have a sense of that, you can start to put an estimate on how many hours are spent observing and correcting things in code reviews that NDepend could point out automatically.  From there, NDepend’s payback period is a pretty straightforward calculation of average salary times the hours spent on review items that could be automated.

These are just a few examples, but I’m sure you could think of more if you were so inclined.  It’s just a question of getting your brain to start operating this way.  There is no shortage of ways that NDepend can pay for itself, so it’s an excellent first candidate for you to hone your business case skills.

Sort by:   newest | oldest | most voted
David S
Guest
Great article! I think the argument for superior tooling is one we developers are much too quick to give up on. This relates to a major epiphany I while back. I realized that as a last option, if either through my own failure to argue the business case compellingly or through management’s sheer stubborness I can’t get the company to shell out for superior tooling and learning resources, it is worthwhile for me to buy them out of my own pocket. I think of it this way: For $1000 a year, I can get a license to Resharper, Ncrunch, NDepend,… Read more »
Erik Dietrich
Guest
I think that’s very wise, personally. I don’t have a company to buy stuff for me any longer, so I invest in the tools as well, and find that the ones I advocate for definitely pay for themselves. With a company, there’s an interesting angle as well, though. It’s been my experience that a boss is FAR more likely to agree to pay for a tool if your response to the prospect of them not paying for it is, “well, then I’ll just buy it for myself.” I think there’s an element of “wow, this person is serious,” but I… Read more »
David S
Guest
Hi Eric, and thank you for your thoughful response! I guess I haven’t had too much luck using the willingness to buy the tools myself as leverage. At the companies I’ve been in where its hard to get approval to buy better tools (most of them, unfortunately), I’ve gotten the feeling that the big reason my boss was reluctant wasn’t because he himself didn’t believe in using the best tools, but because he didn’t feel he had the authority to just pull out the company credit card and spend $300. He felt like he needed to go to the VP… Read more »
Erik Dietrich
Guest

I’d say the business case is the best bet — buy-in across the board. But your strategy about submitting it as expense report is definitely a savvy plan B.

David S
Guest
Hi Eric, and thank you for your thoughful response! I guess I haven’t had too much luck using the willingness to buy the tools myself as leverage. At the companies I’ve been in where its hard to get approval to buy better tools (most of them, unfortunately), I’ve gotten the feeling that the big reason my boss was reluctant wasn’t because he himself didn’t believe in using the best tools, but because he didn’t feel he had the authority to just pull out the company credit card and spend $300. He felt like he needed to go to the VP… Read more »
wpDiscuz