The Future of .NET Open Source Software Delivery

Imagine we are awhile into the future. How do you get open source releases down to your project so that you can use them? How do you get the products down to your computer so that you can use them? Is it easier or harder than the way we’ve always done it before?

The Past and Present

Before we can go there, let’s look at what we do now (the past is really the same for us here). Let’s say I want to use NHibernate. What do I do?  There are basically three paths we all follow in this process.

1. Never had product x before. If I don’t have a current version, I have to go out and look for it. So what do I do?

Open a browser

Find the site

Find the downloads

Find the particular download I want through the plethora of options that may be presented to me

Download it

Unzip it

Then put it into my project references folder somewhere so I can keep it in source control with my project

2. Use the current version without upgrade. If I have a current version, I may just copy it over and use it in my new project. Nevermind that it is two versions ago. I don’t want to take the time to upgrade because it could be a pain.

Open file explorer and find the project with the old version

Open file explorer and find the new project

Create the structure I need for the references folder

Copy the contents of the old project to the new project

3. Upgrade. If I find a bug or I decide it’s time to upgrade to a newer version, how do I get it? Repeat the process of #1 (Never had product x before) and getting the latest version.

Problems with the Present Method of Delivery

It's slow. How long did it take me to get all of that? Yeah, now multiply times every library I want to use.

Too many decisions. I have to make way to many decisions to get the right product and right version downloaded and referenced into my project.

Dependencies may be hard to manage. I may be using projects that depend on the same libraries. In the example above I am using Castle in my project. That got upgraded as well when I got the latest version of NHibernate. Now I may have to test the changes to that. What if the latest version of Castle Windsor I am using is not compatible with the latest version of NHibernate? I won’t see that issue necessarily until I try to run my code. I can try binding redirects, but there is no guarantee that that will work. So now I have a problem. I have to figure out what version of Castle Windsor to use so that I can use the latest version of NHibernate. And this is where dependency management is fully placed on me as a developer. I can now decide to move forward or just continue to use the old version.

Too easy to just continue using the same version you have. It's way too easy to keep using the version you first downloaded and never learning about all of the awesomeness that comes with more current versions of the product.
 
Unfortunately for a lot of people, what I just mentioned with projects that have dependencies on the same things as other projects is the biggest barrier to using OSS (Open Source Software). So let’s talk about the future.

The Future

So now that we have looked at how we currently do it, how will it be in the future?

Open source developers will publish their latest releases to a central repository (possibly in addition to other methods of offering releases).  Then everyone can get their latest releases and develop from there.

Same three scenarios.

1. Never had product x before. Here’s the process.

Know what I’m looking for and confirm the name at the central repository

open a command line

type something to the effect of nu install nhibernate

And I’m done. It’s all brought to me and sitting in my references folder of my project.

2. Use the current version without upgrade. This is still an option. Same as in the present described above.

3. Upgrade. Here’s the process.

open a command line

type something to the effect of gem update

type something to the effect of nu install nhibernate

What Issues Does the Future Method of Delivery Address?

Speed. The process is amazingly streamlined. We are talking seconds as compared to minutes of time to get something. I can now concentrate on what I want to do instead of spending all the time I was on just getting the packages I needed.

The decision tree is reduced. How many decisions did I have to make to get what I needed in the present scenario? How about the future scenario? Greatly reduced.  Less choices to get what I want actually gets me to a decision faster.

I immediately see the dependency changes. All of the dependencies that are required come along nicely with NHibernate. I can immediately see that it downgraded my versions of Castle Core and Dynamic Proxy2. So now I know immediately that I have a problem between Castle Windsor and NHibernate using different versions. It doesn’t solve my problems on this, but it brings it to the surface. So now I can try something like the aforementioned binding redirects.

The process of upgrade became easier than use the current. Another thing you may have noticed. It actually becomes easier to upgrade to the latest version as compared to #2 (Use the current version). That will move people to upgrade, because people will choose the easiest path to get them on their way. And when everyone using the latest version, everyone wins.

The Future Is Now

Oh yeah, the future? It’s now. http://groups.google.com/group/nu-net

How To – UppercuT and Gems

In a previous post I mentioned how I was going to show you how UppercuT (UC) has the ability to make gems stupid simple to create and publish. You ask if gems can get any easier and to that I answer, “Why YES, they can!” How about just filling out the information for the gemspec, running a build and having a nice, shiny new gem ready for publishing?

Rock The Gems

Basically you want to get the latest release of UppercuT. You can download it or grab the source and compile.

There are already instructions out there for how to get UC in your project, so I’m not going to concentrate on that.

Once you upgrade (or add and get everything else set up), you want to have this gems folder at your top level (just under trunk or branch name).

 gems folder at the top level

In that gems folder you are going to find a file named something like the file below. Rename that file to your new gemname.gemspec.

Note: Once you have a gemspec file in a gems folder, your build server NOW needs to also have ruby and gems installed.

Open that file in your favorite text editor and fill in the details. Here’s a good post on how to do that.

  Rename the file to gemname.gemspec Open in a text editor and edit the gemspec according to your needs

Then just for having the gems folder with a gemspec in it, UC will automatically try to build the gem for you (the code in your code_drop/projectname folder is brought over to code_drop/gems/lib folder).

 code_drop/gems

 Gem gets built with the correct version

Removing All of the Other Output After the Gem is Built

Once we are good with what we are getting back for the gem, we can start cleaning up. So we go into our build.custom (don’t have one? create it right next to the build folder) folder and create a file named gemsBuild.post.step.

 build.custom/gemsbuild.post.step

Let’s open the file and insert this:

<?xml version="1.0" encoding="utf-8"?>
<project name="CUSTOM POST GEMSBUILD" default="go">
  <!-- Project UppercuT - http://projectuppercut.org -->
  <property name="build.config.settings" value="__NONE__" overwrite="false" />
  <include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
  <property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
  <property name="path.to.toplevel" value=".." />
  <property name="folder.code_drop" value="code_drop" overwrite="false" />
  <property name="dirs.drop" value="${dirs.current}\${path.to.toplevel}\${folder.code_drop}" overwrite="false" />
  <property name="folder.gems" value="gems" overwrite="false" />
  
  <target name="go" depends="run_tasks" />
  
  <target name="run_tasks">
    <delete>
      <fileset basedir="${dirs.drop}/${folder.gems}" >
        <exclude name="*.gem" />
        <include name="**/*" />
      </fileset>
    </delete>
  </target>
  
</project>

Note: Don’t like NAnt? You can also use Ruby or PowerShell instead of NAnt to write your custom extensions.

Now when we run our build again, we have a nice clean folder.

All clean - just the built gem. Nice...

What If I Want to Change What Goes Into my Gem?

Interested in influencing what goes INTO your gem in the first place? That’s a pretty good thing to be concerned with so that you don’t have all of your referenced assemblies sitting in there. Read about how to set up dependencies. Then you will create a file next to gemsbuild.post.step named gemsPrepare.post.step.

 build.custom/gemsPrepare.post.step

In that file, you will insert something similar to the following (roundhouse file):

<copy todir="${dirs.drop}\${folder.gems}\lib">
  <fileset basedir="${dirs.drop}\${folder.gems}\lib\MSBuild">
    <include name="**/*.*" />
  </fileset>
</copy>

<copy todir="${dirs.drop}\${folder.gems}\lib">
  <fileset basedir="${dirs.drop}\${folder.gems}\lib\NAnt">
    <include name="**/*.*" />
  </fileset>
</copy>

<delete>
  <fileset basedir="${dirs.drop}\${folder.gems}\lib" >
    <include name="ConsoleApp/**" />
    <include name="MSBuild/**" />
    <include name="NAnt/**" />
  </fileset>
</delete>

Learn More

With this knowledge, you shall build. Interested in more UppercuT? Check out the ChuckNorris framework and join the group.

 

Related Posts

