Re: AfxGetApp() returns NULL
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Tue, 18 Dec 2007 22:27:40 -0500
It should support ANY reasonable style, not necessarily out-of-the-box, but it cannot be
configured after installation to support the style I want. Every other editor has a huge
set of interacting parameters to get this right; for example every version of EMACS,
including GNU EMACS, GosMACS, etc., could handle my indentation style...it just took some
fiddling to get it to work right. Epsilon will support most of it, but not all of it, but
it is easy to change the code to do what I want. CodeWrite would support it (which I
easily configured at a client site), but VS simply has no parameters to do it. THAT'S
what I'm complaining about!
The biggest limitation is that the VS people locked onto some flawed paradigms, did not
study existing editors, got captured by the mystique of windowing (as opposed to
viewports), and lost sight of the notion of fully-programmable powerful editors as the
basic mechanism. They haven't caught up yet. Even out-of-the-box, the editor is so
unbelievably weak compared to what I'm used to that it would take me months to bring it up
to doing what I need to do, and I don't plan on spending months to build a poor replica of
a great editor.
My expectations are not out of line with reality; in fact, the ONLY "reality" that, in the
last 30 years, that has NOT been able to support my indentation style is the VS editor!
Reality is (a) it is my style, and therefore represents a reality and (b) every other
editor that had pretensions to being an editor supported it, and that's a reality also.
Even vi got it right, although I gave up on that editor in about three days because it was
so hard to use for other reasons.
joe
On Tue, 18 Dec 2007 19:23:29 GMT, "David Ching" <dc@xxxxxxxxxxxxxxxxxxxxxx> wrote:
Joseph M. Newcomer [MVP]
"Tom Serface" <tom.nospam@xxxxxxxxxxxxx> wrote in message
news:B6163C57-D14D-426B-B862-EC4A3138A67A@xxxxxxxxxxxxxxxx
Hi David,
I think that the style of formatting code is as subjective as anything can
get in our business. I've worked with people that absolutely believe that
God intended us to use the format:
if (...)
{
}
else
{
}
And I go to the church of more real estate and use:
if (...) {
}
else {
}
I also do this a lot:
if (...)
// One line of code
else
// One other line of code
I would put the else on the same line as the closing brace for the
previous if, but that is *too* difficult to read. The thing I like the
least is when people use this format:
if (...)
{
}
else
{
}
But, like I said, everyone has their preferences. Kind of makes you with
K&R had imposed a format from the beginning. I've found that a good way
to get to know code that I inherit is to reformat it. It makes me go
through each line and think about all the blocks.
Hi Tom, sure these are all common indentation themes that are readily
supported by programmer's editors, and it is no big deal to go from one to
another one of these. The IDE lets you do that. But when Joe knocks it for
not out-of-the-box supporting his entirely non-standard indentation style
(have you ever heard of indenting one space past the brace?) and then calls
the IDE a third rate editor because of things like this, I want to get the
point across that it is his expectations that are more out of line with
reality than the IDE's shortcomings. While I would grudgingly tolerate code
to be checked in that followed any one of the formats you illustrate,
because they are at least standard, I would insist Joe's code be reformatted
prior to checking it into the codebase since it is too much to ask other
team members to get used to this entirely non standard code style.
I agree that reformatting the code is a good way to learn it, and after
reformatting it, stepping through in the debugger is even more helpful.
Cheers,
David
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- 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: Tom Serface
- Re: AfxGetApp() returns NULL
- From: David Ching
- Re: AfxGetApp() returns NULL
- Prev by Date: Re: Vista-elevation and HKEY_CURRENT_USER
- Next by Date: Re: AfxGetApp() returns NULL
- Previous by thread: Re: AfxGetApp() returns NULL
- Next by thread: Re: AfxGetApp() returns NULL
- Index(es):
Relevant Pages
|
Loading