Bill Blogs in C#

Bill Wagner discusses C#, LINQ, and other items of interest

August 2005 - Posts

Effective C# is available in Hungarian

I got yet another suprise from Addison Wesley in the mail yesterday.  This one contained a copy of Effective C# in Hungarian:

If you prefer to read in Hungarian, you can purchase the book here:



The Effective C# Hungarian page
To view the synopsis, or purchase.

Posted by wwagner | with no comments
Filed under:
.NET Framework Standard Library Annotated Reference Vol II

I received a care package from Addison-Wesley the other day: My reviewer copy of the .NET Framework Standard Library Annotated Reference, Vol 2 (SLAR II).

This is a reference book, and as such, it is very dry reading. In fact, much of the text is verbatim from the ECMA standard for the pertinent portion of .NET framework library (in this case, Networking, Reflection, and XML processing). The real value in this book is in the annotations. There are many annotations on the classes, members, and namespaces documented here. These comments are everything from historical notes, reasons for inclusion (or exclusion of other possible features), design goals, and even the occasional apology where one of the framework designers felt they should have done better.

To close, I’ll quote myself from the inside cover: “The .NET Framework Standard Library Annotated Reference is the one reference you really need when you use the .NET Framework library. The annotations provide clear insight into the design choices that the library development team made when building the library. Those explanations will guide you to the best design choices for your own application code.”



SLAR II page at Addison-Wesley
More information on the book
SLAR II page at Amazon
Well worth the money
Posted by wwagner | with no comments
Filed under:
A brief commercial interlude

Barnes & Noble online is running a promotion with Pearson Publishing. Pearson is the parent company for several notable names in the tech publishing business: Addison-Wesley, Prentice Hall, and Sams are among their best known brands. 

Effective C# is listed among the sale title, so I posted a note about it.

So go buy a tech book of your choice. But don't delay too long.  The promotion ends September 30.



The Pearson - Barnes & Noble promotion
Books from Addison-Wesley, Prentice-Hall, and Sams
Effective C# at B & N
My book at B & N (on sale)
Posted by wwagner | with no comments
Filed under:
Dave Donaldson wrote this, and I will be using it as I develop useful snippets.

David Donaldson, one of the top .NET guys in our region, has created CodeKeep, which is a cool way to store code snippets (regardless of language).

It’s a very useful application, part web based. David also wrote a VS.NET 2003 add-in that you can use to find your own, or public snippets. I’ve created an account, but I’ve not had enough free to add any snippets (yet).But I will. You should check it out, it’s a useful service, and as the library grows, it will only get better.

My only question: When can I have the VS2005 add in? <smiling>



The code keep homepage
Start here
Dave's explanation of Code Keep
Read what Dave has to say about creating it
Posted by wwagner | with no comments
Filed under:
An overview of some other features in C# 2.0

I've got a new article published on .NET Insight. Here's the introduction:

"You've likely heard about the four major features added to the C# language in version 2.0: Generics, Iterators, Partial Types, and Anonymous Delegates. But many other features were added to this new version of C#. These other features will help you express your designs more clearly, in less code. You should become familiar with these enhancements to your favorite language now. That knowledge will help you create code today that can be easily enhanced tomorrow. You want your code ready for C# 2.0 when you are."

You can read more at the link below



The article
You need to register, but it is free
Posted by wwagner | with no comments
Filed under:
In which I comment on a JDJ editorial

Calvin Austin wrote an editorial (I can’t call it an article because there are too many factual errors) on C# asserting that C#’s best days are behind it.

I waited for a bit to post a response on this. (I had to think through my thoughts.) This also gives me the ‘last mover’ advantage: Check the links below for several other responses.

As for me, I’m not going to try and make a point-by-point argument on the relative merits of C# and Java. I haven’t used Java professionally in 4 years, so my information is somewhat rusty.

Instead, I’ll give my thoughts on the C# community, and where it is, and what’s coming next. C# is still a relatively young language, so I believe there will likely be continued improvement over the next five years (or even more). The same is true for other new languages: Java, Python, and F# come to mind. If you crave stability above all else, go with a mature language like C, Pascal, or even FORTRAN. But, language improvements does not necessarily mean you need to churn your own projects. I’ve compiled many of my C# 1.x projects in C# 2.0 without any changes at all. I’m sure that many of my Java colleagues would say the same about their experience moving from Java 2 through 3, 4 and Java 5. It’s called backward compatibility, and most language designers view it as a good thing. Calvin’s implication that C# and .NET move too fast for corporate adoption makes it sound like all of us are constantly churning code to move our apps from 1.0 to 1.1 to 2.0. It’s just not true.

Interestingly, the same can be said for the Java language. And Calvin says as much, although he slants it quite well. In two successive paragraphs, he says that C# has been under constant development, slowing corporate adoption, and that C# has not kept pace with improvements to the Java platform. Regardless of your bias, that argument is simply illogical: C# moved too fast, so use Java, which, by the way, moved faster.