Before you comment about “cluttering” the ruby community, please be sure to read this (we’re with you on this):  http://devlicio.us/blogs/rob_reynolds/archive/2010/07/19/gems-for-net-community-response.aspx

Gems - Package Management for .NET 

How To – Gems & .NET & How To – Gems & .NET - Dependencies (References)

Gems For .NET – Community Response

There has been a lot of response in the community about this gems idea we’ve been talking about. I even had the opportunity to sit down with Nick Quaranto, the guy behind Rubygems.org, over coffee Sunday and talk about where we think we are going and what it will take to get there.

One of the biggest things that everyone wants to see carrying this idea forward is that we migrate off of Rubygems.org and have our own gem server. And we all agree this is a great idea. There are just two things that really keep that from happening at the current moment. The devil is in the details and when we are ready to move off to our own server, it’s real money at that point (to do it right).

Right now we are embracing the idea of “one community,” and we are certainly not the first non-ruby community to use RubyGems.org. Long term a different host for the .net gems will be both necessary and beneficial. As we move off, we’ll be able to even expand some of the things we can do as far as checking gems as they are published to make sure they meet certain constraints. 

If you are concerned about getting started versus later migrating – the process will be well thought out and seamless for the user experience of getting your gems and pushing them. The user experience is still going to be rock solid, and the same concept of gem install gemname is going to be there no matter what happens.

And for you gem owners – we’ll be working closely with Nick to ensure that the process is still rockstar.

The more community involvement there is from you and others like you, the faster we move to our own servers. And as far as when, well that all depends on you.

How To – Gems And .NET – Dependencies (References)

In my last post I didn’t mention dependencies.  Dependencies are their own animal. They require a couple more things to be in place. Let’s talk about those things.

In the .NET world, the dependency for compiled bits is usually an exact version of a reference.

Let me explain. So for example, you have a reference to log4net, and you don’t ILMerge it into your assembly. You now have a dependency that the DLL needs to be there and a particular version (outside of redirecting the bindings).  So what I’m getting at is that you require an exact version of a particular DLL. And what you really need is an exact name, version, culture, and public key token of a DLL.  But let’s keep things simple. It’s really the version and the name when culture is neutral (and the key shouldn’t change in the same version). So just the name and version.

Adding a Reference as a Dependency

For each reference you have to a library, you find out what version it is (assembly version) and then add that as a dependency. You can do that by cracking open reflector and taking a look at the actual assembly version.

The assembly version

Don’t use the properties. Neither file version or product version are going to be accurate here:

Properties of log4net.dll - file and product version

There is nothing out there that says that assembly, file and informational (also known as product) versions have to be the same. .NET relies on the assembly version for referencing. It makes sense that we should as well. Here’s a better example where things are different:

Castle File Version 1.2.0.6623 Castle Assembly Version 1.2.0.0

So what would I put in my gemspec? If your reference was to log4net version 1.2.10.0, then you need to assign a dependency to that exact version. Done like so:

spec.add_dependency('log4net','= 1.2.10.0')

I believe you add each referenced dependency to it’s own line.

Gem Exists?

Now to the sanity check. Before you even add it as a dependency, you want to ensure that the gem exists.

Go to http://rubygems.org and in the top right there is a search box. Search for your reference there.

search box on RubyGems.org

So let’s search for log4net to be sure it’s there.

search results for log4net

Sweet! I can move on to my next reference because the right version of the gem exists.

Keep in mind that the name of the gem may not be the one you are looking for and/or the name may be slightly different. For example. I have a gem for UppercuT. The gem is named uppercutbuild because there was already a gem named uppercut.

Gem Doesn’t Exist?

Now if it’s not there, you can add it. When the actual authors want to start managing the gem, you can just add them as owners so they can push their own gems.

To check the owners of a gem you type:

gem owner gemname

Gem owners for log4net

To add someone, according to the gem docs, you issue this command:

gem owner gemname --add users.confirmed.email.address.for.ruby.gems@wherever.com

And that’s it.

You see how I am listed as the owner of the log4net gems? I am not really the developer, when I created the gem, I tied it as closely as I could to the apache project and the committers. When those guys are ready to own the gem, I have the specs for both 1.2.9 and 1.2.10 (both are commonly referred to without the last version octet) and I can just add them as owners.



 

Shout it kick it on DotNetKicks.com

How To - Gems And .NET

In my last post I showed gems being used for .NET. Now let’s talk about How.  Most of this stuff I’ve learned over the past two days, so if I have a mistake here or you have a better idea, please don’t hesitate to offer a better solution.

The GemSpec

The Gem::Specification reference is your friend.

In order to create a gem, you need to define a gem specification, commonly called a “gemspec”.

A gemspec consists of several attributes. Some of these are required; most of them are optional.

From here you learn what is required and what will just get you there.

Setup

1. Create a folder named gems in your top level source directory.

2. In that folder we are going to put our gemspec and version files. This is where we will store the files in source control (and one of them may become autogenerated).

3. We will bring our gems folder to our compiled source folder after we build. Then we can add in the compiled output.

GemSpec for .NET

1. Create a file named project.gemspec. In our example it is roundhouse.gemspec. This is the most important file for this entire process.

 first two files

2. Open the gemspec in your favorite notepad editor. Copy the below in and change it for you needs.

version = File.read(File.expand_path("../VERSION",__FILE__)).strip

Gem::Specification.new do |spec|
  spec.platform    = Gem::Platform::RUBY
  spec.name        = 'roundhouse'
  spec.version     = version
  spec.files = Dir['lib/**/*']
  
  spec.summary     = 'RoundhousE - Professional Database Change and Versioning Management'
  spec.description = 'RoundhousE is a Professional Database Change and Versioning Management tool'
  
  spec.authors           = ['Rob "FerventCoder" Reynolds','Pascal Mestdach','Jochen Jonckheere','Dru Sellers']
  spec.email             = 'chucknorrisframework@googlegroups.com'
  spec.homepage          = 'http://projectroundhouse.org'
  spec.rubyforge_project = 'roundhouse'
end

3. Just about everything with tick marks above you will edit to suit your needs. spec.name and spec.rubyforge_project (and the gemspec file name) should all match and not be an already existing project name on RubyForge.

4. If you are a singular author, instead of spec.authors, replace it with

spec.author = 'somebody'

You can also set up description for multiple lines.

spec.description = <<-EOF
   Rake is a Make-like program implemented in Ruby. Tasks and
   dependencies are specified in standard Ruby syntax.
 EOF

Dependencies On Other Libraries

What we call references. You have a dependency on them existing for your library to run. See this post.

VERSION file

This file is stupid simple. It’s a version number. I believe you can put whatever you want in here. It’s probably best to use the Assembly Version number here and stick with the .NET 4 octets of numbers (like 0.0.0.0) for version.

1. Create a file named VERSION.

2. Open it in your favorite editor and put the version you want here.

 VERSION with 0.5.0.242 as the contents of the file

Libraries

1. Create a folder called lib.

 adding in lib folder

2. Copy YOUR compiled DLLs into here. Your references (or dependencies) should not go here. See How To: Gems and .NET - Dependencies.

 Put your dlls here

Documentation

Create a docs folder. In that folder goes your documentation. This could be release notes, a ReadMe, actual documentation. This area is open. Just make sure you add the docs folder to the specification.

spec.files = Dir['lib/**/*'] + Dir['docs/**/*']

 

Executables

If you want to give someone the ability to run an executable from the command line after installing your application with gems, and you use .NET, this is how you do it.

1. Create a folder named bin as a subdirectory next to the gemspec.

2. Put your executable (and dependencies) into the bin directory.

create a bin directory   stand alone executable in bin

3. Create your shim file (it’s named what you would type at the command line). I’ve called mine rh. The one above allows ruby to be able to actually execute the Windows executable. Let’s open it and see what it looks like. This, we learned from an answer to a post on stack overflow.  This shim also goes in source control

