Fog Creek Software
Discussion Board




SourceSafe monitoring tool

Here's a simple tool which does for SourceSafe what other source control systems can do natively: scans the database for changes for the past XX hours and prepares a report complete with color-coded diffs.

Run this overnight, read with your morning espresso, then crack out the whip and go lead-program the hell out of the poor soul who checked in all that BS.

http://assen.port5.com/vssmon.html

Ivan-Assen Ivanov
Tuesday, November 19, 2002

Big deal.

It's easy to write your own VSS applications that do this sort of stuff.

VSS exposes itself to the outside world fully via objects.

Alberto
Tuesday, November 19, 2002

In fact, I'd allow myself about 3 hours to write that application.

Alberto
Tuesday, November 19, 2002

And if you failed would you cane yourself thoroughly?

Simon Lucy
Tuesday, November 19, 2002

Let me see,

some kind person spends time writing some code to scratch an itch. He decides to share the fruits of his labor with his peers, and all you can come up with is "big deal"?

Sad man. Real sad.

Just me (Sir to you)
Tuesday, November 19, 2002

Internet message board psych 101:

If somebody gets their ass jumped at work or home and they are powerless to do anything about it, they will take their frustrations out on some poor unsuspecting soul on the internet.


Tuesday, November 19, 2002

K... Let's start over.

Hey Ivan,  Cool!

Thanks

Brad Siemens
Tuesday, November 19, 2002

Ivan,

Thanks for the link. It's pretty pathetic when people post "big deal, I could have done that". My response to them is:

Big Deal. So can we, but we're smart enough to use free tools instead of writing our own.

Thanks again for posting the link.

Mark Hoffman
Tuesday, November 19, 2002

These late answers show more than anything why this board spawns usually interesting discussions.

Robert Chevallier
Tuesday, November 19, 2002

Alberto,

3 hours.  Man your slow.

I just did it in 5 seconds.
Tuesday, November 19, 2002

Ivan,

I was planning to get round to this sometime soon.  You've saved me some time.

Thanks.

Ged Byrne
Tuesday, November 19, 2002

How does one determine which version of MSXML and Windows Scripting Host is on their Win2000 OS?

These may be dumb questions and/or I'm lazy
Tuesday, November 19, 2002

I found a KB article that shows me which version of MSXML that IE is using:

http://support.microsoft.com/default.aspx?scid=KB;en-us;q296647

I found that my IE is using msxml3r.dll and the version is 8.20.8730.1

But, the guy who wrote the VSSMon says this:

"VSSMon requires MSXML (I guess version 2.0, but I'm with 4.0, and I'm too lazy to check)"

So, since he says "4.0" and my IE uses "8.20.8730.1".  Are we talking about the same MSXML dll?

In the same folder as my msxml3r.dll is:

msxml.dll, msxml2.dll, msxml2a.dll, msxml2r.dll, msxml3.dll, msxml3a.dll, msxml3r.dll, msxmlr.dll

So, I'm guessing his program specifically looks for msxml.dll?  Or maybe not...because my version of msxml.dll is:
8.0.6730.0

Hmmm.  Shouldn't it be easier to determine which dll is being used?

These may be dumb questions and/or I'm lazy
Tuesday, November 19, 2002

To determine WSH version wrote the following two lines in a file and name it wshtest.vbs:

MsgBox "This machine is running " & WScript.Name & _
      ", version " & WScript.Version


Here is an article that explains how to determine the version of MSXML that Internet Explorer is using. Not the exact answer to your question, thought.

http://helpdesk.nashco.ca/Solutions/NAI/MagicSolutions/Utilities/MSXMLChecker.htm

Since you can have different versions of MSXML installed on your computer (true since MSXML 4, or "XML Core Services", as they are called now) the only reliable way to know which version are installed is to write a custom program, and ask for the version you want to use.

Leonardo Herrera
Tuesday, November 19, 2002

These may be dumb questions and/or I'm lazy: check this URL:

http://support.microsoft.com/default.aspx?scid=KB;en-us;q269238

Leonardo Herrera
Tuesday, November 19, 2002

Interesting that I have to write a script to get the WSH version.

I was trying to find the way to do it without writing a script!

Even finding out the version of MSXML that IE uses is quite a process!  I was just wondering, after I found out I'm in the 8's for version number, why the author was still at 4!

These may be dumb questions and/or I'm lazy
Tuesday, November 19, 2002

I'm going to keep posting, because if I'm having problems, I'm sure others might.

I went to run the script (using cscript VSSMon.wsf VSSMon.ini.xml)

