.NET Software Development

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!

Tuesday, September 23, 2008

Nothin but .Net (Day 1)

Nothin But .NET

May be you have read already: Jean-Paul Boodhoo is currently here in Germany giving his great Nothin but .NET training.
I am happy to join and to learn a lot of .Net stuff, come into discussion with JP and the other attendees.
The course is very intense, that means: Starting the day at 8.30 after breakfast, training and coding sessions the whole day until 10.00pm (or later)!
JP sent a lot of stuff for course preparation: A list of prerequisites (VS2008, Resharper, ...), a screencast explaining how to prepare and configure the machine and - and that's what I have never seen before with a training - some homework exercise to get into TDD. The exercise consists of a prepared unit test (of course, written in JP's BDD style) together with skeleton of a class to test. I was our job to complete the class to all the unit test running. This was really a cool preparation and i got appetite for more!

Day 1:
After a small introduction JP started with having a look at our exercise results and picks up one to refactor it more and more. The intense use of lambda expressions to build a fluent interface for searching and sorting signals: that will be a tough week! And, a lot of bloggers mentioned already, JP is fast, really fast in coding. I can't imagine where he stores all the keyboard shortcuts for VS, R#, GVIM, Vimperator, ...
We covered a lot of topics and can' summarize all, but there some of them I definately want to dig in more.
Here a small list of my coding highlights from day 1:
- Specification pattern
- Interface based programming
- Coding by intention
- Don't start with inheritance, refactor to inheritance
- Extension methods are also available for .Net 2.0

I will do my very best to continue blogging during this week! But forgive me if I fall asleep at the keyboard ;-)

Thursday, June 12, 2008

Do you know "Bear Programming"

If you are a software developer you are probably familiar with a situation like this:
You are working on some code, but it refuses to do what you want and you are going to become crazy! This is a point where you ask a colleague for help. Now, what often happens, during the explanation of your problem to your colleague: you see the solution by yourself!
Do you know this? (I'm sure you do!)

Then have a look at this post of Gojko Adzic and his thoughts about Kuniaki Igarashi's presentation on Omoiyari-Driven Development (ODD)!

I totally agree with him!

So let us convince our managers that one peace of our equipment has to be a

Friday, February 1, 2008

Unit Testing: What should I test?

I had some discussions with my colleagues about what to test in unit tests.

I have to admit that it was always theoretical, because we didn't have any real project experience with it. But we are migrating some VB6 stuff to .NET and therefore it is an important topic for us.
But the most emotional discussion was about: Should i test internals or only the public interface?

I would like to cite Derik Whittaker final statement in his comparison, because that's exactly my point of view: "At the end of the day this comes down to a personal/philosophical decision and both are better then the alternative....NO TESTS."

Friday, December 14, 2007

Xmas is coming...

.. when you walk arround, you can see more and more that xmas is coming.
There are flashing lights in the windows and a lot of trees are decorated so wonderful.
But what about all the applications and their windows we use?
Boring! Isn't it?

Now DevExpress has some funny stuff for this season:


Shouldn't every application have skins like that?
Imagine what is possible! Don't think only on xmas. What's about easter, summer, helloween, carnival, ...
... or even local events like the bavarian "Oktoberfest".

Isn't it wonderful?

Wednesday, December 5, 2007

The force will be with you...

Do you know ReSharper?


Itself says it is "The Most Intelligent Add-In To Visual Studio".
I have had a try and I'm really impressed!
May be the most of you have heared and/or had a chance to run a trial.
Have a look at the new demo (Jedi Coding) Ilya Ryzhenkov has published!

If you dare to have a look, keep in mind: Nothing is sharper than a lightsaber!
Powered By Blogger