Board index » cppbuilder » Re: BC Studio?

Re: BC Studio?


2004-05-25 03:58:26 PM
cppbuilder19
Matt Jacobs wrote:
Quote
Boian Mitov < XXXX@XXXXX.COM >wrote:

>Looking back into some of my old books it appears that the streams
>ware indeed introduced somewhere around 1992, or about 2 years after the
>first versions of C++. Does somebody remember the exact time frame? It
>will make it about 12 years.

I took my first C++ course in 1989, and as object orientated
programming was a fairly new concept (to the instructor), she spent at
least 8 weeks on C++ streams. I never forgave her. <g>
8 weeks ! - did you fancy her or something ?
 
 

Re:Re: BC Studio?

Ed Mulroy [TeamB] < XXXX@XXXXX.COM >wrote:
Quote
>Ed, it would help if people assuming things about
>me didn't forget the context of this thread -
>learning C/C++.

Good point and reinforcement for why those for whom the context of
this thread applies should be comfortable with the proper use of
simple and stable functions such as printf and sscanf.
Have you tried to teach C++? IME, any student
that didn't have exposure to either one did
prefer streams over 'printf()'. (Of course,
that might just be my bad influence as a
teacher. <g>) OTOH, those who had exposure
to C usually tried to use C IO. And as it
were, usually they failed badly.
Here's one of those mean tricks teacher play
with their students: One pretty mean way to
teach students something about IO in C++ is
to "accidently" keep a finger on some key,
when explaining something to them while their
program runs. Then look at the screen, see
the mess, pretend to be embarassed, say "oh,
sorry!", pretend to be so confused, and hit
the enter key. In 70& of all the times it
"happened" to me, the programm would blow.
With those that prefered C IO, 98%.
<sarcasm>
Of course, this is just pure empirical,
so it might not be true.
</sarcasm>
Quote
. Ed
Schobi
--
XXXX@XXXXX.COM is never read
I'm Schobi at suespammers dot org
"Sometimes compilers are so much more reasonable than people."
Scott Meyers
 

Re:Re: BC Studio?

Can I subscribe - the course looks brilliant ?!?
--
Mark Jacobs
DK Computing
www.dkcomputing.co.uk
markj atty critical dotty co dotty uk
"We are all part of the matrix - it's just some of us are duracells and some ever readys"
"Hendrik Schober" < XXXX@XXXXX.COM >wrote in message news:40b1c439$ XXXX@XXXXX.COM ...
Quote
0. History/Context
1. Basics:
- "Hello, World!"
- programm organisation, source files,
headers
- functions, types, operators
- (std lib) strings, simple input (cin)
- if/switch/loops etc.
- (std lib) vector/list/indices/iterators,
sorting and other simple algorithms
2. Simple UDT
- class/struct
3. Exception basics
- try/throw/catch
4. Low-level features/Dynamic memory
- pointers/arrays/indices, pointer
arithmetics
- dynamic memory:
. new/delete
. new[]/delete[]
. RAII
- unions
5. UDTs: Inheritance/Polymorphy
- single inheritance, polymorphy (virtual
functions)
- multiple inheritance
6. Type casting
8. Improving UDTs
- operator overloading
- free vs. member functions
- ADL (aka Koenig lookup)
- function objects
- overloading new/delete
9. Exception hierarchies
10. Generic programming
- templates: generic functions/types
- non-type template arguments
- traits, policies
11. RTTI
- typeid, type_info
- more on dynamic_cast
12. A standard library overview
- more on strings
- streams
- STL: containers, algorithms, iterators
13. Brief look at advanced template stuff
- template meta-programming
- generative programming

>.a

Schobi

--
XXXX@XXXXX.COM is never read
I'm Schobi at suespammers dot org

"Sometimes compilers are so much more reasonable than people."
Scott Meyers


 

{smallsort}

Re:Re: BC Studio?

