Re: AfxGetApp() returns NULL
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Tue, 18 Dec 2007 03:32:06 -0500
Yes, the wizard code indentation sucks, and K&R style sucks. I wouldn't use either of
them; first thing I do with wizard code is reindent it so it looks reasonable. One
advantage of my text editor is that it does precisely the right indentation that I want,
and I don't have to fiddle twenty interacting parameters to get it to do the right thing.
I've been using the same indentation style for about 30 years, and it is highly adapted to
human readability. I developed it after studying how human beings process information,
rather than how computers process information. K&R style is actually actively hostile to
human perception. Key to this is undertanding that human beings do not handle nesting
well, and have very poor spatial recognition required for proper indentation recognition.
Combine this with limited visual context and most conventional approaches simply fail the
basic tests of human perception limitations.
Note that the "indent braces" option still gets the indentation wrong; what it gets wrong
is that the program text inside the braces is vertically aligned with the braces instead
of being indented one more space. There are many other problems with how brace
indentation is done, not the least of which is that typing a space in front of a brace
causes the brace to realign; this makes no sense. Overall, I do not want to spend my life
fighting a third-rate editor when I have a first-rate editor already.
Since I have to look up most of the parameters to functions, since Intellisense doesn't
actually give me anything useful most of the time, I don't see that it is providing me any
real advantage. Having a dual-monitor environment with the MSDN permanently on display on
the second monitor is far more an advantage than intellisense. So I find very little to
recommend the VS editor. I use it for fixing trivial syntax errors but I don't do real
work in it. It just gets in the way.
joe
On Tue, 18 Dec 2007 05:24:28 GMT, "David Ching" <dc@xxxxxxxxxxxxxxxxxxxxxx> wrote:
"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in messageJoseph M. Newcomer [MVP]
news:8ncem356k8d7qhhmjfp9g1vl7pdj01t6ca@xxxxxxxxxx
I have no idea what "standard MFC style" is, but out of the box, the
indentation sucks,
and there is, through VS2003, no setting that makes indentation work even
vaguely like I
require.
I will evaluate VS2008 when I receive it. This has not yet happened.
Standard MFC style is what the wizard generates and what is shown in source
code listing in MSDN Magazine and MSDN itself. It's K&R style.
VS2003 also has the checkbox
[ ] Indent braces
Tools | Options
Select Text Editor | C/C++ | Formatting
It sounds like an afternoon in the IDE Options dialog may make you
appreciate the IDE yet.
-- David
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: AfxGetApp() returns NULL
- From: David Ching
- Re: AfxGetApp() returns NULL
- References:
- Re: AfxGetApp() returns NULL
- From: Joseph M . Newcomer
- Re: AfxGetApp() returns NULL
- From: David Ching
- Re: AfxGetApp() returns NULL
- From: Joseph M . Newcomer
- Re: AfxGetApp() returns NULL
- From: David Ching
- Re: AfxGetApp() returns NULL
- From: Joseph M . Newcomer
- Re: AfxGetApp() returns NULL
- From: David Ching
- Re: AfxGetApp() returns NULL
- From: Joseph M . Newcomer
- Re: AfxGetApp() returns NULL
- From: David Ching
- Re: AfxGetApp() returns NULL
- From: Joseph M . Newcomer
- Re: AfxGetApp() returns NULL
- From: David Ching
- Re: AfxGetApp() returns NULL
- Prev by Date: Re: run-time speed
- Next by Date: Re: Resources in a static library
- Previous by thread: Re: AfxGetApp() returns NULL
- Next by thread: Re: AfxGetApp() returns NULL
- Index(es):
Relevant Pages
|
Loading