January 2011 Blog Posts

SolutionUnicaPowerToys for Visual Studio 2008 & 2010

Is a set of macros to deal with Solutions that contain a huge number of Projects.   Macros in SolutionUnicaPowerToys let you analyse projects references and dependencies and let you selectively enable the build of a limited number of Projects and only their references. Here is the list of available commands: Solution Projects ListAllProjectsNames:  recursively lists and counts all the projects in the solution ListAllProjectsUniqueNames:  the same as ListAllProjectsNames with project unique names ListProjectsDependencies: ...

Pratichi TDD? Una ricerca/esperimento

      Ultimamente ci si interroga spesso su qual'é l'influsso del TDD sul disegno del codice e quali pratiche sono prescritte dal TDD. L'anno scorso ho documentato l'esperienza di un team e ora ho preparato un questionario e del codice, un esperimento pratico per indagare le ipotesi. Sia chi é esperto nel TDD e chi ha iniziato da poco puo trovare l'esperimento interessante per riflettere sul proprio stile di TDD e confrontarlo con un altro grazie ad esempi minimi e significativi. O semplicemente per partecipare alla ricerca. Questionario e codice sono in beta, qualsiasi feedbak, suggerimenti e commenti per...

Licenza CC per il Blog - CC License for this Blog

Ho aggiunto la licenza Creative Commons al Blog. L'uso e il riutilizzo del contenuto di questo Blog é benvenuto e incoraggiato in tutte le sue forme.  Per qualsiasi tipo di utilizzo, commerciale e non.  Ció che é scoraggiato e perseguibile per legge é utilizzare il contenuto assegnandosi la paternitá o non attribuendo correttamente la paternitá del contenuto riutilizzato. Have just added Creative Commons License to the Blog. The use and reuse of the content of this Blog is welcome and also encouraged. For any kind of commercial and non commercial use. What is discourage and will be persecuted is any reuse of the content...

DI and IoC: pattern and frameworks, strengths and weaknesses

IoC or Inversion of Control. A well known example of the IoC pattern is the Windows 3.0 programming that inverted the program's control flow compared to MS-DOS. Windows manage the I/O devices and calls program's event handler when the user performs some input.  While in MS-DOS the program in the main loop had to pools the I/O devices to know the position of the mouse and the status of the keyboard. IoC pattern means event-driven instead of pooling the sources. The reference to sources of the events are passed to the program/object that will trigger its behavior when receives an event notification....

TDD with mocks and spies

    Some testing tools like Moq (with MockBehavior.Strict), NMock, JMock and Rhino Mocks fluent and record/playback syntax use mocks.     Other testing tools like Moq (with Verify), Mockito and Rhino Mocks AAA syntax use spies. Here I will note down the characteristics of both. Let start with the differences. Spies allow to assert the expectations after the invocation of the method being tested, while mocks (we are talking abou strict mocks) require to set expectations before the target method invocation. Because of it someone finds the test written with spies more readable, while someone else finds easier to write...