From: David Ching on
"Joseph M. Newcomer" <newcomer(a)flounder.com> wrote in message
news:iougl5p15hqi7r4a75gfutl7eslnhpv4ff(a)4ax.com...
> One of the interesting issues that arose when I did the Win32 book was
> someone who emailed
> me and said "There are too many opinions in this book. Opinions have no
> place in a
> technical reference manual". My response was "The only value-added is the
> opinions. If
> you want the facts, read the MSDN documentation. If you want to know the
> reality of
> practical usage, you have to listen to the people who do this for a
> living. Our opinions
> are what make us different from those who have never done it, or the
> all-the-facts-but-none-of-the-truth documentation". As an educator, it is
> my
> *responsibility* to help mold the mindset of students. Otherwise, we get
> the kinds of
> programs where everything is extern, all methods are public, every module
> does a #include
> of every other header file, casts on AfxGetApp() appear everywhere, and
> pretty soon
> somebody posts a question of the form "I want to refactor my application
> into an app and a
> DLL, but the DLL needs to share 400 global variables with the executable.
> What's the
> right thing to do?" and my opinion is "you have 400 too many global
> variables. Get rid of
> all of them, rewrite the app so it looks like it was coded by someone who
> understood how
> to design software, and THEN refactor it!" What happened was some
> previous instructor
> taught his students what was *possible*, not what made sense. He never
> attempted to
> restrict their mindset to what was sensible. He had no opinions, quite
> possibly because
> he actually didn't write code for a living, just taught it. At Carnegie
> Mellon, the
> professors are practitioners. I was taught by people who wrote compilers
> and operating
> systems, and I valued their opinions. When they said "This is wrong", it
> was reflecting a
> decade or two more experience than I, and my fellow classmates, had.
>
> I've been making a living as a programmer for 45 years, been programming
> for 46. Along
> the way, I've learned what works and what doesn't. What is llikely to
> happen and what is
> unlikely to happen. I've been doing MFC for 15 years. If I can't pass on
> what I've
> learned in that time, I should retire.

All I can say is there is hard-earned wisdom that applies universally, and
there is hard-earned wisdom that does not, and is thus opinion and not fact.
Learning the difference and teaching that to your students in the correct
context is as valuable as the original wisdom.

-- David


From: Joseph M. Newcomer on
One of the first things I make clear in teaching is that I am offering opinions based on
my experience.
joe

On Thu, 21 Jan 2010 11:11:25 -0800, "David Ching" <dc(a)remove-this.dcsoft.com> wrote:

>"Joseph M. Newcomer" <newcomer(a)flounder.com> wrote in message
>news:n7ugl5lr9n6k3kl6p59bli04uktm2vup5v(a)4ax.com...
>> Perhaps because the students have zero years of experience and the teacher
>> has 15 years
>> experience dealing with the reality of MFC applications? Maybe what I do
>> for a living
>> carries some weight for people who have never done it? I have yet to find
>> a situation in
>> which someone asked for an SDI app and did NOT change their mind and want
>> MDI. Sometimes
>> they come to me and say "We started this as an SDI app, now we want MDI,
>> can you fix it
>> for us? The guy who did it is long gone." In the first few years, I got
>> good at this
>> conversion, because they always asked for SDI but ended up wanting MDI.
>> And "untold
>> thousands" does not suggest that those apps always make sense. I once
>> bought an app that
>> was SDI, while its predecessor had been a DOS version of an MDI
>> app...seriously, I could
>> have multiple files open in the MS-DOS version. In the Windows version,
>> only one, and the
>> "clipboard" still used the "internal" mechanism from the MS-DOS version so
>> I could not
>> copy objects from one file into another file!
>>
>> Or, to use another quote I am fond of "Just because it is possible doesn't
>> mean it makes
>> sense". My job is to teach people the reality of building apps, not some
>> hypothetical
>> model that someone at Microsoft thought of in the early 1990s. Reality
>> for me has
>> consistently been that anyone who asks for SDI does so out of ignorance.
>> As soon as they
>> see the product, or as soon as their customers see it, they want MDI.
>>
>
>Universal use of MDI over SDI is an opinion. Just like avoiding
>UpdateData(). There may well be reasons to do so, but those reasons are not
>universal. Myself, I have used both SDI and MDI successfully and would not
>say one is universally better. The fact that with some shenanigans you can
>dumb down MDI to look and feel like SDI is certainly a plug to use it, but
>as I haven't memorized exactly those shenanigans, perhaps I don't want to
>deal with it when I'm just starting my app, which for the foreseeable future
>need only be SDI. Indeed, MDI is harder for people to use. Windows are
>easily lost behind others, etc. Why do you think MS made Office SDI and
>recommended people stay away from MDI in general?
>
>-- David
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Tom Serface on
That's a smart credo. I think the same applies in all areas of life
including giving advice in forums like this one :o)

Tom


"David Ching" <dc(a)remove-this.dcsoft.com> wrote in message
news:uZ2ub4smKHA.6096(a)TK2MSFTNGP02.phx.gbl...
>
> All I can say is there is hard-earned wisdom that applies universally, and
> there is hard-earned wisdom that does not, and is thus opinion and not
> fact. Learning the difference and teaching that to your students in the
> correct context is as valuable as the original wisdom.
>
> -- David
>
>
From: Hector Santos on
Joe,

Please note I am no way suggesting a lack of well founded experience.
Certainly, you are highly experienced and your shoulders raise above
many. You can't be all bad if you from Pittsburgh. :-) I lived 10
years in Irwin and worked for Westinghouse for much of those years,
the latter years as an consultant. I had many contacts with CMU, SEI
and the many of the business development, VC (venture capitalist) in
the area. :)

