Pragmatic Spaces ’09

Pragmatic Spaces 2009 is coming soon.

Known details for now:
1. Limited to 150 people
2. You want to be there
3. There will be GREAT discussions you WON’T want to miss!
4. #pragma09 is something to watch for!

While not directly related to Indy ALT.NET, many of the folks from that community are involved in this event. Alan Stevens will also be an important person for the event.

NAnt – Detect 64-bit or 32-bit OS

I was working with Cody Collins and we ran into a problem recently with detecting whether the OS running was 32-bit or 64-bit from within NAnt. We’re trying to automate the installation of some software that has separate installers for 32-bit and 64-bit and we need to determine which installer to run from NAnt.

The problem begins with NAnt being compiled for 32-bit mode only which means all 64-bit functionality is transparent to it. If it weren’t for that, then we could simply depend on the PROCESSOR_ARCHITECTURE environment variable. So if you try to ask the OS if it’s 64-bit, it will tell you that it isn’t. Luckily there is an IsWow64Process WinAPI call that you can make to determine if you are running in WoW64. From these two pieces of information, you can infer whether or not the OS is 64-bit.

Cody and I were able to come up with the following scripts to determine this.

Note: This runs unmanaged code and does not protect you from crashes there – this could be better but this should get you 90% of the way there. This has been tested on Windows XP (32-bit), Windows 2003 (64-bit), Windows Vista (32-bit and 64-bit), Windows 2008 (32-bit), and Windows 7 RC (64-bit). Not an exhaustive test but it covers many of the bases.

<property name="Is64BitOperatingSystem" value="false" />
<property name="Is64BitProcess" value="false" />
<property name="IsWow64Process" value="false" />
<target name="DetectOperatingSystemArchitecture" depends="DetectIfWow64Process,DetectIf64BitProcess">
		This will detect whether the current Operating System is running as a 32-bit or 64-bit Operating System regardless of whether this is a 32-bit or 64-bit process.
	<property name="Is64BitOperatingSystem" value="${IsWow64Process or Is64BitProcess}" />
		<when test="${Is64BitOperatingSystem}">
			<echo message="The operating system you are running is 64-bit." />
			<echo message="The operating system you are running is 32-bit." />