It failed and I got this error:
C:\Applications\VSSMon\VSSMon.wsf(10, 3) Microsoft JScript runtime error: Automation server can't create object

So, I tracked it down and the first two lines executed in the VSSMon.wsf are:

var ConfigIni = new XMLConfig();
ConfigIni.Load(WScript.Arguments(0));

The Load is failing.

The XMLConfig is the XMLConfig.js he includes in the zip file.

So, I opened up that file.

I have a feeling this line is failing:

this.xml = new ActiveXObject("Msxml2.DOMDocument.4.0");

Hmmmmm.

These may be dumb questions and/or I'm lazy
Tuesday, November 19, 2002

TMDBQ,

The 8.20.8730.1 your are looking at is actually the file version you are looking at.  It belongs to MSXML3.

If you have VB installed an easy way to see what components you have is to look at the references dialog.  (Project/References).

It tells me that I have Microsoft XML v2.6, v3.0 and version 2.0.

It also tells me that I have Microsoft Script Control 1.0.

Ged Byrne
Tuesday, November 19, 2002

TMDBQ,

You are quite right, it should be much easier.

Ged Byrne
Tuesday, November 19, 2002

Ged,

>>>>>>>>>>
The 8.20.8730.1 your are looking at is actually the file version you are looking at.  It belongs to MSXML3.
>>>>>>>>>>

*Slapping-hand-to-forehead*.  Yes, that is the file version!  Now I understand the disconnect to my "8ish" numbers and his "4.0".

>>>>>>>>>>
If you have VB installed an easy way to see what components you have is to look at the references dialog.  (Project/References).

It tells me that I have Microsoft XML v2.6, v3.0 and version 2.0.
>>>>>>>>>>

Yes, I do!  And mine tells me the same things.  (v2.6, v3.0, v2.0)

>>>>>>>>>>>
It also tells me that I have Microsoft Script Control 1.0.
>>>>>>>>>>>

The script code someone else posted worked well.  I have Windows Scripting Host 5.6 according to the script (when run)!

Interesting thing is, I can't get this thing to work still (won't create the object error I mentioned above).

I'm about to give up for now, because I have work to do.

What's strange is, I'm pretty sure I have all the pieces that he suggests, and it didn't work.  Hmm.  Nothing is really "free". :)

These may be dumb questions and/or I'm lazy
Tuesday, November 19, 2002

One more post!

Since the js code wanted to instantiate ActiveXObject("Msxml2.DOMDocument.4.0"), I looked in my registry under HKEY_CLASSES_ROOT

Well, I don't have an Msxml2.DOMDocument.4.0, but I do have a Msxml2.DOMDocument.3.0, so I changed the js file to 3.0.

Now I get this error:

C:\Applications\VSSMon\VSSMon.wsf(157, 3) Microsoft JScript runtime error: Automation server can't create object

It's a different error! (157,3) instead of (10,3)!

Either I get MSXML4? or I see if I can change some more code at 157,3!

These may be dumb questions and/or I'm lazy
Tuesday, November 19, 2002

Woo-hoo!

I found another spot in VSSMon.wsf that referenced 4.0 and changed it to 3.0.

Now it's actually working!

There you go!  If anyone has any problems, just read through my comments!

These may be dumb questions and/or I'm lazy
Tuesday, November 19, 2002

I think 'big deal' is ok, I'm happy with that.

I suppose I was responding to the crack out the whip nonsense, I hate code cops, and the attitude that goes along with it. I once wrote a VSS 'checker' that checked to see who didn't check in code overnight and emailed the boss a list of naughty people.

Needless to say it pissed everybody off considerably, it really alienated the boss too, I was OK though, because strangely my name never appeared on that list.

Alberto
Tuesday, November 19, 2002

Alberto, interesting comment.  Its something that I've been coming up against lately, since I've been really pusing to get version control, a bug tracking system, etc installed in our group.  I set it up, and I use them all the time, but getting the others started is a chore.

I've thought about trying a method like you said you've done, and then thought against it.  Most of what I've read on the topic (i.e. here and in the Pragmatic Programmer) sums to: Don't force people to use it, but instead use it yourself, let it known (politely) that you're using it, then show how much more productive you are with it.  Forcing something on people won't make them like it or use it more than they would otherwise.  When they lose a few files, and then you show them how it wouldn't have been lost with CVS, they might come over quicker.

