jenswinter.com
Software Development 24/7

Frühe Exits

August 11, 2008 23:24 by Jens

Genau wie Stefan bin ich ein Freund früher Exits. Sein Vorschlag sieht so aus:

public void DoSomething() {
    if (!a) {
        return;
}
    if (!b) {
        return;
}
    if (!c) {
        return;
}
    DoItRealy();
}

Ich hätte da aber noch einen kleinen Zusatz.

Die frühen Exits sollten so kurz wie möglich gehalten werden.
Bei frühen returns und throws handelt es sich um Guard Clauses, die nichts direkt mit dem Eigentlichen "Fleisch" der Methode zu tun haben und somit beim Lesen des Codes einen leichten Noise-Charakter haben. Das gefühlte Gewicht sollte m.M.n. so weit es geht auf dem wichtigen Teil der Methode liegen. Wenn ich z.B. wissen will, was darin passiert, will ich die Guards so schnell es geht überspringen können und nur bei Bedarf dort nachschauen.
Die Guards abzukürzen bedeutet, dass ich dabei sämtliche unnötigen Klammern weglasse. Das spart nämlich die eine oder andere Noise-Zeile ein.

public void DoSomething() {
    if (!a)
        return;
    if (!b)
        return;
    if (!c)
        return;
DoItRealy();
}

Oftmals habe ich auch die noch stärker abgekürzte Variante gesehen, in der das "return" in derselben Zeile wie das jeweils dazugehörende "if" steht:

public void DoSomething() {
    if (!a) return;
    if (!b) return;
    if (!c) return;
DoItRealy();
}

Das sieht auch sehr kompakt aus und ist ziemlich gut lesbar. Aber wie so Vieles ist das Geschmacksache.


Tags:
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Erste deutschsprachige ALT.NET Open Space Konferenz

August 10, 2008 13:46 by Jens

Da komm' ich gerade aus dem Urlaub zurück, und werde mit tollen Neuigkeiten überschüttet. Die beste Neuigkeit kam vom Stefan Lieser:

Am 18./19. Oktober wird die erste deutschsprachige ALT.NET Open Space Konferenz stattfinden. Der Veranstaltungsort ist die Mediencampus Villa Ida in Leipzig.
Es wird Diskussionen zu den folgenden Themen geben:

  • ALT.NET
  • Mobile Computing
  • Soft Skills

Ich bin auch besonders gespannt auf das Open Space-"Konferenz" Format.

Weitere Informationen bekommt man unter http://netopenspace.de.


Stefan Lieser: Software Design Principles

August 10, 2008 13:21 by Jens

Stefan Lieser wird am 16.09. als Redner bei der .NET User Group in Braunschweig zu Gast sein. Darauf freue ich mich besonders, da er einen Vortrag über Software Design Principles halten wird - ein Thema, das mir sehr am Herzen liegt.


Composite Application Guidance RTM gone live

July 4, 2008 06:26 by Jens

Not even a week after the release candidate had been published the final drops have been released.

So say Hello to the Composite Application Guidance (f.k.a. Prism) and get the bits here. The codeplex project homepage is at http://www.codeplex/compositewpf.


Prism RC1 released

June 28, 2008 15:02 by Jens

Today the Prism Composite Application Guidance for WPF team (Gosh, what a name!) published the first release candidate.

The Composite Application Guidance for WPF is designed to help you more easily build enterprise-level Windows Presentation Foundation (WPF) client applications. This guidance will help you design and build flexible composite WPF client applications – applications that use loosely coupled, independently evolvable pieces that work together within the overall application.

The release description states that the final release will be on MSDN within a couple of weeks.


Was ist ALT.NET?

June 24, 2008 22:56 by Jens

