Dirk's Development

.NET Software Development

Monday, May 18, 2009

Top 3 - Favorite Development Tools

It was very quiet on my blog for the last months, but I would like to let you know what my Top 3 Development Tools are:
  1. ReSharper: This productivity add-in for Visual Studio is absolutely a "must have"!
    My experience is, if you work with it and use it's feature frequently you can't work without!
    I'm addicted to ReSharper!
  2. Notepad++: I banned the legacy notepad and since a few month I only use Notepad++.
    I love it's large syntax highlighting support for different languages, the code folding, auto indentation, numerous text functions, and a lot more.
  3. And last but not least, FireBug: This FireFox add-on helped me a lot during the development of my last web application. It has great feature to "edit, debug and monitor CSS, HTML and JavaScript live in any web page".
Of course, there are many other tools I use to increase my productivity, but I won't summarize all of them and their capabilities here. But I'd like to list some of them (in no special order): Launchy, ActivAID, ToDoList, ProcessExplorer (and all it's siblings), PL/SQL-Developer, Paint.NET, Tortoise/SVN, dotTrace, Reflector, AutoHotkey, ...

What are your prefered development tools?

Saturday, April 4, 2009

Happy Easter Gadget

Do developers like gadgets?
Do you like gadgets?

I found a video of this funny bunny gadget from nabaztag.
This video shows a crazy integration with TFS:

May be a good idea for a happy easter present?

Sunday, February 8, 2009

Moved to SyntaxHighlighter 2.0

When blogging (ok, not often in the past, but I'll be more busy in future) about software development I want to post code samples in an appealing way.
There are several ways to do this:
  • Embedding screen shots:
    I don't like this way because it is too much work and too much data to transfer over the wire.

  • When using blogging tools like Windows Live Write there are plugins for code syntax highlighting available:
    Most of them embed the code snippets with a lot of inline styles.
    Ok, better that screen shots, but I want to be able to post without being dependent on tools like WLW.

  • Client side post formatting with javascript based code:
    I have seen this often and it was most of the time syntaxhighlighter from Alex Gorbatchev.
    Yes, that's the way I want to post my samples!
Ok, after reading some details it looks easy, but...
I use blogger for blogging and that makes it a bit harder to use the syntaxhighlighter, because you cannot upload any script or style files. Fortunately I wasn't the first one having this problem, so google was my friend (as always)! One hour later it worked.

The next weekend I planned to blog about my experience, but...
Alex Gorbatchev was busy and released version 2 of syntaxhighlighter (now at a new place)!
Before starting to blog a lot of samples using the older version I move my blogs configuration to the new release. This has some advantages: Support for blogger, file hosting and more improvements.

To empower my blog for syntaxhighlighter 2.0 only a few steps were required:

1. removing my changes for syntaxhighlighter 1.5

2. referencing the new script and style files at the end of the head tag:
<link href="http://alexgorbatchev.com/pub/sh/2.0.287/styles/shCore.css" rel="stylesheet" type="text/css" />
<link href="http://alexgorbatchev.com/pub/sh/2.0.287/styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
<script src="http://alexgorbatchev.com/pub/sh/2.0.287/scripts/shCore.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/2.0.287/scripts/shBrushJScript.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/2.0.287/scripts/shBrushCSharp.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/2.0.287/scripts/shBrushXml.js" type="text/javascript"></script>
3. Setting the configuration and apply the formatting
<script type="text/javascript">
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.ClipboardSwf = 'http://alexgorbatchev.com/pub/sh/2.0.287/scripts/clipboard.swf';
That's all!
So, now I'm prepared to post more ;-)

Friday, September 26, 2008

Nothin but .Net (Day 5)

A little bit late, but here it is:

Some comments on the end of day 4
Most of us where able to follow the tasks until about 4:00am!
When I left the training room only Michel and Stefan stayed with JP to go code on.
(when reading the next lines, be aware of: JP didn't went to bed this night!)

The Last Day!
JP presented the results of his last coding hours from day 4:
A QueryBuilder providing a flunet interface to specify a query which later can be visited to create the corresponding SQL statement. Together with a data base gateway this query can executed to get the data from the SQL server.
data_rows = db_gateway.execute_for_rows(Query.from(Tables.Products.table_name)
Awesome, isn't it?

The Bootcamp
This morning JP challenged us in a completely new way: Extreme TDD
While he is committing one test (oh, we BDD'ers say Observation) after the other to the svn repository everybody had to make the current observation passing until the first one said "Checked In!". It was really really fast (and sometimes a little bit frustrating when being almost finished, but another one shouted: "Checked In!")!

Pair Programming

After lunch JP assigned tasks to the pairs:
  • Adding missing functionality
  • Setting up a TeamCity server for CI
  • Auto wiring container (Björn, I love your result!)
  • Code generation using Velocity engine
  • ...
It all went on until 2.00am, but even with some red bull the batteries where low! (more than 42h hours without sleep for JP - how could you bear up so long?)

Good to have more than 6GB of screencasts to

Thank You!
JP, it was really an honor and pleasure to be at your course to learn so many stuff.
God bless you and your family!

Also thanks to the attendees
("Basti", "Bavo", "Birgit", "Björn", "Björn",
"Jonas", "
Michel", "Niki", "Simon", "Stefan",
for having such a good time with you to share experiences, impressions and more!
And to say it with Michel's words: I'm really going to miss you.

I'm still tired, but:

And (JP, sorry for using your motto) keep on to

Thursday, September 25, 2008

Nothin but .Net (Day 4)

Recapitulation of day 3

The fourth day started with good recapitulation of the container stuff of the day before.
Because we were awake it was easier to understand than yesterday evening.

Application startup

Later JP introduced to implement the aspect of application startup as a first class citizen and from my point of view it feels good.
It has to cover the actions of initialization the core service (logging), service layer (registering the service tasks in the container), front controller (registering all the web related stuff in the container: RouteTable, WebContextFactory, ServerViewEngine, CommandRegistry), routing (setting up the routing table)

JP did a lot of cleanup and refactoring to achieve better separation of concerns and focusing on readability of the code.

Introducing the domain layer
Thoughts only:
"Service layer asks the domain layer for getting domain data!"

Parts of the domain:
  • Repositories
  • Aggregates
  • Entities
  • Value Objects
  • Factories
  • Specifications
  • Services
Three ways to get objects from the domain layer:
  • Repositories
  • Aggregates
  • Entities

JP introduced the repository he want to use in our application and created the basics.
We started to do out own experience with it and JP completed the repositories.
(I promise to mention it here the last time: Everything top down and writing the tests first! Seeing and doing it all the time is like getting itintravenous.)
When he came to the part of creating the DTO's base on the domain objects, JP introduced the interfaces for mapping data from one type to another type. I have to say that I like it! (May be you want to have look at his blog entry for that mapping.)


I'm not sure, but it was to somewhere between 9.00pm and 10.00pm when JP said that he wants to do the ORM and querying the data from the database today!
He coded down most of the stuff in an incredible speed. (You may read "day 4" of Kyle Baley's blog about ndbn. I definatly can't express it better!)

Completing and wireing up all together!

Afterwards he challenged us to complete the whole stuff: Mapper implementations for entities to DTOs, DataRow to entities, criteria to query, wiring up, smoke test, ...

3:33am : JP's music (high beats - working like heart pacemaker for us) and some RedBull keeps us alive!!!

It's the first time i do it all in an agile way; it felt really cool.

Now it is nearly 4.00am and the stuff works! Awesome day! I love it!

Now it's really time to go to sleep, because at 8:30am will (or when able to) start last day (sadly).

Wednesday, September 24, 2008

Nothin but .Net (Day 3)

It was a great day again!
JP gave us some tasks to complete in pair programming, test driven, of course.
Beginning in the morning, coding until afternoon and getting really deep into top down development and writing tests first makes this day absolutely wealthy to identify my own deficits.
I learned a lot (thanks to Michel for the inspiring and entertaining pair programming)!

I have to admit that we did not completed all the tasks, but Stefan and Björn developed the best point JP used to complete and refactor.

After supper (unfortunately the surroundings of the hotel where we do the training has a big lack of good restaurants) JP introduced the concepts of a container to get rid of the poor man's dependency injection. In less than one hour he completed a whole container wrapper which shields an underlying real container framework. He also prepared unit tests for us to implement a simple own container.
We did it in a few minutes, but we both were not sure that using Activator.CreateInsance(interface) during the resolving is a good solution.
How would you do this?
JP solution was to have registration items which calls an anonymous delegate to create the requested object.
Later he extended it with lifetime support.

Watching at JP working, everything looks so easy and logical, but I'm sure that I cannot redo by myself with this ease. Indeed a fact of missing routine.

At the very end (11.40pm) JP kicked us with some more container stuff and we all are happy that he is recoding the whole stuff, so we can retrain ourself ;-)

Sleep well!

Nothin but .Net (Day 2)

Puh, day 2 is finished! Now it's about 11.00pm and I'm absolutely exhausted. But the day was great, too.
JP started by introducing the front controller pattern. The goal was to have a plain old ASP.NET (if it is allowed to say so, regarding that ASP.NET MVC is still preview?) running with the front controller in a kind of MVC.
He gave us a lot exercises doing TDD on this project, of course emphasizing to use a naming that expresses the behavior.
Doing this individually or doing it with pair programming, always fun!
During these we covered state based testing and interaction based testing. Using a helpful set of extensions supporting a very good human readable testcode, I can imagine that I will able to get into this code base even a year later. Allow me encourage you to have a look at JP's blog posts about the BDD style of unit test.
Specially for the interaction based testing JP came up with several extension methods for Rhino Mocks also focusing on getting easy readable tests.
JP explained why he is starting projects with "UI first". This is a good way to have get UI signed of by the customer, even the code behind isn't full functional, but the customer is able to confirm that this is the result he wants to get. Starting with the UI leads us to develop this application top down, step by step digging deeper into functionality, getting more and more tests that covers nearly all of out code.
We learned that using the poor man's dependency injection can be extremely helpful to combine the ability of unit testing and simple usage of a class. (But we are prepared that there will come more this week -> containers!)
I have to admit: I have some experience with generics, but implicitly JP teached me that I know nearly nothing about that. I need to learn more about generics, absolutely!
The whole training class is hanging together the whole day and it's absolutely cool to get into more discussion during breakfast, lunch and supper.
If you know JP, you know this slogan "Develop with passion!", but I'm sure "Teaching with passion" fits perfectly also!
Now it's nearly midnight, I have to go to bed immediately and please forgive any typos ;-)
May be more tomorrow! Sleep well!