Archive for March, 2007

Beer #2: Hex Nut Brown Ale

I had the first beer of my second batch last night, its a brown ale from Midwest Supplies called Hex Nut Brown Ale. The beer tasted really good, I would compare it to Newcastle, but a little sweeter. There wasn’t as much carbonation as I wanted, but that might change as the bottles sit longer (I didn’t drink all of them last night :) ).  Anyways, here are the stats:

  • Beer: Hex Nut Brown Ale from Midwest Supplies
  • 2/16: Beer gets brewed, hydrometer reading of 1.050
  • 2/27: Hydrometer reading 1.018
  • 2/27: transferred from plastic fermenter to glass fermenter
  • 3/8: hydrometer reading: 1.012
  • 3/10: hyrdometer reading: 1.012
  • 3/10: Bottled beer, yield was 44 bottles
  • 3/24: Tried first bottle, all was good

This beer turned out really well and I think that because I started in the plastic fermenter and then went to glass, and finally back to plastic for the bottling, I was able to reduce the amount of sediment that ended up in the bottles. Also, I didn’t lose as much beer in the transfers, which is shown by the extra four bottles I got this time around.

I also need to point out that it was my friend Josh’s idea to post the details of my beers here, he was a little offended that he didn’t get credit when I posted about my last beer :)

Unable to load one or more of the requested types

I was getting my build script up-to-date with my WPF additions to Walnut today. I already had the “press F5 and run in Visual Studio” configuration working, now I just needed to make my release build script work so I could continue to package up test releases into an installer.

After I ran the build, I was getting this error: “Unable to load one or more of the requested types”, this is related to the reflection I use to dynamically load either the WinForms shell assembly, or the WPF shell assembly. It was crapping out when trying to iterate over the types in the WPF assembly.

Between some googling and inspecting the build log file, I figured out the issue. The build script first builds  Walnut.exe, then Walnut.WPFShell.dll, then Walnut.Shell.dll.  I found that each shell assembly was rebuilding the Walnut.exe file, because each project in Visual Studio had a reference to that project, so it would force a rebuild. What happens is the version of Walnut.exe is changed when the second shell assembly compiles, which screws up the first shell assembly, it gets confused by the new version number.
The fix was to remove the Walnut.Core project reference from both shell assemblies in my MSBuild files and instead just reference the Walnut.exe file that I know exists in the build directory.

First Look at MonoRail

I “discovered” MonoRail over the past couple days, mostly from a link on Scott Hanselman’s podcast. I had heard about it and finally decided to take a look.

MonoRail is to asp.net development what Rails is to Ruby web development. MonoRail allows you to use a pure MVC pattern in your asp.net application. Controllers handle the page flow and interactions, Views are just that - a “dumb” UI, and Models are your business objects. MonoRail has some nice integration points with Castle’s ActiveRecord library for .net, which makes a lot of the forms work like they would in RoR.

The thing that I think I like the best about MonoRail is that it allow you to develop as if you were using Ruby, but its got the scalability of typical asp.net web apps. I read much more about scalability concerns with RoR as opposed to asp.net, and while I think the scalability of either environment only comes into play when you have a hugely popular site, I still like developing in .net better than RoR.

One feature, albeit small feature, that I really like about Rails that I haven’t seen yet in MonoRail is respecting the intent of a GET request. In Rails when a “Destroy” link is shown, it links to some url like this:

http://localhost:3000/products/destroy/3

Which would be routed to the “destroy” action for product with ID = 3. This works of course, but its better to use a POST request when modifying data, not a GET request. So, the link in Rails actually doesn’t go to that url, instead it uses javascript to write out a “

Anyways, MonoRail looks cool and I’ll definitely look into it more, if I happen to run into a new asp.net project at work, maybe I’ll suggest it, we’ll see.

Constitution as Software

On the way to work this morning, I got the idea for an analogy in my head.

You can compare the U.S. Constitution to a software project. First, there was the Articles of Confederation (a prototype, one to throw away) in 1777. Then in 1790 the Constitution came into effect (v1). Article five of the Constitution describes “the process neccessary to amend the Constitution” (the Change Control Process). Article seven of the Constitution talks about the process of ratifying the Constitution (deployment plan).

After the Constitution came into effect, there were immediately 10 amendments made (the Bill of Rights or bug fixes to those of us in the biz) that were added in response to initial criticism of the Constitution (users unwilling to change). Since the original 10 bug fixes amendments were made, there have been 17 more hacks amendments added to the Constitution. Since 1789, more than 10,000 amendments have been introduced, but few ever get proposed to Congress (triaged).

So what does this all mean? Clearly, the Constitution is an ugly hack, and the framers would have been wise to bone up on some good object oriented design before starting :)

Friends of red-gate

I recently was accepted into the Friends of Red Gate program from red-gate software. red-gate makes some unbelievably useful tools for Sql Server/.Net development, my favorite (so far) being the Sql Compare tool that compares two databases and generates a change script to synchronize them in either direction, very nice.

When I joined the program, they asked for my address so they could send me a “welcome kit.” I was expecting the usual propaganda about red-gate, their products, etc. About a week later I got the kit, and I was shocked. The contents included:

  • red-gate t-shirt
  • red-gate coffee mug
  • red-gate 256MB usb drive

By far the best “welcome kit” I’ve ever gotten, and certainly better than the MCSD certification “welcome kit” that MS sends out :) The best part is that people would be happy enough just to get  licenses of red-gate software as part of the program, but they go the extra mile and send you some cool, useful stuff.