A New Internet Library: Add Your Website/Blog or Suggest A Website/Blog to our Free Web Directory http://anil.myfunda.net.

Its very simple, free and SEO Friendly.
Submit Now....

Thursday, July 31, 2008

Getting Done the Lean Way

Something I've been thinking about lately, as I've been going through reams of paper on lean, kanban, kaizen and Toyota Production system concepts, is how the definition of done differs from that we are used to in Scrum.

In Scrum, the product owner gets with the rest of the team and the come up with a definition of done for the particular project.  What done means is essentially the responsibility of the product owner, but its an exercise done by the entire team.  What done means on one project might not be the same definition of done for another project you work on.  This is an allowance in Scrum.

In lean, I think I've decided that all lean projects have the same definition of done.  Lean is about value, flow and waste elimination, in that order.  With value being the primary focus of any lean organization, the word done must correlates to value.  Thus done can be defined partially as ROI if you want to look at it that way, but something is done the moment value is achieved.  This is the reason why waste elimination is such an important part of lean concepts: its a way to reduce the time it takes to get something done, thus reducing time it takes to provide value.

Naturally a product evolves over time, but in many cases, there is an immense amount of value in getting a product out to market, even though its not your final vision.  This is true for every product I can think of.  You think Toyota waited to put out the Camry until they thought it was perfect?  Of course not.  However, the value in getting the car to market given the state of everything, made sense and provided a lot of value.  We view things in software a bit differently, especially in non-Agile circles, but the same holds true.  Lean software's doneness is the moment it can provide value to its customers/owners.

As the people who write software, we might not always be aware of the value a product provides to its company, thus we might not understand why certain feature sets are created before others and it might not make sense to us.  I've never been an end consumer of any software I've been a part of writing in 15 years.  HR, PR, marketing, accounting, etc.  These are the people who are most likely to understand the value to its highest degree.  Its our job to do work, evaluate cycles, make changes to eliminate waste and continuously improve our processes and reduce the time it takes to provide value.



Source Click Here.

Looking for .NET projects to contribute to

I've been getting a fair bit of mesages from developers, who are enthusiastic about DDD and the common ALT.NET toolset, looking for a good project to contribute to - as a means of doing some hands on learning and helping out the community at the same time. I know one place to start might be Jeff Atwood's open source list, but I was hoping someone might have more specific ideas.

I think one of the challenges is that many open source projects tend to be tools for developers, and as such they are either pretty complicated, or don't relate well to typical enterprise development. The other problem is that many open source projects are well established and have a large codebase, which makes them significantly harder to get involved with.

Anyways, if anyone knows of a good open source project where a junior developer would be able to understand and contribue, please let us know. (Self-promotions welcomed)

 



Source Click Here.

Seats Available: Object-Relational Mapping with NHibernate

This is a friendly public service announcement that seats are still available for my Object-Relational Mapping with NHibernate course. The three-day course is being offered in Calgary running from Tuesday, August 26, 2008 to Thursday, August 28, 2008. You can find the full course announcement here with instructions on how to register. If you are a company or group of individuals, please contact me directly at jkovacs@post.harvard.edu about a group discount.

I am currently planning future public offerings of the course and would like your feedback on where, when, how much, ... I would appreciate it if you could take a few minutes to complete a short survey. As a thank you for your time, I will randomly pick one respondent to receive a copy of JetBrains ReSharper 4.0 Personal Edition. (N.B. The survey is limited to the first 100 respondents.)

Take ORM with NHibernate Course Survey



Source Click Here.

Are You A Good Developer?

'Good' means having qualities that are desirable and distinguishing. From a developer's perspective, these qualities are both technical as well as non-technical. Here are some qualities that a developer should possess if he/she aims at becoming a 'good' developer.



Source Click Here.

Logic Puzzle: Buying donuts puzzle

I thought it would be fun to try something new here.  So I am going to present a logic puzzle and let people try to answer it.  I will post the solution in the future but I want to give people a chance to try to solve it. So here is the first...(read more)

Source Click Here.

ASP.NET MVC Tip #27 - Create ASP.NET MVC Specific Visual Studio Add-Ins

In this tip, I discuss Eric Hexter’s TDD Class Generator Add-In for Visual Studio. This Add-In enables you to generate a class, an interface, and a test class by entering a single keyboard shortcut. Eric Hexter -- who has done valuable work on the MvcContrib project -- visited Microsoft last week and showed me one of his current projects. He has started a project for building ASP.NET MVC specific Add-Ins for Visual Studio. In particular, he has created an Add-In for generating testable classes automatically. You can learn more about the project, and download the binaries and source code, from the following website: http://erichexter.googlecode.com/svn/trunk/TestFirstGenerator/ You also can view a quick video walk-through of the Add-In...(read more)

Source Click Here.

Yahoo Geocode, SQL Server 2008 and ASP.NET AJAX

Beginning where the article Virtual Earth, SQL Server 2008 and AJAX left off, we'll add to our real estate application by enabling the insertion of new properties into our SQL Server 2008 database by querying the Yahoo Geocode service to retrieve the longitude and latitude of a specified address.

Source Click Here.

Using client templates, part 1

Last week, we shipped the first preview for the Ajax work we're doing in ASP.NET 4.0 under the simple form of a simple script file (release and debug versions). This should show how much emphasis this release puts on the client-side. As a matter of facts, I'll use a plain HTML file here instead of an ASPX file to make it perfectly clear that everything here (except for the web service that provides the data) runs on the client. One of the scenarios we're trying to improve is updating parts of the page with new data without a postback (in other words, Ajax). That's a scenario you could implement in a number of manners. First, you could put an UpdatePanel control around your server rendering of the data and be done with it. That...(read more)

Source Click Here.

Wednesday, July 30, 2008

Password : You're doing it wrong

I'd like to think that I deal with passwords the way most developers do. When dealing with registration or something else that requires the user to provide a password, I follow some general guidelines:

  1. The password must be a minimum length, normally no less than 6 characters
  2. The password's maximum length is very high (200 characters)
  3. I'll typically check for at least a mix of letters and numbers. For applications with considerably more sensitive data, I'll have more requirements - such as mixed casing or special characters.
  4. Hash the password with a salt (the salt can be a fixed string, or something more unique to the user - again based on sensitivity). Salting means that if someone gets access to a dump of your Users table, they'll still have a hard time logging into the system with a dictionary attack.
  5. Since hashes can't easily be reversed, send out a new password to users when they forgot password and have them change the temporary password as soon as they log in.

