![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
This is the frankly laughable title of the book I'm currently borrowing.
Sure, maybe you could learn BBC BASIC in 21 days. But C++? I doubt it.
The lesson plan looks... interesting. Take a look:
Day #1: Compiling, linking and running.
Day #2: Program structure. Functions.
Day #3: Variables and constants. Assignments. Printing results.
Day #4: Statements, blocks and expressions. Branching.
Day #5: Writing functions.
Day #6: Writing classes and creating objects. Constructors.
Day #7: For loops. While loops. If/then/else. Switch/case.
Day #8: Pointers.
Day #9: References.
Day #10: Overloading. Dynamic allocation.
Day #11: Inheritance. Virtual member functions.
Day #12: Arrays. Strings. Pointer arithmetic.
Day #13: Multiple inheritance. Abstract classes. Pure virtual functions.
Day #14: Static members. Static functions. Pointers to functions.
Day #15: Containment and delegation.
Day #16: Streams. File I/O.
Day #17: Namespaces.
Day #18: OO analysis and design.
Day #19: Templates. STL.
Day #20: Exception handling.
Day #21: Conditional compilation. The C preprocessor.
Riiiight. So, let's see, on day #6 you start writing and using classes -
a fairly advanced topic. And the next day, you learn /how to write a
for-loop/, which is bread-and-butter stuff that every programmer knows
about. That's... interesting.
Oh, look. Day #12, you learn about inheritance, and the next day you
learn about /arrays/?
I'm also loving the complete lack of any coherent direction or
organisation. It's like somebody decided what topics need to be in the
book, and then did a random shuffle on them. One minute you're learning
about arrays and strings, and the next minute it's multiple inheritance.
Wuh??
Suffice it to say, I'm not expecting much from this book. But who knows,
maybe it will surprise me? Anyway, I've been working from an online
resource, but it really doesn't go into enough detail. (E.g., it doesn't
explain what a copy constructor is [or even mention that they exist],
and that seems kinda important to me.) So now I'm going to try this book.
The /other/ fun thing is that the book claims to be compliant with the
"final ANSI/ISO C++ standard". Yeah, well, it was published in 1999. I'm
going to go out on a limb and say the C++ standard may have changed
slightly since then. ;-)
If I find any particularly amusing remarks, I'll let you know...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Em 14/04/2012 12:23, Orchid Win7 v1 escreveu:
> This is the frankly laughable title of the book I'm currently borrowing.
>
> Sure, maybe you could learn BBC BASIC in 21 days. But C++? I doubt it.
>
> The lesson plan looks... interesting. Take a look:
>
> Day #1: Compiling, linking and running.
> Day #2: Program structure. Functions.
> Day #3: Variables and constants. Assignments. Printing results.
> Day #4: Statements, blocks and expressions. Branching.
> Day #5: Writing functions.
> Day #6: Writing classes and creating objects. Constructors.
> Day #7: For loops. While loops. If/then/else. Switch/case.
> Day #8: Pointers.
> Day #9: References.
> Day #10: Overloading. Dynamic allocation.
> Day #11: Inheritance. Virtual member functions.
> Day #12: Arrays. Strings. Pointer arithmetic.
> Day #13: Multiple inheritance. Abstract classes. Pure virtual functions.
> Day #14: Static members. Static functions. Pointers to functions.
> Day #15: Containment and delegation.
> Day #16: Streams. File I/O.
> Day #17: Namespaces.
> Day #18: OO analysis and design.
> Day #19: Templates. STL.
> Day #20: Exception handling.
> Day #21: Conditional compilation. The C preprocessor.
>
> Riiiight. So, let's see, on day #6 you start writing and using classes -
> a fairly advanced topic. And the next day, you learn /how to write a
> for-loop/, which is bread-and-butter stuff that every programmer knows
> about. That's... interesting.
>
> Oh, look. Day #12, you learn about inheritance, and the next day you
> learn about /arrays/?
>
> I'm also loving the complete lack of any coherent direction or
> organisation. It's like somebody decided what topics need to be in the
> book, and then did a random shuffle on them. One minute you're learning
> about arrays and strings, and the next minute it's multiple inheritance.
> Wuh??
>
> Suffice it to say, I'm not expecting much from this book. But who knows,
> maybe it will surprise me? Anyway, I've been working from an online
> resource, but it really doesn't go into enough detail. (E.g., it doesn't
> explain what a copy constructor is [or even mention that they exist],
> and that seems kinda important to me.) So now I'm going to try this book.
>
> The /other/ fun thing is that the book claims to be compliant with the
> "final ANSI/ISO C++ standard". Yeah, well, it was published in 1999. I'm
> going to go out on a limb and say the C++ standard may have changed
> slightly since then. ;-)
>
> If I find any particularly amusing remarks, I'll let you know...
you have wasted precious minutes writing these that I'm sure you won't
recover from you alloted minutes on the topic about makefiles...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Orchid Win7 v1 <voi### [at] dev null> wrote:
> Sure, maybe you could learn BBC BASIC in 21 days. But C++? I doubt it.
It depends on the depth of your C++ understanding that you want to
achieve.
Certainly things like dynamic allocation, pointers (including their
triple role as pointers to individual values, pointers to arrays, and
iterators, not to talk about function and method pointers), pointer
arithmetic, const correctness, the so-called "rule of three" (which with
the new C++ is actually the "rule of five"), RAII, stack vs. heap
allocation, templates, the standard library and its usage, as well as
all the things you have to know in order to avoid shooting yourself in
the foot will take significantly more than 21 days to master.
This is not even going as far as including more advanced low-level
stuff such as virtual inheritance, placement-new, bitfields and
template metaprogramming.
OTOH, you can learn to make simple (and safe, although not necessarily
efficient) programs in that time, with the proper teacher.
> Riiiight. So, let's see, on day #6 you start writing and using classes -
> a fairly advanced topic.
Not really. Classes are the most basic element of OO programming (and
also the most intuitive part), so IMO they should be taught on the *first*
day. (This does not include inheritance and dynamic binding, though. That
can wait.)
> Oh, look. Day #12, you learn about inheritance, and the next day you
> learn about /arrays/?
Inheritance is much less useful than people thought 20 years ago
(it still has its uses in *some* situations, but much less than predicted).
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> The /other/ fun thing is that the book claims to be compliant with the
> "final ANSI/ISO C++ standard". Yeah, well, it was published in 1999. I'm
> going to go out on a limb and say the C++ standard may have changed
> slightly since then. ;-)
>
Which edition of the book do you have? The first one came out in 1996,
before the actual standard.
--
/*Francois Labreque*/#local a=x+y;#local b=x+a;#local c=a+b;#macro P(F//
/* flabreque */L)polygon{5,F,F+z,L+z,L,F pigment{rgb 9}}#end union
/* @ */{P(0,a)P(a,b)P(b,c)P(2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)
/* gmail.com */}camera{orthographic location<6,1.25,-6>look_at a }
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Le 14/04/2012 17:23, Orchid Win7 v1 nous fit lire :
>
> Sure, maybe you could learn BBC BASIC in 21 days. But C++? I doubt it.
It's a bit like "Learn to handle a hammer in 21 days".
It might teach a lot of technical details (hammer a nail in wood, in
plaster, how to nail two pieces at 90°... ), yet I'm afraid it will not
provide the global vision and design needed for a good carpenter.
(OO design, rationales about approaches)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 15/04/2012 04:21 AM, Francois Labreque wrote:
>> The /other/ fun thing is that the book claims to be compliant with the
>> "final ANSI/ISO C++ standard". Yeah, well, it was published in 1999. I'm
>> going to go out on a limb and say the C++ standard may have changed
>> slightly since then. ;-)
>>
>
> Which edition of the book do you have? The first one came out in 1996,
> before the actual standard.
I have the 3rd edition, published 1999. (The standard was, what, 1998?)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 15/04/2012 09:58 AM, Le_Forgeron wrote:
> Le 14/04/2012 17:23, Orchid Win7 v1 nous fit lire :
>>
>> Sure, maybe you could learn BBC BASIC in 21 days. But C++? I doubt it.
>
> It's a bit like "Learn to handle a hammer in 21 days".
>
> It might teach a lot of technical details (hammer a nail in wood, in
> plaster, how to nail two pieces at 90°... ), yet I'm afraid it will not
> provide the global vision and design needed for a good carpenter.
>
> (OO design, rationales about approaches)
We all know there's only /one/ way to learn C++ in 21 days. ;-)
Post a reply to this message
Attachments:
Download '21days.png' (66 KB)
Preview of image '21days.png'
![21days.png](/povray.off-topic/attachment/%3C4f8a9c39%241%40news.povray.org%3E/21days.png?ttop=443812&toff=1100&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Em 15/04/2012 07:00, Orchid Win7 v1 escreveu:
> On 15/04/2012 09:58 AM, Le_Forgeron wrote:
>> Le 14/04/2012 17:23, Orchid Win7 v1 nous fit lire :
>>>
>>> Sure, maybe you could learn BBC BASIC in 21 days. But C++? I doubt it.
>>
>> It's a bit like "Learn to handle a hammer in 21 days".
>>
>> It might teach a lot of technical details (hammer a nail in wood, in
>> plaster, how to nail two pieces at 90°... ), yet I'm afraid it will not
>> provide the global vision and design needed for a good carpenter.
>>
>> (OO design, rationales about approaches)
>
> We all know there's only /one/ way to learn C++ in 21 days. ;-)
not the only, just the easiest. :)
yeah, developing an age-reversing formula and a flux-capacitor is easier
than teaching yourself C++ is 21 days... :)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 4/14/2012 10:41, Warp wrote:
> Inheritance is much less useful than people thought 20 years ago
Software ICs! Never rewrite code!
I remember doing one fairly hairy (at the time) bit of coding for some
graphics line clipping thing in Smalltalk, and thinking to myself "well,
I'll never have to write *that* again." :-)
--
Darren New, San Diego CA, USA (PST)
"Oh no! We're out of code juice!"
"Don't panic. There's beans and filters
in the cabinet."
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 14/04/2012 06:41 PM, Warp wrote:
> Orchid Win7 v1<voi### [at] dev null> wrote:
>> Sure, maybe you could learn BBC BASIC in 21 days. But C++? I doubt it.
>
> It depends on the depth of your C++ understanding that you want to
> achieve.
> OTOH, you can learn to make simple (and safe, although not necessarily
> efficient) programs in that time, with the proper teacher.
Well, maybe. My initial impressions of this book are not great.
>> Riiiight. So, let's see, on day #6 you start writing and using classes -
>> a fairly advanced topic.
>
> Not really. Classes are the most basic element of OO programming (and
> also the most intuitive part), so IMO they should be taught on the *first*
> day. (This does not include inheritance and dynamic binding, though. That
> can wait.)
I guess it depends. You can start at the top, explaining OO theory and
then working down to how you write code with it. Or you can start with
writing simple procedural code, working up to using functions, and then
using classes and other OO features. Either way would be logical. The
way this book seems to do everything is to just jumble it all up in
fairly random order.
> Inheritance is much less useful than people thought 20 years ago
> (it still has its uses in *some* situations, but much less than predicted).
My university lecturer asserted that "inheritance is overused, and
collaboration is underused".
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |