The Artima Developer Community
Sponsored Link

.NET Buzz Forum
PM Duties Episode IV: The template strikes back...

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eric Gunnerson

Posts: 1006
Nickname: ericgu
Registered: Aug, 2003

Eric Gunnerson is a program manager on the Visual C# team
PM Duties Episode IV: The template strikes back... Posted: Aug 18, 2003 10:44 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Eric Gunnerson.
Original Post: PM Duties Episode IV: The template strikes back...
Feed Title: Eric Gunnerson's C# Compendium
Feed URL: /msdnerror.htm?aspxerrorpath=/ericgu/Rss.aspx
Feed Description: Eric comments on C#, programming and dotnet in general, and the aerodynamic characteristics of the red-nosed flying squirrel of the Lesser Antilles
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Eric Gunnerson
Latest Posts From Eric Gunnerson's C# Compendium

Advertisement

One of the things I own for the C# team is the project system. For this, I'm what's known as a relationship PM, which means that I'm responsible for something but there's no C# team that does project system work. My job is to figure out what the C# user needs and drive them to the VS Core project team.

There are lots of good things coming, most of which I can't talk about until PDC. One thing I can talk about is the C# project templates, which control what you get when you create a new project or add a new item to an existing project. So, I've been looking at what code you get, and deciding how to change it.

Here's the VS 2003 version of a console application:

using System;
namespace ConsoleApplication1
{
	/// 
    
    
        /// Summary description for Class1. /// 
    
    class Class1 { /// 
    
        /// The main entry point for the application. /// 
    
    [STAThread] static void Main(string[] args) { // // TODO: Add code to start application
    here // } } }

 There's a lot of cruft in that template. Here are my notes:

  1. The namespace provides little utility at all, as you never refer to this class from outside.
  2. The XML comment for Class1 is useless, for the same reason.
  3. Why "Class1"? How descriptive is that?
  4. The XML comment on Main isn't useful, because Main is private and can't be called.
  5. The XML comment on Main provides no useful information. If you don't know that Main() is the entry point for an app, then you aren't going to be helped by the comment.
  6. The command line args aren't used by most apps.
  7. The TODO comment is really, really useless. It's mind-blowingly useless, like the directions that are on toothpick boxes, or the label on my blow dryer that warns me not to use it when sleeping. I'm trying to picture the scenario. There I am, working on my console application, and it doesn't work. I'm perplexed. What should I do? Do I need to run the debugger? Should I call a co-worker over? Maybe I'll check the task-list first. Oh, here's a TODO comment, and it says that I need to write some CODE to make my application work. Thanks, Visual Studio.

Here's the Whidbey version:

using System;

class Program
{
	static void Main()
	{

	}
}

It's just a tiny bit cleaner.

I'm making similar changes to the other templates, get rid of useless comments and just generally simplifying things. Windows Forms projects will now use partial classes, with the user code in one file and the designer code in another file.

Note that these changes will not be present in the PDC bits, but will show up in the beta.

 

Read: PM Duties Episode IV: The template strikes back...

Topic: Solution configurations & project configurations Previous Topic   Next Topic Topic: Google Toolbar 2.0 Released

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use