Wednesday, March 30, 2005

House Sold

Yeah! We have sold our house. So the move will take place at the end of April! It will be great to have everything and everyone local again.


I was reading a blog on boo, a python like scripting language on mono and dotNet. Boo looks very interesting because they have gotten rid of some of the python syntax that I found really bad. For example, OO programming in python required the use of "self." everywhere. This got really bad quickly. Fortunately Boo gets rid of that cluncky syntax.

Anyway, the Boo article I was reading had a link to a short demo. While the demo wasn't that interesting, I found the demo tool interesting. He was using a freeware product called Wink (link). Wink can capture a demo from your screen. The resulting demo is shown using flash or other tools. Looks very nice! And did I mention that it is free :)

Thursday, March 24, 2005

Happy Easter!!!

It is always nice to have a little holiday. Now that spring is upon us I'm going to have to shave off the hunter's beard. At least I wont look like this guy anymore.

This week we had fun with Tornados. One *possible* twister came up on the radar near by and it's path would have gone within a mile or two of the house I was in. Luckly some of the winds that were fueling the storm were too strong and broke the thing up before it could really do anything. At least I did not find myself featured on this page.

Have a Hoppy Easter!!!

Friday, March 18, 2005

Aspects, Annotations and Refactoring

Ramnivas Laddad has published a great article on IBM Developer Works. The article is here. I knew that you could use Annotations to mark jointpoints for Aspects. But in his article he shows how you can use Aspects to inject Annotations into your classes. In addition he takes it a step further by giving a great example of refactoring a Transaction Aspect to eliminate coupling and make the aspect more reusable. This article is a great read for anyone working with Aspects and Annotations.

Wednesday, March 16, 2005

Separated at Birth

Check out Bill Faulkner's Bio. His face is very familiar! One of the people at my new job has worked with Bill since he is a leader in the MRI field. I guess he must have some of my intellect as well as my good looks! :)

Thursday, March 10, 2005

NAnt expressions

After exrecising NAnt a lot, I'm really liking many of it's features. It still has a few rough edges, but overall it has been a good experience. The power of it struck me when I had a large section of copied code (nant xml build script) that I was able to refactor to remove the copied code. When I was done, I sat back and thought "Wow! I could never have done that in Ant".

To make this post more interesting I'm going to include a little code to demonstrate the NAnt expressions. I'm not going to show the refactoring because it would take too long to explain. So instead I'm going to show a simple subroutine task that converts paths which I pull out of Visual Studio project files. Some of the paths refer to webproject and have to be converted from URL's into local file paths. This subroutine does the conversion...

<target name="">
input properties:
output property

When path.temp property contains a URL (i.e. starts with http://), this target will search
the directories directly under wwwroot (i.e. ${wwwroot}/*/) for the file contained in
path.temp. When the file is found, it will replace the URL in path.temp with the full
path to the file. If the file is not found, the build fails with a descriptive message.

If path.temp is not a URL, then path.temp is left alone.
<if test="${string::starts-with(path.temp,'http://')}">
<property name="isFound.temp" value="false">
<foreach item="File" property="filename">
<include name="${wwwroot}/*/${path::get-file-name(path.temp)}">
<property name="isFound.temp" value="true">
<property name="path.temp" value="${filename}">
<if test="${bool::parse(isFound.temp) == false}">
<fail message="Unable to find ${path::get-file-name(path.temp)} under ${wwwroot} directory.">

Notice the ${...} isn't just a simple property replacement. Instead in NAnt, I can make function calls ${string::starts-with(...)} for example. Also, I can have simple expressions like ${bool::parse(aProperty) == false}. Very cool stuff. Ant needs to catch up.

Tuesday, March 08, 2005

A replacement for Ant

As my friends know, I dont like Ant. Fortunately I've had the chance to work with nant (Not Ant). NAnt has really learned from many of the limitations and mistakes in Ant. NAnt has many nice features: expressions, dynamic properties, overwritable properties, and .Net scripting to name a few that I've used this week. The .Net scripting is very nice since you can quickly create a function in C# to include in your build. Then it is easy to call the function using NAnt expressions. Plus C# has access to all the functions you could ever need or want in a build script. The result is a cleaner and more flexable build script than possible with Ant. Next time I need a build script (even for a Java project), I'm going to use NAnt and not Ant. (see also nantcontrib)

Now if they would get rid of the XML based build scripts.

Friday, March 04, 2005

Apress Free Books Apress has some free for download tech books online. The subjects are PHP, Perl and .Net. Too bad there isn't any Java stuff.