Looking for *your* feedback

Yeah, that’s the way some things go. I did have plans at the start of the year to do a lot of updates with the tools around here but as time went on and I took a good look at things there wasn’t a whole lot to update. I mean, most of the tools like SimExplorer are quite stable. Sure, there are a few small niggly bits that I should take care of but overall I would say (and this is me talking) that things are pretty stable. I haven’t heard a lot of emails saying “Your software sucks and never works” so either nobody wants to talk to me (which may be true) or no news is good news? I also haven’t seen big things that the software is missing. Again, there are some nice-to-haves that SimExplorer should have but overall I think people are pretty happy with what’s there (yes, again this is me talking).

As for blueprint, there’s a lot to be done there but I’m waverying on the edge. The fact that the Sims 2 is going to deliver some (hopefully) awesome tools for creating real 3D content makes blueprint a relatively obsolete product. So I’m not sure of the value of it, if there is any at all. For the other tools that are on the TODO list, some might be useful and I can get them put together fairly quickly once I sit down and do them. I have to admit I haven’t spent a whole lot of time looking at any Sims code for the past couple of months.

So I leave it to you. I know people are visiting the site and downloading software. There’s not a lot of activity in the forums. So is that all there is? Should I just lock down the site and call it done? Any software that reaches some level of maturity has a dry period of no new development and sometimes that’s enough. Is there something vital that’s missing from your Sims toolbox that you can’t get anywhere else? I’m looking for some feedback from you as it’s your software, not mine. I’m willing to put the hours in and finish off a task that has yet to be done or clean up what’s there and make it what it needs to be, but I’ve been staring at this stuff for so long that I need to know from you what you want. Is there something you want more from here or is everyone happy (of course I can’t make everyone happy, but for the masses is it good enough)? You have lots of avenues of feeback like the forums, feedback here on this post and direct email.

Let me know, speak up, and let me know what you’re thinking? Thanks.

Posted in CDX

VS.NET and the Microsoft Way…

I’ve been struggling with a “best practice” around setting up larger scale projects with .NET

The Web Project wizard in Visual Studio .NET is convenient for creating quick ASP.NET applications on your local machine, but in an effort to simplify your life, it also makes many decisions for you that are difficult to change if you need more flexibility. If you don’t create the virtual directory first then the wizard will automagically create on for you, based on the root of your web server (which is normally C:InetPubwwwroot). My biggest pet peeve with Web Projects is that you cannot even open a .sln file if the virtual directory mapping in IIS is not set up correctly. This becomes a problem with you have multiple users all trying to open the projects you’ve created.

One fix is to not share solution files, but when it comes to the ASP.NET applications, you always have to have the virtual directory setup first before you can open a web project. It’s all very frustrating and I still can’t find a good middle-ground between what you can do without shooting yourself in the head and having a well structured project directory layout. Microsoft has an article where they basically tell you to setup your physical directory first, then point a virtual to it, then create the ASP.NET project. I find this is the fasted way to open up a project as well, because VS.NET isn’t churning in the background creating the virtual directories.

There are some other tricks with folder structure because you can easily create a localized breadcrumb navigation trail with ASP.NET (there are several components out there) which is based on the directory structure. With UrlRewriting, you can direct the user all over the place and not worry about moving things internally. I think this is one the big downfalls with HTML and the Web. You move a link and your entire system falls apart. Some content managment systems (like Microsoft’s own CMS) fix this by storing everything in a SQL database and referring to the files through GUID like URLs, but a) it starts to look like Lotus Notes after awhile (if you’ve ever saw those Urls, they’re god awful ugly and long) and b) it still doesn’t really protect you and moving or changing something sometimes breaks things. There’s still some work there before that problem gets solved.

I think (and correct me if I’m wrong here) it should start with a Web project. The sequence that seems to have worked for me is this:

1. Create a physical directory (I refuse to call them folders) on the hard drive to hold the project

2. Create a web subfolder in this directory. This is where your web app will live.

3. Create a virtual directory to point to the directory you created in step #2 with your app name

3. Create a new Web application in VS.NET with that name. VS.NET will automatically save all your files to the physical directory you created in step 2

4. Create new class library projects and add them to the solution (for unit testing, data access, business functions, etc.) and put them somewhere in the structure (maybe a test or src folder off the root)

One trick I picked up this week (thanks to the guys at ThoughtWorks and some cool guys at CP) is to create one class library project called Core for all your system functions. Inside this project, create a folder called DAL, DTO, Domain, etc. to hold the classes for such. This way you can import one namespace into your tests and it makes it easy to reference everything else. Of course if you have to physically split some of the pieces (like the data access layer from your domain) this might be a problem. I’ve always put my DAL and Domain into separate projects. Not sure if that will be a problem with this setup but it does make things easier in the end.