I only use the de{*word*81} when all my "dropped in" ShowMessages have not given me the information I require to
understand the bug (which is *VERY* rare). But I do still use it - it is important to have one with an IDE. I
do not think de{*word*81}s should be introduced to students until they are advanced enough to require one. (Year 2
onwards...)
--
Mark Jacobs
DK Computing
www.dkcomputing.co.uk
markj atty critical dotty co dotty uk
"Hendrik Schober" < XXXX@XXXXX.COM >wrote in message news: XXXX@XXXXX.COM ...
Quote
Finally, I strongly believe that, to learn
the language, you don't need a de{*word*81}.
 

Re:Re: BC Studio?

I would simply teach them to use C IO but with huge buffers for the input and output strings because memory is
cheap nowadays - one of my programs when run with a certain input file, allocates 200MB off the heap (using
malloc of course) and works fine on most modern PCs running XP. Most of my teaching would instruct students to
always err on the side of excess, because a future-proof program makes more money than a quick and dirty util.
--
Mark Jacobs
DK Computing
www.dkcomputing.co.uk
markj atty critical dotty co dotty uk
"Hendrik Schober" < XXXX@XXXXX.COM >wrote in message news:40b30ef3$ XXXX@XXXXX.COM ...
Quote
Ed Mulroy [TeamB] < XXXX@XXXXX.COM >wrote:
>>Ed, it would help if people assuming things about
>>me didn't forget the context of this thread -
>>learning C/C++.
>
>Good point and reinforcement for why those for whom the context of
>this thread applies should be comfortable with the proper use of
>simple and stable functions such as printf and sscanf.

Have you tried to teach C++? IME, any student
that didn't have exposure to either one did
prefer streams over 'printf()'. (Of course,
that might just be my bad influence as a
teacher. <g>) OTOH, those who had exposure
to C usually tried to use C IO. And as it
were, usually they failed badly.

Here's one of those mean tricks teacher play
with their students: One pretty mean way to
teach students something about IO in C++ is
to "accidently" keep a finger on some key,
when explaining something to them while their
program runs. Then look at the screen, see
the mess, pretend to be embarassed, say "oh,
sorry!", pretend to be so confused, and hit
the enter key. In 70& of all the times it
"happened" to me, the programm would blow.
With those that prefered C IO, 98%.
<sarcasm>
Of course, this is just pure empirical,
so it might not be true.
</sarcasm>

>. Ed

Schobi

--
XXXX@XXXXX.COM is never read
I'm Schobi at suespammers dot org

"Sometimes compilers are so much more reasonable than people."
Scott Meyers


 

Re:Re: BC Studio?

George <George@localhost>wrote:
Quote
[...]
>>>Using IDE based products such as BCB and VC to study C++ porgramming is
>>>redicules. While it can be done, there are too many issues that
>>>distract, divert or overwhem the student.
>>
>>If it were true then every {*word*249}ager should have taken a course in driving a
>>bicycle before learning how to drive a car.
>
>I think your example doesn't compare well.

Ok, how about this: a person must learn how to drive a car with a stick
shift before he can learn how to drive automatic. Is it easier for a novice
to start driving automatic or manual?
Is it easier for a novice learning how
to drive (automatic or manual) when a
clever autopilot and a fancy navigation
system always interupt with some helpful
questions???
Quote
[...]
>For one, students learn programming, languages,
>and using available tools. These are three
>distinct things. They will have a hard time
>learning all three of them at once.

Learning includes both instruction and practice. The first is really
independent of the tools. Whatever tools we are all using, we all read the
same famous books on programming and language. As to the practice, I believe
BCB (and VC) IDE makes this task much easier for a student than any of the
command-line tools. And I also believe that learning the basics of using BCB
would be easier for a student than learning how to use a command-line tool.
I know you believe this. But what I asked
for was an explanation why you do.
Quote
>Further, no one here called for primitive text
>editors. Editors with syntax highlighting and
>the ability to integrate compilers are rather
>easy to find.

I never implied that you either use BCB or nothing. I agree that there is a
number of integrated environments, that can be paired with various compilers
OK, so here we seem to agree.
Quote
and be as helpful for a novice as I believe BCB would be.
And here we don't.
Quote
>Rather than that, the question
>was, whether, when struggling to learn C++,
>you should have to deal with wizards that ask
>you whether you want to create a VCL project,
...