All this is pretty vanilla and you can change an SHA1 hash implementation for some encryption or whatever else tickles your fancy. What I've noticed though isn't that developers are hitting some type of technical hurdle when dealing with password, but rather, a usability one. The point behind bullets 1, 2 and 3 is that users ought to be able to enter anything they want as a password, provided it meets a minimum set of guidelines. As developers, we should try very hard never to impose restrictions which limit the effectiveness of a password. Lately though, I've been astonished at some of the limits sites impose on passwords - forcing me to come up with a less secure password than what I would have liked.

Here are some popular sites which have such restrictions:

  • digg only accepts letters and numbers
  • SourceForge only accepts letters and numbers (when you change your password, SourceForge even goes through the trouble of showing you a little dynamic update as you type (weak > normal > strong and then "invalid character" when you enter an exclamation mark)
  • Passport limits password to 16 characters (isn't Microsoft a champion of passphrases?)
  • MySpace only accepts passwords up to 10 characters long, but at least require 1 number or punctuation character
  • Wikipedia let me register with a password of 'a', but at least has very informative help on choosing a strong password. (Additionally, given what an anonymous user can do on Wikipedia, I'm not too disappointed in this policy)

And for sites with better policies:

  • Ebay, PayPal and Google have useful help and accept special characters (PayPal and Google even require at least 8 characters),
  • Twitter and Facebook don't have any "choosing a strong password" help, but still seem to accept everything

The most shameful site I've ever come across though is completely unacceptable - not only because of the ridiculous limitations it puts on passwords, but also the type of data it's responsible for. The Bank of Montreal's Mosaik Credit Card (BMO is major Canadian bank), has a password limit of 8 characters and only accepts letters and numbers (there's actually a maxlength="8" attribute on the form).

Here's a simple rule to follow. If Windows Calculator displays the total number of possible combinations in non-exponential form, you password guidelines suck.



Source Click Here.

Using LINQ in ASP.NET (Part 4)

In the Part 1 and Part 2 of this series we discussed how to use LINQ to SQL features to query and manipulate data. Part 3 introduced you with the inbuilt LINQ to SQL class designer. The LINQ to SQL class designer not only allows you to design classes visually but also saves reasonable amount of time otherwise needed to write equivalent code manually. Another such handy feature available to ASP.NET developers is LINQ Data Source Control. In this article I will explore this control with examples.

Source Click Here.

Live Mesh update

Not sure if everyone saw, but Microsoft has expanded the size of the Tech Preview for Live Mesh.  You can see the announcement on the Live Mesh Forum . So what was announced?  Well there are two main things: Doubled the maximum number of users...(read more)

Source Click Here.

How to Program Visual Basic 2008 - a master text.

Deitel books are great learning tools and often used as course text or soup to nuts learning guides. Also the physical quality of the book (printing, paper choice, color, etc) make it a collectors item if your a book lover) I had the pleasure of being a technical reviewer on this one (though the way these guys write there isn't much review to do :) This book includes coverage of the new features in ASP.NET 3.5, Web Services, Silverlight, Winforms, LINQ, WPF and More. Get more info here: http://www.deitel.com/books/vb2008htp/ Read More......(read more)

Source Click Here.

Live Mesh update

Not sure if everyone saw, but Microsoft has expanded the size of the Tech Preview for Live Mesh.  You can see the announcement on the Live Mesh Forum . So what was announced?  Well there are two main things: Doubled the maximum number of users...(read more)

Source Click Here.

How to Program Visual Basic 2008 - a master text.

Deitel books are great learning tools and often used as course text or soup to nuts learning guides. Also the physical quality of the book (printing, paper choice, color, etc) make it a collectors item if your a book lover) I had the pleasure of being a technical reviewer on this one (though the way these guys write there isn't much review to do :) This book includes coverage of the new features in ASP.NET 3.5, Web Services, Silverlight, Winforms, LINQ, WPF and More. Get more info here: http://www.deitel.com/books/vb2008htp/ Read More......(read more)

Source Click Here.

Tuesday, July 29, 2008

The great thing about me is that there's so many of me

Geek points for identifying the movie quote from the title. 

 

Okay, I'm going to get this completely out of my system in one go and not do it anymore.  I used to roll my eyes at people that only use their blog for "look at me, I'm speaking at such and such on this date and I just published this or that," but it appears that I'm one of those people now.  I swear, I'm writing up original blog posts with real content after this one -- and finishing some useful StructureMap documentation.

First, my latest article for MSDN Magazine is up today on Object Role Stereotypes.  I was excited to write this article because I'm a huge fan of Rebecca Wirfs-Brock and her work on Responsibility Driven Design.  UML might be great at helping you visualize an existing or proposed design, but Responsibility Driven Design can help you figure out what the design should be and understand existing designs.  I've always thought RDD was undervalued in the clamor for fancy visual modeling tools.  I'm going to follow up pretty shortly with some material that got cut from this article for length.  I got quite a bit of inspiration for my recent StructureMap rearchitecture work from the research I did for this article.  I'd like to share that as well for more examples.

I'm going to be speaking this November at QCon San Francisco on my lessons learned about design, TDD, and framework usability from 5+ years of evolving the StructureMap code.  It's a tremendous lineup of speakers for the conference and I'm just thrilled to be there.  I'm especially looking forward to the tracks on DSL's, the "Architectures you've always wondered about," and the track on Functional Programming.  Not to mention just being in San Francisco itself.

A short article I wrote earlier this year for CoDe Magazine entitled Using Continuous Integration to Reduce Project Friction is up on DevX.  If you need some help convincing your team or management to adopt Continuous Integration, this might give you some ammunition.


And finally, I've got a few last things to work out, but I'm finally going to start my "Presentation Patterns" book for Addison Wesley.  I'm effectively redoing the content from "Build Your Own CAB" plus the material I never got around to and making that a real book.  As of now, the proposed Table of Contents is:

 

 

  1. What's so hard about building a User Interface?
    1. Look at everything that's going on here
    2. How do I test this?
    3. How do I connect all this together?
  2. Separated Presentation
    1. The travails of using Active View
    2. The Humble Dialog Box (narrative)
    3. Separated Presentation (narrative)
    4. GUI Architectures (pattern)
    5. Passive View  (pattern)
    6. Supervising Controller (pattern)
    7. Presentation Model (Model-View-ViewModel) (pattern)
    8. Communication between the View and Presenter (narrative)

                                          i.    By events

                                        ii.    Direct communication

    1. What's the Model? (long narrative)
    2. Model Based Validation with the Notification Pattern
  1. The Mechanics of the View
    1. Managing Screen State (narrative)
    2. Flow Synchronization (pattern)
    3. Observer Synchronization (pattern)
    4. Flattener (pattern)
    5. MicroControllers (pattern)
    6. Embedded Controller (pattern)
    7. Screen State (pattern)
  2. Complex Screens
    1. Composite Controller (pattern)
    2. Layout (pattern)
    3. Messaging
  3. The Application Shell
    1. Coordination between Screens (narrative)
    2. Screen Activation Lifecycle (narrative)
    3. Presenter First
    4. Application Shell
    5. Application Controller
    6. Screen Collection
    7. Screen Subject
    8. Layer SuperType
  4. Event Coordination
    1. Coordination between Screens
    2. Latch (pattern)
    3. Event Aggregator (pattern)
    4. Command (pattern)
  5. Crafting a Domain Specific Language (not well defined yet)
  6. Modularity
    1. Using an Inversion of Control Tool
    2. Bootstrapper (pattern)
    3. Registry (pattern)
  7. Communicating with the Server
    1. MORE DEFINITION HERE
    2. Command Executor (pattern)
  8. Automated Testing
    1. Unit testing the Presenter layer
    2. Unit testing the View
    3. Subcutaneous Testing
    4. Strategies for User Interface Testing
    5. Screen Driver (pattern)

From the early feedback, it looks like I'll move the testing material up and I think I'm going to include some discussion of "Mobile Objects" ala CSLA vs DTO's / Bounded Context / Separate Domain Model for client & server.  I'd also like to talk about using an ESB like nServiceBus or Mass Transit for client to server communication.   The examples will primarily be WPF, but I'll include some WinForms, Java Swing, and probably Flex.  I thought hard about using Cocoa examples, but for all of its cool features, I cannot read Objective C code.  The focus is on patterns and design rather than specific technologies.

 

 

Okay, I'm done with the self promotion now.  I promise.



Source Click Here.

Retain position of a DragPanel Extender after postback using ASP.NET AJAX

The DragPanel extender makes it extremely simple to add a 'drag' to your controls. However there is a functionality missing in the DragPanel extender. The DragPanel extender does not have the built-in capability to retain the position of controls that have been dragged, after a page postback. In this article, we will see how to retain the position of the DragPanel extender, after a postback.



Source Click Here.

SOS: Request for feedback

I have asked in the past, but wanted to ask again as it has been a while and there are different people looking at this blog now. Does anyone have any feedback on the SOS debugger extension?  I am looking for things like: What commands are missing...(read more)

Source Click Here.

The great thing about me is that there's so many of me

Geek points for identifying the movie quote from the title. 

 

Okay, I'm going to get this completely out of my system in one go and not do it anymore.  I used to roll my eyes at people that only use their blog for "look at me, I'm speaking at such and such on this date and I just published this or that," but it appears that I'm one of those people now.  I swear, I'm writing up original blog posts with real content after this one -- and finishing some useful StructureMap documentation.

First, my latest article for MSDN Magazine is up today on Object Role Stereotypes.  I was excited to write this article because I'm a huge fan of Rebecca Wirfs-Brock and her work on Responsibility Driven Design.  UML might be great at helping you visualize an existing or proposed design, but Responsibility Driven Design can help you figure out what the design should be and understand existing designs.  I've always thought RDD was undervalued in the clamor for fancy visual modeling tools.  I'm going to follow up pretty shortly with some material that got cut from this article for length.  I got quite a bit of inspiration for my recent StructureMap rearchitecture work from the research I did for this article.  I'd like to share that as well for more examples.

I'm going to be speaking this November at QCon San Francisco on my lessons learned about design, TDD, and framework usability from 5+ years of evolving the StructureMap code.  It's a tremendous lineup of speakers for the conference and I'm just thrilled to be there.  I'm especially looking forward to the tracks on DSL's, the "Architectures you've always wondered about," and the track on Functional Programming.  Not to mention just being in San Francisco itself.

A short article I wrote earlier this year for CoDe Magazine entitled Using Continuous Integration to Reduce Project Friction is up on DevX.  If you need some help convincing your team or management to adopt Continuous Integration, this might give you some ammunition.


And finally, I've got a few last things to work out, but I'm finally going to start my "Presentation Patterns" book for Addison Wesley.  I'm effectively redoing the content from "Build Your Own CAB" plus the material I never got around to and making that a real book.  As of now, the proposed Table of Contents is:

 

 

  1. What's so hard about building a User Interface?
    1. Look at everything that's going on here
    2. How do I test this?
    3. How do I connect all this together?
  2. Separated Presentation
    1. The travails of using Active View
    2. The Humble Dialog Box (narrative)
    3. Separated Presentation (narrative)
    4. GUI Architectures (pattern)
    5. Passive View  (pattern)
    6. Supervising Controller (pattern)
    7. Presentation Model (Model-View-ViewModel) (pattern)
    8. Communication between the View and Presenter (narrative)

                                          i.    By events

                                        ii.    Direct communication

    1. What's the Model? (long narrative)
    2. Model Based Validation with the Notification Pattern
  1. The Mechanics of the View
    1. Managing Screen State (narrative)
    2. Flow Synchronization (pattern)
    3. Observer Synchronization (pattern)
    4. Flattener (pattern)
    5. MicroControllers (pattern)
    6. Embedded Controller (pattern)
    7. Screen State (pattern)
  2. Complex Screens
    1. Composite Controller (pattern)
    2. Layout (pattern)
    3. Messaging
  3. The Application Shell
    1. Coordination between Screens (narrative)
    2. Screen Activation Lifecycle (narrative)
    3. Presenter First
    4. Application Shell
    5. Application Controller
    6. Screen Collection
    7. Screen Subject
    8. Layer SuperType
  4. Event Coordination
    1. Coordination between Screens
    2. Latch (pattern)
    3. Event Aggregator (pattern)
    4. Command (pattern)
  5. Crafting a Domain Specific Language (not well defined yet)
  6. Modularity
    1. Using an Inversion of Control Tool
    2. Bootstrapper (pattern)
    3. Registry (pattern)
  7. Communicating with the Server
    1. MORE DEFINITION HERE
    2. Command Executor (pattern)
  8. Automated Testing
    1. Unit testing the Presenter layer
    2. Unit testing the View
    3. Subcutaneous Testing
    4. Strategies for User Interface Testing
    5. Screen Driver (pattern)

From the early feedback, it looks like I'll move the testing material up and I think I'm going to include some discussion of "Mobile Objects" ala CSLA vs DTO's / Bounded Context / Separate Domain Model for client & server.  I'd also like to talk about using an ESB like nServiceBus or Mass Transit for client to server communication.   The examples will primarily be WPF, but I'll include some WinForms, Java Swing, and probably Flex.  I thought hard about using Cocoa examples, but for all of its cool features, I cannot read Objective C code.  The focus is on patterns and design rather than specific technologies.

 

 

Okay, I'm done with the self promotion now.  I promise.



Source Click Here.

Super Simple MVC Ajax With JQuery Demo

During the recent Insiders summit, Wally cornered me into recording a really short video demonstrating a feature of ASP.NET MVC. I decided to sprinkle a little Ajax in my demo by showing how to use jQuery to call an action that returns a JsonResult . Specifically, I show how to update a couple of regions in the page (two dom elements) with data pulled from the server. I then add a little sparkle to the demo by implementing the ubiquitous yellow fade when adding the content to the DOM. As you're watching it, you'll notice that I'm making it up on the fly based on another demo I did earlier that day. He's posted the video here in show #106. That's heckuva a lot of shows Wally! Technorati Tags: aspnetmvc , ajax , jquery Read More......(read more)

Source Click Here.

Retain position of a DragPanel Extender after postback using ASP.NET AJAX

The DragPanel extender makes it extremely simple to add a 'drag' to your controls. However there is a functionality missing in the DragPanel extender. The DragPanel extender does not have the built-in capability to retain the position of controls that have been dragged, after a page postback. In this article, we will see how to retain the position of the DragPanel extender, after a postback.



Source Click Here.

Missing Dynamic Data Templates - VS 2008 SP1 and .NET 3.5 SP1

In case you have installed the .NET 3.5 SP1 and Visual Studio 2008 SP1 and are unable to find the Dynamic Data Website Template, you can install the latest version of runtime from http://www.codeplex.com/aspnet/Wiki/View.aspx?title=Dynamic%20Data&referringTitle=Home To explain it further, I had the December 2007 CTP installed which contained the Dynamic Data Runtime and Astoria, Entity Framework etc., All of these gets bundled into the .NET 3.5 SP1 Beta and you dont need the December 2007 CTP any longer. So I went ahead and uninstalled the December 2007 CTP. Post the uninstallation, I was unable to find the "Dynamic Data Website" Template. After some research I found that instead of fixing the issue by installing/uninstalling SP1...(read more)

Source Click Here.

SOS: Request for feedback

I have asked in the past, but wanted to ask again as it has been a while and there are different people looking at this blog now. Does anyone have any feedback on the SOS debugger extension?  I am looking for things like: What commands are missing...(read more)

Source Click Here.

Effects and Transitions for Silverlight

Another installment of Silverlight.FX additions to enable creating declarative views - this time, pre-packaged, declarative effects and transitions... Read More......(read more)

Source Click Here.

Super Simple MVC Ajax With JQuery Demo

During the recent Insiders summit, Wally cornered me into recording a really short video demonstrating a feature of ASP.NET MVC. I decided to sprinkle a little Ajax in my demo by showing how to use jQuery to call an action that returns a JsonResult . Specifically, I show how to update a couple of regions in the page (two dom elements) with data pulled from the server. I then add a little sparkle to the demo by implementing the ubiquitous yellow fade when adding the content to the DOM. As you're watching it, you'll notice that I'm making it up on the fly based on another demo I did earlier that day. He's posted the video here in show #106. That's heckuva a lot of shows Wally! Technorati Tags: aspnetmvc , ajax , jquery Read More......(read more)

Source Click Here.

Using LINQ in ASP.NET (Part 3)

In the Part 1 and Part 2 of this series we discussed how to use LINQ to SQL features to query and manipulate data. We also learnt to call stored procedures via LINQ to SQL. In the previous examples our approach was manual in that we ourselves created the custom data context and entity classes. Visual Studio comes with an inbuilt designer to perform the same task. This article will teach you how to use the designer and consume the created classes in your application.

Source Click Here.

Missing Dynamic Data Templates - VS 2008 SP1 and .NET 3.5 SP1

In case you have installed the .NET 3.5 SP1 and Visual Studio 2008 SP1 and are unable to find the Dynamic Data Website Template, you can install the latest version of runtime from http://www.codeplex.com/aspnet/Wiki/View.aspx?title=Dynamic%20Data&referringTitle=Home To explain it further, I had the December 2007 CTP installed which contained the Dynamic Data Runtime and Astoria, Entity Framework etc., All of these gets bundled into the .NET 3.5 SP1 Beta and you dont need the December 2007 CTP any longer. So I went ahead and uninstalled the December 2007 CTP. Post the uninstallation, I was unable to find the "Dynamic Data Website" Template. After some research I found that instead of fixing the issue by installing/uninstalling SP1...(read more)

Source Click Here.

Effects and Transitions for Silverlight

Another installment of Silverlight.FX additions to enable creating declarative views - this time, pre-packaged, declarative effects and transitions... Read More......(read more)

Source Click Here.

Using LINQ in ASP.NET (Part 3)

In the Part 1 and Part 2 of this series we discussed how to use LINQ to SQL features to query and manipulate data. We also learnt to call stored procedures via LINQ to SQL. In the previous examples our approach was manual in that we ourselves created the custom data context and entity classes. Visual Studio comes with an inbuilt designer to perform the same task. This article will teach you how to use the designer and consume the created classes in your application.

Source Click Here.

Monday, July 28, 2008

Migratory Compromises

Martin Fowler recently wrote an article about incremental data migration. In it he covers some of the pitfalls to putting off data migration and the benefits associated with tackling migration iteratively. As a lot of us are doing re-writes or replacement systems in this day and age it's worth a read.

I think there's an important piece either implicit to the piece or missing. Namely: when we put off migration we might be exposing ourselves to the possibility a large net decrease in the quality and/or functionality of the new system. I'll explain.

When we're developing new systems we're often correcting the errors of our own making or an inherited past. We are hopefully ensuring the integrity of our new data structures whether they're produced as a side-effect of an object system or domain modeling effort or we're making some kind of database as a primary project artifact. So can we assume that existing (and scarily dirty) data can be brought over into this new, pristine environment? Clearly the answer is "no."

Often times we're working with legacy data from a rat's nest system that's evolved over the years. I remember a particular nasty data migration that, postponed to the end of the project, took a good month to do. Not just a month of effort, a month of toil and drudgery!

Indulge me a brief war story. The data in question was from a system that had been through several data migrations and patched/in-place replacements. First Sybase, then Access, then SQL Server 6. There were several tables of questionable value, "day of week" and "gender" immediately springing to mind. One could look at rows as kinds of geological strata. Certain fields became out of date and screens ended up being coded with conditional logic along the lines of "if the record date is less than a certain day, get this semantic value from this field, otherwise..." As if this wasn't enough there were out-and-out data integrity errors of the particularly egregious nature. There was no way the reports siphoning this data could be correct or counted on. At best they were a relative and probabilistic measure of what was really happening the business.

Naturally I made the mistake of not taking this albatross into account. Nightmare.

What can you do to avoid this situation? As Martin shares, making an initial assessment of the current data structure would be a big first step. If the data is messy, you'd be well served to tackle migration incrementally and early. But what about my (maybe not so) extreme case where data "assets" are in awful shape?

Conscript Users

If you have the luxury of leveraging users to fix data issues, use it. Sometimes these issues can be fixed through the legacy application itself. For example, we introduced a feature in our vendor management module that ensures vendors aren't duplicated (by their tax ID). In a client's system there was all kinds of redundant data. We approached them with this issue and worked out a plan of collapsing duplication before counting on migrated data.

Defensive Architecture

Sometimes it's best to raise your guard against imported data in your application's design. By taking an early assessment (which, in the case of product development, might be an educated guess) we can decided if old data is trustworthy. If not, we might build our applications in such a way that missing or invalid data is part of the app itself. Taking the vendor de-duplication example, we might have built a feature that let users correct duplication in the new system and just brought the data over as is. Expanding on that feature, we might also have prevented 1099s (tax forms) from being generated for suspected duplicates providing an exception report for these cases.

The problem with designing for bad data is the increased effort -- and therefore cost -- involved in design, implementation, and test. This strategy, I'd say, should be used as a last resort and sparingly. All disclaimers aside, sometimes it can't be avoided; we can all probably tell a data horror story or two.

The Real Risk

We've been cruising on this new project. We're happy with the design and it's an order-of-magnitude better than the previous solution. Our client's going to be thrilled! That's a lovely feeling to be sure, but in reality what we're bringing forward might be a limiting factor in total success. You might have to make disappointing compromises like scrubbing new features or extending a project's scope/time/budget if you've developed a feature that simply isn't compliant with old data.

A thorough initial assessment paired with incremental migration can help you make Agile decisions about architecture and client involvement. Without techniques like this you'll essentially be rolling the dice on how long migration takes or, at the worst case, whether new features are practical without a whole slew of compensating or enabling features.



Source Click Here.

My friend Weston is looking for some good Agile .Net developers in Austin

My friend Weston Binford is looking for some good .Net developers in Austin.  Austin.  Agile.  Place where they actually care about doing things well.  Maybe go to JP's "I will make you awesome in one absurdly action-packed week" class.  What's not to like?

 

From the job posting:

 

I manage a software development team creating internal business applications. Two years ago, I took over the team and we switched our project management from Waterfall to Scrum with four week sprints. We have created a WebForms application tied to a database using an object/relational mapper. The application still has "legacy" C# code and some modules written in stored procedures before we embraced domain-driven design. We have used Model-View-Presenter to ease unit testing, but we are acutely aware of the pain of WebForms development and are looking to move to Model-View-Controller using ASP.NET MVC or, perhaps, Monorail.

We have embraced collective code ownership, continuous integration, unit testing, code coverage, domain-driven design, and sustainable pace. Creating maintainable software is our primary goal. We are committed to continuous learning and are empowered to get the tools that we need. For example, the company paid for J.P. Boodhoo's Nothin' but .NET Developer Boot Camp (highly recommended) and we have dual monitor (moving to tri-monitor) workstations and a copy of Resharper. We work together in a team room to maximize communication.

Based on the success of the first application, we have a mandate to develop two other applications from scratch in .NET 3.5 using agile techniques. The development is long-term and strategic for the company. We are looking for three senior developers with strong object-oriented skills and experience with extreme programming or other agile development techniques to join our team as full-time employees.

You can get more details about our business at our web site, http://www.mvbalaw.com/. We are a stable, family-oriented business. We provide benefits including company-paid health insurance for the whole family, 401(k) match, vacation and holidays.

Interested?

If so, individuals only (no recruiters, please) e-mail me directly at developerjobs@mvbalaw.com.

Thanks,
Weston M. Binford III
Director of Software Development
McCreary, Veselka, Bragg & Allen, P.C.

 



Source Click Here.

Going full circle with TDD

A couple of years ago, I had lunch with JP. It was before TDD had clicked for me and I was still very much a skeptic. As always, JP was passionate but not forceful in his explanation of it but by the end of the lunch, I still wasn't sold. So much so that I wrote a nice little write-up that, upon re-reading, is akin to looking at pictures of my choice of clothing in the 80s. (What can I say? Corduroy worked for me.)

So it is with some bemusement that I reflect on almost the exact same conversation I had with another young developer three days ago, except that I played the part of JP and he played the part of the skeptic. I recognized each and every argument he posed because I made them myself at one point: It takes too long. What's the difference whether I test first or test after? There's too much code. It's safe and warm and fuzzy in my world and I won't have you telling me otherwise.

The argument wasn't all that heated because we're both Canadian. But in the end, the only real argument that stuck with him is the same one that stuck with me originally: it works for me. I've been doing it for a while now and I like the results I get with it. Maybe I can't quantify the specific time and/or cost savings over time but I can tell you, it "feels" right. I like looking at the software I build with it. I like going back to it to add features. There's a much smaller learning curve when reviewing it after a few months.

Maybe I can get that same feeling just by adopting a few decent development practices rather than a full-on design methodology. That may be so, though it seems to me that TDD allows you to adopt such practices a lot more naturally. So that you aren't forcing yourself to learn them. Rather, you learn TDD and other design principles seem that much clearer.

Of course, TDD isn't exactly a walk in the park itself and it sure does help if you can learn alongside someone who has done it. And even now, I'd rank myself only about a 4 or 5 out of 10 on the "TDD Afficianado" scale (though if a recruiter asks, the answer is always 7). Past the book-learning phase but still not practised enough that I could, say, teach a course on it.

Which I think is part of the barrier to entry. It's hard (for me, at least) to learn on one's own without some real-world work backing it up when the class/seminar is over. Often, there is a sense of hopelessness anyway at having your eyes opened to a new world, then returning to your regular job at Niagra Inc.

At one point, I had some vague plan to do an online Skype thing with whomever wanted to join to talk about something like this. Not to teach but to share my findings and see if anyone else would either learn from it or enhance my knowledge of it. I do hope I have the wherewithal to follow through on it because I do so love the idea. Kind of a real-time version of Derik's www.dimecasts.net site (which continues to be awesome if you haven't checked it out).

Anyway, I'm not entirely sure where I'm going here. Just liked the symmetry of the two conversations, I guess but I'll stop now. Let me know if you'd be interested in a Skype coding session, possibly sometime in September when I've fled this foreign corporate cowboy world again.

Kyle the Circuitous



Source Click Here.

.NET Rocks #362: James Kovacs Inverts Our Control!

I had the pleasure of appearing on .NET Rocks #362. I talked to Carl and Richard about dependency inversion, dependency injection, and inversion of control. A lot of what we talked about I also wrote about in my MSDN article, Loosen Up: Tame Your Software Dependencies for More Flexible Apps. Here's the summary of the show, which I had absolutely no input into whatsoever:

James Kovacs talks about the Castle Windsor project, and gives the clearest definitions of Inversion of Control (IOC) containers, Dependency Injection, and the reasons why we need to think about these techniques. Critical listening for all .NET developers.

I believe that I owe them both a beer next time I see them for such flattering remarks. smile_embaressed



Source Click Here.

SOS: Commands not working on a mini-dump

Problem So occasionally I run into people trying to analyze a managed mini-dump and they have problems.  They run a command like !dumpobj and it fails. Cause The reason that these commands fail is that the CLR stores all it's data in virtual memory...(read more)

Source Click Here.

www.ASP.net - What's Missing ?

Next week I have a week full of meetings on things like. The Next Version of Web Forms Dynamic Data v.now and v.next ASP.NET 4.0 But the BIG part of the week will be spent on strategic planning for www.ASP.net web sites in the coming year. We want to answer questions like .... What's the NEXT great multi-media experience for developers ? What social networking features are missing and wanted on www.asp.net ? What improvements do we need to blogs, forums, RSS, etc.? What's missing that developers really want? What's broken and needs to be fixed? So, while I'm thinking about it THIS week, why not send me an email (use th elink on this page) and let me know what YOU think of the subject ! Read More......(read more)

Source Click Here.

ASP.NET MVC Tip #26 - Create a Lightweight Control View Engine

In this tip, I show you how to create a custom ASP.NET MVC view engine that supports lightweight, declarative controls. I show you how to create both simple controls and controls that display database data. I also show you how to test the rendered output of the lightweight controls. One of the beautiful things about the ASP.NET MVC framework is that a view can look like anything that you want. Don't like inline scripts? You can build a new view engine. Don't like anything that looks like a tag in your views? Build your own view engine. You always have the option of replacing the default Web Forms view engine with your own custom view engine. In this tutorial, I explain how you can replace the default ASP.NET MVC Web Forms view engine...(read more)

Source Click Here.

Sunday, July 27, 2008

My Special Giveaway for WordPress lovers

Please visit http://www.learnxpress.com and click the link titled “Free WordPress Themes Giveaway” for more information. Quick Link: Free WordPress Themes Giveaway

Please visit http://www.learnxpress.com and click the link titled “Free WordPress Themes Giveaway” for more information.

Quick Link: Free WordPress Themes Giveaway



Source Click Here.

Note about GMP CMS review

I recently wrote a review of GMP CMS for asp.netPRO and it was published in March print edition. But unfortunately the vendor has discontinued its sale without informing us.

I recently wrote a review of GMP CMS for asp.netPRO and it was published in March print edition. But unfortunately the vendor has discontinued its sale without informing us.

(more…)



Source Click Here.

The ASP.NET 2.0 Anthology

Sometimes developers get bored by reading traditional ASP.NET 2.0 books - they often only provide concepts. But as a developer gets familiar with the framework, they need to explore the hidden secrets of it to experience its full potential. The ASP.NET 2.0 Anthology: 101 Essential Tips, Tricks & Hacks from SitePoint unleashes such secrets. Written [...]

Sometimes developers get bored by reading traditional ASP.NET 2.0 books - they often only provide concepts. But as a developer gets familiar with the framework, they need to explore the hidden secrets of it to experience its full potential. The ASP.NET 2.0 Anthology: 101 Essential Tips, Tricks & Hacks from SitePoint unleashes such secrets. Written by five eminent authors, this book is power packed with tips, tricks, and hacks spanning 17 chapters.

(more…)



Source Click Here.

Essential Silverlight 2 Up-to-Date-New from O'Reilly

Now you can design rich Internet applications (RIAs) for the Web using Silverlight 2, Microsoft’s second release of the Silverlight platform. The biggest change from Silverlight 1.0 is the inclusion of a compact version of the .NET Framework, complete with the .NET Framework 3.0 Common Language Runtime.

Now you can design rich Internet applications (RIAs) for the Web using Silverlight 2, Microsoft’s second release of the Silverlight platform. The biggest change from Silverlight 1.0 is the inclusion of a compact version of the .NET Framework, complete with the .NET Framework 3.0 Common Language Runtime.

(more…)



Source Click Here.

High Quality WordPress Themes

WordPress themes are available in plenty for free. But are they really user friendly and includes support from the developer. In fact only 30% of free theme designers provide direct support to end users. So why not you to consider to buy a paid WordPress theme. Brian Gardner has developed high quality WordPress themes for several [...]

WordPress themes are available in plenty for free. But are they really user friendly and includes support from the developer. In fact only 30% of free theme designers provide direct support to end users. So why not you to consider to buy a paid WordPress theme.

Brian Gardner has developed high quality WordPress themes for several types of websites such as News, Magazine, Technology. His themes are also perfect in terms of Search Engine Optimization (SEO) is concerned. You will also get direct support from Brian either through direct e-mail or discussion forum. You can also check out a live demo of all themes from his website. Brian has alos listed a huge database of sites which are curently using his themes.

To view the demo and to purchase the theme, click https://www.e-junkie.com/ecom/gb.php?ii=68191&c=ib&aff=20610&ev=f3a11c7b1d



Source Click Here.

Just published: Murach's C# 2008

Murach’s C# 2008 is the latest edition of best-selling C# book. The content continues to evolve with the language, of course, but one thing has stayed the same over the years: We still call this “the C# book you’ll wish you’d bought first” because it gets you developing professional Windows Forms applications without any wasted [...]

Murach’s C# 2008 is the latest edition of best-selling C# book. The content continues to evolve with the language, of course, but one thing has stayed the same over the years: We still call this “the C# book you’ll wish you’d bought first” because it gets you developing professional Windows Forms applications without any wasted time or effort.

Why we say this is the C# book you’ll wish you’d bought first

#1: A FAST start, coupled with Visual Studio productivity
This book starts you off using all the best features of Visual Studio 2008 so you can begin productive work almost immediately. In fact, it has you create a simple business application in chapters 2 and 3 so you can see right away how the core features of C# and of Visual Studio work. Download these chapters for free, and see for yourself.

#2: Object-oriented programming made clear
When it comes to object-oriented programming, too many C# books resort to whimsical but useless metaphors, like illustrating objects by creating animal classes such as mammals, cats, and dogs. Then they leave it up to you to figure out how to transfer these concepts to business applications.

In contrast, we present business objects such as customers, invoices, and products so you can see how OOP is used to create multi-tiered applications in the real world.

#3: Confidence in handling business requirements
Learning to use C# classes and OOP techniques isn’t enough. You also have to know how to code for the tasks that are required in most business applications. So this book builds on your skills in incremental steps to teach you how to validate data, handle numeric, date, and string data, work with loops, arrays, and collections, code methods and event handlers, handle exceptions, and work with text, binary, and XML data.

#4: A solid grounding in database programming
You can’t create business applications without handling databases. So this book teaches you how to use C# 2008’s tools for rapid application development, like the data sources feature and data handling controls. It also includes introductions to ADO.NET coding and to LINQ, a 2008 feature that lets you query almost any data source.not just databases.using the C# language.

Powerful stuff that’s glossed over in a chapter or two in most other C# books.

#5: No side-stepping of business requirements
This book presents complete, non-trivial applications that illustrate what you need to know on the job. Studying applications like these is the key to mastering C# development, but you won’t find them in many other C# books.

#6: Practice exercises solidify your skills
The exercises at the end of each chapter let you apply what you’ve learned, giving you valuable, hands-on experience. And because we provide the starting points for these exercises here at our site, you get the maximum amount of practice in a minimum of time.

#7: Paired pages make learning a breeze
If you haven’t ever used one of our books before, you may want to download a sample chapter before you buy. If you do, you’ll discover why programmers are so impressed by our “paired pages” format and why college students ask their instructors for Murach books. Not only does this format make learning easier and faster, but it also makes this the ideal reference book when you’re on the job.

#8: 100% guarantee
Like all our books, this one is backed by our 90-day trial period and 100% guarantee. It must teach you C# 2008 the way the best professionals use it, or send it back for a prompt refund.

So please don’t delay. Get your copy, and let this book turn you into a top C# developer starting today!



Source Click Here.

ADO.NET 3.5 Cookbook

Microsoft ADO.NET 3.5 is the latest data access technology from Microsoft. It’s a collection of classes that are part of the .NET Framework, and is designed to provide consistent access to data in loosely coupled n-tier application architectures such as web services. “Data access is a key part of all business and other application development,” [...]

Microsoft ADO.NET 3.5 is the latest data access technology from Microsoft. It’s a collection of classes that are part of the .NET Framework, and is designed to provide consistent access to data in loosely coupled n-tier application architectures such as web services. “Data access is a key part of all business and other application development,” says Bill Hamilton, author of ADO.NET 3.5 Cookbook (O’Reilly, US $54.99).”Since the first edition of this book, the .NET platform and SQL Server have become serious competitors to technologies such as J2EE and products like Oracle,” Hamilton says. “Understanding and using ADO.NET correctly is critical to the construction of .NET Windows and Web forms applications that consume, use data, and update data. ADO.NET is simply the most robust and easiest to use data access technology.”

Updated for Visual Studio 2008, .NET Framework 3.5, and SQL Server 2008, the book demonstrates how you can work with LINQ and other new .NET technologies to make data access easier and more efficient. ADO.NET 3.5 Cookbook offers time-saving recipes for:

  • Connecting to data
  • Working with disconnected data objects
  • Querying, retrieving, searching, analyzing, adding, modifying, copying, and transferring data
  • Maintaining database integrity
  • Programmatically working with data in .NET Windows and Web Forms user interfaces
  • Working with XML data
  • Optimizing data access
  • Enumerating and maintaining database objects
  • SQL Server CLR integration

ADO.NET 3.5 Cookbook is designed to solve a wide variety of real-world data access problems. Clearly organized, the book makes it easy to locate and use the recipes presented, offering more than 200 coding solutions and best practices for problems that developers will encounter every day with ADO.NET. The recipes not only address immediate needs, but also help readers learn the underlying concepts of this technology.

“This is my favorite type of technical book to write–one that presents real world problems and accompanying solutions–rather than the typical tutorials that often leave the reader without an ability to do that,” says Hamilton. “As a consultant who designs large-scale, I believe that I understand the data access problem domain and its importance.”



Source Click Here.

Issues with .NET Framework 2.0/3/5

I recently installed .NET Framework 3.5 and now whenever I try to install an executable file a message box prompts which says Regasm.exe not found. Microsoft should prevent these kind of issuesfrom happening to reduce the pain of developers. I will update this post once I fixed this issue. Update: I resolved the issue temporarily by [...]

I recently installed .NET Framework 3.5 and now whenever I try to install an executable file a message box prompts which says Regasm.exe not found. Microsoft should prevent these kind of issuesfrom happening to reduce the pain of developers. I will update this post once I fixed this issue.

Update: I resolved the issue temporarily by uninstalling .NET Framework 3.5.



Source Click Here.

Nokia N82 in hands

A brand new Nokia N82 which I purchased is now in my hands. It looks cool. I will post a review after testing it.

A brand new Nokia N82 which I purchased is now in my hands. It looks cool. I will post a review after testing it.



Source Click Here.

Bill Gates to Step Down Office Today

A number reports have suggested that Microsoft co-founder and formerly the richest man in the world, Bill Gates will step down from his daily involvement in Microsoft - the world's biggest software producer. Although Mr. Gates will remain Chairman of Microsoft, his involvement in the company will be reduced to "special projects" and his focus [...]

A number reports have suggested that Microsoft co-founder and formerly the richest man in the world, Bill Gates will step down from his daily involvement in Microsoft - the world's biggest software producer. Although Mr. Gates will remain Chairman of Microsoft, his involvement in the company will be reduced to "special projects" and his focus will shift to charity work and concentrating on the Bill and Melinda Gates Foundation.

Renowned for being a Harvard dropout who made good, Gates set up Microsoft in Albuquerque, New Mexico, USA, partnered by Paul Allen, currently owner of the Seattle Seahawks, the Portland Trail Blazers, and the Seattle Sounders soccer team. Microsoft developed what was for many years entirely ubiquitous software for the PC - MS-DOS.

The company went on to develop equally ubiquitous software utilizing what at the time was a revolutionary graphical user interface. Its Windows and Microsoft Office solutions have continue to dominate the PC software market as they have for several years. Likewise, with a few notable exceptions, Microsoft has either dominated or played a major part in each field it has entered, including becoming one of key providers of web hosting server Operating Systems.

Although he maintains the record of being a self-made billionaire at the youngest age, he is no loner the richest man in the world, nor even in the US. Investor Warren Buffett and Mexican telecommunication's tycoon Carlos Slim HelĂș now rank before him in the list of richest people.

Reposted from hostsearch.com



Source Click Here.

Reminder - DC ALT.NET Meeting 7/24/2008 - LINQ Deep Dive

Just as a reminder from the previous post, the July meeting for DC ALT.NET will be on July 24, 2008 from 7PM-9PM.  Check out our site and our mailing list for more information as it becomes available.  This month, K. Scott Allen, of OdeToCode and a co-host of Herding Code, will present a deep dive into LINQ and a code-along so that we can follow along.  The intent is to go as deep as we can with LINQ to find out what works, what doesn't and how to use it effectively.  So, bring your laptops and get ready...

LINQ

K. Scott Allen has recently recorded an episode on Herding Code dedicated to LINQ.  It's well worth a listen as he talks about the following LINQ topics:
  1. What is it?
  2. How introducing LINQ to .NET changed the framework
  3. LINQ Providers
  4. LINQ to XML
  5. LINQ to SQL - how it's different from EF, tips and tricks, when to use it
If that's not enough, he also has a course through Pluralsight called LINQ Fundamentals.  This three day course covers the basic fundamentals in syntax, but also LINQ to SQL, LINQ to XML, as well as other topics. 

Special Thanks

Once again I'd like to thank Cynergy Systems, Inc for sponsoring this month's event.  As a side note, they are actively looking for experienced .NET developers with interest in WPF and Silverlight.  So, if you're looking for a great company that is a leader in the Rich Internet Applications area and want to work in downtown Washington D.C., definitely check them out. 

Details

DateTime:
7/24/2008 - 7PM-9PM

Location:
Cynergy Systems Inc.
1600 K St NW
Suite 300
Washington, DC 20006
Show Map

Be there and hope to see a passionate crowd!  And don't forget to bring your laptop!



Source Click Here.

Incarceration Log - Day 4

It has been only four days since my self-imposed, month-long incarceration in the prison known as Corporate Calgary, but already the three walls of my cell close in around me. My oppressors continue their assault on my psyche with inhuman tortures such as "Death by 1000 Quick Questions" and "Let's Talk About Weather" and "We Meet Because We Can".

My jailors mock me with bizarre acronyms and epic tales of projects past. Yesterday, I nearly screamed in terror when I caught myself chuckling knowingly at one such anecdote. During a meeting to review progress of a system I didn't know existed, let alone used, no less. I fear I may be going insane.

Two things keep me alive. One is the presentation I give next week on ASP.NET MVC to the Calgary .NET User Group on the 29th and the Edmonton .NET User Group on the 31st. During status meetings, I surreptitiously pull up my VM and review my code and notes, ignoring the sidelong glances at my insolent giggles. These presentations are my one tenuous grip on reality and I shall protect them with, well, not *my* life but probably the life of someone close to me.

The second is the one ray of light in my task list: a throwaway application I pull up when I need an extra dose of lucidity. Just this morning, I discovered an error that made me nearly leap for joy for the mere mental exercise, slight as it was:

private void ConvertFile( string converterName, string sourceFile, string destinationFile )  {      IConverter converter = FindConverter( converterName );      converter.ItemProcessed += converter_ItemProcessed;      int recordsProcessed = converter.processFile( sourceFile, destinationFile);  }

This (much simplified) piece of code contained an error. The first time it was called, it ran fine. Each subsequent call appeared to process the file multiple times. I.e. the second time it ran, the file was processed twice, the third time, thrice, the fourth, ummm...quadrice. And so on and so forth.

Alas, the solution presented itself all too quickly. The file was not actually being processed multiple times. Rather, a brand new ItemProcessed event was being appended to the event handler each time through. So the second time the file was processed, the ItemProcessed event was called twice each time an item was processed. The third time, thrice. Etc, etc.

Unfortunately, the fix was trivial:

private void ConvertFile( string converterName, string sourceFile, string destinationFile )  {      IConverter converter = FindConverter( converterName );      converter.ItemProcessed += converter_ItemProcessed;      int recordsProcessed = converter.processFile( sourceFile, destinationFile);      converter.ItemProcessed -= converter_ItemProcessed;  }

And now I am left to ponder my decision to work onsite for the next month in this soulless place. Left to wonder why I left my safe haven. To toil between a woman whose radio is always slightly off-station and a man with a cruel tendency to squeeze his squeaky, rubber duck at inopportune moments.

Pray for me, readers. Pray. For hope.

Kyle the Indentured



Source Click Here.

The Anonymous Namespace Bug

 

Actively participating in the development of a static code analyzer such as NDepend is a good way to learn about tricky Common Type System (CTS) details. Every feature have to be tested properly to cop with things like managed and unsafe unmanaged pointer types (ref out and *), open/close generic types, generic parameter types, methods with special name (.ctor() .cctor() get_ set_ add_ remove_...), all sorts of arrays combination, virtual/new/override methods, explicit interface implemented methods, nested types, anonymous namespace... And of course, all this tricky points can be more or less combinated.

During our tests we found 2 bugs related to anonymous namespace. One in VSTS Coverage and one in the Visual Studio Code Model. Hopefully, the other CTS peculiarity seems to be bug free as far as our tests are concerned.

When the lightning strikes 2 times the same place, I suppose that this is not by chance: namespace are not first class citizen in the CTS. In other words, there are no metadata tables related to namespace in the metadata of an assembly. At IL level, namespace are just types names' prefixes. This lack of support for namespace certainly leads team responsible for these features to forget about testing these cases.

 

The Team Coverage Anonymous Namespace Bug

This bug occurs when there is a nested type in a type declared in an anonymous namespace. For example testing this piece of code.

.leads to the following Team Coverage XML. We can see that instead of having the class ClassInAnonymousNamespace.NestedClass declared inside the anonymous namespace, we have a class named .NestedClass declared in the ClassInAnonymousNamespace namespace.

 

The Visual Studio Code Model Anonymous Namespace Bug

This bug occurs with VB.NET, when you have a type declared in an anonymous namespace. For the VB.NET compiler, the anonymous namespace doesn't exist. Indeed, the VB.NET compiler makes it so that every type declared in an assembly are prefixed by the name of the assembly. I don't know the reason for such choice, but I hope there is a solid one because it is really not elegant. Update 24 July 2008:  This is a customizable VB.NET project setting: Application > Root Namespace.


Now consider the VisualStudio code model. As shown below, a VB.NET type declared in an anonymous namespace doesn't reference a namespace object. To see the assembly name namespace, one needs to analyze the delta between the FullName and the Name of the type.


 



Source Click Here.

Originals Enjoy