Chronicles of the 6th Software Craftsmanship (SCIL) meetup.
This time, we discussed and practiced my own very beloved technique - called Refactoring.
During the session Itay Maman demonstrated a real life project that he needed to refactor for his company.
On the first part of our meeting, Itay refactored a very lengthy method in the CustomAction class, called actionPerformed.
Here is the initial code of that method.
You can watch the session here, where Itay demonstrated his approach and the refactoring steps he applied.
On the second part of the meeting, we practiced by refactoring the same code, but this time without the unit...
If you like practicing in identifying code smells, then you can find below a short class called TimerManager.
public class TimerManager
public delegate void TimerCallback(object data);
private static readonly object _sync = new object();
private readonly Dictionary<int, Timer> timers = new Dictionary<int, Timer>();
private readonly Dictionary<int, TimerCallback> callbacks = new Dictionary<int, TimerCallback>();
public void SetTimeout(TimerCallback timerCallback, int snooze)
var timer = new Timer(snooze);
Boy, I had so much fun during our 4th meeting...
There were more than 80 people, deeply concerned about our profession and eager to learn best patterns & practices.
In the first part we had 3 lectures: Code Reviews (Tools & Processes) - Ran Tavory , Structure 101 - Eran Harel and Legacy
Code & Unit Tests - Uri Lavi.
In the second part Aviv
Ben-Yosef & Yoni Tsafir demonstrated pair programming (Randori Style) while solving the Bowling Kata exercise.
For our second Software Craftsmanship Coding Dojo, I have prepared a "Short Roman Numeral" Kata.
In essence, a Short Roman Numeral is a number between 0 to 3999 that has a ToString() method which returns its roman presentation.
The rules of roman presentation construction can be found here.
After the meeting, I took some time in order to record the Code Kata.
As you probably know it is extremely difficult to produce a well synchronized recording.
Hence, after a few sleepless nights I have finished the recording with great satisfaction, only to discover (thank you my "dear" friend) that I made a typo during...
Once upon a time, there was a class called Invoice. Its responsibility was to calculate a final
price being presented to the customer.
Time went on; The autumn passed, the winter fade out and the spring was already at the door and our class started to
Each time a developer found a new set of relevant parameters (that should have been passed to the Invoice class) he added a new
constructor, to support them.
And so it happened, that after...
Oh, my God!
I am definitely in love!
I finally had the time to play with the latest DevExpress's Refactor! Pro and Code Rush.
Two distinct main features capture my eyes immediately:
The ability to highlight the changes/code smells and refactorings inside the Visual Studio's Editor.
It seems that the team invested a lot of effort in order to enable painting on the Visual Studio's editor and canvas.
This enables a smooth user experience, without prompting and stalling with unnecessary dialogs.
The changes are visualized directly on the source code.
Below is one of my favorite refactoring steps: "Extract Method" visualized in Visual Studio 2008.
A huge amount...
One of the key aspects of a Software Craftsmanship is constant practice.
Kata (from Martial Arts) is one form of such practice. The notion of a Code Kata was first introduced by Dave Thomas and can be viewed as:
Practice of the same methods, solutions and activities to a perfection.
Practice of the same problem, tackling it each time from a different angle or with a different solution.
Solving a known problem multiple times utilizing the same methods, enhances the understanding of the specific steps; It especially enhances the understanding of unit tests, refactoring steps or "Design" approaches. Moreover, striving to do better...
This week we concluded the Experts Days.
The sessions were effectively organized (by Eyal Vardi from E4D), the audience was amazing and the atmosphere was energizing .
Here are the headlines of my sessions:
I. What's new in .NET 4.0 and VS 2010:
The main focus was to emphasize the most important (in my opinion) upcoming features.
Here they are:
Task Parallel Library, PLINQ and Coordination Data Structures
Reaction (Rx) Framework
Managed Extensibility Framework (MEF)
Dynamic Language Runtime (DLR - and especially F#)
Also, we reviewed a lot of other upcoming features in .NET 4.0 and Visual Studio 2010 (IDE).
For those, willing to have a deeper look, here...
Don Roberts and John Brant stated in the book Refactoring - Improving the Design of Existing Code: "Refactoring with automated tool support feels different from manual refactoring". Indeed - It is! Having an automated tool that helps you to change the code without the fear of breaking it - is invaluable. That's why, I wanted to summarize several available options for .NET developers. Let's start with the obvious one: Visual Studio Refactoring Tool. As usual Microsoft concentrates on...