result = system(File.dirname(__FILE__) + "/rh.exe " + ARGV.join(' '))
exit 1 unless result

 

4. Don’t forget that space at the end of your executable name.

5. Open your gemspec. We need to make sure we have spec.executables filled out and our new directory added to our Files.

version = File.read(File.expand_path("../VERSION",__FILE__)).strip

Gem::Specification.new do |spec|
  spec.platform    = Gem::Platform::RUBY
  spec.name        = 'roundhouse'
  spec.version     = version
  spec.files = Dir['lib/**/*'] + Dir['docs/**/*'] + Dir['bin/**/*']
  spec.bindir = 'bin'
  spec.executables << 'rh'

  spec.summary     = 'RoundhousE - Professional Database Change and Versioning Management'
  spec.description = 'RoundhousE is a Professional Database Change and Versioning Management tool'
  
  spec.authors           = ['Rob "FerventCoder" Reynolds','Pascal Mestdach','Jochen Jonckheere','Dru Sellers']
  spec.email             = 'chucknorrisframework@googlegroups.com'
  spec.homepage          = 'http://projectroundhouse.org'
  spec.rubyforge_project = 'roundhouse'
end

Build And Push

You must already have Ruby (1.8.6 or better) and RubyGems installed and/or updated to at least 1.3.7 (gem update –system). You will want to use a RubyInstaller version of Ruby under the Ruby on Windows section.

1. Open a command line and type

gem build project

2. If there are no issues, you should have a gem for upload.

 roundhouse-0.5.0.242.gem

 roundhouse-0.5.0.242.gem

3. Create an account with RubyGems.org.

4. Ensure your project name isn’t already taken by searching for it. If it is you will need to rename your gemspec file, spec.name, and spec.rubyforge_project to a name that is not taken.

5. Type the following command:

gem push project_someversionnumbers.gem

 gem push roundhouse

6. Let it finish. Head out to rubygems.org and look at your shiny, new gem!

  sweet!

7. Test it.

gem install project 

gem uninstall project

 

FollowUp

In my next post, I’ll show you how to make it stupid simple. UppercuT will support this feature natively so all you have to do is have a directory called gems (at the top level of your source) with the gemspec. During the build, it will create the VERSION file and copy your output the the lib folder (custom step for bin folder will be necessary). Then it will execute a step that builds the gem. All for the price of “build”. That’s coming up in the next blog post. In the meantime, feel free to ask any questions you have. Stay tuned…



 

kick it on DotNetKicks.com | Shout it

Gems - Package Management For .NET

The Ruby community has enjoyed a great user experience with a package management system they use called Gems. A gem is a package (or a library), compressed with some additional metadata, and can be either source files or binaries. Let’s focus on binary gems. We have the same concept in .NET (DLLs/EXEs). You may have references to other DLLs. When you want to update a reference you are using on a project, you may also need to update its dependencies as well. And so on and so forth. A package management project is meant to help make that easier. It’s actually really hard to explain what gems or package management without just showing you. So take a look here:

gem install sidepop - installed log4net - installed sidepop

I type:

gem install sidepop

And that’s it. It looks and sees that I have a dependency on log4net. Notice how it nicely just pulls down log4net version 1.2.10 as well?

Background

I can count on one hand all of the package management projects that have been started for .NET. Dru Sellers, Chris Patterson, and I have talked about package management stuff from time to time. Dru and Chris have been a part of one project (Nu) that has been started several times to start to answer this question. We’ve participated on the mailing list for HornGet. At one point I casually asked why we couldn’t just use gems. Other people out there have probably stated the same thing. But no one has really carried the idea forward. Until now.

Yesterday Dru asked for a gem-ify feature for UppercuT. We started talking and looking at how easy it is to create a gem. Then we figured out how to make the executables piece work as well. This is where you can install a gem and then call the executable from the command line anywhere and get output. From the thread on ChuckNorris where we talked about this:

Here is something you might find pretty interesting: http://rubygems.org/gems/roundhouse 

If you have ruby installed, you can install roundhouse now from the command line:

gem install roundhouse

This gives you the opportunity to type this anywhere:

rh <options>

Why Should I Care?

If you work with Open Source, you know how much of a pain it can be to update your references. You update one library, say NHibernate, and find out that you also need to update your references to Castle. And possibly, you might then need to update your references to log4net. It can be a painful process. This is the start of answering that question.

Right now it's starting to look like the answer for gems in .NET is just gems. Why Should I Get Excited?

It sounds like Jeremy Miller among others are getting excited about this. And why not? We’ve been trying to answer the gems question since Ruby made it so easy.

The implications of this are awesome! I still haven’t fully grokked what we’ve just opened up.  But it’s huge!

It doesn’t get us all of the way there to updating the references in our source code folder. That’s where projects, like Nu, are going to start showing up that leverage the idea of using the gems infrastructure to get the libraries from the ruby folders to your source code folder. You are going to see UppercuT come back soon with taking care of getting your gem built with the proper version.

This is the start of something very cool.



 

Shout it kick it on DotNetKicks.com

Do Story Points Relate to Complexity or Time? Response

I was recently pointed to an InfoQ article titled Do Story Points Relate to Complexity or Time? It mentions that some teams estimate by a matter of complexity versus how long in effort something will take. Mike Cohn, who wrote the original post It’s Effort, Not Complexity, makes some very good points into how people should estimate based on how much time a story will take to finish versus another story. Relative effort, not complexity. The argument here is that complexity should not matter if two stories take the same amount of time to complete.

I thought Mike and the article illustrate some very important points. Effort is different than complexity. The InfoQ story mentions:

 

Dentist - In a BOX!
Mike gave an interesting example where he compares the two backlog items of licking 1000 stamps and performing a simple brain surgery. According to Mike, despite their vast difference in complexity, they should still be given the same story points because they would take the same amount of time.

I am humbly reminded of the humorous video on the right (Dentist – In A BOX!) when presented with this idea of performing brain surgery. The other part of the story that was great talked about story points being a function of effort, risk and uncertainty (link back to Mike’s original comment):

Perhaps the way to say that is that points are a function of effort, risk and uncertainty, or SP = f(E, R, U). (Call one of those complexity if you want; it’s not important.) The idea is that points are an estimate of the effort involved. Risk, uncertainty, complexity, doubt and other things people have mentioned here can be incorporated BUT only to the extent they affect the expected effort. If something is complex but that complexity will not affect the time to implement the feature, that complexity should not affect the estimate—that was my point with the lists of numbers to be multiplied or added.

I do want to point out what Mike mentioned in one of his other comments:

Thinking of points as a function of Effort, Complexity and Doubt is fine. In my reply above to John I just combined Complexity and Doubt into one thing: Uncertainty.

Points are a measure of how long it will take (effort). How long it will take can be affected by other things and those can influence our estimate. The key is to remember and understand that it is always about time–no client ever cares how hard we had to think, only how long it took.

“No client ever cares about how hard we had to think,only how long it took.” What I believe I am hearing is that Mike is not discounting that there is effort in understanding. Thinking, research, and learning time is still effort, and I think a lot of people miss this important point when they talk about effort. The example provided was a doctor versus a boy on the two tasks. What happens if they are the same person and that person is not a doctor? What if it’s you?! In my mind, that makes a better determination of what developers face when estimating a simple problem versus a complex one.

Let’s explore this idea in more detail. What all goes into the effort required to lick 1000 stamps versus perform brain surgery if you had to do them? Sure the effort of actually performing the task is roughly the same, but the effort to learn how to lick a stamp is significantly less than the effort required to learn how to perform brain surgery. And that I believe more accurately represents what we as developers go through.

To further illustrate, where I work, we also take stories and estimate tasks from those stories. With that I have started including ramp up time as part of the effort for my team as developers. A problem could take 15 minutes for me to code. But it might take me 2 hours to understand what it is that needs to be done. That is not a 15 minute task. That is a 2 hour and 15 minute task. And the effort involved was 2 hours and 15 minutes.

