- Details
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.
The 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.
- Details
The 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
- Details
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 :)
- Details
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).
- Details
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.
- Details
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.
- Details
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.
- Details
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
- Details
Yesterday one more MCTS came through: .NET Framework 3.5, ASP.NET Applications
- Details
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 !!