<script language="C#" prefix="MyWin32Calls">
	< code>
		< ![CDATA[
			public static extern bool IsWow64Process(System.IntPtr hProcess, out bool lpSystemInfo);
			public bool IsWow64Process()
				bool retVal = false;
				IsWow64Process(System.Diagnostics.Process.GetCurrentProcess().Handle, out retVal);
				return retVal;
	< /code>
<target name="DetectIfWow64Process">
		Detects whether we are currently in a WoW64 process or not.
	<property name="IsWow64Process" value="${MyWin32Calls::IsWow64Process()}" />
	<echo message="Setting the [IsWow64Process] property to ${IsWow64Process}." />
<target name="DetectIf64BitProcess">
		Detects whether we are currently in a 32-bit or 64-bit process (not necessarily what the OS is running). Note that as of the time of this writing, this will ALWAYS return false because NAnt is compiled to run in 32-bit mode only.
	<!-- This can return x86, x64, AMD64, or IA64 as of the time of this writing. This works for a 32-bit process in a 64-bit OS because the OS makes the 64-bitness transparent to the process in this environment variable. -->
	<property name="Is64BitProcess" value="${environment::get-variable('PROCESSOR_ARCHITECTURE')!='x86'}" />
	<echo message="Setting the [Is64BitProcess] property to ${Is64BitProcess}." />

On a 64-bit OS, it has the following output:

D:\bin\deleteme\nanttest>build DetectOperatingSystemArchitecture
NAnt 0.85 (Build 0.85.2344.0; rc4; 6/2/2006)
Copyright (C) 2001-2006 Gerry Shaw
Buildfile: file:///D:/bin/deleteme/nanttest/
Target framework: Microsoft .NET Framework 2.0
Target(s) specified: DetectOperatingSystemArchitecture
   [script] Scanning assembly "lsbw4oxa" for extensions.
     [echo] Setting the [IsWow64Process] property to True.
     [echo] Setting the [Is64BitProcess] property to False.
     [echo] The operating system you are running is 64-bit.
Total time: 0.2 seconds.

Happy NAnting!!!

*heads off to the IndyALT.NET meeting on Continuous Integration now…*

New Indy ALT.NET Site is up

We now have a newly revamped Indy ALT.NET site up and online! While we’re not completely done with it, we are far enough along to go ahead and turn it on for the time being. Very soon we will be filling out some of the interactive portions but for now it is fast and has all of the necessary information there!

So why did we do this? Several reasons…
1. The original site was a wiki system manipulated into being a community-type site. It worked, but was a little strange.
2. The original host was donating their services to us and we had began to overstay our welcome.
3. Our original replacement .NET-based CMS was not as efficient for us to manage as we had hoped.
4. Our original replacement host had very serious availability issues (also donated hosting).

So as a result, we ended up choosing a PHP-based CMS and are paying a little bit of money for some proper hosting. And what you see is the result! A (soon-to-be) proper community site that is very responsive for you, very flexible for everybody, and very easy for us to maintain and update. All-in-all, a good site for the group! 🙂

Major kudos go out to Sasha Kotlyar for all of the hard work with getting this up and running! Without him, we’d still have a pretty crappy site! 🙂

Indy Invades CinArc!!

On Tuesday (July 8, 2008) evening, Sasha Kotlyar, Dean Weber, and I made a spontaneous trip to Cincinnati to check out the CinArc group (not to be confused with this CinARC). This group is Cincinnati’s Architecture User Group and seems to be mostly .NET-based. They are a very new group as this was only their second meeting. They meet monthly on the second Tuesday of the month. Their current meeting-format is that of a fishbowl meeting. You can read more on Wikipedia about this here.

I must say, the three of us Hoosiers really enjoyed ourselves at CinArc! Despite the downpours, rush-hour construction, and construction barrels we had to dodge in the middle of the road, it was great! Oh, and I won a door prize as well! I walked out with a VS2008 Pro license (only had MSDN-based licenses before, now I have a permanent license!). The group is led by Mike Wood, who also happens to lead the Cincinnati .NET User Group. Lots of other people were also in attendance (I’m not even going to attempt to name them because I’m horrible with names and I’ll surely forget some of them but turns out I follow lots of them on Twiter). There was a total of 19 people there with 5 chairs in the middle of the fishbowl (1 moderator, 3 speakers, 1 open). It was great that they veered away from the norm where it was a very interactive discussion and almost everybody participated in it.

The agenda for the meeting was different than what I’ve been used to for user group meetings, and I really liked it! I’m used to food before hand, kicking things off with announcements, then going into the discussion for the rest of the night, and door prizes at the end. What they did, instead, was kick things off with the discussion, about an hour into it take a break for food, kick the second half off with announcements, go back into the discussion after the nice little break, and then door prizes at the end. The trick to accomplishing this is timing on the food and if it can be pulled off, I may actually try to assimilate this style into the ALT.NET meetings! However, one important part of the ALT.NET meetings, I feel, is the social time spent before the meeting. Perhaps we can have snacks and drinks available then and real food available at “Halftime”.

One other thing that was really neat was that the meeting attendees were able to choose the topics to discuss. Ideas were put up on a whiteboard as recommended by the people there, and then everybody voted on the ones that they were most interested in participating in discussion with. There were 3 topics that seemed to be the most popular, and it turned out that we had time to discuss 3 topics. So it worked out perfectly!

As I said before, I had a great time at CinArc and I highly recommend it to anybody who is in the area and is interested in best architecture practices and bouncing ideas off of one another! There were some extremely intelligent guys at this group and it’s great that they are trying to expand knowledge in the community and help one another! I can already see this is going to be a very popular user group in the future! I hope some of those guys come visit some of our Indy events, and I just may try and pick up some Reds tickets some second Tuesday of the month afternoon so I have a good excuse to be in town again for another CinArc meeting! 🙂


What is ALT.NET?

When we were discussing the Indy ALT.NET group’s goals with others, we were asked, “How are you going to distinguish Indy ALT.NET from the Indy .NET User Group?” This was a GREAT question!

In coming up with that answer, I’ve mulled around and tried to come up with a definition for ALT.NET. There are plenty of posts out there that have attempted to do this but the reality of the situation is that there is not yet a single, concrete, agreed-upon answer to this. So as such, I’ll add my thoughts to that cloud of what some people think ALT.NET is.

In trying to define this, I am going to outline the process I went through in coming up with this definition. I think going through the process helps you understand what it is just a little bit better. Here was my first attempt:

The concept of ALT.NET means that you try to use all tools and techniques available in an appropriate way to do your job in the best and most efficient way possible.

The problem with this definition is that it leaves you just as confused as you were before. From this definition you would believe that ALT.NET is the same as being a good software engineer. I believe this definition is a 100% accurate definition but unfortunately, it is 90% useless. So let’s try it again and fill in not just what ALT.NET means but also what it stresses.

The concept of ALT.NET means that you try to use all tools (whether mainstream in your specific industry or not) and techniques available (whether mainstream in your industry or not) in an appropriate way (without overkill) to do your job in the best (as defined in almost any possible way) and most efficient way possible.

With these stresses, this definition starts to make a little more sense, but it’s still not all that useful. Let’s try it again and this time add a lot more to it.

The concept of ALT.NET means that you try to use all tools and techniques available in an appropriate way to do your job in the best and most efficient way possible.

The tools may come from any source whether it’s your industry or not. For example, there may be some tools that Java developers take for granted that are just completely unknown about in the .NET industry. Or perhaps there is a tool used by accountants to ensure calculations are done correctly and that tool would be an awesome yet non-obvious solution for implementing a suite of unit tests for your code.

Like the tools, the techniques may also come from any source whether it’s your industry or not. Perhaps you’re running into some architectural problems of how to lay things out and a VLSI engineer has a technique for laying out blocks of functionally-related items on their boards that an architect could use in laying out their classes.

In addition to these examples, the concept of ALT.NET even takes it one step further. Not only should one look to other industries for a tool or technique, one should also consider developing new tools or techniques to as part of the greater evolution of things. While they’re not ALT.NET-created concepts, “alternative” methodologies such as Domain Driven Design (DDD), Behavior Driven Design (BDD), and Agile Development have not always been around but had to have been dreamed up at some point. I believe ALT.NET encourages the evolution of our industry by encouraging such new “outside the box” concepts to be considered.

Now, one thing to be careful about is overusing these tools and techniques. Just as an architect needs to ensure he/she does not over-architect the system, you must also ensure you do not go overboard with these tools and techniques. They need to be used appropriately and not just for the sake of using them. In fact, often times the KISS methodology applies! When determining what tool or technique to use, you need to ensure you make such a decision to ensure you create the “best” thing you can. Best is a very vague word here that can be defined MANY different ways and that’s for you to decide. Perhaps it means the quickest solution to code. Maybe it means the fastest solution to execute (from a performance perspective). Perhaps it means the cheapest third-party tool that fits the bill. Or maybe it means the easiest for a user to interact with. The “maybes it means” list can go on forever.

Whew! I think that just might be it! I think that just might be a pretty good explanation of what ALT.NET is!

Now, while I believe that is a good definition for it, I think it’s important to discuss one more thing that has been a popular topic of debate. Is ALT.NET divisive? I am going to change the question a little bit and not answer whether it is or not but rather it should be (to me the difference in the questions are due to the rude and perhaps elitist behavior of some individuals and not the fundamental concept of the ALT.NET movement).

So, should ALT.NET be divisive? My answer is a simple “no.”

Let’s go back to my very first definition of what ALT.NET is:

The concept of ALT.NET means that you try to use all tools and techniques available in an appropriate way to do your job in the best and most efficient way possible.

As I stated before, this definition essentially means that you are simply trying to be the best software engineer that you can be! Again, I believe this is a 100% accurate definition. And by this definition, there should be absolutely no division created within our industry because of ALT.NET. This is what all of our peers should be doing. ALT.NET focuses on some non-mainstream things and in some scenarios such things are the “best” way of doing things but there are certainly times when they’re not the “best” way of doing things. The only question that remains is what exacly that “best” word means to you. Let’s use some examples.

Consider that you’re a consultant working on a small application for a non-profit company where the code will later be maintained by college students on a somewhat casual basis. In this case would it make sense to invest in a potentially complex way of architecting the system so that it follows a generic, standard philosophy? Perhaps but probably not if it is going to be too complex for the college students to easily (and safely) maintain.

Now consider that you’re a software development shop that regularly works on custom projects for clients. In this scenario, your business model could be built around efficiently pumping out successful projects in a repeatable fashion. In this case would it make sense to invest in a potentially complex way of architecting the system so that it follows a generic, standard philosophy? Probably so once you have nailed such a thing down you can repeat it regularly to increase productivity in the future.

One more example. Consider that you’re the said software development shop above and you are working on a very critical project with a tight deadline and you have not yet mastered this new architecture. In this case would it make sense to invest in a potentially complex way of architecting the system so that it follows a generic, standard philosophy? I would say probably not. Any significant fundamental change to your current process can introduce some very significant risks. With that being said, many of the topics that ALT.NET covers can introduce significant risks if they’re used in inappropriate situations or are not done well (which can very well happen since they’re not very widely understood in the industry and not many people have much experience with a lot of these things). So you must consider that doing such a thing can be a big risk.

In the last example, I hit on one very big thing and that is that many of the ALT.NET-focused topics bring a lot of risk with them because they are not yet really all that proven to be successful. There are many companies and situations where this is unacceptable and in those cases, the mainstream tools and techniques should probably be considered. This is not to say that the ALT.NET-focused topics are “too difficult” for certain people. It has nothing to do with that at all! It has everything to do with that “best” word. But I think people who determine that the ALT.NET topics aren’t currently “best” for them may still want to consider following the ALT.NET topics for their personal professional development. Increasing your awareness of various things is a good thing, afterall!

Now I want to end this post with a last closing thought. Personally to me, my interest in this ALT.NET movement has two motivations to it:

  1. I want to learn about some of these neat new things that I’ve never heard about before!
  2. I want our Indianapolis development community as a whole to learn about some of these neat new things too!


EDIT: 4/30/2008 4:13pm EST
I have been asked for some links on various community sites by some people who are just now being introduced to the ALT.NET movement. Here are a few links to get you started. Over the next day or two I’ll see if I can get a “History of ALT.NET” post up. 🙂

David Laribee’s coining the term ALT.NET
MSDN Magazine article on ALT.NET
ASP.NET Podcast Show #103 – ALT.NET with David Laribee

IndyALT.NET Site is live!

IndyALT.NET is now live!

Right now it’s being hosted in somebody’s house (thx to Paul Hacker, MSMVP, for sharing his servers temporarily!) We’re excited about our first two events! Next month we’re having Mike Griffin come in for some training on the EntitySpaces OR Mapper. In July we are planning on having Todd Anglin come in and show us some good stuff with some of Telerik’s products. And who knows what else we’re going to do!

Interesting and busy times to come!


Jaxidian Update is proudly powered by WordPress and themed by Mukkamu