I don’t think there’s any one real solution or “right” way to do things here. A rule of thumb might be to group logical sub-sections of your application in their own directories. If you ever have more than 10-15 files in one directory, maybe it’s a sign you need to improve your directory structure.

In the end, there is also motivation to have all directory structures the same on all developer machines, as well as having the same structure mirrored on an integration server (like one running your web server or Continuous Integration one). Makes for a simple migration from one environment to the next. Don’t even get me started on the whole namespace heiarchy…

Posted in CDX

Good (free) ASP.NET components

I’m really struggling trying to find some good free ASP.NET components on the net. I’m a strong believer (and follower) of not re-inventing the wheel and will fully conceed to someone who has already gone through the pain and suffering of writing a module that did something simple, like a drop-down menu, calendar pop-up, etc. I love writing custom components, but in a crunch when you need to do an app I don’t have time to write a nice re-usable thing. Maybe after the project is finished but not as part of it. Too much of a hit on the momentum that you’re trying to achieve.

Right now I’m struggling to try to find a good tab navigation component. I like navigation through tab panels, as long as there’s only a few. Some good examples of sites that use the tab approach would be GForge, MSDN, and Experts Exchange. I’m currently building a simple ExtremeProgramming (XP) tool that would track stories, iterations, tasks, and show some metrics in an agile type project. There are a few tools out there, but some are overkill and this one needs so many dependant libraries and technologies that even my Linux box would have a hard time trying to run it. A tab panel would be great for that type of thing so each area is split up into a separate page and you can easily see what’s going on and access everything.

I did manage to hunt down the ZmodemControls which look great. However when you actually get your grubby hands on it, it doesn’t work right. You can go into the collection and define the tabs and all that jazz, but the control has a bad habit of reverting back to it’s empty self, losing all your configuration. I even hand coded the menu collection (rather than using the collection editor) but after reloading the page the component (or VS.NET, or both?) just decided to blow everything away. Hmmm. That’s just not right.

There’s a great one here, that looks exactly like what I want. It’s in all JavaScript. Ugh. For an ASP.NET application, that’s just not right either.

The quest continues.

Posted in CDX

Advanced .NET debugging and C# default parameters