Thoughts?


 

kick it on DotNetKicks.com Shout it

Kansas City Developers Conference (KCDC)

Yesterday I attended KCDC in Kansas City. It was a great time and I had the opportunity to spend time with people much smarter than me. Even with all of the people I already know, I met quite a few new people during the day long conference.

I gave a talk on RoundhousE. If you attended that presentation, the slide deck is here: RoundhousE presentation (right click and save target as...and download or rename the extension to .PPTX). The presentation went really well despite starting off a little slow. I got some good feedback and am definitely going to be considering that over the next few weeks.

If you attended the presentation and are looking for the new feature I demoed (the differ), it’s only in the trunk right now. I will have a release sometime soon with that included. http://code.google.com/p/roundhouse/downloads/list (look for the one after 0.5.0.188)

If you are still reading this and you read “differ” and went “WHAAA?!” – Ya, the diff utility side of RoundhousE is in the trunk. It still needs some polish, and you will need RedGate to use it (others on future releases), but it’s there. Give it a run.

Also, if you are like me and you like NHibernate to generate your sql script, there’s a present for you in the sample project.

 

Looking forward to next year’s conference.

RoundhousE now supports Oracle, SQL2000

RoundhousE, the database migration software that is based on sql scripts has added support for Oracle and SQL 2000.  There have also been numerous other little things, including better logging and a script run errors table. The script errors table captures what went wrong when/if your scripts are not quite up to par or there is some other issue.

A special thanks goes out to http://twitter.com/PascalMestdach and http://twitter.com/jochenjonc. They worked hard on this and all I did was provide guidance and help bring it back to the trunk.

This is what an entry in the new errors table looks like:

Sweet Mother Mary, look at that error goodness!

This is a preview of new log:

==================================================
Versioning
==================================================
Attempting to resolve version from C:\code\roundhouse\code_drop\sample\deployment\_BuildInfo.xml using //buildInfo/version.
Found version 0.5.0.188 from C:\code\roundhouse\code_drop\sample\deployment\_BuildInfo.xml.
Migrating TestRoundhousE from version 0 to 0.5.0.188.
Versioning TestRoundhousE database with version 0.5.0.188 based on http://roundhouse.googlecode.com/svn.
==================================================
Migration Scripts
==================================================
Looking for Update scripts in "C:\code\roundhouse\code_drop\sample\deployment\..\db\TestRoundhousE\up". These should be one time only scripts.
--------------------------------------------------
Running 0001_CreateTables.sql on (local) - TestRoundhousE.
Running 0002_ChangeTable.sql on (local) - TestRoundhousE.
Running 0003_TestBatchSplitter.sql on (local) - TestRoundhousE.
--------------------------------------------------

But what are you waiting for? Head out and grab the latest release today!

Deciding On Features For Open Source

Open source feature selection is subjective.

Pick a feature An interesting question was posed to me recently at a presentation - “How do you decide what features to include in the [open source] projects you manage?”

Is It Objective?

I’d like to say that it’s really objective and that we vote on features and look at what carries the most interest of the populace. Actually no I wouldn’t. I don’t think I would enjoy working on open source (OSS) as much if it someone else decided on what features I should include. It already works that way at work. I don’t want to come home from work and work on things that others decide for me unless I’m being paid for those features.

So how do I decide on features for our open source projects? I think there are at least three paths to feature selection and they are not necessarily mutually exclusive.

Feature Selection IS the Set of Features For the Domain

Your product, in whatever domain it is in, needs to have the basic set of features that make it answer the needs of that domain. That is different for every product, but if you take for example a build tool, at the very least it needs to be able to compile source. And these basic needed features are not always objective either. Two people could completely disagree what makes for a required feature to meet a domain need for a product. Even one person may disagree with himself/herself about what features are needed based on different timeframes. So that leads us down to subjective.

Feature Selection IS An Answer To Competition

Some features go in because the competition adds a feature that may draw others away from your product offering. With OSS, there are all free alternatives, so if your competition adds a killer feature and you don’t, there isn’t much other than learning (how to use the other product) to move your customers off to the competition. If you want to keep your customers, you need to be ready to answer the questions of adding the features your competition has added. 

Sometimes it’s about adding a feature that your competition charges for, but you add it for free. That draws people to the free alternative – so sometimes that adds a motivation to select a feature. Sometimes it’s because you want those features in your product, either to learn how you can answer the question of how to do something and/or because you have a need for that feature and you want it in your product. That also leads us down the road to subjective.

Feature Selection IS Subjective

I decide on features based on what I want to see in the product I am working on. Things I am interested in or have the biggest need for usually get picked first, with things that do not interest me either coming later or not at all. Most people get interested in an area of OSS because it solves a need for them and/or they find it interesting. If one of these two things is not happening and they are not being paid, it’s likely that person will move on to something else they find interesting or just stop OSS altogether.

OSS feature selection is just that – subjective. If it wasn’t, it wouldn’t be opinionated and it wouldn’t have a personality about it. Most people like certain OSS because they like where the product is going or the personalities behind the product.

For me, I want my products to be easy to use and solve an important problem. If it takes you more than 5-10 minutes to learn how to use my product, I know you are probably going somewhere else. So I pick features that make the product easy to use and learn, and those are not always the simplest features to work on. I work for conventions and make the product opinionated, because I think that is what makes using a product easier, if it already works with little setup. And I like to provide the ability for power users to get in and change the conventions to suit their needs. So those are required features for me above and beyond the domain features. I like to think I do a pretty good job at this. Usually when I present on something I’ve created, I like seeing people’s eyes light up when they see how simple it is to set up a powerful product like UppercuT.

Patches And/Or Donations

But remember before you say I’m a bad person or won’t use my product, I’ll always accept patches or I might like the feature that you suggest. If you like using the products I provide and they solve a problem for you the two biggest compliments you can provide are either a patch or a donation.  If you think the product is great, but if it could do this one other thing, it would be awesome(!), then consider contacting me and providing a patch, or consider contacting me with a donation and a request to put the feature in. And alternatively, if it’s a big feature, you could hire me to work on the product to make it even better.

What If There Are Multiple Committers?

In the question of multiple committers, I choose that someone always makes the ultimate decision to select whether a feature should be part of a product or not. But for other OSS project maybe this is not the case. If there is not an ultimate decision maker, then there is the possibility of either adding every feature suggested or having a deadlock on two conflicting features.

 

So let me pose this question. If you work on Open Source, how do you decide on what features to put in your open source projects? How do you decide what doesn’t belong? What do you do when there are conflicting features?

Chicago Alt.NET Presentation Aftermath

Right now I’m on the train on my way back from Chicago. It’s interesting to be drinking a Corona and hanging out in the lounge while I’m watching the miles go by. Chicago was a nice time. I had never been so we decided to vacation in Chicago and see the sites – posts coming at the other blog.

My presentation was on UppercuT. It was a small group that came to the presentation which makes for an more engaging audience. Overall it was a pretty good presentation and I enjoyed it. We got a little comfortable and ventured off track for a few minutes and talked about RoundhousE as well. I would definitely come back out to Chicago and present or go to a Code Camp.

The slides for the presentation are here: presentation slides.

I had a good question that came about when working on Open Source. I’ll catch that in the next post.

UppercuT and Mercurial (hg)

I mentioned this awhile back on twitter, but UppercuT (UC) has support for Mercurial for versioning your assemblies.

In the settings file, all you need to do it tell UC to use hg.

hg goes in source_control_type

When you build your assemblies, they will use the changeset number in the version, and in the informational version, you get the hash, just like you do when using Git.

Sweet mother Mary, look what we have here!

Pretty sweet. By the way, UC also supports .NET 4.0 as of last week. With this knowledge you shall build.

Symbolic Regular Expression Exploration

This is a pretty sweet little tool. Rex (Regular Expression Exploration) is a tool that allows you to give it a regular expression and it returns matching strings. The example below creates10 strings that start and end with a number and have at least 2 characters:

