Re: Get total system memory



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


.



Relevant Pages

  • Re: WANTED: SOFTWARE INVENTIONS
    ... Linkage is a metric used by Google and other search engines ... You don't report to a conscience either. ... No bright programmers are stupid enough to trust this ex-videotape salesman ... anyone who posts advertisements in Usenet newsgroups hasn't a clue. ...
    (comp.lang.java.programmer)
  • Re: In the matter of Herb Schildt
    ... letter criticising me would have it published. ... themselves some serious questions about their employment policy. ... of experienced C programmers and writers in the field think that Schildt's ... have an appropriate newsgroups line in your header for your mail to be seen, ...
    (comp.lang.c.moderated)
  • Re: To Peter Seibel
    ... abuse defenders of Schildt online, ... There are no "basic principles" of C in the sense that there are ... computer programmers don't have the right to be ... have an appropriate newsgroups line in your header for your mail to be seen, ...
    (comp.lang.c.moderated)
  • Re: WIN API example in C++
    ... I do not believe he was laughing at you, rather laughing at the fact that it ... not C programmers, ... >> Declare Function OSRegOpenKey _ ... >> newsgroups on the web, and you can be sure that in at least one of these ...
    (microsoft.public.vb.winapi)
  • Re: Warum ist QuickTime so ineffizient?
    ... Wer in Newsgroups schreibt, ... TLDs for Testing, & Documentation Examples ...
    (de.comp.sys.mac.misc)

Quantcast