string.format("{0} Architect{1}", "Over", "ed")

As an enterprise software architect, there are many difficult problems that I face at work.  Most of the time, these problems require an elegantly architected solution that promises to be both maintainable and efficient at the same time.  This is always a difficult balance to achieve. 

The thing that surprises me most is that many people have a skewed view of maintainability.  An application that is maintainable does not necessarily mean that it is simple to configure, refactor, or extend.  While these characteristics of software are good ones, they do not make software easy to maintain.  Ease of maintenance to me means that a developer with good fundamental skills can understand, support, and modify code.  Often times, the simplest software is the easiest to maintain.

Which brings me to my key point: Many software systems are overarchitected

While that word came up as a spelling error in my editor, I am quite confident that the concept exists.  You know the stuff I am talking about — Code that is ridiculously complex in the name of architectural purity.  Code that has hooks for uses that only the designer/developer were able to dream up and that the user or support tech will never understand or use.  If these extraneous bells and whistles cause you to expend brain cycles on goals other than making the software meet the requirements, the exercise is purely academic.

This is why is pays to have experience in the problem domain for which you are writing software.  If you understand what things the user may want to do, you can add the right hooks in (and none of the wrong ones).  Take the title of this blog post as an example.  I have plenty of flexibility as I have a plethora of options for switching out my title.  Heck, I could even put it in web.config!  But alas, does that really buy my anything to be able to easily switch my blog post tile to “Under Architecting”?

So before you amaze yourself with your coding prowess, think about what it is you are doing.  Is it a requirement for you application?  Would it be used any more often than once per ice age?  Did you only do it to prove that you could?

A little common sense goes a long way…


WMIC – A Hidden Gem

Often times I find myself applying “developer-type” solutions to IT administrator problems.  Naturally I was excited as PowerShell a.k.a Monad a.k.a Poshwas gaining notoriety.  I had visions of a tool that would let me peek into services, filesystems, performance counters, etc. for all of my servers including database, application, web, etc.  Much to my dismay, I quickly found that PowerShell only works locally!  Total bummer, but it is a 1.0 product, so I am sure Microsoft had to do some feature triage. Things like AD and WMI took a back seat as there are other ways to get that data.

This means that the best way to query a server for administrative details such as OS version, patches, CPU, memory, running processes, services, etc is still to use Windows Management Instrumentation (WMI).  In my opinion, using PowerShell 1.0 to call WMI is using a sledgehammer to kill a fly.  This is fine, and it will certainly do the trick.  However, if you don’t already know how to wield a sledgehammer, you may be explaining to your boss why it took 4 days to get a working script that one can do without PowerShell in 5 minutes.  Enter WMIC – the command line tool for WMI.

It is amazing this thing doesn’t get more play, because it is awesome and comes built into most recent versions of Windows including Windows XP.   WMIC is simple, elegant and very powerful.  You can accomplish a tremendous amount in just one command line.  This is much more straightforward, in my opinion, that using .NET or even PowerShell to crack open the functionality and data contained within WMI.

To show you how easy and awesome WMIC is, I invite you to try the following steps. Note there is no step to download anything because as long as you are using any modern version of Windows, it is included in the OS:

  • Go to a command prompt and type the following command
  • C:\Documents and Settings\your_id> WMIC

  • This will bring you to the WMIC command prompt. Now type
  • wmic:root\cli> process

Notice the horizontal scrollbar in your results — there is a lot of information provided! This is essentially task manager on steriods. Better yet, it can be scripted out to a text file… on a schedule… etc… Pause for a minute and think about all of the things you can do with this. Now get ready to have your socks rocked off by the number of different items you can get information on. We used the “process” command to get information about the active running processes, but check this out (from within the wmic command prompt):

  • At the WMIC command prompt type
  • wmic:root\cli> /?

