Re: Ping from C/C++ doesn't work properly using either System() or popen()
- From: "James J. Dines" <james.dines@xxxxxxxxx>
- Date: Mon, 20 Feb 2006 22:34:53 GMT
Floyd L. Davidson wrote:
"James J. Dines" <james.dines@xxxxxxxxx> wrote:<*MUCH* back and forth deleted>
Floyd L. Davidson wrote:
Ironically enough, I was thinking more along the lines of C++ and the
possibility that char would be over-ridden originally (recall the original
poster wasn't clear if using C or C++ though his code was "very C"), but I
haven't had time to follow up on that. I would imagine it is something
that cannot be done, and I certainly would never do it if one could, but
as we both know, that won't necessarily stop a lot of people ...
I know you aren't a C++ guy, but do you see where I was originally going
with this when I was viewing the code in a C++ context?
I really would like to encourage you to carefully ask about this in
comp.lang.c and get a more definitive answer from people you can
verify as experts.
No thanks. I have no doubt that you follow it religiously, and are
accurately portraying the general sentiment. Again, reasonable people can
disagree. I believe it is clear that we are both reasonable people. I
have views on what makes good source code, and what makes for bad source
code, and they are opinions, not absolute fact. I have thought about it in
enough detail that Kernighan, Ritchie, or any contemporary C language guru
would not convince me otherwise. Again, to me this is a big picture thing
that transcends implementation detail, and is about good coding practice.
Portable practice, as opposed to portability practice.
My rule of thumb is this: Without exception, be consistent and explicit
except when to do otherwise would obfuscate the meaning of the code,
confuse, mislead, and/or cause unnecessary effort to be expended by the
code reviewer, or cause the function of the resultant binary to behave
differently. As far as I am concerned, source code should be a special
case of compilable documentation in as much as that is possible.
I'd rather have someone say, did you know you could use a 1 there instead of
sizeof(char)? (-and now, thanks to you, I do :-) ... than ... 'it took me
10 minutes to find the function reference and see what that 1 was supposed
to represent in this context.' Many things are a trade-off. Not everyone
will pick the same option when one is presented.
I spread myself too thin to change that approach, and keep track of all of
the exceptions for each language, platform, etc ... It would be a kind of
spaghetti code in my psyche that I don't have the time, inclination, or -
perhaps - ability, with which to deal.
Peace; thanks for your help, your valuable input, and your time!
Jim D.
.
- References:
- Ping from C/C++ doesn't work properly using either System() or popen()
- From: Neel
- Re: Ping from C/C++ doesn't work properly using either System() or popen()
- From: Floyd L. Davidson
- Re: Ping from C/C++ doesn't work properly using either System() or popen()
- From: James J. Dines
- Re: Ping from C/C++ doesn't work properly using either System() or popen()
- From: Floyd L. Davidson
- Re: Ping from C/C++ doesn't work properly using either System() or popen()
- From: James J. Dines
- Re: Ping from C/C++ doesn't work properly using either System() or popen()
- From: Floyd L. Davidson
- Re: Ping from C/C++ doesn't work properly using either System() or popen()
- From: James J. Dines
- Re: Ping from C/C++ doesn't work properly using either System() or popen()
- From: Floyd L. Davidson
- Ping from C/C++ doesn't work properly using either System() or popen()
- Prev by Date: Re: NIC not detected
- Next by Date: Re: cookbook to installing/configuring WPA
- Previous by thread: Re: Ping from C/C++ doesn't work properly using either System() or popen()
- Next by thread: Wireless network tuning WMP54G on Ubuntu Breezy
- Index(es):
Relevant Pages
|