Last week a bunch of us went on a .NET “advanced” debugging course. Well, suffice to say, the course was not what we were really expecting and ended up being a course on how to read MS .dump files, step through (assembler) code with WinDbg and generally get to know the IL code from a .NET assembly (see my Microsoft Lied blog earlier on the raw facts of how VB.NET and C# are not the same).

Anyways, one of the people who works on the QA team for C#, Min Kwan Park, has an excellent blog on .NET debugging and walks you though some ideas around what to do, what not to do, and how to deal with some funny .NET problems (like debugging web services from a web service client and what to do when remote debugging hangs). There are also some great links to other debugging docs so if you want to really get some advanced debugging tips check out the blog here.

Today I got into a bit of a language pickle. I was writing some code for someone to show them how to write Unit tests (using NUnit of course). When you write lots of little snippets of code for people day in and day out, you usually end up writing it in a language that the end developer is most comfortable with. This usually means flipping back and forth between VB, VB.NET, C#, C++, and so on. So I was writing up a test and went to implement the code for the test by writing this in C#:

public void TheMethod(string name, int rate=30)



This was the typical language guffah that we keep making. Whether it’s adding a semi-colon at the end of a line of VB/VB.NET code or putting in Dim statements in C# code it’s embarassing. In this case, I forgot why C# couldn’t handle default parameters. In C++ (and some other OO languages) the above code could be called like this:

TheObject.TheMethod(“NYSX”, 10);

or this:


The second example would set the rate to 30 automagically. C# doesn’t have this feature (it’s the first time I tried it in C# today, silly me). I did some digging and found out one reason why C# doesn’t have this feature. It’s related to a specific implementation of the feature.

In the C++ world, when the user writes:


the compiler generates

TheObject.TheMethod(“NYSX”, 30);

In other words, the compiler takes the default value that is specified in the method prototype and puts it into the method call – it’s just as if the user wrote ’30’ as the second parameter. There’s no way to change that default value without forcing the user of the class to recompile, which is unfortunate. The overloading model works better in this respect. The framework author just defines two separate methods, and the single-parameter one calls the two-parameter method. This keeps the default value in the framework, where it can be modified if necessary.

It would be possible for a compiler to take something like the C++ definition and produce the overloads, but there are a few issues with that approach.

The first one is that the correlation between the code that the user writes and the code the compiler generates is less obvious. Microsoft generally tries to limit magic when possible, as it makes it harder for programmers. The second issue has to do with things like XML doc comments and intellisense. The compiler would have to have special rules for how it generates doc comments for the overloaded methods, and intellisense would need to have smarts to collapse the overloaded methods into a single method.

Writing overloads yourself is a bit less convenient, but Microsoft thinks it’s an acceptable solution. Guess I’ll just have to get in the habit of being embarassed when I write code (or write more of it in a single language rather than bunny hopping all over the language garden).

Posted in CDX

Getting to know .NET and Microsoft samples

If you haven’t tried it already, C# and .NET is a pretty nice language/platform to work in. Some people are a little intimitated by the whole “OO” concept, but for old hacks like me who have been doing OO since the days of Smalltalk and Eiffel it’s just a walk in the park. Luckily there are two nice resources to get you going.

First, head on over to ASP.NET Web. There they have something called Web Matrix. It’s a free IDE that lets you build applications using .NET. There are also all kinds of tutorials and good stuff there. This would be the first place you should hit to get your feet wet on this whole .NET thing.

Next, Microsoft has got a nice download (just showed up last week) on their site. It’s a collection of 101 code snippets and examples in VB.NET and C#. There’s all kinds of good stuff here that will show you how to solve the most basic problems and give .NET a good run.

With these two toolkits in your hand, you should be well on your way in learning .NET. So what are you waiting for? Start coding!

Posted in CDX

Format change on the site

I was getting a little tired of the old look and wanted to try to clean things up a little around here. I think I’m happy with this for now but let me know if you have any suggestions (especially in the colour area). The site is still 100% table free (thank the Gods for CSS) but bear with me as I find time to update a few glitches here and there. Cheers!

Posted in CDX

Another new .NET app is born

As I was going through my old projects, one kept coming back to me. It’s an old script writing app that I created using MFC but never finished or released. There were a lot of these type of tools out there to help budding script writers get going, but in the end all they’re just glorified word processors. After spending some time with the GDI+ capabilities of .NET WinForms and the ease of creating Visio like applications I thought it might be a good idea to try something different.

StoryTime is a visual story editor where you can treat characters, locations, and interactions as objects. I’m taking the approach that everything is an object (well, that’s true of any OO developed system) where you can interact and “direct” it. Basically turn script writers into mini-directors, commanding characters and locations through speech and actions (which is what they do, but the intent is to get them doing it visually). It seems to make for a good paradigm with OO and takes a different look at writing scripts, rather than the typical word-processing formatting view of the world. Of course it’ll need to spit out the script as per the Hollywood standard, but that’s just a formatting thing that any XML programmer worth half his salt can do with a simple XSLT file.

Sure, another project to start that might take months (or years) to come to light. Oh well, back to some website work and Sims code this weekend as I try to practice what I preach and get some updates out there.

Posted in CDX

More spam haikus

Walt came back to haunt me this week with two new spam haikus. I really must find the generator for this. Maybe I should start a new page? A new site? Collect them all. Amuse your friends!



rosette transect methodology

widthwise helicopter bow

upstater chaste trample


electorate depression


delete euclid



important ashen bordeaux


paragraph loud penance

Posted in CDX

The Dilbert Principle in Action

The Dilbert Principle states: The most ineffective workers are systematically moved to the place where they can do the least damage — MANAGEMENT.

Last week someone (presumably facilities) installed a somewhat large (3 feet by 3 feet) box near the exit on our floor at work. Inside the box was to hold a defibrillator. Apparently it’s important all of a sudden to have one of these. I’m hoping there’s someone out there that’s trained and certified on it (but it wouldn’t surprise me if they just installed it without doing that).

Anyways, as all stories go, things begin to get weird. First, they neglected to inform anyone that the box was alarmed and of course some individuals were intrigued at the presence of new medical equipment so they just had to try it out (nothing like good electro-shock therapy to make it through those lunch hour meetings). Sometime after the initial deployment, a post-it note was placed on the box that said “Box is alarmed”. Good to know and well put. Skip ahead a couple of days later. The defibrillator mysteriously disappears. Since the box was alarmed, I can only imagine someone who was authorized to remove it did so. Otherwise there would be a distinquishable “whoop-whoop” sound echoing through the halls and I don’t recall that happening. Now we move ahead in time a few more days to the present. The box is still empty however now someone has kindly replaced the “Box is alarmed” post-it with a “Box is empty” post-it. I can’t wait to see what shows up today. “This box intentionally left empty” post-it? Your guess is as good as mine.

Nothing like smart people doing smart things. I hear bells ringing for some new induction into the management stream.

Posted in CDX