Patrick,
I don't see how Moore's law is applicable in this situation. It doesn't
matter how fast your computer is if it is trying to process 1000's of
requests per second. Consider a script that needs to query a list of domain
computers. You can either call directly into the Netxxxxxx APIs and get the
list quickly or use WMI and all of the out of proc interactions with the WMI
service that this entails (and yes, there is quite a bit of memory/processor
overhead). If this script is executed many times a second then you will
experience the pain that WMI imposes.
Moore's law says that the speed of processing doubles every 18 months or so.
But the problem is that our expectations also double. So if you are running
a script that takes 1 second to process today, you would expect it to only
take 500 ms in 18 months. However if you use WMI it may take 2 seconds today
and 1 second later. Regardless it is still more time than need be.

Anyhow, I can not disagree with you more regarding the "readability" of
code. If you read the forward of my books you will see that I generally
suggest that programmers write readable code. However note that what I mean
by readable code is more like "parsible" code. I write code expecting others
to be able to learn what I was doing (with comments, predictible variable
names, predictible function names, proper indenting, etc). However I don't
want to limit my coding to interfaces that I believe will be around in 5
years so that newbies then would be able to understand my programming. That,
in my mind, is unreasonable.
Just a couple of years ago WMI was not around so coders coded directly into
the Win32 APIs. In another couple of years WMI will probably be replaced
with something else. This is inevitible. If you have hired a programmer that
can not do enough research to figure out what Win32 API calls are doing then
you should fire him right away.

Your comment regarding "the very fact that someone had to ask where to find
it is a serious warning sign" is very disturbing to me. Basically speaking,
with that statement you have fully dissed the entire CPAN repository as well
as one of the basic tennets of Perl 5.x+ (extensibility). I can certainly
appreciate you not wanting to use 3rd party modules/extensions, but keep in
mind this is one of the reasons people use Perl in the first place.

Just my US $0.02,
dave

-----Original Message-----
From: Patrick J. LoPresti [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, October 03, 2002 7:23 AM
To: Dave Roth
Cc: 'Timothy Johnson'; [EMAIL PROTECTED]
Subject: Re: Disabling a service


(Apologies in advance for this rant.)

Dave Roth <[EMAIL PROTECTED]> writes:

> I would really recommend Win32::Lanman, also. WMI is great but it is 
> very expensive (processing time, memory overhead, etc).

How many times per second do you normally enable or disable a service?

Put another way: Computers double in speed every 18 months.  Do you?

Almost all of the expense of almost every script occurs when humans read it,
not machines.  So you should optimize your scripts for human readers.  For
every line you write, think about the poor sod five years from now who never
met you, but who is desperately trying to fix some bug or add some feature.
Because that is exactly what is going to happen (in my experience, anyway).

With that in mind, a clean, object-oriented interface supported by
ActiveState and Microsoft is generally preferable to any third-party module.
The very fact that someone had to ask where to find it is a serious warning
sign.

Don't get me wrong; Win32::Lanman is a *great* module.  And there are some
things, like user rights management, which you cannot do without it, at
least for now.  But I still try to avoid it.

 - Pat

P.S.  It would be different if ActiveState bundled it.  Has anybody tried to
get them to do so?  How would one go about this?
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to