No, that's not the case. It's up to the instructor to limit his exposition
to whatever he chooses to be the test platform. Console application probably
would be the easiest way to go. Whether the students decide to learn the
other features of the tool is upto them. Who said the instruction should
cover everything available.
I had been helping a student recently to
get along with an IDE. He took a course in
graphical programming. The instructor had
them do DirectX stuff using VC6 and he
told me that most students hated it simply
for the fact that it took so much just to
set up a workspace to start doing anything.
They had been given exact instruction on
how to setup a project. But they didn't
understand what it all means, so they
tried to follow those instructions without
knowing what it means. I first watched him
trying to setup a project and he always
would forget to enter something here or to
uncheck a checkbox there, end he either
got unintelligable message boxes from some
wizard telling him he did wrong or he
ended up getting a project where some
setting was wrong, causing him a lot of
trouble later.
For them it was like they should learn the
basic principles of driving by driving a
Boing around the airport. Even looking at
the{*word*19}pit was too much.
Quote
>hit F1 on the keyword 'bool' you get hits for
>"BOOL" (Win API), "Bool" (.NET), "bool keyword"
>(C#), "bool keyword" (C++), "bool operator"
>(OLE DB Templates) and more of these _plus_ 2
>dozen hits for "boolean" (and we are talking

Are you saying that no help is better than this expanded help? I don't think
the students are so dumb as to not being able to solve this little problem.
90% of what you get to them is nonesense.
I wouldn't call this "expanded help".
Besides, they always have help on their
desk: Their notes and a book. The online
help promisses something it can't deliver
to students. (In the Boing{*word*19}pit, it
does not help that there's a note at
each of the buttons.)
Quote
>Finally, I strongly believe that, to learn
>the language, you don't need a de{*word*81}.

I don't think so. Both compiler and de{*word*81} are great tools facilitating
learning. The first programs will go wrong, and compiler messages will help
learning the language, and F1 will be very helpful here. As well the
de{*word*81} will show when the flow is incorrect, or when strange stuff
happens, and will help to examine what went wrong and why. Without the
latter the students will try solving those problems with lots of printing,
which can be more time consuming, more confusing, and may introduce other
errors.
You forget that one can find errors by
looking at the code and thinking about
it. And for learning, this is _a_lot_
better than anything else.
It's my task as an instructor to ensure
that the problems they are given match
their level of understanding. If they
cannot solve it with only little help
by me, then I did something wrong.
(In fact, I found their worst problems
were unintelligable compiler messages.)
Quote
g
Schobi
--
XXXX@XXXXX.COM is never read
I'm Schobi at suespammers dot org
"Sometimes compilers are so much more reasonable than people."
Scott Meyers
 

Re:Re: BC Studio?

Mark Jacobs <markj atty critical dotty co dotty uk>wrote:
Quote
I would simply teach them to use C IO but with huge buffers for the input and output strings because memory is
cheap nowadays - one of my programs when run with a certain input file, allocates 200MB off the heap (using
malloc of course) and works fine on most modern PCs running XP. Most of my teaching would instruct students to
always err on the side of excess, because a future-proof program makes more money than a quick and dirty util.
That might be fine enough for many your
tasks. But how many of them will end up
where this is intollerably dangerous? I
wouldn't want to be responsible for the
results.
Also, I think there's way to many guys
out there that don't think about what
they do. I rather have students leave
my course that think much to much than
a little bit to little about what they
do.
Quote
[...]
Schobi
--
XXXX@XXXXX.COM is never read
I'm Schobi at suespammers dot org
"Sometimes compilers are so much more reasonable than people."
Scott Meyers
 

Re:Re: BC Studio?

I agree. Programmers especially should think how to design an application, and to double-check their coding as
they write it, before they try to compile it.
The point I was trying to make, was to always program for more than what you need currently, and build in
buffer overflow protection (check all memory allocations and static buffer usage for possible overwrite past
the end of the allocated memory block) so that hackers have a hard time trying to abuse your offerings. It's a
pity Microsoft and Linux have both failed in this latter task, and are now thrashing around trying to tidy up
their code so that buffer overruns no longer occur. My point is that the OS's should not have been released
with these unchecked buffers in the first place. It smacks of programmers making too many assumptions about
how a buffer will be used.
--
Mark Jacobs
DK Computing
www.dkcomputing.co.uk
markj atty critical dotty co dotty uk
"Hendrik Schober" < XXXX@XXXXX.COM >wrote in message news: XXXX@XXXXX.COM ...
Quote
That might be fine enough for many your
tasks. But how many of them will end up
where this is intollerably dangerous? I
wouldn't want to be responsible for the
results.
Also, I think there's way to many guys
out there that don't think about what
they do. I rather have students leave
my course that think much to much than
a little bit to little about what they
do.
 

Re:Re: BC Studio?

Quote
Your story will explain the MFC nonsense...
I was co-authored with Namir Shammas who had written a couple of books
on VC++ and was mainly an MFC guy. He thought little of templates and
mostly knew whatever language MFC was written in (which. while
similar, was neither of C or C++). The publisher (Sams) asked him how
important they were and his opinion was that they were a trivial part
of the language of interest only to academics.
Quote
Templates are at least 50% of the power of
C++ even if you are using them for 10% of the code...
If you are speaking of them used somewhere in the entire program then
I agree. If you are speaking of user code using them as opposed to
them being part of the STL that is merely used, then I think a lot
less. I've seen a lot of code which uses containers and other STL
stuff but which doesn't itself do much with templates. I'm in that
same camp, only lightly using templates other than those already
supplied in the header files.
Quote
...Honestly I don't recall templates in OWL either...
OWL 2 and 2.5 did a lot more with them. They were used less
extensively in the 16 bit versions of OWL.
Some examples from OWL headers of the 16 bit TC++ 4.5
template <class T>class TResponseTableEntry {
template<TWidthHeight widthOrHeight>
struct TEdgeOrSizeConstraint : public TEdgeConstraint {
template <class T>struct TOleFactoryNoAuto {
template <class T>struct TOleFactoryAuto {
template <class T>TUnknown*
TOleFactoryAuto<T>::AutomateObject(T* app,const
void* obj,const typeinfo& info)
template <class T>void
TOleFactoryAuto<T>::UnregisterAutomation(T* app)
. Ed
Quote
Boian Mitov wrote in message
news:40b2d310$ XXXX@XXXXX.COM ...

Talk about insanity :-( . Templates are at least 50% of
the power of C++ even if you are using them for 10%
of the code. Those are usually the internal modeling 10%
and they do 90% of the real work down there!

Your story will explain the MFC nonsense. I remember it
was out just a bit after the OWL. Honestly I don't recall
templates in OWL either. Maybe because of its Pascal
origin :-( . I can't wait to get the generics in the next
Delphi and C#. Then I may start to consider them
somewhat real competitors to C++ !
 

Re:Re: BC Studio?

"Hendrik Schober" < XXXX@XXXXX.COM >wrote in message news:40b31858$ XXXX@XXXXX.COM ...
Quote
>and be as helpful for a novice as I believe BCB would be.

And here we don't.

>>Rather than that, the question
>>was, whether, when struggling to learn C++,
>>you should have to deal with wizards that ask
>>you whether you want to create a VCL project
You can usually tell someone who has learned C++ with
BCB when they ask what
spoo s;
is and why does it compile without using new and a pointer.
This has actually come up in my experience.
When the tool actually modifies the rules of standard C++
it can give a student the wrong impression of the language.
Just my opinion. But I also think that learning SE techniques
is more valuable than learning any language and I'm happy
that most universities spend more time on this than teaching
a particular language.
 

Re:Re: BC Studio?

Quote
...Have you tried to teach C++?...
Yes. Mostly to poor chumps who have been assigned to teach C++
classes but who have no knowledge of the language.
I've come to the conclusion that when you see a tenured professor from
the Engineering Dept teaching a software class, he is being punished.
If the class is not an entry level one then he's probably done an
especially horrible thing, perhaps telling a {*word*194} joke at the
President's Tea or expressing an opinion that isn't liberal.
. Ed
Quote
Hendrik Schober wrote in message
news:40b30ef3$ XXXX@XXXXX.COM ...

Have you tried to teach C++? IME, any student
that didn't have exposure to either one did
prefer streams over 'printf()'. (Of course,
that might just be my bad influence as a
teacher. <g>) OTOH, those who had exposure
to C usually tried to use C IO. And as it
were, usually they failed badly.

Here's one of those mean tricks teacher play
with their students: One pretty mean way to
teach students something about IO in C++ is
to "accidently" keep a finger on some key,
when explaining something to them while their
program runs. Then look at the screen, see
the mess, pretend to be embarassed, say "oh,
sorry!", pretend to be so confused, and hit
the enter key. In 70& of all the times it
"happened" to me, the programm would blow.
With those that prefered C IO, 98%.
<sarcasm>
Of course, this is just pure empirical,
so it might not be true.
</sarcasm>
 

Re:Re: BC Studio?

"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message news:40b32c14$ XXXX@XXXXX.COM ...
Quote
>...Have you tried to teach C++?...

Yes. Mostly to poor chumps who have been assigned to teach C++
classes but who have no knowledge of the language.

I've come to the conclusion that when you see a tenured professor from
the Engineering Dept teaching a software class, he is being punished.
If the class is not an entry level one then he's probably done an
especially horrible thing, perhaps telling a {*word*194} joke at the
President's Tea or expressing an opinion that isn't liberal.
LOL. I had a prof for a networking course that actually told us
that he would take off points for using any fancy language
extensions like classes etc. He was an physics professor
and we all speculated as to what he said to the dean's wife
that got him a 4th year CS class <g>
 

Re:Re: BC Studio?

Ed Mulroy [TeamB] wrote:
Quote
I've come to the conclusion that when you see a tenured professor from
the Engineering Dept teaching a software class, he is being punished.
If the class is not an entry level one then he's probably done an
especially horrible thing, perhaps telling a {*word*194} joke at the
President's Tea or expressing an opinion that isn't liberal.
Yup, it's liberals and intellectuals who are ruining this world for the
rest of us.
--
Ken
planeta.terra.com.br/educacao/kencamargo/
* this is not a sig *
 

Re:Re: BC Studio?

Ed Mulroy [TeamB] < XXXX@XXXXX.COM >wrote:
Quote
>...Have you tried to teach C++?...

Yes. Mostly to poor chumps who have been assigned to teach C++
classes but who have no knowledge of the language.
There was a bit more to my posting
that you avoided answering to:
Quote
[...]
>Have you tried to teach C++? IME, any student
>that didn't have exposure to either one did
>prefer streams over 'printf()'. (Of course,
>that might just be my bad influence as a
>teacher. <g>) OTOH, those who had exposure
>to C usually tried to use C IO. And as it
>were, usually they failed badly.
[...]
Schobi
--
XXXX@XXXXX.COM is never read
I'm Schobi at suespammers dot org
"Sometimes compilers are so much more reasonable than people."
Scott Meyers
 

Re:Re: BC Studio?

"Mark Jacobs" <markj atty critical dotty co dotty uk>writes:
Quote
I would simply teach them to use C IO but with huge buffers for the input
and output strings because memory is cheap nowadays
IMHO, huge buffers are an excellent way to cover bugs rather than detect
and fix them.
I'd teach to use buffers of the exactly correct size. This will make errors
appear much earlier, especially if appropriate tools are used.
See U29 on kmi-ftp.open.ac.uk/pub/documents/bugtales.3o4
Quote
- one of my programs when run with a certain input file, allocates 200MB
off the heap (using malloc of course) and works fine on most modern PCs
running XP. Most of my teaching would instruct students to always err on
the side of excess, because a future-proof program makes more money than
a quick and dirty util.
Pre-allocating 200MB to cover bugs seems rather "quick and dirty" to me.