Some of Calvin’s other statements should be examined under much closer scrutiny (whether you’re looking at Java vs. .NET, or any other decisions. Calvin says the following:

While developers had to get budget approval for MSDN licenses, their Java colleagues were able to deploy a system for free. Now with the advent of a new crop of open source J2EE application servers to follow JBoss, the justification for a team to spend thousands of dollars on basic development tools becomes harder, especially if it means a choice between deciding on a new laptop and a renewal of your existing desktop tools.

First, remember that time is money. I’d rather spend the money on tools and be more productive than mess around with large numbers of ‘free’ tools that almost work, and require a day or more to get them working. This is true for .NET development, or Java development. But that’s my opinion. Your language choice does not lock you into a make vs. buy camp. If you are in the Java camp, you can choose between free or open source tools (Eclipse comes to mind) or purchase tools (Borland’s JBuilder). You have the same choice as a .NET developer. You can use the VS.NET IDE, or Borland’s C# Builder, or choice #Develop (http://www.icsharpcode.net/OpenSource/SD/) for free.

A similar statement can be made about the ability of source code libraries for .NET. The enterprise library is a rich enhancement to the .NET framework, and it’s free. You can also participate in its evolution (http://msdn.microsoft.com/practices/). There are also a number of commercial libraries available for .NET (Dundas Chart, Infragistics libraries to name a few).

The bottom line: tools cost (or availability) is not a real factor in your language or platform choice. You can choose to buy commercial tools, or use free tools with platform. And, with both platforms you can influence the direction of the free community based tools.

In the end, I’m glad that C#, Java, Python, and many other developer languages all have strong community support. It keeps the vendors motivated. As an application developer, I want the best platform and tools I can have. My tools vendors know they have competition. They know I have options. That means improvements for many years (in C#, in Java, and in languages and tools we don’t even know exist yet). Misinformation like Calvin’s doesn’t help anyone.



The original editorial
You've got to be kidding...
Christian Nagel's comments
Discussion on C# 2.0, 3.0
Michele Leroux Bustamante's comments
She's used both Java and .NET...
Jon Box's comments
arguing point by point
Steve Smith's comments
once again, arguing point-by-point
Posted by wwagner | with no comments
Filed under:
Balena & DiMauro: Practical Guidelines and Best Practices for Visual Basic and Visual C# Developers.

Yes, I have been reading quite a bit.

This is a very good book for relative newcomers to .NET development. On the one hand, if you simply follow all the guidelines Francesco and Giuseppe present, you will be a very good.NET developer. The guidelines are an accurate representation of the accepted best practices for .NET development. There are over 700 tips and topics, so the topics do cover just about all the possible contingencies.

What is missing from this book is the justification for each topic: Why should you follow it, and what pitfalls await if you don’t? More importantly, without more justification for each recommendation, it’s hard to learn where the exceptions are or might be. And, there are almost always exceptions.

In the end, I would recommend this book to inexperienced .NET developers, or if you are looking for a set of guidelines to adopt in a corporate setting. With some annotations for the exceptions your group has, it’s a solid start. However, if you already an experienced .NET developer, this book won’t make you great.



The book page on Amazon
Should you want to buy it.
Posted by wwagner | with no comments
Filed under:
Or, is it a review?

Brad Abrams and Krzysztof Cwalina have finished writing "Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries". 

I was lucky enough to be one of the technical reviewers for this manuscript, so I've already read it.  From that standpoint, I can say it is a one of those must-have books for your .NET library. You'll learn rules and guidelines for Type Design, Member design, designing for future enhancements, error handling and exceptions, and the most common design patterns used in the .NET framework.

You can read this book with two different hats.  One the one hand, it will help you understand the guidelines followed by the .NET framework team. This will help you use the framework more efficiently. You'll know much more about why the framework is organized the way it is, and why the framework works the way it does. In addition, it will give you a much deeper understanding about how to create software libraries that are easier for others to use.

Most of all, this book is based on experience designing reusable frameworks:  Brad and Kryzystof have been instrumental in three releases of the CLR and the base libraries (1.0, 1.1, and the upcoming 2.0 release).  From that standpoint, they know what works, and where they have made mis-steps. 



The book homepage at Addison-Wesley
Learn more about the book, or buy it from A-W
The book homepage at Amazon
In case you'd prefer buying it there.
Brad Abrams blog entry
Brad give his thoughts on the book.

Posted by wwagner | with no comments
Filed under:
GDI+ can help distinguish your application from your peers

I wrote an article showing some techniques to create different presentation styles using .NET and GDI+:  things like transparent backgrounds, different irregular shaped windows, toast popups, and notify icons.  The kinds of things that occasionally can really make a difference in your application's presentation.



Spice it up
The article is online here.
MSDN September contents
There is lots of good things here
Editor's announcement
Stephen Toub blogs about the new issue.
Posted by wwagner | with no comments
Filed under:
Keith Brown - The .NET Developer's Guide to Windows Security.

This book is divided into six sections. Most important is “The Big Picture”. Every developer (whether you use .NET, or another platform) should understand this area.

Next is a set of topics on Windows Security Context, and Access Control. You will refer to this section often if you are doing .NET development.

The last two sections are specific to certain applications or components: COM+, Network Services. Finally, the ever-popular miscellaneous section covers those topics that defy classification.

Brown’s treatment of the subject is broad. You should not be under any misconception that this book will make you an expert on security (either Windows, or .NET). But, it will help you remember the issues you need to remember in order to produce software that does not increase the attack surface of your customer’s machines. That’s the strength of this book. You will not need every recommendation for every application you develop, but you will need to remind yourself of these issues, and make sure you have thought about those issues.

The only weakness in Brown’s book is the low-level organization, and the corresponding Item titles. Too many of the titles describe the question that the item answers. (For example, “How to Create a Windows Principal?”) I’d rather see the titles organized around the tasks I need to perform and consider. Why do I need to create a windows principal? When do I need one? I’d like the Item titles to help me know when I need to dive deeper into a given topic.

As I said at the top of this review, “The .NET Developer’s Guide to Windows Security” should be required reading for every .NET developer. It’s already earned a place of prominence on my bookshelf. I browse the table of contents repeatedly during development. It reminds me of the issues I need to consider when I make important design decisions.



Keith's homepage for the book
More about the book online ( RSS Feeds for updates )
The book page at A-W
Keith Brown's book
The Amazon page
You could buy it here.
Posted by wwagner | with no comments
Filed under: