Two Screencasts on How to Demystify Spaghetti Code

In my consultant career, no matter the kind of company I visited, from the tiny startup to the largest fortune 500 corporation, they all have in common to be entangled in spaghetti. Spaghetti means poorly structured code. Spaghetti means high maintenance and evolution cost. Spaghetti means frustration, friction and lack of motivation for everyone in the team. And often, spaghetti means project failure.

Mastering code structure means demystifying and getting rid of spaghetti code! With Filip Ekberg, we propose you to cover in-depth code dependencies management through two 30 minutes screencasts. The tool NDepend is used to shed light on the structure of real-world code bases.

The first screencast shows how to make the best of dependency graph and dependency matrix tooling to explore the structure of a .NET application. This includes detecting at a glance good patterns or smelly patterns, buried in the code. In this screencast, we also explain how to master interaction between code query LINQ generation and dependency graph and matrix. Doing so constitutes a very powerful way to generate all custom graph you really need to visualize, like custom call graphs and inheritance graphs.

The second screencast starts with focusing on dependency code rules. This is especially useful to write rules related to Object-Oriented tenets, like base class shouldn’t use derivatives, or to list instance method that could be made static. We then continue with rules concerned with layered architecture, like UI layer shouldn’t use the DAL layer or components dependency cycles detection. We finally explore entangled layering in the real-world, and explain how to get rid of spaghetti and achieve well structured code bases.

These screencats contain many original and useful haha hints that will improve the way you and your team manage your .NET code base dependencies.

Enjoy :)

Part I

Part II

This entry was posted in .NET assemblies, .NET Framework, .NET Fx, Acyclic componentization, Code Dependency, Component, CQLinq, Cycle, DAG, Dependencies, Dependency Cycle, Dependency Graph, Dependency Matrix, graph of callers, Graph of Dependencies, Indirect Dependency, Pattern, Patterns. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • http://profiles.google.com/florin.jurcovici Florin Jurcovici

    “… from the tiny startup to the largest fortune 500 corporation, they all have in common to be entangled in spaghetti.” – I beg to disagree. Respectable, self-conscious companies aren’t entangled in spaghetti. They’re smeared all over with ravioli code – small pieces of code which in themselves aren’t looking that bad, but don’t match together and don’t create an orderly code structure. Which is IME just as bad.