This blog as moved to: http://nerditorium.danielauger.com/
Moving On
Over the past couple of months, the development group has gone through several reorganizations. Yesterday another reorganization happened, including a substantial software platform shift. I did not feel this shift was good for my career, nor was it something I wanted to participate in. Additionally, I think the days of in-house software development for government agencies are coming to an end at light speed. Therefore, with heavy heart, I felt it was time for me to go. Up until recently, it was the most enjoyable job of my career. I wish my former coworkers the best of luck, and I look forward to hearing their war stories as time goes on.
The Case of Web Deploy 2.0 and the Missing MSDeploy.exe
This week, I decided to install the newly released Web Deploy 2.0 on my machine at work. I already had Web Deploy 1 on my machine, so I decided to uninstall that first before installing 2.0. After the installation I begain getting the following error when trying to execute VS2010 created web deployment packages from the command line:
Error: The system was unable to find the specified registry key or value msdeploy.exe is not found on this machine. Please install Web Deploy before exe cute the script. Please visit http://go.microsoft.com/?linkid=9278654 ========================================================= =========================================================
Of course the first thing I did was validate that MSDeploy was indeed installed with Web Deploy 2.0. It was. I then tried adding MSDeploy's location to the path environment variable. No dice. I then tried reinstalling Web Deploy 2.0. Still no luck. After trying some other things I cracked open the deployment package's cmd file and found this:
@rem --------------------------------------------------------------------------------- @rem if user does not set MsDeployPath environment variable, we will try to retrieve it from registry. @rem --------------------------------------------------------------------------------- if "%MSDeployPath%" == "" ( for /F "usebackq tokens=2*" %%i in (`reg query "HKLM\SOFTWARE\Microsoft\IISExtensions\MSDeploy\1" /v InstallPath`) do ( if "%%~dpj" == "%%j" ( set MSDeployPath=%%j ))
For whatever reason, Web Deploy 2.0 did not add either of these items during install. I ended up adding the MSDeployPath environment variable, and all was good.
Programming is a Craft

“craft -noun 1. an art, trade, or occupation requiring special skill, esp. manual skill: the craft of a mason." (dictionary.com)
“In English, to describe something as a craft is to describe it as lying somewhere between an art (which relies on talent) and a science (which relies on knowledge). In this sense, the English word craft is roughly equivalent to the ancient Greek term techne." (wikipedia.com)
In my opinion, on a whole, software development is a combination of craft and primitive engineering (which is slowly emerging as a true engineering discipline). The term craft usually means how something was made, not what was made or the perceived value of the end result by the layman. One of the commenters on the original post mentioned carpentry as a craft that may not always be defined by the value placed on the end product by the layman. In this vein, I will also mention that witchcraft is considered a craft.
One of the hallmarks of craft is that that it is filled with heuristics and folklore. Much of the work of today's software developer is squarely within this realm. More often than not, there is no clear-cut way to solve a problem. We craft a solution based off of our experiences and the folklore we encounter. It is worth noting that I consider blogs, google searches, MSDN, visits at a coworker's desk, irc, and stackoverflow.com to be sources of folklore.
I must say that I do agree with much of the post, but I think the terminology that is presented is incorrect. I think it would have been wiser to say that software development is most often not an art, and ego has no place in it.
The Mythology of Commodore Told in about 15 Minutes by Jim Butterfield
I was cleaning up the data drive on my computer tonight and I came across this gem, which is also hosted on blip.tv:
Many of us owe our career to Butterfield, and the father of the 65XX - Chuck Peddle.
If you are interested in the history of Commodore, please check out Brian Bagnall’s: Commodore: A Company on the Edge.
Getting RVM to Work when GVim is Launched from Ubuntu's Menu
If you want to use GVim as your Ruby editor in Ubuntu (and most likely any other Gnome based distro), you've probably found out that your .bashrc file is not read when launching GVim from the Gnome menu. This means that your RVM paths are not available in the scope of apps launched from the menu. However, when launching apps from the menu, the launcher can access your .profile file. That being the case, here is a quick work-around for this issue:
1) Add the following code to your ~/.profile file:
# This loads RVM into the session scope of the launcher. [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"2) Create a script that you can use to start up GVim. Example ~/Apps/GVim/gvimstart.sh. In this script, place the following:
#!/bin/bash source ~/.profile gvim3)Right click on the applications menu and choose "Edit Menus". Then find your GVim launcher and point the command entry to your script.
I am, by no means, a Gnome expert, so please let me know if you are aware of a better solution.
Happy coding!
Learn WPF for Free
In my last WPF related post I spoke a bit about my WPF learning experience. I was fortunate enough to have an MSDN Universal subscription and any book I wanted via my employer as I went down the path. Unexpectedly, I recently received an email from a reader who wanted to learn WPF on a budget of $0.00. After thinking for a bit, I came to the conclusion that WPF can be learned without spending any money (assuming you have a computer that can run the tools). Below is a roadmap on how to do so.
Get the tools for free
Visual Studio Express, which is able to create WPF apps can be found here:
http://www.microsoft.com/express/Windows/
If you need any other tools, such as SQL Server Express, you can most likely find them via the Web Platform Installer here: http://www.microsoft.com/web/downloads/platform.aspx
Learn the Framework
Between MSDN and the community, there is more than enough well-written documentation out there to help one become an expert on the WPF framework itself. In his book, “Advanced MVVM”, WPF expert, Josh “The Maestro” Smith, recommends the following documents to come up to speed with the WPF framework:
Introduction to WPF: http://msdn.microsoft.com/en-us/library/aa970268.aspx
WPF Architecture: http://msdn.microsoft.com/en-us/library/ms750441.aspx
A Guided Tour of WPF: http://joshsmithonwpf.wordpress.com/a-guided-tour-of-wpf/
Customize Data Display with Data Binding and WPF: http://msdn.microsoft.com/en-us/magazine/cc700358.aspx
ItemsControl: ‘I’ is for the Item Container: http://drwpf.com/blog/2008/03/25/itemscontrol-i-is-for-item-container/
A lot of the information in the above links is difficult to absorb, but I think it is very worthwhile to go through the material, and work through the examples, at least once. If some of the documents are unclear, you can always go back to them as you learn more and need more clarification.
Learn MVVM
Many people blow off MVVM as “the latest popular design pattern”, but learning MVVM is essential to working with WPF. This is because MVVM is a natural pattern to use considering the way databinding works with WPF. Yes, you can write WPF apps using tried-and-true code-behind and click event handlers like people did with winforms, but you’ll be doing yourself a disservice.
When learning MVVM, the first place to look is this very simple video by the Jason “The Enigma” Dolinger, where he explains what MVVM is, and what the pattern’s strengths are: http://blog.lab49.com/archives/2650
The next place I would look is the “MVVM In the box” training by Karl “The Educator” Schifflett:
http://karlshifflett.wordpress.com/2010/11/07/in-the-box-ndash-mvvm-training/
As a lesson summary, an in-depth overview of MVVM written by Josh Smith can be found here: http://msdn.microsoft.com/en-us/magazine/dd419663.aspx
Apply what you’ve learned
While there is no WPF “best practices” sample that I am aware of, I think the following can get one to see how WPF fits into an application architecture.
Building a Desktop TO-DO application with NHibernate: http://msdn.microsoft.com/en-us/magazine/ee819139.aspx
Understanding the MVVM Pattern: http://live.visitmix.com/MIX10/Sessions/EX14
Build Your Own MVVM Framework: http://live.visitmix.com/MIX10/Sessions/EX15
Not strictly MVVM, but worth looking at as application and framework samples:
PRISM: http://compositewpf.codeplex.com/
Caliburn Micro: http://caliburnmicro.codeplex.com/
Caliburn Micro Soup To Nuts Series: http://caliburnmicro.codeplex.com/documentation
MVVM Light: http://mvvmlight.codeplex.com/
Keep Learning
Read Blogs! Search out WPF related blogs. There are enough out there to fill your news reader every day. Pete “6510” Brown puts out a Windows Client roundup frequently which is a good starting point.
Read and participate in the knowledge dump at http://stackoverflow.com/questions/tagged/wpf.
At first you may find that some of the questions are the same things you are wondering about. After awhile, you will find that you can answer some of the questions. As you answer questions, you’ll reinforce what you’ve learned.
Share
Software development is still largely a folklore based discipline. It is your duty to share what you have learned in the best way you know how.
Katamari Code
We’ve all worked on projects where the codebase is a mess. Here are a couple of common messy codebase analogies I’ve heard over the years:
The House of Cards Codebase:
The Jenga Codebase:
Although I can appreciate the above analogies, more often than not, I think Beautiful Katamari is the most appropriate analogy.