> rex.exe "^\d.*\d$" /k:10

This is something I could use to validate/generate the Regular Expressions I have created with both UppercuT and RoundhousE.

Check out the video below:

Margus Veanes - Rex - Symbolic Regular Expression Exploration

Margus Veanes, a Researcher from the RiSE group at Microsoft Research, gives an overview of Rex, a tool that generates matching string from .NET regular expressions. Rex turns regular expres...

Chuck Norris Be Thy Name

 Chuck Norris doesn’t program with a keyboard. He stares the computer down until it does what he wants.

Chuck Norris welcomes youAll things need a name. We’ve tossed around a bunch of names for the framework of tools we’ve been working on, but one we kept coming back to was Chuck Norris. Why did we choose Chuck Norris? Well Chuck Norris sort of chose us. Everything we talked about, the name kept drawing us closer to it. We couldn’t escape Chuck Norris, no matter how hard we tried. So we gave in.

Chuck Norris can divide by zero.

What is the Chuck Norris Framework? @drusellers and I have been working on a variety of tools:

WarmuP - http://github.com/chucknorris/warmup (Template your entire project/solution and create projects ready to code - From Zero to a Solution with everything in seconds. Your templates, your choices.)
UppercuT - http://projectuppercut.org (Build with Conventions - Professional Builds in Moments, Not Days!) | Code also at http://github.com/chucknorris/uppercut
DropkicK - http://github.com/chucknorris/dropkick (Deploy Fluently)
RoundhousE - http://projectroundhouse.org (Professional Database Management with Versioning) | Code also at http://github.com/chucknorris/roundhouse
SidePOP - http://sidepop.googlecode.com (Does your application need to check email?)
HeadlocK - http://github.com/chucknorris/headlock (Hash a directory so you can later know if anything has changed)

Others – still in concept or vaporware

People ask why we choose such violent names for each tool of our framework? At first it was about whipping your code into shape, but after awhile the naming became, “How can we relate this to Chuck Norris?” People also ask why we uppercase the last letter of each name. Well, that’s more about making you ask questions…but there are a few reasons for it.

Project managers never ask Chuck Norris for estimations…ever.

The class object inherits from Chuck Norris

Chuck Norris doesn’t need garbage collection because he doesn’t call .Dispose(), he calls .DropKick()

So what are you waiting for? Join the Google group today, download and play with the tools.

And lastly, welcome to Chuck Norris. Or should I say Chuck Norris welcomes you…

Microsoft C# Most Valuable Professional

Recently I was awarded the Microsoft Most Valuable Professional (MVP) for Visual C#. MVP_FullColor_ForScreen

For those that don’t know it’s an annual award based on nominations from peers and Microsoft. Although there are just over 4,000 MVPs worldwide from all kinds of specializations, there are less than 100 C# MVPs in the US. There is more information at the site: https://mvp.support.microsoft.com

The Microsoft MVP Award is an annual award that recognizes exceptional technology community leaders worldwide who actively share their high quality, real world expertise with users and Microsoft. With fewer than 5,000 awardees worldwide, Microsoft MVPs represent a highly select group of experts. MVPs share a deep commitment to community and a willingness to help others. To recognize the contributions they make, MVPs from around the world have the opportunity to meet Microsoft executives, network with peers, and position themselves as technical community leaders.

Here is my profile: https://mvp.support.microsoft.com/default.aspx/profile/rob.reynolds

I want to thank those that nominated me, without nominations this would never have happened. Thanks to Microsoft for liking me and finding my achievements and contributions to the community to be worth something. It’s good to know when you put in a lot of hard work that you get rewarded! I also want to thank many of the people I have worked with over the last 7 years. You guys have been great and I’m definitely standing on the shoulders of giants! Thanks to KDOT for giving me that first shot into professional programming and the experience and all of the training! A special thanks to @drusellers for kick starting me when I went stale in my learning back in 2007 and for always pushing me and bouncing ideas off of me. Without you I don’t think I would have made it this far. Thanks Alt.NET for keeping it fresh and funky! A very special thank you goes out to my wife for supporting me and locking me in the basement to work on all of my initiatives!

Coders For Charities

C4C Coders For Charities: Geeks Giving BackLast weekend I had the opportunity to give back to the community doing what I love. As geeks we don’t usually have this opportunity. The event is called Coders 4 Charities (C4C) and it’s a grueling weekend of coding for nearly 30 hours over the weekend. When you finish you get to present to the charity and all of the other groups what you have completed.

From the site:

Coders For Charities is a 3-day charity event that pairs charities and local software developers. Charities often do not have the funds to implement a new website or intranet or database solution. Software developers often do not volunteer for charities because their skills do not apply. This event is the perfect marriage of these two needs; software developers volunteering their time to help charities better serve their community though the latest technology!

The actual event was lined with multiple charities and about 50 developers, designers, business analysts, etc, each working with a different charity to come up with a solution that they could implement in less than 3 days. C4C provided a place and food for us so that we wouldn’t have to leave much during the time we had to implement our solution. They also provided games like Rock Band so we could get away and clear our minds for a few moments if necessary. I don’t think we made it down there to play, but the food and drinks were a huge help for us.

The charity we we picked was Harvest Home. They had a need for an online intranet site where they could track membership and gardening. Over the next few days we worked on a site we could give them. Below is a screen shot with private data marked out.

It was an awesome and humbling experience to be able to give back to a charity and I’m happy I was a part of it. I would definitely do it again. How often do we get to use our abilities to volunteer our time to a charity?

Topeka Dot Net User Group (DNUG) Meeting – April 6, 2010

Topeka DNUG is free for anyone to attend! Mark your calendars now!

IMG_1469_-_Copy SPEAKER: Troy Tuttle is a self-described pragmatic agilist, and Kanban practitioner, with more than a decade of experience in delivering software in the finance and health industries and as a consultant. He advocates teams improve their performance through pursuit of better practices like continuous integration and automated testing. Troy is the founder of the Kansas City Limited WIP Society and is a speaker at local area groups on team related topics. He currently works as a Project Lead Consultant with AdventureTech Group of Kansas City, KS.

TOPIC: Why Kanban?

Kanban is receiving a large amount of attention recently. What does it offer compared to other approaches? Answering that question may require you to hit the “reset” button on previously held biases and assumptions.

Kanban blends Lean thought with ideas from first generation agile methodologies. To get started with Kanban, we will examine what steps are necessary to establish a transparent, work-limited, pull system. We will highlight the perils of allowing too much work-in-progress and how it affects development performance. Once established, Kanban teams need only a few metrics and tools to monitor their performance and improvement.

WHERE: Federal Home Loan Bank Topeka on the Security Benefit Campus – Directions?

WHEN: 11:30 AM - 1:00 PM on April 6th, 2010

REGISTER: http://topekadotnet.wufoo.com/forms/topeka-dnug-meeting-attendance/

ADDITIONAL INFO: As always, please sign in and out of FHLBank to help them with their accountability. Please park in the visitors section at the front of the building when you arrive. If  there are no spots in visitors you may park in the overflow lot at the far east end of the facility.  Lunch will be provided and we will have some great door prizes!

UppercuT – Custom Extensions Now With PowerShell and Ruby

UppercuT Logo. With attributions to Microsoft for PowerShell Logo and Ruby Association for Ruby Logo Arguably, one of the most powerful features of UppercuT (UC) is the ability to extend any step of the build process with a pre, post, or replace hook. This customization is done in a separate location from the build so you can upgrade without wondering if you broke the build.

There is a hook before each step of the build has run. There is a hook after. And back to power again, there is a replacement hook. If you don’t like what the step is doing and/or you want to replace it’s entire functionality, you just drop a custom replacement extension and UppercuT will perform the custom step instead.

Up until recently all custom hooks had to be written in NAnt. Now they are a little sweeter because you no longer need to use NAnt to extend UC if you don’t want to. You can use PowerShell. Or Ruby.   Let that sink in for a moment. You don’t have to even need to interact with NAnt at all now.

