Moved to another hosting provider.
Moved to here.
Michael Hall's Weblog
What made me begin to unconsciously type "worlofwarcraft.com" into my internet browser address bar. (really)
Here's the scenario
It all starts here. Reading a nice little article about the "faux-code" used on a very entertaining show, although I like the spin-off better. Because I was reading the article using my RSS feed reader of choice I only saw a link to the comments on a popular link aggregation site. There was only one comment on the site, that fully followed a key law regarding internet anonymity.
Okay, my brain works... strange.
Posted byMDH at Saturday, March 22, 2008 0comments
Labels: brain, hurt, oww, stargate, world of warcraft
I don't think it is a coincidence that my favorite development tools are so well documented. The only reason they kept my attention long enough probably has more to do with their level of documentation than their level of "coolness".
Direct links to documentation for some of my favorite tools.
Posted byMDH at Friday, August 17, 2007 0comments
Labels: documentation
Handy guide that I've perused once or twice for tips on formatting strings in C#.
String Formatting in C#
Posted byMDH at Thursday, July 26, 2007 0comments
Labels: .net, c#, formatting, strings
A wealth of useful BizTalk 2004 information can be found at Gille's WebLog.
Another good resource that takes one of Gille's posts even further and demonstrates how to unit test a mapper.Automated Build & DeploymentPosted byMDH at Thursday, July 26, 2007 0comments
Labels: biztalk, tdd, unit testing
There are a lot of reasons typically given for software projects failing, poor management, lack of requirements, and lack (or excess) of talent are common reasons I've heard(used) for failed projects that I've witnessed(particpated in).
Coding Horror has an excellent article that presents 3 alternative reasons that projects may fail that might not be intuitive at first.
Will My Software Project Fail?
CH presents three new pillars of successful software projects.
Posted byMDH at Thursday, July 26, 2007 0comments
Labels: agile, automation, build management, source control
Regular expressions are great. Little strings of yummy helpfulness.
Here's a little regex that can be used to trim all some or all of your trailing whitespace.:b+$
Just pass nothing for the replacement.
Posted byMDH at Monday, July 23, 2007 0comments
Labels: regular expressions
Don't stay logged into shared machines, log off when you are done. The performance overhead of multiple logged in users is bad enough when we're all working, but do we really need 4 instances of ScrnSve.exe running too? Also, if you're logged in but unavailable then managing the machine is more difficult if a reboot needs to be done or other system maintenance. And for Knuth's sake, please don't stay logged in over night.
Sure, we can't be constantly logging in and out, there are times we will be working for extended periods of time on the shared server and may be pulled away during that time. No sense in running another application whose only purpose in life is to burn cycles and render pretty pictures when no one is looking.
Posted byMDH at Monday, July 23, 2007 0comments
Labels: remote desktop
TextPad is my text-editor of choice. It's simple, fast and lightweight. Plus it supports regular expressions and wildcard searches.
When preparing a post for upload onto the site I often need to replace the leading whitespace with HTML encoded whitespace. This replacement will have to be run for leading whitespace character you wish to replace, but don't worry TextPad will let you know when there are no more replacements to be made.
Inside the TextPad Replace dialog ... (Don't copy the quote marks!)
Find what: "^\(\( \;\)*\)[[:space:]]"
Replace with: "\1\ "
To restore the whitespaces use the follow expression.
Find what: "^\(\([[:space:]]\)*\) \;"
Replace with: "\1 " <-- Notice that there is a single space character after the \1.
Posted byMDH at Sunday, July 22, 2007 0comments
Labels: regular expressions, textpad
Just taking another peek over to the the Sun's side of the Sun/Microsoft fence and checking the color of their grass.
Another tool for testing the reliability of your tests is Jester. This tool will actually tweak your code as your unit tests are executed to see how well the tests hold up to changes.
There's already a C# port named Nester. I'm definitely going to try to integrate this into my CI process.
I have to admit, this isn't going to be funny (heh, wocka-wocka-wocka) the first couple times but it'll be interesting to see where it takes my code.
Posted byMDH at Thursday, July 19, 2007 0comments
Labels: extreme programming, test driven development, unit testing
Just reporting on untested code is nothin'. How about a tool that *removes* untested code.
Check out the oh-so-provocatively named coverage tool, Guantanamo.
When Guantanamo detects untested code it will actually remove it from a working copy of the codebase. C'mon, if you want to move from the foo-foo world of XP and into the hardcore world Mountain Dew level of extreme it should remove the code from source control. Currently the tool is only available in the Java world, but with most of the XP tools stack (ant, junit, cruisecontrol, jcover) will eventually find it's way into the C# world.
If you're wondering about the quality of your unit tests, and are in the Java world, check out Ashcroft. The same guy who gave us Guantanamo also created this tool for analyzing your unit tests. By checking your tests against a set of guidelines your testing practices become more focused and streamlined.
They are building a 10 Commandments of Unit Tests, here's a direct quote from their site.
- I am the class being tested. Thou shalt not test any other class but me.
- [Thou shalt write isolated tests]
- [Thou shalt not access files during unit tests]
- [Thou shalt not write two tests which depend upon each other]
Posted byMDH at Thursday, July 19, 2007 0comments
Labels: extreme programming, test driven development, unit testing
The pendulum is swinging back towards Linux again for me. As my wife has noticed and much to her irritation, every couple months I'll take another shot at replacing my Microsoft... er, I misspelled that, I meant Micro$haft (now I'm 133t), operating systems with one of the more popular Linux distributions. Over the years I've tried Red Hat (v4 was my first attempt), SuSE, Mandrake, Lindows (I think it's now called Linspire), Caldera (now SCO, those bastards) and an old Corel distribution. Mostly with varied levels of failure. Until Red Hat started the Fedora project, most of my attempts at converting to Linux we immediate dismal failures at best. There was always some level of ridiculous flakiness or some quirk that would irritate me enough to throw my hands up and run back to the known-devil that is Windows.
My current experiment is with Ubuntu 7.04, installed with the DVD included in a Linux Format magazine. The magazine is an excellent read and worth picking up even if you're a hardcore MS developer. But to make their magazine even cooler, each issue contains a content disc that usually has the latest version of several distributions. It's much easier just to spend the $15 and read the magazine while the installation chugs along, than to fight with downloading an ISO and discovering it was corrupt only after you began the install. But the magazine isn't why I'm blogging. I'm blogging because I am so throughly blown away by the Ubuntu installation experience.
Ubuntu has an amazing installer. They load the operating system as a live cd, basically running the OS directly from the DVD. You can then play around with the distribution before you fully commit to installing the OS, and if you decide to commit you just click the "install" icon on the desktop. A few more clicks through the wizard and you are on your way to Ubuntuy Linux goodness. The really fun part is that you can surf the web while the installation is running because the live cd loads all the drivers automatically. So I was able to blog about how awesome the Ubuntu installation experience is while the installation is running! Neat! Funny that installing an OS could be easier than installing some common desktop application.
Posted byMDH at Monday, July 16, 2007 0comments
Streamripper is a plug-in for WinAmp 5.0 that will allow you to save streaming music to disk. Simply download the latest version and run the installer. When you start WinAmp an additional window titled "STREAMRIPPER" will be open as well. While listening to a stream that you want to record, click the start button in the Streamripper window. StreamRipper will beging to save the files in a folder on your desktop by default. To change the location of the save folder, click the config button in the Streamripper window, select the File tab and change the output directory to wherever you want Streamripper to save to.
A thorough tutorial on how to use Streamripper with WinAmp can be found here.
Posted byMDH at Saturday, July 07, 2007 0comments
DotNetKicks is a social bookmarking site, kind of like Digg but targeted at .NET developers. The stories are moderated using a democratic system where articles get votes, called kicks. The more kicks you get the higher up you move in the story hierarchy. When a story is submitted it starts in a pending stories queue. If you get enough kicks your story will be moved from the pending stories queue to the front page. This might all sound like fun and games but what really perked my ears up was their integration with Google's AdSense to earn money for submitted stories. DotNetKicks will split 50% of the ad revenue for clicks through to stories you submit. Nice.
The trick is getting submitted, if your readers aren't aware of DotNetKicks they won't know to submit and/or Kick your articles. You need a way to let them know about the site, but without being crass about it. I didn't want to manually submit my post every time I blogged, so I used Blogger's template system to help do it for me. <p><a expr:href='"http://www.dotnetkicks.com/submit/?url=" + data:post.url + "&title=" + data:post.title' expr:id='data:widget.instanceId + "_kickit"'><img alt='Submit this story to DotNetKicks' expr:src='"http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=" + data:post.url'/></a></p>
I created a tag that I inserted into my Blogger posts template that will automatically display the number of kicks the article has received so far. If you click on the link and the story hasn't already been submitted you will automatically be redirected to DotNetKicks article submission page with the link and title already filled out for you. If the story has already been submitted your vote will be added to the kicks counter.
To add the tag into your post template go to the Template tab under your Blogger accounts Customization section. Select "Edit HTML" and check the "Expand Widget Templates" check box. Scan the template until you find a line that looks something like "<p><data:post.body/></p>". That is where the Blogger templating engine inserts the body of your post. I inserted my tag to appear directly below the body of my posts but you can play around with whatever position you like by using the "Preview" button. You'll have to save the template to apply the changes when you are satisfied.
PS, I used the above steps to post this article to DotNetKicks.
Follow up: The URL changed for submitting links, the snippet in the article has been updated to output the correct link.
Posted byMDH at Saturday, July 07, 2007 6comments
Labels: blogger, blogging, kick me, social networking
Sure, I can code with no pants on. But if I'm working on a team it's better if I put on some nice slacks.
Posted byMDH at Friday, July 06, 2007 0comments
Labels: developer, just kidding, sarcasm, source control
I just got back from seeing the Transformers movie. All I have to say about that is, "Mr. Bay I am sorry for doubting you." This is what summer popcorn adventure movies are supposed to be. Simple, straight-forward action, driving music and just enough humor and light romance to keep it fun. And gigantic robots smashing the shit out of each other.
Personally, I have quite a history with the Transformers franchise. The first thing I ever purchased with my own money was a first generation Optimus Prime. I had to do chores at my father's truck shop for several weekends before I saved up enough money. $13.00 American. As with all children's fancies I eventually traded him for a new Rodimus Prime around the time of the first Transformers movie. Big mistake, Rodimus was never as much fun as Optimus.
I'm pretty sure I did more than my fair share of whining and wheedling whenever my mother got too close to the toy section, but my biggest showdown with my mom was over the Transformers movie. We were at a Jewel that had a video rental center towards the front of the store that was carrying the object of my desire. I don't recall the entire event completely, but I'm sure it went something like this. As my mother entered the cashiers line to pay for our daily bread when I began my attack. She was informed of the movie and just how important it was, but she resisted. As she packed up our groceries and moved out towards the door I realized the object of my desires was not in our possession, I became frantic. I remember stomping and crying and yelling that I was being abused and she probably didn't love me or care about me. She kept her will and I didn't get the movie that day, but I like to think I put up quite the scene. I have to admire her fortitude, I was quite the showman.
Autobots, transform and roll out.
Posted byMDH at Wednesday, July 04, 2007 0comments
Labels: funny, movies, transformers
Small Solution Structures
If the project space is small I'll just name the folder and solution to match the fully-qualified namespace.
Folderc:\FrogsBrain.MyFancyPants
Solutionc:\FrogsBrain.MyFancyPants\FrogsBrain.MyFancyPants.sln
NamespaceFrogsBrain.MyFancyPants
Larger Solution Structures
If the solution directory tree is very deep or there are many projects are under the root namespace I will break the solution folders up to remove redundant uses of the root name.
Folderc:\FrogsBrain\MyFancyPants
Solutionc:\FrogsBrain\MyFancyPants\MyFancyPants.sln
NamespaceFrogsBrain.MyFancyPants
This will help keep to avoid errors when a path can get too long and wreak havoc with some source control tools.
Project Structures
The project names will follow suit, leaving out the name of the solution.
Folderc:\FrogsBrain.MyFancyPants\Library
ORc:\FrogsBrain\MyFancyPants\Library
Projectc:\FrogsBrain.MyFancyPants\Library\Library.csproj
ORc:\FrogsBrain\MyFancyPants\Library\Library.csproj
NamespaceFrogsBrain.MyFancyPants.Library
OutputFrogsBrain.MyFancyPants.Library.dll
The exception is that the project output will be the fully-qualified name of the project. This makes identifying the assembly easier and prevent collision of names like Library.dll.
Folders Not Divided By Namespace
Inside of projects I try to follow the same structure but if a folder is not to be included in a namespace or I want to group some files without changing the namespace structure I will create a folder with a "_" prefix.
Projectc:\FrogsBrain\MyFancyPants\Library\Library.csproj
Foldersc:\FrogsBrain\MyFancyPants\Library\_buildc:\FrogsBrain\MyFancyPants\Library\_configurationc:\FrogsBrain\MyFancyPants\Library\_documentationc:\FrogsBrain\MyFancyPants\Library\_contracts\ISomeView.csc:\FrogsBrain\MyFancyPants\Library\_service\ISomeService.cs
NamespaceFrogsBrain.MyFancyPants.Library
OutputFrogsBrain.MyFancyPants.Library.dll
All files inside of "_" prefix folders are considered to be in the same namespace as their parent folder.
Posted byMDH at Monday, July 02, 2007 0comments
Labels: code structure, standards
I get all verklempt over automated builds. The usefulness of scripting your builds and running them on an automated system cannot be overstated. Period.
Preventing bloat and keeping your builds in sync with the code base is difficult if you don't keep them close. Typically code will be split into separate files to make it more maintainable, build files are no different. I've found that a single build file for anything but the simplest project can grow very unwieldy quickly but by keeping only one coordinating build file at the solution level and splitting the builds up by project, automated builds can be easier to implement and manage. Also, by keeping the files alongside the code they are the building the builds stay in sync with the code they are building.
For example, I have a solution containing 3 projects. One is an executable, two are libraries. The folder structure and the naming of the solutions typically follows the structure of the namespaces.
Let's work from a root folder named 'source' sitting on C:.c:\source
Inside of here I have a solution folder named FrogsBrain.MyFancyPants, the solution will match the name of the folder.c:\source\FrogsBrain.MyFancyPants\FrogsBrain.MyFancyPants.sln
I'll go ahead and add my standard folder to hold my master build script.c:\source\FrogsBrain.MyFancyPants\_build\FrogsBrain.MyFancyPants.build
The primary concern of this build file will be to call the project builds in the correct order and perform any global configuration for those projects.
Now I will build the project folders.c:\source\FrogsBrain.MyFancyPants\Library\Library.csproj
And this too will contain a folder for it's respective build file.c:\source\FrogsBrain.MyFancyPants\Library\_build\Library.build
The pattern will be repeated for the other two projects.c:\source\FrogsBrain.MyFancyPants\Library\UI.csprojc:\source\FrogsBrain.MyFancyPants\Library\_build\UI.buildc:\source\FrogsBrain.MyFancyPants\Library\Tests.csprojc:\source\FrogsBrain.MyFancyPants\Library\_build\Tests.build
VS.Net Solutions can hold items that are not inside a project. Unfortunately, whenever you just add a Solution Item, VS.Net will ignore the folder structure and link to the item directly underneath the solution name. To imitate your physical folder inside your solution, add a new Solution Folder and name it '_build' to match your physical folder, then add the master build file as a Solution Item inside that folder.
Now your VS.Net Solution will look like...FrogsBrain.MyFancyPants
_build
FrogsBrain.MyFancyPants.build
Library
_build
Library.build
UI
_build
UI.build
Tests
_build
Tests.build
Now your build files will be added to source control and versioned alongside the code they are building. This will make executing automated builds easier because the location and naming of the build files will be standardized, making the process easier and more repeatable.
Posted byMDH at Monday, July 02, 2007 0comments
Labels: continuous integration, cruisecontrol, nant, source control
I have really enjoyed using SourceGear's Vault source control server for all my personal development needs for quite a while and I have been nothing but happy with them, I need to expand my horizons.
What I really like about SourceGear, aside from their excellent products, is that they seem to really get how to cater to the small, independent software developer. By providing a free single-user license they put themselves within reach of the developer who could not otherwise afford their product. They also are owned by an individual who really seems to know how to communicate with developers on their level. Through his blog about the daily issues of his software firm and excellent book, Business of Software, which I own and recommend picking up. Also, they support developers desire to extend their products with an automation API and a set of NAnt extensions.
But comfort breeds complacency. I need to try new stuff and see what's out there.
The world of source control tools has seen a surge of growth and even better, competition over the past couple years. The list of actively developed source controls tools, that are within the reach of a mere mortal developer, has grown tremendously and the choices are all very attractive.
So, I've decided to play around with a couple vendors that have licenses that appeal to me. So here's a brief description of what I want in terms of features and licensing.
Cheap, or at least reasonably priced, since I'm not writing packaged software for sale at this point, I'd like a vendor who has discounted licenses for open-source software developers and teams. I like to constantly merge/check-in my code to the repository so having to break flow by leaving the comfort of VS.Net is not desirable. Also, I don't like having to memorize the command-line utility, I am a GUI brat and although I've worked with services and console apps for years I prefer managing the server via some form of GUI, web-based or standalone application doesn't matter. There also needs to be the ability to integrate with CruiseControl.NET and NAnt. Also, labeling needs to be easy, branching and merging of branches should be simple operations. The creation of repositories and working structures needs to be painless. Checkins needs to be atomic and transactional, individual pieces of changelists need to be easily rolled back and commit failures cannot corrupt the repository.
Very attractive open-source developer friendly licensing. An excellent book that covers Perforce as a tool is The Build Master which I own and have read.
CollabNet binaries, can't beat the license, FREE! I don't own this one yet but will be ordering it from Amazon. Version Control with Subversion
From personal and painful experience, "Blech". I inherited it at my job but it's better than everyone working off a shared folder.
What I currently use, but will list it's merits. Vault is also covered in Coder to Developer, which I read cover-to-cover but then gave away as a gift to an excellent Agilist developer when he moved on to another company. Also, I think it's where I first heard about Vault.
I love me some CodePlex, best place for MS-based OSS projects I know of but I'm going to focus on the SCM aspect.
The current likely candidate for replacing VSS at work.
Posted byMDH at Monday, July 02, 2007 0comments
Labels: developer, development, professional, source control