Case in point, a coworker of mine has 5 versions of his application on his machine, no source control, and he tells which is the one to work on by file modification time.  I recently helped him write a small script to crawl his source tree and find all the files his app links to.  (its jsp).  He found a file that he didn't put on the live website, that should have been there.  The next day he asked me to help him set up CVS this week.

So, thats my conversion story.  It doesn't help my cause in getting people to use these tools since I've only been out of school (B.S. in CSE from UC Davis) for about 5 months.

To make a long story short, writing that script probably did more harm than good, by alienating developers, making them resentful towards you, etc.

my 32 cents.

Obviously nameless
Tuesday, November 19, 2002

I think it is just a cool mechanism to do code reviews. If I were managing several more junior engineers I would use it all the time to judge the quality of their work, make sure they were adhering to coding standards, etc.

dmooney
Tuesday, November 19, 2002

I might even use it for myself just to help me figure out what I've checked in to help me update my painless software schedule. (Yes, we actually are using painless software schedules in Excel at my company.)

dmooney
Tuesday, November 19, 2002

Then, you'd be stalking them.

Alberto
Tuesday, November 19, 2002

>>>>>>>>>>
Then, you'd be stalking them
>>>>>>>>>>

Oh, just stop.

Seriously.

dmooney said he would use it as a tool for code reviews.  I don't know about you, but the few opportunites that I have had to be involved in a code review -- I embrace it.

I like to learn and am always constantly trying to learn.  I love looking at source code.  I love talking source code with other programmers.  C'mon, if you work at a place where a manager is counting lines of code (remember: taking lines of code away from a project is a good day too) or "hawking" you for a certain amount of pre-conceived production ... well, just leave the company.  I would.  It would drive me crazy.  But, the tool used in the right hands could be valuable.

Really, to me, the people that have something to worry about (crappy work, little work done, in other words "not smart and don't get things done") are the only ones that would be worried about someone looking at their code.

Don't blame the tool, blame the idiot using it!
Wednesday, November 20, 2002

I don't blame the tool, but I do blame the idiot using it.

Don't get me wrong I love code reviews, I like it when my boss comes, then he (male) gets to see how good I am!

My boss just says "I might come to your code review", we all say "fine", he's not sneaking around behind our backs, trying to catch us out.

No snooping, just collaborative effort amongst open minded and receptive human beings.

Alberto
Wednesday, November 20, 2002

>Don't get me wrong I love code reviews, I like it when my >boss comes, then he (male) gets to see how good I am!

So do I, but I get to see what a short sighted programmer I have been, and I get a chance to rethink all those things
that seemed to be a good idea at the time I wrote them.

To "defend" your code among your peers is a very healthy
excercise, and it opens your eyes, because you get questioned why you did stuff a certain way even if the code is working good already.

And the good, elegant parts usually never gets mentioned in code reviews anyway.

Patrik
Wednesday, November 20, 2002

I'm not so humble, I've been doing this for a long time and I write good code.  Of course code reviews are useful for me, but to be honest I usually find myself leading any code review. I do not encourage 'defensive' code reviews, at the end of the day if the coder who's code is being reviewed wants to do it THAT way, then I allow it to be their call.

I suggest reading Freedman Daniel P and Gerald Weinberg "Handbook or walkthroughs, inspections and technical reviews" New York (Dorset House). Weinberg is also the original proponent of "Egoless programming" the concept of which most review techniques are based.

Code reviews must be a learning, improvement experience, nobody should be defensive. This especially is important for interns and other greenies.

Alberto
Wednesday, November 20, 2002

Alberto,

I also write good code. Im not humble either. It is just that
what I consider "good code" may change over time.
Maybe I used the word "defend" carelessly in lack of a better word. I didnt mean for the reviewed programmer, or anybody for that matter, to be defensive.

The experince I was reffering to, happened when I wrote a bunch of code on the learning curve. (Not learning the language, but learning new systems to intergrate with etc.)
and that resulted in me being able to change my mind about my own code after the review.

I think "egoless programming" is a contradiction in terms,
but thanks for the reading suggestions :-)

Patrik
Wednesday, November 20, 2002

I don't get how reading the code other people on the check into the public code repository is snooping.

dmooney
Wednesday, November 20, 2002

I write crap code.

Then I make it better.  Then I own up to showing people.
Then I go back and fix it.

Everyone (given a small subset of the global population), seems to think I write good code. 

I write crap code.

Simon Lucy
Wednesday, November 20, 2002

I write beautiful code, probably the best in the world.

Alberto
Friday, November 22, 2002

I wish.

Alberto
Friday, November 22, 2002

*  Recent Topics

*  Fog Creek Home