Refactoring with Microsoft Visual Studio 2010

Until this time I tried not write any post about book review but this book is unique. Of course like every developers I make a plan for year. And of course there is an item about some amount of books which I have to read (in this year I must read 15 technical books). When I changed the company and became team leader I unfortunately don’t have a lot of time but plan – it’s plan J

However I couldn’t write a review on “Refactoring with Microsoft Visual Studio 2010” by Peter Ritchie.Refactoring with Microsoft Visual Studio 2010

I’ve just closed a book which I was reading a few weeks. I was really impressed! I didn’t expect this at all: a way to learn the tool in the context of design patterns. It isn’t just something to read to understand the tools provided to you from VS2010, it’s a book about patterns and practices for power programming. With this book you will look at an assortment of techniques in great detail. You will study how these patterns can be used to change the way your software is designed.

What this book covers

Chapter 1, Introducing Refactoring, describes what refactoring is, its importance, and its priority in the software development effort. Comparison to re-writing and what “Technical Debt” is and how refactoring can be used to pay down technical debt is covered in this chapter.

Chapter 2, Improving Code Readability, begins detailing the refactoring’s built in to Visual Studio and how they can make code more readable. Code smells are introduced, and which code smells apply to readability, and how to detect and refactor them are detailed in this chapter.

Chapter 3, Improving Code Maintainability, continues to detail the refactoring’s built in to Visual Studio and how they can make code more maintainable. Code smells that apply to maintainability, how to detect and refactor them are detailed in this chapter. The importance of unit testing is covered in this chapter.

Chapter 4, Improving code navigation, continues with simple refactoring’s and how code can be refactored to improve its navigability in general and takes into account Visual Studio code navigation abilities.
Chapter 5, Improving design correctness, begins detailing complex refactoring’s. Design principles such as Liskov Substitution and Composition over Inheritance are introduced and how to perform refactoring’s related to these principles is covered in this chapter.

Chapter 6, Improving class quality, introduces code quality metrics like cohesion and coupling. Principles related to cohesion and coupling are introduced and refactoring’s that increase cohesion and decrease coupling are covered in this chapter.

Chapter 7, Refactoring to loosely-coupled, expands on coupling from the previous chapter and drills-down on loosely-coupled design. Principles related to loosely-coupled are introduced and complex refactoring’s related to loosening coupling are covered in this chapter.

Chapter 8, Refactoring to layers, continues with more complex refactoring’s that involve layered architectures. Typical layers, Model View Presenter, and Repository patterns and how and when to refactor to them are also detailed in this chapter.

Chapter 9, Improving architectural behavior, details complex refactoring’s to improve architectural behavior. Design behavior patterns, when and how to refactor to them are detailed in this chapter.

Chapter 10, Improving architectural structure, continues with architectural-related complex refactoring’s. Object-Relational Mapping (ORM) and refactoring Repository implementations are included in this chapter.

Chapter 11, Ensuring Quality with Unit Testing, details the importance of unit testing. How unit testing applies to refactoring, examples of unit testing to support the refactoring effort and legacy code are also detailed in this chapter.

I consider “Refactoring with Microsoft Visual Studio 2010” as one of the first books which I’ll recommend a good .NET-developers!


Disable XAML Designer in Visual Studio 2010

XAML designer is always opened by default in Visual Studio. I don’t like this behavior. Especially because I usually use just Xaml mode without Design mode.

So please don’t waste your time on closing this window each time and switch off it eventually. You can do it by selection following option:

Tools -> Options -> Text Editor -> XAML -> Miscellaneus

And select “Always open documents in full XAML view” under.

Python Tools for Visual Studio

Last 6 months I’m looking not only Microsoft technologies. I’m using Objective-C and Python languages now.

I’ve awesome news: Microsoft released a new beta of the Python Tools for Visual Studio.

Python Tools for Visual Studio is a free & open source plug-in for Visual Studio 2010. The Python tools are put together by a small team from Microsoft’s Technical Computing Group and released on Codeplex.

An integrated environment for developing Python in VS2010

  • Advanced editing, Intellisense, browsing, “Find all refs”, REPL, …
  • Supports CPython and IronPython
  • Local & Cluster/remote debugging
  • Profiling with multiple views
  • Interactive parallel computing via integrated IPython REPL
  • Support for HPC clusters and MPI, including debugging support
  • NumPy & SciPy for .Net
  • Support for Cloud Computing (soon)
  • Support for Dryad (large scale, data-intensive parallel programming) (soon)
  • Free & Open Source (Apache 2.0)

There are a few screens: