CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Darrell Norton's Blog [MVP]

Fill in description here...

March 2005 - Posts

  • List of Reflector Addins

    John Papa recently posted about how cool Reflector is. Another cool part is that Lutz has built a plugin architecture into Reflector. I had links to a few addins, but here is a complete list of Reflector addins:

    Reflector.FileDisassembler
    This add-in can be used to dump the disassembler output to files for any Reflector supported language.
    Website Download

    Reflector.CodeMetrics
    Analyses .NET assemblies and shows design quality metrics. The menu item is registered under the "Tools" menu.
    Website Download

    Reflector.SQL2005Browser
    This add-in allows to browse .NET assemblies stored in SQL Server 2005 (Yukon) databases.
    Website Download

    Reflector.DelphiLanguage
    The Delphi view that is used inside .NET Reflector provided as a language add-in.
    Website Download

    Reflector.McppLanguage
    This add-in extends Reflector with a Managed C++ language rendering module.
    Website Download

    Reflector.ChromeLanguage
    This add-in extends Reflector with a Chrome language rendering module.
    Website Download

    Reflector.Diff
    This add-in shows differences between two versions of the same assembly.
    Website Download

    Reflector.VisualStudio
    This program is hosting .NET Reflector inside the Visual Studio 2003 IDE. Run Reflector.VisualStudio.exe to register the add-in with Visual Studio.
    Website Download

    Reflector.ClassView
    Shows class definitions as plain text with color coding. The menu item is registered under the "Tools" menu.
    Website Download

    Reflector.CodeModelView
    This add-in shows the underlying code model objects for a selected node in .NET Reflector. The menu item is registered under the "Tools" menu.
    Website Download

    Reflector.FileGenerator
    This add-in can be used to dump the disassembler output to files for any Reflector supported language.
    Download

    Reflector.Graph
    This add-in draws assembly dependency graphs and IL graphs.
    Website Download

    Reflector.OpenRunningAssembly
    Opens an assembly or dependency from a process running on the system. The menu item is registered under the "Tools" menu.
    Website Download
    Posted Mar 30 2005, 10:16 AM by darrell with 10 comment(s)
    Filed under:
  • Welcome to new CodeBetter blogger John Papa!

    A hearty CodeBetter welcome to John Papa! You might recognize John as a frequent author of the Data Points column in MSDN Magazine or as the author of several books about ADO!  (Yes I'm late to the party, sorry, but I've been busy.)

  • How to fix the software development industry

    Jay has some musings on Bob Reselman's Coding Slave book. If you've read Coding Slave (now a free download), you'll realize Bob was proposing one method of fixing the current state of software development by proposing a programmers guild. Jay offers two suggestions, work-life balance and religion/spirituality. And Steve McConnell thinks it should be industry certification.

    In order to propose a solution, we have to look at the problem in more depth. A programmers guild wouldn't work due to a prisoners' dilemma problem. If everyone cooperates, we can do great things. But the individual motivations ALWAYS reward not cooperating. Someone will say, if I don't work for the programmers guild, I can get a little less money for a lot less work because I don't have to follow those procedures and don't have to pay dues. And some company somewhere will take a defector up on that offer. Work-life balance generally works only for employees with family. Younger employees are generally motivated by money, and dedicated developers are motivated by recognition, with all good software developers being motivated by the technical challenge. And unlike medicine, where the backers of certification are usually the state board, the IEEE certification is backed by training companies (Can you say conflict of interest? I knew you could.).

    No, the foundational problem is money. Everyone has heard the "great programmers are 10 times more productive" thing. And everyone that quotes this immediately follows it up with "and since you only have to pay them twice as much, great programmers are a steal!" Even though great programmers are motivated by more than money, who reading this wouldn't mind a little extra cash in their paycheck? Right.

    In addition to paying great programmers more, we need to pay crappy, or maybe "less sophisticated", programmers much less. The reason that companies only want to pay 10x productive programmers 2x as much is because of all the "dead wood" that they have to pay too much for. Haven't you ever had a negative producer on your team? Just remember that the company was paying them almost as much as they were paying you, and all they were doing was slowing you down. It upsets companies just as much as it bothers you.

    Check out the following figure of value and salary. The red area is wasted money. This is the salary and benefits companies pay for people that are not contributing as much value as they are extracting from the system. (As an aside, nature has a term for life forms that do not give back to the host....)  The purple area is the unvalued contribution, also known as the CEO's bonus zone. The bigger the purple area, the bigger the CEO's bonus.

    What the industry needs to do is to bring the two lines more into alignment. For example, in the following image the salary line is more closely matched to the contributed value line. This means great programmers get paid a lot more. This also means that bad programmers get paid a lot less. This would force out of the market those programmers that expect to be paid a lot but that contribute very little.

    Some might argue that the lines should match exactly. This will never happen since nobody, programmers nor businesses, have perfect information about the value line. Also, there will still be some entrants into the market that will be paid slightly more than they are worth, because they will be expected to move up the curve quickly. This is analogous to sports rookies getting paid obscene amounts of money when they won't take their team to the Super Bowl for 4 more years.

    So that's my proposal for improving the software development industry. How exactly we go about doing that is another matter.

    Posted Mar 29 2005, 06:51 AM by darrell with 23 comment(s)
    Filed under:
  • Sysprep your virtual machine

    Instructions on how to sysprep your virtual machine images. I wish I had done this the first time. :)
    Posted Mar 28 2005, 11:48 AM by darrell with no comments
    Filed under:
  • TechEd 2005: Early breakout session info posted

    Some preliminary info on the breakout sessions has been posted to the TechEd website. One that looks interesting is Ted Neward's ARC314  Passing Messages: A Flexible, Powerful and Extensible Communication Model. Here's the abstract:

    "Over the last decade, focus in inter-process communication has centered on Remote Procedure Calls (RPC) and its object-oriented equivalents. In this session, we discuss the benefits of using another communication approach, messaging, to gain flexibility, scalability, and integration benefits that traditional RPC simply can't provide."

    Anyone see any other compelling sessions? Let me know in the comments or drop me an email.

    Posted Mar 28 2005, 07:58 AM by darrell with no comments
    Filed under:
  • UML 2 diagrams and guidelines

    Scott Ambler has an excellent set of pages on the diagrams of UML 2.0. Each diagram has an entire page on what the diagram shows and a set of diagram guidelines. The learning priorities are right on, too. Here's the table:

    Diagram

    Description

    Learning Priority

    Activity Diagram

    Depicts high-level business processes, including data flow, or to model the logic of complex logic within a system.  See UML Activity diagram guidelines.

    High

    Class Diagram

    Shows a collection of static model elements such as classes and types, their contents, and their relationships.  See UML Class diagram guidelines.

    High

    Communication Diagram

    Shows instances of classes, their interrelationships, and the message flow between them. Communication diagrams typically focus on the structural organization of objects that send and receive messages.  Formerly called a Collaboration Diagram.  See UML Collaboration diagram guidelines.

    Low

    Component Diagram

    Depicts the components that compose an application, system, or enterprise. The components, their interrelationships, interactions, and their public interfaces are depicted.  See UML Component diagram guidelines.

    Medium

    Composite Structure Diagram

    Depicts the internal structure of a classifier (such as a class, component, or use case), including the interaction points of the classifier to other parts of the system.   

    Low

    Deployment Diagram

    Shows the execution architecture of systems.  This includes nodes, either hardware or software execution environments, as well as the middleware connecting them.  See UML Deployment diagram guidelines.

    Medium

    Interaction Overview Diagram

    A variant of an activity diagram which overviews the control flow within a system or business process.   Each node/activity within the diagram can represent another interaction diagram.   

    Low

    Object Diagram

    Depicts objects and their relationships at a point in time, typically a special case of either a class diagram or a communication diagram. 

    Low

    Package Diagram

    Shows how model elements are organized into packages as well as the dependencies between packages.  See Package diagram guidelines.

    Low

    Sequence Diagram

    Models the sequential logic, in effect the time ordering of messages between classifiers.  See UML Sequence diagram guidelines.

    High

    State Machine Diagram

    Describes the states an object or interaction may be in, as well as the transitions between states. Formerly referred to as a state diagram, state chart diagram, or a state-transition diagram.  See UML State chart diagram guidelines.

    Medium

    Timing Diagram

    Depicts the change in state or condition of a classifier instance or role over time.  Typically used to show the change in state of an object over time in response to external events. 

    Low

    Use Case Diagram

    Shows use cases, actors, and their interrelationships.  See UML Use case diagram guidelines.

    Medium
  • RSS Blog Reader plugin for Visual Studio

    I've blogged about Morrison Schwartz freeware programs before, but they've recently added an RSS Blog Reader plugin that lets you blog from within Visual Studio.

    Features include:

    • Support for folders or individual feeds
    • Drag-and-drop support for feeds and folders
    • Preview a new feed as you add it
    • Easy control of all feed properties
    • Automatic and on-demand refresh of feeds
    • Automatic feed search based on a site URL
    • Keyword searching for published feedsusing Synic8
    • Keyword search within all subscribed feeds
    • Import of feed subscriptions from an OPML file
    Posted Mar 25 2005, 11:37 AM by darrell with 3 comment(s)
    Filed under:
  • Working with Visio 2003

    I’ve been doing a lot of Visio work lately, working on presentations for my employer. Here is a list of useful Visio stencils, downloads, and even a blog:

  • IronPython 0.7 Released!

    Jim Hugunin announced IronPython 0.7 today at PyCon. Apparently it takes advantage of .NET 2.0 features.
    [via Jason Zander]
    Posted Mar 23 2005, 12:41 PM by darrell with no comments
    Filed under:
  • TechEd 2005: I'll be there

    I'll be at TechEd 2005! I will also be staying at the JW Marriott. I'm stoked to finally meet a bunch of y'all (yes, I am from the south) bloggers in person! If you're going, watch my blog and I'll post my schedule (as soon as I know it) so we can meet up.

  • Scott Bellware is right, but don't sacrifice the speed

    Scott Bellware drops an excellent loooong post TDD, Java, and the Microsoft Visual Developer. I couldn’t have said it better myself, nor would I have tried considering how loooong the post is. (Did I mention it was a long post?)

    The one thing, though, that Microsoft developers cannot lose in their pursuit of better coding practices is speed of development. If we end up similar to the Java camp in length of development time, we’ve lost the speed advantage and made up for it by NOT being cross-platform compatible (in the general sense). Everything we do has to be tempered by this fact.

    Posted Mar 21 2005, 01:46 PM by darrell with 1 comment(s)
    Filed under:
  • Change all database object owners to DBO - now runs changeOwner for you

    This SQL Server script comes to you courtesy of Geoff Appleby!

    Change All Object Owners to a given account (usually dbo) if not already owned by the SA (change the @NewOwner variable to another username string if you don't want DBO to own everything):

     1 declare @ObjectName varchar(256)
     2 -- we are only interested in USER Objects
     3 -- not already owned by 'sa'
     4 -- we don't want keys and constrainst
     5 set @ObjectName = (
     6   select top 1 [name] from sysobjects
     7   where uid <> SUSER_SID('sa')
     8   and [type] in ('FN','IF','P','TF','U','V')
     9   )
    10 declare @ObjectOwner varchar(256)
    11 declare @ObjectFullName varchar(512)
    12 declare @NewOwner varchar(256)
    13   set @NewOwner = 'dbo'
    14  
    15   -- default to 'dbo' if null
    16   set @NewOwner = isnull(@NewOwner, 'dbo')
    17  
    18 while @ObjectName is not null
    19 begin
    20   select @ObjectOwner = USER_NAME(uid) 
    21     from sysobjects where [name] = @ObjectName
    22   set @ObjectFullName = @ObjectOwner + '.' + @Objectname
    23   PRINT 'Changing ownership of ''' + @Objectname + 
    24     ''' from ''' + @ObjectOwner + ''' to ''' + 
    25     @NewOwner + ''''
    26   execute sp_changeobjectowner @ObjectFullName, @NewOwner
    27   set @ObjectName = (select top 1 [name] from sysobjects
    28     where uid <> SUSER_SID('sa') 
    29     and [type] in ('FN','IF','P','TF','U','V'))
    30 end
    
    Update: Fixed formatting.
  • Lasik follow-up

    Today I went to an optometrist for a 1-week (actually 6 days) follow up to my Lasik surgery. After 6 days I have 20/15 vision. This means what most of you suckers can see at 15 feet, I'm 5 feet behind you reading it, thus allowing me to be firmly in the peanut gallery. :)

  • Why should you move to ASP.NET 2.0?

    Someone recently contacted me via my blog and asked some good questions on whether to move to ASP.NET now since 2.0 is coming out soon. I think these answers are generally helpful, so I'm posting them here.

    I have been a web developer for about 7 years. I do most of my work with PHP although I have used Classic ASP, as well as some Java/Servlet stuff. I have been looking into ASP.NET and have tinkered around with a little coding in VB.NET. I have never used VB before but it seemed like Visual Studio .NET works best with VB.NET with the Intellisense and whatnot. As I have been reading up on ASP.NET it looks like the 2.0 release is really going to change things.

    1. Should I wait to get involved in .NET until the 2.0 stuff is release? Well all my 1.1 knowledge be outdated and useless when 2.0 comes out? Will 1.1 apps still run in a 2.0 environment?

    Learning ASP.NET 1.1 is not a bad thing. If you learn ASP.NET 1.1 you will be able to support all ASP.NET web sites out there (the differences between ASP.NET 1.0 and 1.1 are minor). Microsoft has also written a detailed guide on Migrating from ASP.NET 1.x to ASP.NET 2.0. ASP.NET 2.0 will also be fully backwards compatible with ASP.NET 1.1. So there won’t be a big “conversion” effort, you can just start new sites in ASP.NET 2.0 once it is publicly available. If you really want to wait until ASP.NET 2.0 and since you’ve mentioned you have done ASP development before, there is a guide written on Migrating from ASP to ASP.NET 2.0.

    You can work with ASP.NET 2.0 now using the Visual Web Developer Express beta, but realize that it is in Beta and has not been fully completed. It is also important to realize that there is not a “go-live” license associated with the Beta version. Microsoft recently has given a go-live license to Beta 2 of a given technology.

    2. From the brief amount of time I have spent programming .NET (I use Visual Studio .NET 2003) it looks like all the code behind files get compiled into 1 dll. This is a neat idea but the problem I had was that if I am wokring on several different parts of the site at once then compiling the whole site to make one little change is a huge pain. For example, I was making a simple project management application that would let me keep track of my projects and the tasks for each project. I got everything working, compiled my code behind files into one dll and published my application to the server. Then I started working on another feature of the application that would let me email reports of my logged time for each task to my clients. As I was working on that, I realized that I had a little problem with my application and needed to adjust edit task function a little. This was just a minor adjustment that would have taken about 5 mins to fix. The problem was that I had all this unfinished code for emailing reports that wasn't ready to compile. So I ended up going through the new files and I "excluded" them from the project which was a huge pain. Then a made my little update to the edit task function, compiled, and uploaded my .dll. Then I had to go back an include all my new files back into the project. It was this incident that caused me to really rethink this .NET thing and seek some advice form someone who has more experience than I have. How do you avoid this problem? Do you use VS.NET and code behind?

    The compilation model has changed in ASP.NET 2.0. The full details can be found here, but basically you have 4 options:

    ASP.NET 2.0 offers four different compilation models for a Web application:

    • Normal (ASP.NET 1.x)—In a normal ASP.NET Web application, the code-behind files were compiled into an assembly and stored in the /bin directory. The Web pages (ASPX) were compiled on demand. This model worked well for most Web sites. However, the compilation process made the first request of any ASP.NET page slower than subsequent requests. ASP.NET 2.0 continues to support this model of compilation.
    • Batch-compilation—In ASP.NET 2.0, you can batch-compile any application with a single URL request. As with ASP.NET 1.x, batch compiling removes the delay on the first page request, but creates a longer cycle time on startup. In addition, batch-compilation still requires that the code-behind files are compiled pre-deployment.
    • Deployment pre-compilation—A new feature of ASP.NET 2.0 allows for full compilation of your project prior to deployment. In the full compilation, all of the code-behind files, ASPX pages, HTML, graphics resources, and other back-end code are compiled into one or more executable assemblies, depending on the size of the application and the compilation settings. The assemblies contain all of the compiled code for the Web site, and the resource files and configuration files are copied without modification. This compilation method provides for the greatest performance and security, at the cost of removing all of your ability to modify the Web site post-deployment. If you are working with highly visible or highly secure Web sites, this option is the best choice for final deployment. However, if you are building a small site running on your local intranet, and the site changes frequently, full pre-compilation may be overkill.
    • Full runtime compilation—At the other extreme of deployment pre-compilation, ASP.NET 2.0 provides a new mechanism to compile the entire application at runtime. That is, you can put your uncompiled code-behind files, and any other associated code, in the new code directory and let ASP.NET 2.0 create and maintain references to the assembly that will be generated from these files at runtime. This option provides the greatest flexibility in terms of changing Web site content, at the cost of storing uncompiled code on the server.

    Code-behind has also changed in ASP.NET 2.0. ASP.NET 2.0 takes advantage of partial classes to create a different coding model that many are calling code-beside (since you have 2 classes, or really partial classes, that work together instead of using inheritance), but Microsoft is still calling code-behind. Find out more detail on the coding models.

    Both of these taken together, along with a better source code control tool and configuration management (branching your code would have solved the main part of the problem) would address all of the issues you had.

    And yes, I do use Visual Studio for all my .NET development.


    3. Do you have any thoughts about whether I should bail on VB.NET and instead start doing C# development? I visited the site that you link to about converting VB.NET code to C# and that site seemed to suggest that C# was a much better language. I have also read that if you aren't sloppy about how you write your VB.NET code and use Option Strict and so forth then there really is no difference other than syntax. What thoughts do you have about this? I read your website about how the language doesn't matter when it comes to performance but what about when it comes to using VS.NET? Do you think VB.NET is the better language in terms of using it with VS.NET?

    Whether you choose VB.NET or C# is a matter or personal opinion. While I prefer C#, I can code almost as well in VB, and would choose VB if I had to do any Microsoft Office development. Both languages are starting to diverge in the 2.0 version of the Framework, so you might want to look into the new features of each language to see if there is any compelling reason to choose one over the other specific to your situation. Check out these articles on new C# 2.0 features and new VB 2005 features.

    Posted Mar 16 2005, 09:31 AM by darrell with no comments
    Filed under:
  • MAD Code Camp call for speakers

    Are you a top-notch Microsoft developer living in Virginia, West Virginia, Maryland, or Washington DC? Want to show your stuff off to other developers? Then be a speaker at the Mid-Atlantic District Code Camp! Submit your session form. Work on your presentation. Then join us on May 7th for a day of code, code, and more code!

    Not big on public speaking? Then show up for some great sessions given by your peers! There will also be plenty of opportunities for nerdworking.

    So have you signed up yet?

    Posted Mar 16 2005, 08:30 AM by darrell with no comments
    Filed under:
More Posts Next page »