Hier mal mein Versuch den Begriff "ALT.NET" in einer Xing-Gruppe
(https://www.xing.com/app/forum?op=showarticles;id=7137858;articleid=7137858#7137858) zu beschreiben:

"Soweit ich das überblicken kann wurde dieser Begriff erstmals von David Laribee erwähnt und umschrieben:
http://laribee.com/blog/2007/04/10/altnet/

ALT.NET beschreibt eine bestimmte Einstellung des Entwicklers. Dieser zeichnet sich dadurch aus, dass er nicht bereit ist, sich Mainstream-konform zu verhalten. Vielmehr steuert er dagegen und ist ständig und aktiv auf der Suche nach besseren Wegen und Tools, um Ziele zu erreichen. Mit Wegen und Tools sind hier sämtliche Mittel der Softwareentwicklung gemeint. Das sind neben bspw. Entwicklungsumgebungen und Entwicklertools auch Programmiermethoden und Paradigmen. Ich würde sage, das Ganze hat mit Microsoft direkt nichts zu tun.
Obwohl sich viele Erkenntnisse der ALT.NET-Community gegen Microsoft und dessen vorgegebenen und empfohlenen Wegen richten. Das liegt aber eigentlich nur daran, dass Microsoft den größten  Einfluss auf die Entwicklergemeinschaft hat und somit den Mainstream definiert. Der brave .NET-Entwickler trabt da natürlich einfach hinterher, ohne sich zu fragen, ob das was MS vorgibt überhaupt das Beste ist.

Ein Beispiel:
Über die DataSet-Klasse gibt es z.B. tonnenweise Zeitschriftenartikel. Ein Designer dafür ist fest ins Visual Studio eingebaut. Ich würde das DataSet also als ziemlich "mainstream" bezeichnen. Trotzdem wird fast jeder mal so seine Schwierigkeiten damit gehabt haben.
ALT.NET ist jemand, der nach Möglichkeiten sucht, die Ziele ohne die Verwendung von DataSets effizient zu erreichen. (Es gibt natürlich auch Anwendungen, wo das DataSet das optimale Mittel ist.)
"

 


Deutschsprachige ALT.NET Homepage

June 24, 2008 22:39 by Jens

Die deutschsprachige ALT.NET Community hat nun neben der Google Group auch eine eigene Webseite. Sie ist unter http://www.altdotnet.de zu erreichen.


ReSharper 4.0 released

June 9, 2008 23:20 by Jens

The great guys from JetBrains finally released ReSharper 4.0. Congratulations for a great work the team has done.

If you are a C# developer and don't know ReSharper make sure to check it out. It will make your life so much easier.


Fancy UI controls considered harmful

June 4, 2008 23:39 by Jens
We are currently working on the very first iteration of our healthcare application. The goal for this iteration is to provide some basic means of navigation and a dashboard-like screen.

I was responsible for the navigation part. It should consist of a list of patients to select from, a menu-like panel to invoke use cases and some other rather minor things. A rather great deal of work has to be done to develop a basic underlying application framework. That doesn't leave much time to tweak the user interface and create nice-looking navigation parts.

My co-worker's task is to create a screen that shows some summary information including a chart to display some health data.
Today he showed me a first draft of the screen. It showed a very pretty chart. With animated lines and gradient colors. A typical WPF chart.

It looked very cool. But I didn't think it was a good idea to include such modern control as part of the first iteration. While all other parts of the app look pretty basic and simple, the chart will draw much of the test users' attention.

But that is not what I want to achieve with the first and very basic iteration drop. The primary aim should be to get as many meaningful feedback as possible. But I'm afraid the test users will get distracted and won't deliver as much support as would be possible.
Don't get me wrong here. This is unconscious behavior. The chart control will catch every tester's eyes. This is not what I want to achieve.

So our strategy is to include a simpler version of the chart first and upgrade its appearance along with all other user interface parts. This way we can make sure that the testers don't focus too much on only one part.
Tags:
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Bye, bye, Delphi

June 4, 2008 20:42 by Jens
Yes, finally I did it. I canceled my newsgroup subscription to the German Delphi newsgroups. There haven't been many discussions for a long time now that were of any interest to me.

I developed in Delphi for eigth years until I finally switched to the .NET platform and the C# camp two years ago. Since I worked at my new occupation I didn't write a single line of Delphi code. Nevertheless I still lurked the Delphi newsgroups. But now it's time to let go of Delphi.

So canceling the newsgroups subscriptions was a final step. So long, and thanks for all the fish!

.NET UserGroup Braunschweig

May 21, 2008 19:20 by Jens

Gestern war ich zum zweiten Mal zu Gast bei der .NET-User Group in Braunschweig. Wir hörten einen interessanten Vortrag über Game Development mit dem XNA-Framework.

Gefreut habe ich mich, dass ich bei der Verlosung ein Windows Vista Ultimate gewonnen habe. (Ich glaube, ich hätte diese Woche Lotto spielen sollen. Cool)

 


dotnet-gui.com Gewinnspiel

May 21, 2008 18:50 by Jens

Diesen Montag durfte ich mich über eine Lizenz für ein Paket der Bibliothek Infragistics NetAdvantage for WPF freuen. Bekommen habe ich diese als glücklicher Gewinner des dotnet-gui.com-Gewinnspiels.

Danke an Norbert und das dotnet-gui-Team. NetAdvantage werde ich gut gebrauchen können.

 


ReSharper 4.0 Beta

May 21, 2008 18:34 by Jens

ReSharper 4.0 has finally reached beta state. It can  be downloaded here.

If you want to know more check out this comparison of plain Visual Studio 2008 vs. ReSharper 4.0.

Here are some of the most important new features of ReSharper 4.0:

  • Full support for C# 3.0 and LINQ
  • Comprehensive insights into .NET Framework
  • Solution-wide code analysis
  • Code cleanup
  • New Refactoring
  • Multiple new productivity features
  • Smoother interaction with Visual Studio
  • ASP.NET speedup
For a detailed description of these features go to http://www.jetbrains.com/resharper/beta/beta_newfeatures.html

.NET Domain Driven Design with C#

May 18, 2008 21:09 by Jens

This weekend I received a copy of Tim McCarthy's ".NET Domain Driven Design with C#". I was waiting eagerly for this book. Special thanks go to my boss for sponsoring it. Smile

As I haven|t read the book yet, I cannot give a review. So I will leave the text of the back cover here:

"As the first technical book of its kind, this unique resource walks you through the process of building a real-world application using Domain-Driven Design implemented in C#. Based on a real application for an existing company, the project featured throughout the book focuses on the Domain Model and the framework that is being built to support it. Each chapter is broken down into specific modules so that you can identify the problem, decide what solution will provide the best results, and then execute that design to solve the problem. With each chapter, you'll build a complete project from beginning to end, offering you indispensable, hands-on practice at creating code that builds applications. What you will learn from this book  

  • When, why, and how to use Domain-Driven Design
  • How to design and build the initial Domain Model
  • What to do to achieve "Persistence Ignorance"
  • Ways to build a Repository framework for the Domain Model
  • Techniques for applying TDD to the Domain Model
  • How to apply the Model-View-ViewModel Pattern
  • How to build a client-side membership system
  • What to do to synchronize the client application with the server
This book is for experienced C# .NET developers who want to improve their techniques for writing applications that perform well and are highly scalable."


Since we are currently starting a brand new WPF project that will cover all of the things that come in the book, it arrived just in time. Cool And I hope it will be a good help for us.


Show me your diploma

April 7, 2008 20:52 by Jens

Today I learned that you are not allowed to know certain things if you don't have a degree.

Or in other words, there is no way you can know certain things if can not show me a diploma certificate.