I'm just saying that as a teacher, I would naturally expect more
openness in ideas, especially in the computer world. There was once
famous Pittsburgh person "Dr. Debug" (CMU Graduate) who was prominent
in the early cyberspace days (which I am an early pioneer in), with a
famous quote:

"There is no such thing as a bad language, just bad programmers."

Of course, you can substitute language for anything, and the converse
axiom can also be used."

"There is no such thing as a bad CUI, just bad CUI programmers."

But then again, it depends on what is your goal.

For example, a course titled "Applied Software Engineering" may be
different than just "[Principles of] Software Engineering." or maybe
more specific, "Applied CUI" vs "Principles of CUI".

I guess, the idea about using MDI as a starting point is not an odd
thing, but to add more "color" that isn't necessary simply because it
is will be easy to argue against. SDI is not "exceptionally rare."

I was also going to add but didn't and I'm happy to read David alluded
to it that once a upon a time, the recommendation was not to do MDI
any more and I seen to recall, that MS realized quickly they had to
continue to support it because people wanted it and it was really
inconceivable that it can be eliminated.

Personally, without the help of the smarter IDE holding the hands of
programmers, using MDI in C/C++ was very complex framework to follow
and require a high degree of understanding. Never mind the fact that
it added a higher overhead.

I just had to make a comment mostly because I noticed a propensity
from your post lately that many methods that have many years of
precedence is deemed by you as wrong and/or incorrect. The Exports
thread was one of them. I suddenly felt "Am I stupid?" because we use
WINAPI in our prototyping and DEF files for our WIN32 SDK? We use
both, where it applies, when we want to expose C/C++ classes, then we
use the dllexport/dllimport declarations. When we want to expose pure
pascal based stack proloque/epilogues we used the traditional WIN32
WINAPI because that is how WIN32 works and it is the method most
explicit traditional binding is done in the API world. For use, this
important because we have a 250 function WIN32 API/SDK for all the
major languages, including p-code languages:

C/C++
Delphi (from 3.0 up)
VB (classic)
Java
PHP
COM
.NET

We have a mixed world here. I will say, today, if you allow the IDE to
create the initial source code and framework, that it helps in the
area of not needing to pay special attention. However, personally,
over the years, when I want clarity or have issues with multi-language
API imports, by far, using the MS dllimport/dllexport has been more
problematic and generally will revert to the basic methods.

Anyway, as David suggested, its about wisdom and generally, with age
comes wisdom and openness to understand:

"There is no such thing as bad ideas, just bad implementations."

SDI and MDI has its place in the CUI arena.

I don't think you want anyone telling you this. I wouldn't, but I am
also not the type to tell anyone that is good or bad. I might suggest
there an an optimal way to do something, but I am strong believer of
people learning thru trial and error and fault. I guess today, that
is rare and IMHO the "IDE" help contribute to people needed more help
not less because almost inevitably most programmers, some day will
need to understand how things actually work not depend on higher layer
frameworks holding their holds. I will be interested to know the
statistics how many programmers don't use the IDE for development or
don't depend on it or get solve issues when the IDE is not there for
them. :)

This is all of course, ONE MAN's OPINION :)

Ciao




Joseph M. Newcomer wrote:

> Perhaps because the students have zero years of experience and the teacher has 15 years
> experience dealing with the reality of MFC applications? Maybe what I do for a living
> carries some weight for people who have never done it? I have yet to find a situation in
> which someone asked for an SDI app and did NOT change their mind and want MDI. Sometimes
> they come to me and say "We started this as an SDI app, now we want MDI, can you fix it
> for us? The guy who did it is long gone." In the first few years, I got good at this
> conversion, because they always asked for SDI but ended up wanting MDI. And "untold
> thousands" does not suggest that those apps always make sense. I once bought an app that
> was SDI, while its predecessor had been a DOS version of an MDI app...seriously, I could
> have multiple files open in the MS-DOS version. In the Windows version, only one, and the
> "clipboard" still used the "internal" mechanism from the MS-DOS version so I could not
> copy objects from one file into another file!
>
> Or, to use another quote I am fond of "Just because it is possible doesn't mean it makes
> sense". My job is to teach people the reality of building apps, not some hypothetical
> model that someone at Microsoft thought of in the early 1990s. Reality for me has
> consistently been that anyone who asks for SDI does so out of ignorance. As soon as they
> see the product, or as soon as their customers see it, they want MDI.
>
> You sound like a very special case. The embedded compiler system I did over ten years ago
> was required by the client to be MDI (they got that part right). Since it cost nothing to
> make it MDI instead of SDI, it was the obvious choice.
> joe
> On Thu, 21 Jan 2010 03:22:16 -0500, Hector Santos <sant9442(a)nospam.gmail.com> wrote:
>
>> Why would a teacher restrict the mindset of students with such a
>> highly subjective opinion, which is highly isolated to one own
>> experiences and to many, not really true in the market place? There
>> are untold thousands of SDI applications. Its unconceivable to even
>> notice that it might even be a rarity. Its not. SDI has its place as
>> well as MDI and they offer two different set of design needs. We use
>> a MDI for our embedded p-code language/compiler IDE. We use SDI for
>> monitors, configuration tools, etc. This isn't an oddity or exception.
>>
>> Very odd statement.
>>
>> --



--
HLS
From: Hans-J. Ude on
Hector Santos wrote:

>Please note I am no way suggesting a lack of well founded experience.
> Certainly, you are highly experienced and your shoulders raise above
>many. You can't be all bad if you from Pittsburgh. :-) I lived 10
>years in Irwin and worked for Westinghouse for much of those years,
^^^^^^^^^^^^
Are you the follower of Nikola Tesla?
;)
Hans