Microsoft Mocking Framework and TypeMock


While everyone has been wondering over the past couple years when Microsoft would ship its own version of a mocking framework, as of yesterday TypeMock announced it has been acquired by Microsoft and the product will be included in future versions of Visual Studio.  At least they didn't follow their previous pattern and create a less powerful clone of other products already on the market.  Hmm, interesting this should be me thinks.  Next to follow, possibly a DynamicProxy2 clone from Microsoft?  What day is today again?

Creating Objects - Round 3


Ayende has been discussing the different ways of actually creating objects in .NET and the perf cost associated to each of them.  I thought I'd add to the mix one more method, using the DLR.  I've talked to several people who have identified concerns with the speed of the DLR so I found the results rather interesting.  The context is still the same, identify the time it takes to construct one million Created instances. The delegate: delegate Created CreateInstance(int num, string name); The structure: public class Created { public int Num; public string Name; public Created(int num, string name) ...

Vibrant Ink for Visual Studio 2008


For those of you that enjoy the Vibrant Ink theme that was originally produced for Textmate, John Lam converted it to work under both Vim and Visual Studio 2005 a while back.  I've enjoyed that for both editors, however with Visual Studio 2008 out, we need to update.  I've updated the settings file to now work with Visual Studio 2008.  Feel free to download it here.

Code to Live Video from Tulsa TechFest


Jeffrey Palermo and I sat down with Chris Koenig while at Tulsa TechFest back in October to chat about the new ASP.NET MVC stack.  Josh Holmes just published an extract of our conversation out on Channel 9 here.  This was recorded back in October, right after the ASP.NET MVC stack was first made public by Scott Guthrie down at the ALT.NET conference in Austin, TX.  We discussed other things such as the open source movement and it's relationship to the Java counterpart but they didn't make the cut in the editing room.  You can watch the video directly here.  Have...

ALT.NET Super Summary


It's simple in my opinion: Spreading pragmatic .NET I wasn't there, however that's my interpretation of the vision. I think one of the core competencies any developer needs to espouse is passion. Passion is at the root of being a pragmatic developer, regardless of whether or not you’re doing .NET/Java/Ruby/LISP, etc. We are going through a hiring phase at work right now, during the interviews, passion is one of the top characteristics that I look for in a candidate. Passion is a catalyst for being pragmatic. Where does your passion lie?  

NHibernate Performance


I am doing some research into the use of NHibernate over the use of the current data access layer we use at work. Overall, the results are very good compared with what we current had in place (lazy loading all properties, limited caching strategies to name a few), however I'm curious if anyone wants to ring in on past experience they have had with NHibernate. Our DBA is concerned that we will be losing out on cached execution plans from SQL Server by moving to NHibernate from stored procedures. It is my understanding that parameterize SQL can...

Common Lisp


For those of you interested in functional languages (I know Jeremy is), APress has decided to give away it's PDF version of the book Practical Common Lisp for free. Go get it here. UPDATE: The URL has been updated for the free book download.

Castle Presentation


I will be presenting at the September Iowa .NET User Group meeting, if you don't have any plans September 5th come on out for some free pizza and a presentation on the Castle MicroKernel/WindsorContainer. I will be giving an introduction to the dependency inversion principal, and then we will jump into MicroKernel and the extensions that have been built on top of MicroKernel to create WindsorContainer. My final demo will include a custom facility to extend WindsorContainer that will provide integration with the memcached distributed object caching system. I hope to see you out there!

DLR Scores


In the constant battle for staying ahead in the software world, Microsoft appears to have a slight edge from the dynamic language perspective. The DLR is being created to support the various dynamic languages that Microsoft intends on releasing, IronPython and recently IronRuby with a dynamic version of Visual Basic in the future (this reminds me of VBScript and the VARIANT data type - sigh). Microsoft hasn't exactly been on the forefront of dynamic languages, Smalltalk has been around for over 25 years. However what does appear to be changing is the way languages and platforms...

IronRuby Emerges


So John Lam annouced the alpha release of IronRuby, he mentions that they did a lot of work on string and arrays, unfortunately, with the current release .NET types aren't able to execute Ruby mixins. I was hoping to do something like the following: require 'mscorlib' require 'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' list = list.Add(5) list.Add(10) list.Add(15) list.extend Enumerable list.each {|i| puts i.to_i} The following code does execute: require 'mscorlib' require 'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' require 'System.Drawing, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' require 'System.Windows.Forms, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' Application = System::Windows::Forms::Application Form = System::Windows::Forms::Form Button = System::Windows::Forms::Button Point = System::Drawing::Point Size = System::Drawing::Size MessageBox = System::Windows::Forms::MessageBox window = window.text = 'Testing IronRuby'...



This blog has been pretty quiet lately, what's going on, has Nick fallen asleep? Nope, I've just been busy wrapping a few things up. Most importantly, I got married on June 2nd, and we took a few weeks off to head down to Hawaii and relax. If you've never been, my recommendation is to skip Maui and head right for Kauai. I will be presenting at the Cedar Rapids User Group on January 7, giving my presentation on Castle's MicroKernel/Windsor Container, so if you are interesting in hearing more about the light-weight IoC container come on...

ReSharper 3.0 Released


Absolutely amazing, do not pass go, do not collection $200, just go get it.

ReSharper 3.0 Beta


Get it here, looks like they've added quite a bit to this release including a new model for different editions of the product.

TextMate for Windows


TextMate appears to be the de facto text editor for the Mac, it became extremely popular with the RoR crowd and has continued to grow. I had posted about Intype at the beginning of the year as it looked promising with it's template expansion support, however not much has happened with the product since then. I just came across E, a text editor for Windows that fully supports the bundle and command integration from TextMate. I really enjoy Vim, and I am used to the keyboard binds so this might be difficult to switch to, I'm going...

Message Propagation


Today I ran into an issue where multiple user controls within a scrollable container (Windows Forms) were not always scrolling properly within the container. When the outer user control (specific controls actually) within the container had focus, scrolling worked fine, however when other controls had focus, scrolling with the mouse wheel doesn't occur at all - time to start digging. I noticed this occurred with the TextBox class, and it behaves differently depending on the Multiline state of the control. This is actually a valid situation, we want the TextBox class to handle the WM_MOUSEWHEEL message when...

DLR Hosting Services


I was poking around within the DLR code that was release yesterday within the IronPython Alpha release and I came across the Script class which allow local hosting of a script. Given a language provider you can then execute a block of code. Internally the ScriptEnvironmentSetup loads 4 LanguageProviderSetup classes currently IronPython.Hosting.PythonLanguageProvider Microsoft.JScript.Compiler.Hosting.LanguageProvider Microsoft.VisualBasic.Scripting.Hosting.VisualBasicLanguageProvider Ruby.Hosting.RubyLanguageProvider Unfortunately it appears they are only including the IronPython.Hosting.PythonLanguageProvider with this current release. A quick example of what you can do, the Script class is a wrapper around the ScriptDomainManager: using System; using Microsoft.Scripting; namespace IronPythonScriptHost { class Program { static void Main(string[] args) { string code = "print \"Hello\"...

DLR and IronRuby


Today at Mix the DLR was announced along with Silverlight. IronRuby is on the list to be one of the languages that will make the initial release under the DLR. If you're interesting in poking around with the early bits of the DLR, check the 2.0 Alpha release of IronPython. Hammett, any chance MonoRail is going to take advantage of these new features/languages?

Software Evolution


There has been a discussion going on the Central Iowa Java User Group discussion board recently and I think it’s worth noting. The discussion started off as a standoff between SOAP and REST. The gist was that SOAP brings too much extra “gunk” to the table and REST is all about the HTTP protocol, clean and precise. The REST folks feel that SOAP fills the gap for tool vendors (which it does) followed by a statement that went something like “…SOAP is CORBA in an XML tuxedo…” That put a smile on my face, thanks Brandon....

Tailing your log file


In Unix we have tail -f which will allow a user to see during real-time the values that are being committed to a log file. I tend to use log4net as my logging utility, however I can't always use a console appender to view your log in real-time. On Windows, a good replacement is called Tail for Win32 which allows you to do the same thing, and also colorize the output based on keywords. A nice little tool.

Choosing a Text Editor


By and large I live in Visual Studio day in and day out. I picked up a copy of the Pragmatic Programmer back in 2000 and I continue to re-read it every so often, it’s a treasure trove of great information, I highly recommend it if you haven’t read through it before. One of the points Dave Thomas and Andy Hunt make in the book is to pick a text editor and know it well. The goal here is being proficient and learning the keyboard binding that your text editor provides can further improve your daily efficiency....



Jeffrey Palermo recently commented about a discussion he and the CodeBetter guys had with Scott Guthrie regarding adding new support for MVC within ASP.NET. While I didn't get a chance to talk to Scott, I hope they look at other features that current MVC frameworks provide that make the development cycle more fluid. For example, the process of extracting values submitted from the form can be tedious. Within MonoRail, the MVC web framework provided from Castle, if your controller inherits from the SmartDispatchController, you can take advantage of data binding back to the action of your...

Extended Gmail Keyboard Support


I love the keyboard shortcuts in Gmail, however there were several shortcuts that were missing that keep me from truly navigating Gmail without a mouse. With this greasemonkey script I no longer need my mouse. I can do things such as: Shift + x + u - Select all unread items. g + label name - Navigate to a label. l + label name - Apply a label to an email. / to perform a search. t - trash a conversation. Pressing h will display a help screen to show all of the options, which is displayed using the same Quicksilver style window that...

Navigating Google Reader without a Mouse


I've been using Google Reader for a while now, and I love the fact that they support keyboard shortcuts so I can avoid using my mouse as I browse though my subscriptions. Until yesterday I only used the following shortcuts: N - View the next post. P - View the previous post. M - Mark / Unmark a post as read. Yesterday I decided to organize my subscriptions as my list was getting a little unruly and appeared cluttered when I would sign in. Google Reader supports tags/folders so I was able to cleanly organize my feeds. Now I was faced...

New Text Editor in Town


Intype is a new text editor for Windows. While it's currently just an alpha release, it looks very promising with template support and multiple languages. They even have a few screencasts, check it out and let them know what you want to see in the next release.

Developers Hitting the Music Scene


So I found this hilarious, and very geeky to boot. I doubt a record label will be after this, but it's worth four minutes of your time.

Upgrading to Subtext


The other day I finally decided to replace CommunityServer with Subtext. After upgrading to CommunityServer from .Text a while ago, I found the user experience less than friendly. Subtext also is offering more features right now than CommunityServer such as cocomment and akismet support out of the box. Scott mentioned recently that CommunityServer is looking to potentially add cocomment support with the next release, I'd rather not wait. Blog spam is increasingly an issue, while I was working on the import process, I deleted 9,410 spam comments. Most importantly I now have the source code...

Vista Launch


Tomorrow Windows Vista will launch, a long awaited day for many. If you happen to be in the Des Moines area, an event is being held at the Polk County Convention Complex, you can register here. Aside from discussing Windows Vista, other topics will include Office 2007 and .NET 3.0. A little birdie even told me Microsoft will be giving away free licensed products at the end of the day to registered attendees. In case the recent snow put a damper on your weekend plans(for those of us in Iowa), the week looks brighter.

Must Read


Jeremy Miller has an excellent read on writing orthogonal code. Do not pass go, do not collect $200 until you have read this post. If you have even more time (read: an hour at a minimum) I highly recommend reading Big Ball of Mud which dissolves the forces behind what cause software architectures to fail and discusses solutions to address them. Finally, Jason Yip hit the nail on the head when discusses what it takes for last minute changes to be safe. Several years ago I worked on a team that produced a calculation engine for...

Microsoft MVP - Visual C#


I am once again a Microsoft MVP for Visual C# in 2007; what a great way to start the new year!

DNUG Meeting


Last night Robert Hundausen presented at our Iowa DNUG meeting covering many of the new features found within SQL Server 2005. Robert has a photo posted of last nights event here. I just wanted to thank Robert for presenting, we had a great time, including the spanning topics discussed during dinner afterwards. :-)

HDC Presentation


Tim and I just finished out presentation on Model View Presenter in ASP.NET 2.0 this afternoon which we followed up by doing a podcast for with Jeff Julian and Dru Sellers. Overall I was very pleased with the presentation, we had one issue with a live demo, but since when do demos work in front of 150 people? For anyone interested, the code is available on svn here.

Drawing the line


Ted Neward recently commented about a comment that Scott Hanselman made during the patterns & practices Summit. Scott said that his company Corillian had built an abstraction layer atop of log4net. From Ted's perspective, the Java world has been dealing with too many layers of abstraction for the last decade they are paying the price for it (agreed). Ted also brings up YAGNI, suggesting that layers are added without an existing need. In my opinion they are both right (way to take sides huh?) Java is attempting to dig itself out of a hole, an example of...

Windows Installer Issues


This morning I ran into an issue where I couldn't remove a Windows Service from my development machine from ARP (Add/Remove Programs). It would exit with an error. After manually removing the executable and associated files (don't do this) and removing the entry from "HKEY_LOCAL_MACHINE\SOFTWARE \Microsoft\Windows\CurrentVersion\Uninstall", I thought I was in the clear (again don't do this). Not so quick, the item I thought I had removed continued to show up under ARP, this time without the Repair or Remove buttons. After talking to Heath, the suggestion was to run msiexec /fvomus {productcode}, the {productcode} can be found...

Heartland Developers Conference


The 3rd annual Heartland Developers Conference will be October 26th and 27th in Omaha, NE. HDC has just sold out with over 500 attendees expected! Tim Gifford and I will be presenting on the Model View Presenter pattern within ASP.NET 2.0. It appears that Kent Tegels is presenting at the same time. He is covering the new Entity Data Framework which sounds intriguing. For those that are curious, we will be using NHibernate for our data persistence tool during the presentation. :-) Let me know if you'll be out there the night before...

UIPAB Survey


The patterns & practices team is currently holding a survey about the direction of a new project aimed to fill the gaps and extend where the UIPAB left off. I am curious if they will be integrating Windows Workflow into the project as it seems to be a good fit. At TechEd this summer there were several presentations on Windows Workflow within ASP.NET by the ASP.NET team, hopefully Microsoft isn't creating two different projects with the same goals in mind. This wouldn't happen would it - Windows Communicator, Windows Messenger, MSN Messenger ;-) Go ahead and...

Mock Object Discussion


Scott Hanselman has a great discussion on mock objects on Hanselminutes. They go over the basics of how mocks fit into the development environement and how it helps in a test driven development environment. Scott mentions how the Expect API of many mock object frameworks read like an english sentence, this is a great example of a fluent interface. Scott points out one of the most apparent reasons why Rhino Mocks is a great mock library, it doesn't rely on string-based method names, you actually use the method in your expectations. This is great because it...

Model View Presenter Redux


The Model View Presenter (MVP) pattern seems to be all the rage within the last year; it must be the new pink. While I agree this is a great pattern to decouple various logical layers within a system, I think we are missing an important core piece to the puzzle. In my opinion, humble of course, the Model is purely a representation of my data, and I prefer to depict that in the form of a Data Transfer Object (DTO), this is the ubiquitous PONO (Plain Old .NET Object) - (Edit: Domain Model's are welcome too) . The View...

XmlMessageFormatter Woes


I ran into an issue with the XmlMessageFormatter yesterday where I noticed a difference between how .NET 1.1 and .NET 2.0 behave with streams and thought it would be good to share. We are pulling messages off a queue (ours happens to pull from Oracle AQ running on top of JMS). Since we don't know exactly what .NET type the XML message represents we can provide an XmlMessageFormatter with the types our application is aware of and ask it to perform the deserialization process for us. There is nothing complicated with this, internally it is just attempting...

Subversion on Google and CodePlex Errors


Google has recently provided access to creating Subversion repositories with you gmail account for projects here. After performing a small import, the SVN access Google provides is rather slow, hopefully they are still working on this. Microsoft released CodePlex at the end of June, a development community site which interacts with Team Foundation Server. CodePlex is currently limiting the amount of projects that are created to help scaling efforts. After accepting the terms and conditions to download the Jad Engine project, I got the following helpful error message: Hopefully some of the developers on CodePlex...

Bored During Build Time?


It's very important to keep your build time as short as possible, but everyone has to deal with it one way or another. If you enjoy anagrams, try next time you are waiting for your build process to complete. On a serious note, if your build time is extremely long (can you eat lunch during your build?) then the next step is to shorten your build time to increase the feedback loop within your development team. The longer your feedback loop is among the development team, the longer it will take to fix bugs when they...

Test Driven Development Discussion


Last night I had the opportunity to go to dinner with the Visual C# Team, C# MVP's and Regional Directors. I had an interesting discussion with Bill Wagner on the merits of having development teams following the test driven development methodology. It was a hearty discussion where I attempted to play the devil advocate in support of full compliance of the TDD approach. I also had the chance to chat with Jeffrey Palermo about some of the idiosyncrasies related to the configuration file within StructureMap and the immediate value ReSharper provides to development teams.

Dirty SOAP


I just came from Scott Hanselman and Patrick Cauldwell's session on dynamically endpoints without ASMX. Their session was great and I had the opportunity to talk with Scott for a little bit afterwards. Scott's company uses dynamic endpoints to allow their customers to easily integrate with their financial software by providing WS-I compliant web services to support integration with disparate client software. Using a dynamic adapter, they are well suited to evolve with the eminent release of WCF. Three days into TechEd and the only things missing are power strips in the session rooms (shouldn't this...

Notification Policy


How does your application support notification policies? Do you have failover mechanisms to support the policy? Our plane was scheduled to leave at 4 o'clock Saturday to fly out to TechEd. When I arrived at the airport at 2:30 I was notified that our plane had been cancelled and rescheduled to an earlier time that had already left by this time. The airline confirmed that they had in fact notified us via a phone message that was left at the main number of our office - which somehow never made it to us, they were free...

Intellisense for SQL Server


I have mentioned previous how I enjoy working with Red-Gate software, they have done it again and this time it's free. Now you can get Intellisense for SQL inside Query Analyzer, Enterprise Manager, SQL Server Management Studio and Visual Studio 2003/2005. Here's a screenshot: Download it here.

Tech Ed 2006 BoF Session


Eric Jacobs and I will be holding a BoF session at Tech Ed called ".NET User Group Open Forum" Tuesday night at 7:45. The purpose is to discuss ways to facilitate a .NET user group in your area, driving membership and promoting good content. We will discuss both things to do and not do when running your user group. If you are a member of an existing user group or would like to start one in your area and will be at Tech Ed, stop by our BoF session and share your thoughts. Unfortunately I won't...

XPath Debugging Visualizer


This morning I put together an XPath Visualizer for an XmlDocument to be used within Visual Studio 2005. This comes from waking up at 4 a.m. and not falling back asleep. Any suggestions? Here are a few screenshots: XPathVisualizer 1 XPathVisualizer 2 XPath query during debugging. Viewing the Xml document while debugging. Source is available here. Installer is available here.

Inversion of Control with Spring.NET


I have previously mentioned using the Spring Framework for the AOP support the framework provides, however Spring is deeply rooted in providing dependency injection or Inversion of Control (IoC). Spring uses a configuration file to manage type relationship mappings to objects, which can be stored in its own external XML file, an embedded resource within an assembly, or directly within your web.config or app.config file. For a simple example, we will define our own XML file (spring.xml), with the following contents:   <?xml version="1.0" encoding="utf-8" ?> <objects xmlns=""> <object name="Database" singleton="false" type="SpringDemo.Database, SpringDemo"> <constructor-arg ref="SqlConnectionObject" /> <constructor-arg ref="SqlCommandObject" /> </object> <object name="SqlConnectionObject" singleton="false" type="System.Data.SqlClient.SqlConnection, System.Data"> <constructor-arg type="System.String" value="Data...

KerberosToken and ASP.NET


Today I found myself debugging a security issue involving the WSE 2.0 SP3. A little background; we have a web service that we wanted to secure; WSE seems to be an obvious choice. We were using WSE to embed a KerberosToken in the SOAP header, this allowed us to retrieve the KerberosToken on the server, access the embedded Principal and check to see if the sender was in fact a member of a specified NT domain group. A simple Windows application proved this worked and I continued on my way. As I started to test an...

ROI for Agile Methodologies


A common question I have heard regarding the use of agile methodologies is how can I determine the ROI of our new found practices. ThoughtWorks, an IT consulting company heavily involved with the agile movement has commissioned Forrester Research to perform an assessment of their processes; here you can read about their results.

Merging Database Schemas


For business applications, databases can be the ugly step child of an application, in particular during the development process. From the test driven development aspect, the question is often, how can I maintain consistent data for the environment so I can invoke atomic tests, quickly and repeatedly in an automated fashion? Another common issue is versioning of the database schema over the lifetime of the development process. At work, I was tasked with merging an existing application into a web framework that required table modifications for integration (it wouldn’t be considered an ‘integration’ without modifications, right?). While the modifications are...

MVP Award


I was just notified that I have been selected for the Microsoft MVP Award in Visual C# from Microsoft for 2006. This is a great experience; I had a great time at the MVP Global Summit this past year and am looking forward to making the trip this year. Unfortunately, Rafael Munoz (the MVP Lead) doesn't have a blog (Rafael - you need a blog <g>) , but I would like to thank him for all the support he has given throughout the past year.

Potential of Canvas


Apple’s Safari browser as well as Firefox 1.5 now support the <canvas> element which can be used to create 2 dimensional drawings. While IE 6 doesn’t currently support it, and I haven’t tested it yet on IE 7 Beta, I’m curious about it’s potential, relative to the Web 2.0. Obviously, if all major browsers were to support the <canvas> element, the potential is there for a lot of opportunities. For example, while I can’t imagine writing by hand the javascript to create a business report (sounds a little too repetitive), I could see a tool or library...

AJAX Search


I decided to update my search by adding a little AJAX support via Michael Schwarz’s Ajax.NET library. When implementing the Ajax.NET library within a user control, I found that the suggested method of registering you class with the library in the Load event doesn’t work properly. While the library does emit the Javascript references to the HTTP handler (the purpose of registering your class with the library), invoking a call to the proxy didn’t work correctly. This only appeared to be an issue with user controls, regular .aspx pages work correctly. By directly including the two...



Meebo is a web-based instant messenger application with similar functionality to Trillian. It appears to be another great implementation of AJAX. Do you find yourself integrating more AJAX type support into your online applications? As a whole are we becoming more concerned with the overall usability factor for our end user? Is the concern for usability becoming more important as it becomes easier to provide solutions to the masses or are the demands of our end users becoming more stringent? I'm interested in your thoughts?

Rat Race


Google just release an API to allow you to create modules that can be plugged into your personalized Google page. These modules can then be published to their module directory for others to use. at this time does support a feature this rich, however I'm sure it's just a matter of time. Is this just another sign of web 2.0 knocking on our doorsteps?

RSS Client


Several people have asked what RSS client I use. After trying several different readers including Omea Reader, Google Reader, and RSS Bandit to name a few, I've settled on RSS Popper. RSS Popper integrates into Microsoft Outlook and is completely free. What reader do you use?

Scrum Plug-in for VSTS


Conchango has developed a Scrum plugin for Visual Studio Team System. This is definitely worth checking out and just goes to show how extensible the new Visual Studio environment is.

PDC 2005 Sessions


In case you weren't able to attend the PDC this year, you have two options for viewing the content. First, you can purchase the sessions on DVD for $499.00 or, you can download any of the sessions and watch them on your computer for free. It's hard to beat the free option, check it out here.

Google Analytics


Google Analytics is a free tool to keep track of metrics for your web site. This is definitely a great way to get quick feedback regarding your site. The underlying service comes from Urchin, a web analytics company purchased by Google this past March. I wonder if we will see a web metrics tool from Microsoft anytime soon?

Quote Of The Day


We've been using Visual Studio 2005 for the last two months, including Visual Studio Team Systems for our source control repository. We have enabled the requirement that a comment is required before a check-in can take place. Because this is a beta product we have had our share of issues to work with, though I'm extremely happy with the product. This comment came in today from Javier and I thought it was worth sharing. For those days when you just have no idea what happened, comments like these arise. “File is unchanged. I needed to check...

Internet Explorer Developer Toolbar


I just came across this new toolbar, targeted specifically for web developers, release by the IE team. There are a host of different items this toolbar provides such as exploring and modifying the DOM of a web page, getting a report on all images within a web page, validating HTML, CSS, and 508 support for web accessibility. Also there is a really helpful ruler that can measure any element on a site. If you are developing for the web this is an excellent tool.

Extension Methods in C# 3.0


Microsoft has made public documention describing new features of C# 3.0. At the PDC today, Microsoft announced LINQ, but there are other features of the C# language that are changing drastically. For example, extension methods are being added to the language which will allow you to do something like the following: namespace Acme.Utilities { public static class Extensions { public static int ToInt32(this string s) { return Int32.Parse(s); } public static T[] Slice(this T[] source, int index, int count) { if (index < 0 || count < 0 || source.Length – index < count) throw new ArgumentException(); T[] result = new T[count]; Array.Copy(source, index, result, 0, count); return result; } } } Assuming you import...

Advanced Design Time Support For Your Components


Have you ever noticed the blue links below the property grid of a objects such as the DataGrid or TabControl when you drag it onto a form? These links provide additional configuration functionality of their objects through various means; a UITypeEditor is used for the DataGrid for example. Implementing this functionality is rather simple, here is just an example. The follow example will allow you to edit the FullName value through a custom UITypeEditor, exposing the editor several different ways, one of which is a custom designer for the component. namespace DeveloperNotes { using System; using System.Drawing; using System.Windows.Forms; using System.Windows.Forms.Design; using System.Drawing.Design; using System.ComponentModel; using System.ComponentModel.Design; [Designer(typeof(ManagerDesigner))] public class ManagerComponent :...

Some Interesting Thoughts On Consulting


I came across both these links today and thought they were worth sharing. Let me know what your thoughts are concerning the topic once you have read both links. Are you a prostitute or a software consultant... What is Consulting?

IE7 Problem


I noticed that following the installation of IE7, Trillian was no longer working. Apparently IE7 is shipping with a new version of wininet.dll which caused the problem. I have since uninstalled IE7 but wanted to note this in case anyone else was running into similar issues.

Thoughts on IE7 Beta 1


I downloaded IE7 Beta 1 yesterday to see what the IE team has been up to. Currently I have mixed feeling about the product, but because it's only a beta product, time will only tell what will become of it. Initially it provides a feel similar to that of Firefox, in particular with its toolbar search built into the upper right hand corner of the window. IE7 now has tabbed support, something IE has been missing for a long time. Intregrated RSS support is also included. Two thumbs up so far. I came across two "downsides" to this beta product...

Language Shops


Language shops, we've all heard of them, this company only writes applications in language X, Y or Z, maybe you even work for one. Typically the language of choice has a large following, be it VB, C++ or Java. The reasoning behind this is purely financial, usually. With a large following it is much easier to locate developers, typically at lower rates, especially if the market is saturated with developers of language X, Y, or Z. I completely agree with Matt in that, if you hire people that are smart enough to learn a new technology,...

XP Themes Issue


Yesterday I was working on an internal tool that contains several controls, one being a TreeView control. I noticed that my images for each node within my TreeView weren't showing up. As it turns out, there is an issue with calling Application.EnableVisualStyles() in 1.1 of the .NET Framework that causes TreeNode images to not display. To work around this, you can call Application.DoEvents() to process all Windows messages that are in queue before the instance of your application is invoked. Luckily, this has been fixed in 2.0.

Installing Visual Studio 2005 Beta 2


Earlier today I was installing Visual Studio 2005 Beta 2 when it prompted me to remove a previous install of the .NET Framework 2.0. Specifically I needed to remove the following:   Microsoft .NET Framrwork 2.0 Beta 2 Microsoft Device Emulator Beta 2 Microsoft Visual J# .NET Redistributable Package 2.0 Beta No problem, I went to Add/Remove programs and removed both the .NET Framework 2.0 Beta 2 and the Device Emulator Beta 2; however the Visual J# .NET Redistributable Package 2.0 Beta was not listed. I did a quick search and found it located in the following...

Visual Studio 2005 Beta 2


Beta 2 has just been released, as of yesterday they only had the links up however the content wasn't available, today everything is there so if you are an MSDN subscriber you can now download Visual Studio 2005 Beta 2.

Visual Studio 2005 Developers Conference


Its official, the Visual Studio 2005 Developers Conference is a go. I will be presenting in both the Minneapolis and Omaha locations covering ClickOnce deployment on June 1st and 2nd, respectively. I will be discussing the high level architecture, deployment and application manifests. I will also cover both security as well as API support to implement on-demand download and custom updating scenarios. There will be three tracks, a Smart Client Track, ASP.NET 2.0 Track, and Visual Studio Team Systems Track. You can register now for only $99, come out and learn what's new for the...

SQL Server Rant


So I was finishing up a stored procedure this morning, saved it and then noticed that once the editor closed that I didn't prefix this particular stored procedure as I had all my previous to match. No problem, right-click on the stored procedure in the list and select “Rename” which will allow you to edit its name, it will confirm that you want to change it and it's a done deal, right? Nope, if you open the stored procedure back up you will notice that it didn't change its name 'internally' within the stored procedure; you have to...

CLR Internals


The May issue of MSDN magazine came in the mail today and there is a great article inside called Drill Into .NET Framework Internals to See How the CLR Creates Runtime Objects. This article is definitely not for the faint of heart, but I absolutely love this stuff. Hanu Kommalapati and Tom Christian go into great detail discussing items such as LoaderHeaps, High and Low Frequency Heaps, the SOS debugger and how the ClassLoader creates the Method Slot Table to name just a few. Oh yes, you will learn how virtual method dispatching works from the ClassLoader's...

The Shelf Life of Google


I can't help but wonder, with Google continually producing more and more products related to their search technology, where will it end? I love Google as much as the next person (probably more) and with the competition in high demand I don't think we'll see an outage anytime soon. MSN has been producing some great integration tools for their search service that are outstanding - I love the fact that I can get my search results in an RSS format. That said, where do we draw the metaphorical red-line? Personally I think we will see much...

Fun with the CodeDOM


I just realized tonight that it's been quite awhile since I've had a blog post. Things at work have kept me rather busy but they are finally starting to settle down now. I was talking to Tim Gifford earlier today about the use of CodeDOM. I decided to put together a little sample that shows you how to generate code on the fly. The example was just thrown together so there are obviously many modifications that can be done to clean this up, an exercise that will be left up to the reader. It's important...

Solidifying The Glue


There has been a lot of recent chatter about Indigo, especially since Eric Rudder recently gave the VSLive! Keynote in San Francisco yesterday. My previous post resulted in a "glue" feeling from Kent that the Microsoft environment provided in the past. I am starting to get this feeling again. I am not saying this is a bad thing; in this case it actually makes sense with what they've done. When .NET first came out we had .NET remoting, ASMX for web services, enterprise services for distributed transactions, WSE for all of your WS-* and MSMQ for message queuing....

Microsoft vs. Sun – Web Frameworks


Over the years both Microsoft and Sun have attempted to provide different programming frameworks to developers, yet as these frameworks are all vying for the same goal (i.e., higher developer productivity, easier integration, etc.), they are attacking their goal from opposite ends of the spectrum. If we look back at ASP, before .NET we see that Microsoft provided a framework centered on a COM infrastructure that allowed everyone to develop their applications in either VBScript or JScript. Mind you, there was no inherent framework for web development, at least, not in the sense that we tend to see it now....

Debugging Web Applications with Fiddler


I just came across a new article on MSDN detailing the release of a tool called Fiddler. Fiddler sits as a proxy between WinINET and your requests to web servers; allowing it to capture all HTTP traffic. Fiddler is then able to track results and provide performance metrics based on the HTTP traffic being processed. Something I think makes this product even more valuable is the support for debugging. Fiddler supports a type of breakpoint, which allows you pause HTTP traffic, and edit values. If you don’t have an IDE readily available this is the...

What type of developer are you?


Brad Abrams wrote a post back in late 2003 discussing three types of developers. These three types of developers (i.e., Systematic, Pragmatic and Opportunistic) can map closely to the languages of C++, C# and VB, respectively. These three types were defined by Steven Clarke who works on API usability at Microsoft. I think a major flaw with this mapping is that developers can become pigeonholed specifically by the programming language they use. I don't feel that I fit into one specific category here; it's more of a melting pot for me. So I wonder, where do you fit in...

Finding Unmanaged Exceptions


Mike Stall has a really nice write up that walks you through using Windbg to find out about unmanaged exceptions. Nice stuff Mike.

A Software Developer’s Mantra


Marco Dorantes recently posted what I would consider a software developer's mantra, check it out here.


Comega is an extension to C# in two areas; a control flow extension for asynchronous wide-area concurrency and a data type extension for XML and table manipulation (the latter seems much easier to say, don't you think?). This is a research project that has been going on at Microsoft Research; however Dare Obasanjo recently made a post mentioning an article he has recently written that should show up around the end of the month. It appears that Comega could really provide an enhanced support of Object <--> XML mapping, this would be very welcome in my book. ...

Becoming an independent consultant


This is a very interesting read on becoming an independent consultant. Matt has some pretty interesting posts on his blog.

make_pair in C#


Recently in the C# forum on the Code Project someone asked of a mechanism to implement a make_pair in C#. make_pair is provided in the Standard Template Library in C++ which allows you to easily maintain a pair of two specified types in one contained data element. While there are classes in place within the .NET Framework version 1.1 that allow you to perform similar operations, basically any class that implements the IDictionary interface provides this base functionality that make_pair exposes (i.e, Hashtable, HybridDictionary, ListDictionary, etc) although access to their members isn't as direct as a make_pair exposes....



I was reading Chris Anderson's post on a new web browser he came across called Maxthon. It runs using the IE rendering and network stack but has lots of extra features such as tabbed windows, skinning, and a utility bar to launch external applications from within the browser. After just a few minutes of playing with it I am very impressed, check it out here.

Check to see if your .dll or .exe is a .NET assembly in unmanaged C++


Javier recently made an interesting post on how to check to see if a .dll or .exe is in fact a .NET assembly or not. This can also be done in unmanaged code so I took this as an opportunity to sit down and write a quick example of how we can check a file to see if it is a .NET Assembly. This is what I came up with. #include "cor.h" #include <stdio.h> bool IsAssembly(char file[]); int main(int argc, char* argv[]) { bool bIsAssembly = false; bIsAssembly = IsAssembly(argv[1]); if(bIsAssembly) printf("I am a .NET Assembly.\n"); else printf("I am not .NET Assembly.\n"); return 0; } bool IsAssembly(char file[]) { bool bIsAssembly =...

Enumerating GAC Assemblies with IronPython


I haven't been able to play with IronPython for a while now, work has been rather busy and I have also just received a copy of Programming .NET Security from the folks at O'Reilly to read and review. So far I am rather impressed with the book. This morning when I woke up I decided to sit down and play around with IronPython again. I love the fact that I can simple write a script yet have the power of the .NET Framework available to me at the same time. With the following script we can...

SQL Server 2005 Webcasts


Check out the new SQL Server 2005 webcasts. There will initially be a week of 15 webcasts. Here is the kicker; if you attend a webcast you will receive a copy of the Beta 2 Resource Kit, and a Beta 3 Resource Kit when it ships. If you are truly devoted (you better be), the first 1500 people to watch 5 or more webcasts will receive a limited edition SQL Server 2005 webcast t-shirt. If that wasn't enough (you want more?), all webcast viewers will be entered into a competition to win an XBox (so you...

What kind of social software are you?


I found this link via Tosh Meston, apparently I am 3°. You can run through the simple test located here. I am not currently employed by Microsoft, but maybe this is a sign of my calling?

Windows Groups and VBScript


Someone at work recently came up to me and asked if I would write up a quick VBScript file to display in a message box the list of Windows Groups a user is assigned to if the user ran it locally. This is what I came up with: Dim WshShell, objDomain, objUserName, list, oGroup Set WshShell = WScript.CreateObject("WScript.Shell") objDomain = WshShell.ExpandEnvironmentStrings("%USERDOMAIN%") objUserName = WshShell.ExpandEnvironmentStrings("%USERNAME%") Set objUser = GetObject("WinNT://" & objDomain & "/" & objUserName & "") On Error Resume Next list = objUserName & " belongs to the following groups:" & vbCrLf & vbCrLf For Each oGroup In objUser.Groups list = list & vbCrLf & oGroup.Name Next Set WshShell =...

Heath is blogging


Heath Stewart, a good friend and former coworker is now blogging. Check out his blog on MSDN.