Skip to content

Dawid Cieszyński

.NET/PHP Software Developer

NDepend v4

Details
Published: 02 August 2012

I was recently given the newest version of the NDepend tool to try out.

Make your .NET Code Beautiful with NDepend

NDepend is a Visual Studio tool for managing complicated .NET code and reaching high code quality. With NDepend you can judge the quality of software using code metrics, visualisations of dependencies on graphs or treemaps, and standard or custom rules - rules that point out overgrown classes, for example.

Once the add-in is installed, all it takes is to create a new project (menu NDepend->NDepend Project->New project) and you can already analyse your code. A small circle appears in the bottom right corner with information about the state of the code; you can look at what ought to be improved, or ignore the rules you choose to.

Rules ExplorerThe newest version adds the ability to write rules in CQLinq (in earlier versions this was CQL, a language close to SQL). All of the standard rules have been converted to CQLinq as well, which makes it easier to write something of your own by example. There is also a great deal of information on the vendor's site.

The rule editor itself has everything you need: intellisense syntax completion and hints about the individual objects available.

An example rule - a warning about singletons:

//<Name>Avoid the Singleton pattern</Name>
warnif count > 0
from t in Application.Types
where !t.IsStatic && !t.IsAbstract && (t.IsClass || t.IsStructure)

// All ctors of a singleton are private
where t.Constructors.Where(ctor => !ctor.IsPrivate).Count() == 0

// A singleton contains one static field of its parent type, to reference the unique instance
let staticFieldInstances = t.StaticFields.WithFieldType(t)
where staticFieldInstances.Count() == 1
select new { t, staticFieldInstance = staticFieldInstances.First() }

// The Singleton pattern consists in syntactically enforcing that a class
// has just one unique instance.
// At first glance, this pattern looks appealing and it is widely used.
// However, we discourage you from using singleton classes because experience
// shows that singletons often result in less testable and less maintainable code.
// More details available in these discussions:
//  http://codebetter.com/patricksmacchia/2011/05/04/back-to-basics-usage-of-static-members/
//  http://adamschepis.com/blog/2011/05/02/im-adam-and-im-a-recovering-singleton-addict/

Every rule not only describes its individual parts, but also ends with a thorough explanation of why the rule matters, together with links to articles that discuss the problem at greater length.

A tool worth a look, especially on larger projects built by a team of people. What I have touched on here is only the tip of what it can do; the best thing is to test it yourself on your own applications.

1% of your tax for Kacper Tomaszewicz

Details
Published: 28 December 2010

Kacper TomaszewiczThe end of the year is coming, and in the new year there will be tax to pay. In Poland you can send one per cent of it to a cause of your choosing - if you have nothing better in mind for your "one per cent", help Kacper. Kacper has cerebral palsy and is being brought up by his mother on her own. There is more on his site: https://kacper.crystalcode.pl

Chess Monitor - Imagine Cup 2010

Details
Published: 20 November 2010

Those of you who use my Chess Monitor (if there are any) have probably noticed that it no longer works. And it does not work because the hosting for Imagine Cup 2010 projects ran out recently.

I have moved the application to the StudentLive.pl server. So instead of cieszakteam.imaginecup2010.net, please head for http://cieszak.studentlive.pl/.

And a question for you: do you have any suggestions or ideas for this application? Lately I have been wondering what to do with it...

I wish you successful games :)

Programming Timer 1.5.0.0

Details
Published: 25 September 2010

ProgrammingTimer is not dead!

I have just released version 1.5.0.0 of the program that measures the time you spend working on projects. In this version I added support for Visual Studio 2010 and removed the Software Updater support (since I will not be supporting it any more).

Text File Viewer 2.0.1.15

Details
Published: 25 September 2010

And an update to TextFileViewer as well. I added support for UAC on Windows Vista / 7 and a few Microsoft Visual Studio 2010 file extensions.

PowRek

Details
Published: 04 September 2010

Before long I will be building the next version of the PowRek application (those who know what it is, know ;)).

And yesterday, together with the rest of the CrystalCode Studio team, we finished the RC of our CMS. At the moment we are polishing the details and looking for clients.

The first site built on our CMS is the site for the PowRek application.

Text File Viewer

Details
Published: 27 August 2010

Back when I still wrote programs in Delphi I made a few nice ones. By now nobody is likely to be using them anyway. But I wanted to remind you about one of them - one I still use myself, on Windows 7 x64.

That program is Text File Viewer. The last version was built on 2007-01-22, so more than three years ago. The application lets you see a preview of a text file - the first few dozen or few hundred characters of its contents - when you hover the mouse over it. It makes browsing files enormously easier, because you do not have to click through every one of them. And if some heavy application such as Visual Studio is associated with a file type, you do not have to start it up either, or right-click and pick open in Notepad++.

If you have not had the chance to use this program yet, do give it a try.

2010-08-27 14:03:

I forgot to mention:

Do not install SoftwareUpdater! It is no longer supported.

Also, if you want to change the configuration, the configuration application has to be run as administrator.

Apart from that everything should work.

ImagineCup Poland 2010

Details
Published: 09 July 2010

The ImagineCup 2010 competition finished yesterday. As we already knew, the Poles took every place in the Internet Explorer 8 Award category. Unfortunately the fteams team did not make the podium.

You can find photographs on flickr: ImagineCup's photostream

MCTS .NET Framework 3.5, ASP.NET Applications

Details
Published: 22 June 2010

Yesterday one more MCTS came through: .NET Framework 3.5, ASP.NET Applications

Chess Monitor - Imagine Cup - Internet Explorer 8 Award - World Edition

Details
Published: 01 June 2010

I have something to boast about :) The list of Imagine Cup finalists has just been published

I came third in the world edition of Imagine Cup - Internet Explorer 8 Award !!

Page 1 of 5

  • 1
  • 2
  • 3
  • 4
  • 5

Select your language

  • Blog
  • Applications
  • Turbo Pascal
  • NokiX Scripts

Most read

  • Coins
  • Wyszukiwarka 2.1.0.2 [PL]
  • ImagineCup Poland 2010
  • Windows Live Writer and Joomla - second and final attempt
  • Text File Viewer 2.0.1.15 [PL, EN]
  • Tetris 1.05+ [EN]
  • Programming Timer 1.5.0.0 [PL, EN]
  • Cycling season - open!