Extension Points

On the wiki, all of the extension points are shown. The basic idea is that you would put whatever customization you are doing in a separate folder named build.custom. Each step Let’s take a look at all we can customize:

The start point is default.build. It calls build.custom/default.pre.build if it exists, then it runs build/default.build (normal tasks) OR build.custom/default.replace.build if it exists, and finally build.custom/default.post.build if it exists. Every step below runs with the same extension points but changes on the file name it is looking for. NOTE: If you include default.replace.build, nothing else will run because everything is called from default.build. 
  * policyChecks.step 
  * versionBuilder.step NOTE: If you include build.custom/versionBuilder.replace.step, the items below will not run. 
    - svn.step, tfs.step, or git.step (the custom tasks for these need to go in build.custom/versioners) 
  * generateBuildInfo.step 
  * compile.step 
  * environmentBuilder.step 
  * analyze.step NOTE: If you include build.custom/analyze.replace.step, the items below will not run. 
    - test.step (the custom tasks for this need to go in build.custom/analyzers) NOTE: If you include build.custom/analyzers/test.replace.step, the items below will not run. 
      + mbunit2.step, gallio.step, or nunit.step (the custom tasks for these need to go in build.custom/analyzers) 
    - ncover.step (the custom tasks for this need to go in build.custom/analyzers) 
    - ndepend.step (the custom tasks for this need to go in build.custom/analyzers) 
    - moma.step (the custom tasks for this need to go in build.custom/analyzers) 
  * package.step NOTE: If you include build.custom/package.replace.step, the items below will not run. 
    - deploymentBuilder.step

Customize UppercuT Builds With PowerShell

UppercuT can now be extended with PowerShell (PS). To customize any extension point with PS, just add .ps1 to the end of the file name and write your custom tasks in PowerShell.

If you are not signing your scripts you will need to change a setting in the UppercuT.config file. This does impose a security risk, because this allows PS to now run any PS script. This setting stays that way on ANY machine that runs the build until manually changed by someone. I’m not responsible if you mess up your machine or anyone else’s by doing this. You’ve been warned.

Now that you are fully aware of any security holes you may open and are okay with that, let’s move on.

Let’s create a file called default.replace.build.ps1 in the build.custom folder.

default.replace.build.ps1

Open that file in notepad and let’s add this to it:

write-host "hello - I'm a custom task written in Powershell!"

Now, let’s run build.bat.

I'm a custom task written in PowerShell!

You could get some PSake action going here. I won’t dive into that in this post though.

Customize UppercuT Builds With Ruby

If you want to customize any extension point with Ruby, just add .rb to the end of the file name and write your custom tasks in Ruby.  Let’s write a custom ruby task for UC. If you were thinking it would be the same as the one we just wrote for PS, you’d be right!

In the build.custom folder, lets create a file called default.replace.build.rb.

default.replace.build.rb. Ya. Ruby

Open that file in notepad and let’s put this in there:

puts "I'm a custom ruby task!"

Now, let’s run build.bat again.

I'm a custom ruby task!

That’s chunky bacon.

 

 

UppercuT and Albacore.NET

Just for fun, I wanted to see if I could replace the compile.step with a Rake task. Not just any rake task, Albacore’s msbuild task. Albacore is a suite of rake tasks brought about by Derick Bailey to make building .NET with Rake easier. It has quite a bit of support with developers that are using Rake to build code.

In my build.custom folder, I drop a compile.replace.step.rb. I also put in a separate file that will contain my Albacore rake task and I call that compile.rb.

compile.replace.step.rb

What are the contents of compile.replace.step.rb?

rake = 'rake'
arguments= '-f ' + Dir.pwd + '/../build.custom/compile.rb'

#puts "Calling #{rake} " + arguments
system("#{rake} " + arguments)

Since the custom extensions call ruby, we have to shell back out and call rake. That’s what we are doing here. We also realize that ruby is called from the build folder, so we need to back out and dive into the build.custom folder to find the file that is technically next to us.

What are the contents of compile.rb?

require 'rubygems'
require 'fileutils'
require 'albacore'

task :default => [:compile]

puts "Using Ruby to compile UppercuT with Albacore Tasks"
desc 'Compile the source'
msbuild :compile do |msb|
  msb.properties = { :configuration => :Release, :outputpath => '../../build_output/UppercuT' }
  msb.targets [:clean, :build]
  msb.verbosity = "quiet"
  msb.path_to_command = 'c:/Windows/Microsoft.NET/Framework/v3.5/MSBuild.exe'
  msb.solution = '../uppercut.sln'
end

We are using the msbuild task here. We change the output path to the build_output/UppercuT folder. The output path has “../../” because this is based on every project. We could grab the current directory and then point the task specifically to a folder if we have projects that are at different levels. We want the verbosity to be quiet so we set that as well.

So what kind of output do you get for this? Let’s run build.bat

custom_tasks_replace:

     [echo] Running custom tasks instead of normal tasks if C:\code\uppercut\build\..\build.custom\compile.replace.step exists.
     [exec] (in C:/code/uppercut/build)
     [exec] Using Ruby to compile UppercuT with Albacore Tasks
     [exec] Microsoft (R) Build Engine Version 3.5.30729.4926
     [exec] [Microsoft .NET Framework, Version 2.0.50727.4927]
     [exec] Copyright (C) Microsoft Corporation 2007. All rights reserved.

If you think this is awesome, you’d be right!

 

With this knowledge you shall build.

kick it on DotNetKicks.com Shout it

Virtual Alt.NET – UppercuT Automated Builds

Tomorrow on February 24th, 2010, I’m going to be giving a presentation on UppercuT (UC) at Virtual Alt.NET (VAN). If you are interested in learning about an automated build tool that will save you time and get you to a professional build in moments, not days, you can log into the VAN around 8PM CST on Wednesday (tomorrow). You don’t even have to go to a physical place to see the presentation! You can hang out from the comfort of your own home and watch me walk through how easy it is to use UC.

Here is a link to the live meeting: http://www.virtualaltnet.com/van

If you’ve seen my presentation of UC before, this will be similar but more focused on examples and samples.

RoundhousE – ADO.NET over SMO

One thing most database change management tools use is SQL Server Managment Objects (SMO).  Most do that because ADO.NET doesn’t allow the batch statement separator keyword GO in sql statements.  So most people write off the ability to use a database change tool for sql server without actually having the sql server installed on the machine that is running the tool. This is not a reality in some organizations, especially when licenses for SQL server are limited. 

RoundhousE_Logo Split the GO

Recently, a few guys have really been helping me get RoundhousE (RH) to the point of not using SMO anymore.I’d like to thank Jochen and Pascal for all of your hard work recently on this and bearing with me while we worked out getting the regex ironed out for splitting sql statements on GO when it isn’t in a comment section.

There only two requirements with GO statements when using RH. The first one (a good practice IMHO) is that GO has to be the last statement on a line. The second is that using GO in between tick marks (‘), like for inserting it into a table, be sure it isn’t the last statement on a given line. This second one is a low possibility, but worth mentioning for those that might structure string insert/updates with GO in them in such a format.

So to recap:

Good Stuff

sql statements GO

something something
GO

some more statement action go

/*
Use some database
GO
*/
--GO
--something something GO

Not Gonna Work

do something GO do something else

