Re: Get total system memory
- From: "Karl E. Peterson" <karl@xxxxxxxx>
- Date: Thu, 28 Jun 2007 09:36:41 -0700
MikeD <nobody@xxxxxxxxxxx> wrote:
While your advice is indeed good advice, you must realize that a large
number of people (dare I say vast majority?) get the code for things like
this by copying and pasting it from web sites, newsgroup posts, etc. IOW,
they NEVER originally consulted MSDN Library about the API function. They
find the code, copy it, paste it, it works, and never think about it again
until they notice it no longer "works". And then they post a message to the
newsgroups. <g> Nothing wrong with that as that's what the newsgroups are
for.
I disagree. I think that when something "doesn't work", the first response of any
programmer should be to turn to the documentation, rather than to ask other
programmers "why doesn't this work?" I see the newsgroups as an augmentation of the
documentation, not a replacement for it.
And not to be judgemental of these people in any way, but most of them
probably wouldn't fully understand the documentation anyway. That's
primarily because they're hobbiest programmers and only know VB, maybe some
JavaScript or ASP. But not C++, and the Platform SDK (the documentation in
MSDN Library for the Win32API) is written for C++ programmers.
Right, judgement aside...
IOW, all I'm
saying is that even if JoeHobbiestProgrammer DID look in MSDN Library and
read the docs for GlobalMemoryStatus, he most likely would get it that he
needs to use GlobalMemoryStatusEx and understand why GlobalMemoryStatus
doesn't "work", but wouldn't understand from the docs how to call
GlobalMemoryStatusEx from VB.
And that's the point where Joe comes here, or simply searches the web for another
example that uses the new found function.
The person who WOULD be able to understand
from the docs how to call it would already know to consult MSDN Library in
the first place. So, yeah, you can advise them to go to MSDN, but they're
either not going to or won't understand the docs (and in either case will
still post another message asking for the code). Which is why I just went
ahead and posted it, as originally I was going to do what you did and just
refer him to the docs for GlobalMemoryStatusEx.
I try to combine the two approaches, when time allows. Ideals versus practicality,
huh? <g>
--
..NET: It's About Trust!
http://vfred.mvps.org
.
- Follow-Ups:
- Re: Get total system memory
- From: Bob O`Bob
- Re: Get total system memory
- From: MikeD
- Re: Get total system memory
- References:
- Get total system memory
- From: phonl
- Re: Get total system memory
- From: Jimmy B
- Re: Get total system memory
- From: MikeD
- Get total system memory
- Prev by Date: Re: Storing variables with Random Files
- Next by Date: Re: winhttp and downloading a file
- Previous by thread: Re: Get total system memory
- Next by thread: Re: Get total system memory
- Index(es):
Relevant Pages
|