Have fun exploring!!! Please post any comments here of useful tricks you have found using WMIC. Here are some other useful resources you may want to check out for more information on WMIC:

    TeamCity – A Better CCNet?

    I have heard some buzz about a product from JetBrains called TeamCity.  Some very influential technologists such as Roy Osherove seem to like the capabilities, so it is definitely worth a look.  This looks like a good competitor to CruiseControl.NET, so I think I am going to give it a spin.  I’ll update the blog here with my findings as I go along.  The installation sounds to be smoother than CCNet (which can be a bit painful), and some of the features on the TeamCity website look terrific.

    More to come, but if you have any experiences with TeamCity, please share them here in the comments.  My only concern at this point is that it looks like it may cater to more of a “Java” based crowd?  Sometimes tools with a Java history just don’t “feel” right to me and seem to take a long time to get the hang of for teams that are primarily involved with .NET.

    Microsoft IT Advisory Council

    So I get a lot of email from Microsoft, which is mostly by my own doing since I like to get the download notifications, my company is a gold partner, etc. Recently I received an email inviting me to fill out an application to join the Microsoft IT Advisory Council.   A while later I learned that I was accepted and have been spending some time browsing the site and the forums provided for discussions.  At first, I thought is was just another means to pump free demographic data out of me, but it does appear to be legit. Apparently there are small meetings to discuss topics relevant to IT professionals.  Here is the blurb from the website describing the concept.

    What is the IT Advisory Council?

    The IT Advisory Council is a select group of IT Professionals and Developers, which purpose is to share your views, ideas and opinions, helping Microsoft shape future initiatives. As a member, you will play an integral part in providing us with feedback on Microsoft customer offerings, licensing, support, marketing materials and community initiatives.

    Members will communicate with us via an online portal and a program of face-to-face and online events. Each event is currently limited to 12 members to ensure rich discussion and you will be eligible to participate based on a point-system on our portal. Membership also involves completing a monthly online ‘task’, which can be completing a mini-survey or sharing your experiences on our portal forums and blogs to help Microsoft understand what it’s like to be in your shoes.

    Presently, there are more than 200 members in New York, Chicago, Toronto and the UK, and we are currently opening up further membership both in current locations and worldwide. Do you want to become a Council Member? Register here.

    Anyone have any knowledge or experience with this? I am going to check it out and see what kind of resources it may provide and hopefully make some more mutually beneficial connections in the software community.

    VSS and CruiseControl.NET

    Recently, a respected member of the .NET community asked for some “gotchas” when using SourceSafe with CruiseControl.NET. At first, I was thinking, “There really aren’t any. It is working fine for us” however when thinking back on the setup of the current infrastructure I recall there was some tweaking necessary to get things rolling.

    DISCLAIMER: I would like to preface any content of this article by saying that I am by no means a VSS fan. It is free, it is just good enough, and it is already in place. I already know what tool I want to switch to when the time is right, but for today I work in a VSS shop.

    So, if you are going to setup CCNet with SourceSafe, here are some things to keep in mind. With respect to things to stay away from, I experienced some issues when I tried to monitor a large number of projects. You also may experience VSS timeouts if the project folder you point to has too many subfolders/files. In some cases, the VSS history command to see if anything had changed since the last build took longer than the preset timeout (I believe it is 30 seconds)!!! So it would help to be selective in the points you monitor within VSS. If you keep your solutions/projects to smaller, more manageable sets of code you’ll probably be more successful.

    One thing you could try is to time the history commands from a command line. When using VSS, CCNet essentially issues a command like the following:

    SS.EXE history $/Devl/Products/XYZ/Common/2.0/Batch -R -Vd12/5/2007;5:01a~12/4/2007;1:11p -YBuildUser, -I-Y

    By executing this manually you can get a feel for how long it will take to execute the command. The CCNet logs will show if you experienced a timeout:

    2007-12-05 05:04:20,165 [Accounting Batch 2.0:WARN] Process timed out: C:\Program Files\Microsoft Visual SourceSafe\SS.EXE history $/Devl/Products/XYZ/Common/2.0/Batch -R -Vd12/5/2007;5:01a~12/4/2007;1:11p -YBuildUser, -I-Y.  Process id: 3928.  This process will now be killed.
    2007-12-05 05:04:22,994 [Accounting Batch 2.0:WARN] The process has been killed: 3928
    2007-12-05 05:04:23,040 [Accounting Batch 2.0:ERROR] Exception: Source control operation has timed out.

    Despite some pain getting the right level of monitoring, it is now a useful tool. I would definitely encourage use of the CCTray app for all developers. This seems to be the easiest way to communicate a breakage. You can also use the web dashboard to show the history of what has happened:
    CCNet Web Dashboard

    Houston, we have a TechFest!

    The Houston .NET Users Group (HDNUG) is organizing a day of technological banter at the University of Houston next month. The event has been coined the Houston TechFest and it is going to be held on August 25th (a Saturday).

    This knowledge sharing experience is of particular interest to me because it will be my first true technology speaking experience. I’ll be presenting a session on Continuous Integration focusing on the open source tools that have been created to help .NET projects be more efficient. Here is the abstract of the presentation.

    So if you are a seasoned technical speaker and have some pointers I am happy to mooch off of you if you want to leave a comment or email me.