insert into sometable (id, description)
VALUES
(1, 
' yep yep. uh huh...ya ya ya ya ya. GO
')

Favor ADO.NET over SMO

Those that have been using RH know that they can use it with SMO for 2005 and 2008. Being able to switch out either one of these has been a lifesaver for some organizations that have not yet upgraded to sql server 2008. Right now RH is in a transition state where SMO is still accessible while ADO.NET is really feeling it’s way out. So if you are using sql2005 or sql2008 now, you can continue doing so. Keep in mind that those will be deprecated in favor of ado.net at some point.

Go check it out! To use the new ado.net version, just change the databaseType (/dt in console) to “sqlserver”.  Please let me know if you find any problems with it.

databaseType="sqlserver"

For those that use Oracle, be on the lookout for coming support. Also, Fluent NHibernate lovers, be ready for some schema script generation!

Upcoming Events for 2010

One of my goals for the year was to speak at least three times this year and from the looks of things, it appears I’ll meet that goal in the first half of the year. 

This is what’s going on this year for me (subject to additions/changes):

 

Rocky Mountain Tech Tri-Fecta 2.0

RMTT (hash tag #rmtt) will be the last weekend of February. I’m going to be doing a Birds of a Feather presentation. From what I understand, the BoF presentations will be at 7AM for one hour. I will be facilitating/leading a group discussion on automation tools. Here is the abstract:

Build/Deploy Automation & Developer Automation Tools

This will be an open discussion about build/deploy and developer automation. In the .NET world, there has been a serious need for better tooling in this area and we can discuss the needs/deficits. If the conversation steers toward demos, we can take a look at a build tool called UppercuT, which is the fastest zero to professional build you will find in the .Net market to date (plus it's 100% free!). We can also look at a database change management tool known as RoundhousE. Another tool that may be shown is a project (solution and everything else) templating tool known as Warmup. Other tools are open for discussion and demos. If you have a developer automation tool you love, or you are are a developer automation tool builder, come ready to discuss your tools!

Coders For Charities

Coders For Charities (hash tag #c4c) will be the last weekend of March. This is the 3rd Annual C4C event where “dozens of Kansas City area web developers, designers, and business analysts will engage with local non-profit organizations for a weekend of ‘giving back’ to their communities.” This is something I’ve been wanting to do since the first event three years ago. It looks like an awesome event. If you are in the KC area and you haven’t already signed up for this event, what are you waiting for? This is going to be a great place to meet other developers and work hard on something that benefits a charity or non-profit organization.

Chicago Alt.NET May Meeting

I believe I will be presenting on UppercuT when I go out to Chicago Alt.NET’s monthly meeting in May. I’ve never been to Chicago, and I’ve heard that it’s beautiful in May. There may be some touring in order. I’m pretty excited to get out to see the sites and hang out with a bunch of cool, smart people up in the windy city. If I present on UppercuT, this is the abstract:

Automated Builds: How to UppercuT Your Code!
“Build – it’s not just for F5 anymore.”

How you build your code and verify quality is something that is usually not thought of at the beginning of a project, but is one of the most important things you can add to code! During this session we will go over the conventions in building and verifying code quality. We will see a project that is using automated builds and how all of the conventions are applied. We are going to see UppercuT and how well suited it is for automated builds. UppercuT is a build framework (based in NAnt) that allows rapid and powerful use of NAnt without having to understand the intricacies of NAnt. The last thing we will do is apply UppercuT to a project to show you how fast you can go from F5 to automated builds!

KC .NET User Group July Meeting

At the KC DNUG I’ll be presenting on RoundhousE in July. KC DNUG is a fantastic group and I enjoy every event I can get to with them! Here is the abstract:

Database Change Management with RoundhousE!
"Because kicking your database is a good thing!"

Many would not argue that you need to version your code, and few would argue that you should version your code in a way that can lead you back to a specific point in source control history. However, most people don't really think of doing the same with your database. That's where RoundhousE comes in. RoundhousE versions your database how you want. Not to mention it's one of the most intelligent database migrations tools out there, it also helps you keep your scripts in source control in a way that makes sense. We'll walk through the tool and its features and then open for questions. You'll see how it can make database change management extremely simple for you and how it makes auditors and DBAs smile. RoundhousE - you know you want to learn more...

Kansas City Developers Conference

KCDC (hash tag #kcdc) doesn’t have a firm date yet from what I hear. I don’t know much about this one yet, other than that I am so there. Hopefully talking about something cool as well!

Virtual Alt.NET Meetings

Virtual Alt.NET, lovingly known as the VAN hosts meetings on Wednesday nights. Now I believe that is going to be once a month.  I’m hoping to present on two topics this year. One of those is UppercuT and the other is RoundhousE (same abstracts as above). The dates for these are not set in stone yet, and I probably shouldn’t be trying to jinx it by talking about them yet! I’m really excited to do a presentation online though and how that will work out!

Other Events

I loved Iowa Code Camp last year. It was awesome! I am definitely looking forward to another round with a bunch of awesome guys/gals! Tulsa TechFest was another event I really enjoyed and I would like to get back to this year. One I’ve never been to and think I would like to check out is the Heartland Developers Conference (HDC).

I’m open to other cool events and meeting more people smarter than I am. What conferences are you going to that I might find interesting?

Warmup – Getting Started

What if there was a tool out there that could let you specify a structure for a project (visual studio solution + everything else) and save you up to 3+ hours of work every time you started a new project?

Warmup was an idea by Dru Sellers to remove all of the setup work required every time you set up a new project. You know, create the solution, add projects, put in your references, etc. Then how about getting the infrastructure for your service/website/console set up as well with things like IoC, etc? What about patterns and other pet items that you put in any project?

Yeah – there’s an app for that. And it’s pretty simple to use. Plus you can change your templates when you have new ideas, so it’s totally rockstar!

The first thing you do is to set up templates somewhere in source control (svn or git). Then you specify where that is to the configuration and what type of source control.

<warmup
  sourceControlWarmupLocation="git://github.com/ferventcoder/warmup-templates.git"
  sourceControlType="git"
  />

Then you run a simple command. If base was one of the folders below the directory above my source control, then that is what I would specify as the first argument.

warmup.exe base nameOfProject

image

I specify nameofProject. That is what I want my project to be named when I am complete. 

Templating

Let’s start by taking a look at the base template. The basic idea here is simple. Place __NAME__ everywhere you want to be replaced when running Warmup. In the same way UppercuT does token replacement with ConfigBuilder, DocBuilder, SqlBuilder, and DeployBuilder, Warmup does token replacement for an entire solution.

Template with token __NAME__

If we were to look at some of the files you would see the absolute depth of how naming really can be replaced. Let’s take a look at the solution though, that will hold quite a bit of meaning for you.

image

Now that we have our template all set up, we have one thing to do. Open our .sln file in Notepad and delete the first line (not sure what happens here, but this works). Microsoft should be on the first line when we are done.

image

And now our template is all ready, so we check our changes into source. If we are using git, we need to push back to the repository we are looking at after we finish committing.

Run Warmup

Now that we’ve seen our template, let’s run Warmup.

Let’s call the new project Alpha.

warmup.exe base Alpha

This is the output:

Hardcore git cloning action to: C:\code\warmup\code_drop\warmup\Alpha
Running: cmd  /c git clone git://github.com/ferventcoder/warmup-templates.git C:\code\warmup\code_drop\warmup\Alpha
Initialized empty Git repository in C:/code/warmup/code_drop/warmup/Alpha/.git/

replacing tokens

image image

This project already has UppercuT, RoundhousE, and others already in it. Take a look at the lib folder:

Jam packed with goodness

I open a command line and run build.bat.  I get a successful build with 31 passing tests! If I were to go to the code_drop folder, I’m all ready to deploy if I had my deployment framework already here.

I can already run RoundhousE and create my database from here:

image

image 

Conclusion

I have an entire structure that allows me to just concentrate on the stories at hand. Warmup may not be the best thing since sliced bread, but it’s going to save you oodles of time! If you know someone else that has create a template you want to use and it’s shared publicly, you can just edit the config file to point there. We have been using warmup for close to 3 months now and it saves us a bunch of time. Plus we find more and more things we can put back into the templates to save us time. I believe this aspect of learning and growing your templates over time is the intention of warmup. Plus your template may not be the same as mine and that’s completely cool!

Download Zip: WarmUp

kick it on DotNetKicks.com Shout it

Windows Mobile Phone Bug: Text/SMS messages coming in from 2016 – Need a fix?

If you are seeing text messages coming in from the year 2016 and thinking this is a total WTF (mate?!), put down the phone. There is no need to break the phone. It’s fine. Nearly all WM phones are experiencing this right now. I repeat, there is no need to break the phone!  There is a fix for this that requires maybe five minutes of your time.

DISCLAIMER: You do this on your own terms. I am in no way liable if you follow these instructions and damage or render useless anything at all including but not limited to your phone. You accept that you are 100% liable for any actions you take based on this or any reference from or to this posting. In other words, you can’t hold me accountable if you screw up your phone which I know you love and cherish. This hack worked for me. YMMV. Are you still reading this part? Move along now…nothing to see here.

I was pointed to this post on twitter today when I complained about it being 2016 all of a sudden (thanks @thines01!): http://www.wmexperts.com/y2016-sms-bug

Seems a new bug has afflicted our phones today: text messages come dated six years from now.

So unless something really weird happened last night, we're seeing a nasty bug in our little gizmos.  Here's what we know as of now:

  • Messages received after 1/1/2010 may be dated as 2016
  • Effects WM6.1, WM6.5 and even non-Windows Mobile phones
  • It is ROM independent, meaning switching won't help
  • All Some carriers seem to be experiencing this bug, but T-Mobile seems fine
  • HTC and LG are aware, but no official response yet

The fix is actually really simple. You will need a registry editor (or you can just install the cab from the site in the link above – I’ve heard it’s also on PPCGeeks).

1. Find this key: HKLM\Software\OEM\SMS
2. Add a new DWord Value named RecvTimeStamp with a Decimal value of 1.
3. Add a new String Value named Language with a value of 100. NOTE: Unsure if this is required or not. Try it without first.
4. Close the registry editor.
5. Wait.
6. Wait for a new SMS message to come in.
7. Look at that…nice. Now what to do about those other ones that are showing ABOVE the new messages? That’s for you to figure out.

There you go. I actually said the same in less than 140 characters as well. Good luck!

Two Major Milestones for RoundhousE and UppercuT

This last year I had a focus to get more involved in Open Source (OSS). The year before I had been involved a little by submitting a patch here and there, but 2009 was a big year for me in OSS. I now manage 4 open source projects that have solved a need for me and others. Coming up on the end of the year it was important for me to get some final touches into at least two projects to finish out the year.

UppercuT, http://projectuppercut.org

UppercuT

UppercuT (UC), for those of you who have never heard of it, is an automated build tool that uses conventions to build your code. That means that you can have a professional build for most projects out of the box within 3 minutes! You drop it into a project, update a simple configuration and you’re done.  It is also extendable (to the point of steps being completely replaced) so it’s very powerful. The goals we had for UC when we started it are that it’s insanely easy to use, easy to upgrade your builds, and easy to extend. It has met all of those goals and has some features that other build tools do not have (versioning out of the box and templating for configurations, documents, sql, deployment files, etc to name a couple). Check it out at http://projectuppercut.org.

So what milestone did we finish for UC? When the project started, there were plans for support for multiple types of source control for versioning the assemblies. We supported Subversion (SVN) from the beginning, but the priority for other types was lower. I’m pleased to announce that in the last two months we’ve added both TFS and GIT. The GIT one is a little more interesting. It follows what is suggested for versioning by Chris Ortman, GitFu and in the Git documentation. We also go the extra mile to show the SHA1 as well so you could theoretically get to that version.

Git Versioning with UppercuT - two types of versioning

How easy is it to do versioning with Git? Assuming you have a git repository, you crack open the configuration and change your source control to git:

GIT 'er DONE!!!

If you’ve used UppercuT in the past or have been dying to try it out, set a goal to look at the latest verion this year before February.

RoundhousE, http://projectroundhouse.org

RoundhousE

RoundhousE (RH), for those of you who have not heard of it, is a database migrations tool that uses SQL Scripts. RH is kind of like Tarantino. We had originally wanted to contribute our ideas to Tarantino, but some of the goals for the two didn’t line up nicely so RoundhousE was born. RoundhousE runs update scripts (the goal is DDL/DML only), but it also looks for other scripts in other folders (like functions, views, and sprocs). The reasoning for the separation is so that versioning and seeing version history is much cleaner in source control. RH also versions databases the way you want. We prefer to version our databases based on source control, but it is extendable to be versioned in any way (or not at all). RH has an MSBuild task, a NAnt task, but most importantly, a command line console (rh.exe). Everything is configurable (including the version and scripts run tables).  Check it out at http://projectroundhouse.org. RH has quite an extensive roadmap for where it is going (we are moving it to be a total migration package, not just a migration runner).

So what milestone did we finish for RH? Making RH environment aware so you can execute environment specific scripts. Why would you want to do that? What if you wanted to insert a bunch of test data into your database but didn’t want that to get into production? What if you want to run the output of templated scripts for granting permissions to different users in different environments?

Here I have a set of permissions scripts. Notice they are environment specific.

Couple of scripts

Notice also that they have two things. They have “.ENV.” in the name to let RH know they are environment scripts. Then they also have the name of the specific environment (LOCAL, TEST) they should be run in. By the way, If you use UC and templating, you only maintain one file in source control and the file per environment is generated at build time (I digress). So we have some environment files and now I run RH to migrate my database.

Lots of RH automated goodness here.

We can see from the log notes below that it only runs the LOCAL environment script in the LOCAL environment.

LOCAL.GrantRobDataReaderDataWriterPermissions.ENV.sql is an environment file. We are in the LOCAL environment. This will run based on this check.
Running LOCAL.GrantRobDataReaderDataWriterPermissions.ENV.sql on (local) - TestRoundhousE.
TEST.GrantRobDataReaderDataWriterPermissions.ENV.sql is an environment file. We are in the LOCAL environment. This will NOT run based on this check.

And to be sure, we look in the database:

View of ScriptsRun table with run output

If you’ve looked at RoundhousE in the past or haven’t yet looked at it, it’s worth downloading and running the sample to see what it can do.

 

By the way, you’ve probably noticed that have a definite theme with our developer automation tool suite (WarmuP, UppercuT, RoundhousE, DropkicK, HeadlocK, and SidePOP). We are still not solid on the library name, but pretty close. Each of the tools are designed to be enjoyable to use and free. We respond to inquiries and fix problems quickly. Once we have a name for the library, we may offer enterprise support for those that would require that.

kick it on DotNetKicks.com Shout it

2010 and Forevah

Today marks the beginning of a new year. For many of us that means new resolutions like losing weight or quitting smoking. I tend not to focus on resolutions because I am horrible about keeping them. I usually set goals instead of making resolutions. And when I do set goals I intend for them to be SMART (Specific, Measurable, Achievable, Realistic, Timed).  I’ve found that having goals that are measurable and realistic within a given time frame help me focus on how I want to get there from where I am currently. In doing so I tend to set goals like “Lose 5 pounds in 3 weeks” versus the more general “Lose weight.” Measurable goals with a time limit give you a focus on a deadline.

So, in keeping with the spirit of the new year, let’s raise our glasses and toast each other on our SMART goals (or DUMB goals) for the upcoming year. Here, here!

Here are a few of my stated goals:

  • Read five books this year (on anything, just read five books).
  • Release UppercuT v1 by the end of June.
  • Make a for fee product and have that solves a problem for many people by the end of the year. This means the product should be available for purchase and have support.
  • Speak at least 3 times this year on topics I and others find interesting.
  • Learn 2-3 new things a month, if not at least 1 new thing a day.
  • Be awarded MVP by the end of the year for my contributions to the community through OSS and teaching others. I realize this goal is requires outside influence, so I’ll say that if I make every effort to help and contribute to the community, then that is where I measure the achievement.

 

Tim has already talked about his goals for the year. What are your SMART goals (links to posts are okay) for this year?