Javascript and the Date object

October 2nd, 2007 – sprocketrocket

I learned a few new things about the Javascript Date object today:

  1. When using this constructor: new Date(year, month, day);, month is 0 based. So, if you want to create a date object for September 30, 2007, it would look like this: new Date(2007, 8, 30);
  2. It’s far better to use a completely different constructor - one that takes a date string, parses it, and returns a valid date object. So like this: new Date('9/30/2007'); will generate September 30, 2007.
ADD TO STUMBLEUPON ADD TO DEL.ICIO.US ADD TO NEWSVINE ADD TO FURL ADD TO NETSCAPE ADD TO TECHNORATI FAVORITES ADD TO SQUIDOO ADD TO WINDOWS LIVE ADD TO YAHOO MYWEB ADD TO ASK ADD TO GOOGLE

Posted in The Geeks, sprocketrocket, Firefox, Microsoft .Net, Visual Studio 2005 | No Comments »

KDiff with Team Foundation Server

May 29th, 2007 – sprocketrocket

Recently, I’ve been using Microsoft’s Team Foundation Server (TFS) for source control. Both my last job and my current job use it and as a Microsoft developer, and so, whether I like it or not, I expect to see a lot more of it in the future; but that’s really beside the point. Microsoft’s diff / merge tool simply isn’t adequate. It highlights the differing line just fine, but it’s not smart enough to tell me what’s different.

Years ago, I started looking around for a good solution and found KDiff. It’s an open source project hosted on Source Forge. It’s a wonderful piece of software that does exactly what you’d expect it to do. It even tells you if the only difference on a given line is just spacing (which typically has zero impact on code execution).

I wanted it to integrate with TFS nicely without having to work around it and found the necessary command-line paramters to feed to TFS:

Compare:
%1 %2

Merge:
%1 %2 -o %4

So to make them work with TFS, open Visual Studio, go to Tools -> Options and under the Source Control -> Visual Studio Team Foundation Server tree, click “Configure User Tools. . .”. That’s where the magic happens.

That’s pretty much it. It makes dealing with different files, concurrent checkouts, and other issues related to development and source control so much better.

ADD TO STUMBLEUPON ADD TO DEL.ICIO.US ADD TO NEWSVINE ADD TO FURL ADD TO NETSCAPE ADD TO TECHNORATI FAVORITES ADD TO SQUIDOO ADD TO WINDOWS LIVE ADD TO YAHOO MYWEB ADD TO ASK ADD TO GOOGLE

Posted in sprocketrocket, Visual Studio 2005 | No Comments »