Tech Blog

Jay's Technical blog

Fun:: A new Boolean library for you ('cause I like you)

31 October 2005
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

So a co-worker (Scott H.) sent me some code that is purely fictional (but a sick part of me wishes I had actually found it in the wild).

Here's the code -

        IsNotFalse =False
       IfValue =TrueThen
            IsNotFalse =True
            IsNotFalse =False
            Value =True'Make sure Value IsNotFalse

I think this is awesome.  We need to add a few functions though.  We need Obviously IsNotTrue.  We also need some obscure things like MightBeTrue and MightBeFalse as well as MightNotBeTrue or MightNotBeFalse.  Here's my implementations of these in VB <grin />

   Public Function IsNotTrue(ByRef Value as Boolean) as Boolean
        ' re-use library as much as possible
        ReturnNot IsNotFalse(value)
   End Function

   Public Function MightBeTrue(ByRef ParamArray arr() as Integer) as Boolean
        Dim x as Integer
        For x = LBound(arr) to UBound(arr)
            If x <> 0 Then
                 Return true
            End if
   End Function

   Public Function MightBeFalse(ByRefParamArray arr() as Integer) as Boolean
        ' re-use library as much as possible
        Return Not MightBeTrue(arr) 
   End Function

   Public Function MightNotBeFalse(ByRefParamArray arr() as Integer) as Boolean
        ' re-use library as much as possible
        Return MightBeTrue(arr) 
   End Function

   Public Function MightNotBeTrue(ByRefParamArray arr() as Integer) as Boolean
        ' re-use library as much as possible
        Return Not MightBeFalse(arr) 
   End Function

Anyone see anything I missed? [I'm a moron... I put MightBeTrue twice... and I forgot the MightNots...]

The Heresy of Agile Documentation...

28 October 2005
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

I just saw this post by my co-worker Rob Teixeira (MS MVP) on Agile.  Actually, IMO, it's not really about agile at all except maybe for Rob to get a couple one-liners in (on both sides), and it's also not an attack on agile despite the source of the name.  Ultimately his post is to introduce one of the coolest concepts I had heard.  I'll let you read, but Rob talks about Design Docs and a better way to do them... digital video!

[go read his article and come back]

I'm pretty impressed.  As long as you can keep the video well marked and you know what project was discussed where I think this is a fabulous idea.  I like what our VP says which is that we are not programming at a time when keyboard time costs money... the technology and the tools we have today are much, much better... we should use these tools to adapt our dev methodlogies intos the future

Pondering Agile...

14 October 2005
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

<small_rant>It seems like a lot of my career at my current job has caused me to ponder different development methodologies.  Currently we have 2 competing methodologies.  Most of the company uses a waterfall approach (SLDC); the group I'm in has at one time done what they call RAD, but it's closer to coding from chaos (when it happens).  Our RAD development was very iterative in that we ignore much of the paperwork/planning and start developing prototypes (usually working prototypes); we showed the prototypes on  regular basis to our customer.  There was virtually no paperwork at all. 

The first thing to hit us was the change control process which can be a fairly lengthy process... one size fits all; if you are deploying a small intranet site or a major mainframe change it all travels through this process.  Change management is absolutely essential (don't get me wrong), but the problem has been that the company itself is reactive, so every mistake by someone ends up causing more paperwork for everyone else.  Next we added Design docs, and from there who knows where, but we're pretty much in full SLDC. 

IMO, waterfall (SLDC) looks like "death by paperwork" to me.  RAD had its own issues.  We built things fast that don't usually work as planned, and with lot's of bugs.  </small_rant>

As I look at Agile Methodologies, things like TDD jump out at me as a better way.  The other ideas of how projects work seems to be a better way.  I guess the rest of it is that I got into IT to program computers; I love programming.  I didn't get into IT so that I could write technical specifications. 

I would move to Texas to work with Palermo, or Miller if I didn't have some roots here in Florida. <sigh />

How to Create a ASP.Net 1.1 site where a DLL is created for the subdirectories (with Visual Studio .NET 2003)

14 October 2005
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

[Note this is a .Net 1.1 solution to the problem (.NET 2.0 has an easier solution I believe); it might work for VS.Net 2002 as well as VS.Net 2003... This is a pretty long post.  I actually give you a short answer before going into the lengthy discussion]

As you may know I support a combination ASP/ASP.NET site at work.  This site atually has a total of 10 subapps that are housed in individual subdirectories off the main site (for each "wing" ASP.NET or ASP).  As I'm converting the ASP site over I have started to realize something that is a bit worrisome to me; everytime I get ready to release something (bit or small) I have to do a full deploy of the DLLs because I only have 1 web project.

After some research and picking the brains of several co-workers, I came up with the solution (and since I couldn't find an answer online, I'm posting it).

Let's simplify this a bit so you can see what you have to do.  Assume that you have a site that looks like this...

(- bin)
-- _controls
-- SubSite1
-- SubSite2

Since the full answer is rather lengthy, let me give you the short answer (if you just want to get the idea).  You have to make each subdirectory it's own project.  Each subdirectory must not reference the MainSite, but the subsites can reference each other.  Finally you reference the subdirectories in the main project, and can deploy the MainSite's Bin directory and all the web files.

Here's the Long answer.

The goal is to have a SubSite1.dll and a SubSite2.dll in the bin directory of the MainSite.  BTW, the "_Controls" subdirectory is where I put my custom controls and user controls. 

Ok, so if you already have this set up with everything in a single web project, here's what you need to do to switch SubSite1's code into it's own DLL.  Remove the SubSite1 subdirectory from the main web project and create a new web project that points to the SubSite1 directory (I like to create an empty web project and point it to the existing directory).  This will cause the SubSite1 directory to be registered with IIS as an application; go into the IIS Administration control panel item and make the SubSite1 subdirectory not an application.  This will also create a Global.ASAX and a Web.Config in the SubSite1 directory which I delete. 

Now you should have an empty directory.  Make sur ethat you are in the new SubSite1 Project and click on the icon in Solution Explorer of Visual Studio that shows all files.  You will now see all your files, but they aren't a part of the project.  Right click on all the pages and code in the subdirectory and add them into the project.

All done right?  Nope.  Try compiling the new project... it won't work; you're going to probably have a bunch of errors.  You need to go through this same process with the _Controls subdirectory.  Work with _Controls and get it to compile without adding a reference to the MainSite application; you may need to move some code around to get this to work.  You may want to create a separate DLL project to hold common code.  BTW, you may also have to adjust some namespaces.

Now add a reference to the _Controls project to the SubSite1 project.  You will probably have a lot less errors compiling this project now.  Work to get the SubSite1 project to compile without a reference to the MainSite project (so you'll be moving code around again, but be careful not to break the _Controls project... you'll probably want to put some of the necessary code in the common code project... also, like before you may also need to adjust some namespace references).

Once you have the SubSite1 project working (and hopefully you're still with me), then you really just need add the SubSite1 project as a reference to the MainSite project; the MainSite project will also probably need a reference to the _Controls project and the common code project (if you built one).  Now when you deploy you can deploy the web files (aspx, ascx, asax, Web.Config) for all the directories and just the DLLs in the MainSite project's bin directory. 

The beauty of this is that if you have to change the SubSite1 subdirectory you may only have to re-deploy a single DLL... or just the changes.  There can be versioning issues that might make you have to deploy the MainSite DLL again as well, but after this process MainSite probably has less code in it. 


07 October 2005
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

Well, I've worked about 3 weeks straight with minimal sleep (it must have been like what Sahil goes through everyday except I'm older than him).  I covered 41 reporting and analysis products and wrote a lot of text.  Hopefully it turns out OK (with that much work, I'm not 100% sure).  There are some cool posts coming from this experience, but I have a 1 week lull and then I'm back into it for a week.

[Note to Jonas: I will get back to you as soon as I recover from the three week marathon writing assignment.]

I spent last evening trying to get Ultimate Spiderman and X-Men Legends2: Age of Apocolypse working; right now neither do.  I get a BSOD (Blue Screen Of Death)  in Windows XP shortly after I launch the games, and it's a driver issue.  My next guess is to try to switch out CD-Rom drives (I currently have an older DVD burner in the machine).  Everything else should be good Athlon XP 2000+, GeForce FX 5200, and the MoBo's builtin C-Media audio.  I have the latest BIOS for the MoBo and all the latest drivers.  No dice.  I double click, I hear the Cd-Rom spin up, screen goes blank for a second and bam... BSOD... <sigh>

I can't even return it according to Best Buy's return policy since both boxes are open. <grrr />  I think I need to buy a console for gaming...

Any advice?

[Not sure where to put this; it is somewhat technology-related, but I don't think it's that technical, so it goes personal until I chat with Brendan]