473,385 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Bjarne Stroustrup says

Hello all

Bjarne Stroustrup says "The most important thing to do when learning
C++ is to focus on concepts and not get lost in language-technical
details" and "Focus on programming techniques, not on language
features" in his book <The C++ Programming Language>.

I don't follow these.
What does Bjarne Stroustrup actually mean?

Jul 23 '05 #1
13 1848
"Teddy" <du********@hotmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hello all

Bjarne Stroustrup says "The most important thing to do when learning
C++ is to focus on concepts and not get lost in language-technical
details" and "Focus on programming techniques, not on language
features" in his book <The C++ Programming Language>.

I don't follow these.
What does Bjarne Stroustrup actually mean?


When you learn C++, rely on simple concepts rather than a technical
understanding of the language. For example, think of std::vector as a
sequence and not a class template.

Focus on the useful aspects of C++ and not the features. For example, think
of >> as a read operation instead of an overloaded operator.

Hope this helps.
Jul 23 '05 #2
Teddy wrote:
Bjarne Stroustrup says "The most important thing to do when learning
C++ is to focus on concepts and not get lost in language-technical
details" and "Focus on programming techniques, not on language
features" in his book <The C++ Programming Language>.

I don't follow these.
What does Bjarne Stroustrup actually mean?

He means, don't lose the sight of the forest looking at the trees.
Don't spend all your time learning the intricacies of the language
instead of seeing the big picture and actually doing your work.
You don't have to know all the minute details of the implementation
to get the design right and achieve your goals.

V
Jul 23 '05 #3
This might be true when learning, but its definately NOT true in
general. I've seen alot of code written by people who didn't
understand the intricacies of the language and it tends to be brittle
and hard to maintain.

Jul 23 '05 #4
BigBrian wrote:
This might be true when learning, but its definately NOT true in
general. I've seen alot of code written by people who didn't
understand the intricacies of the language and it tends to be brittle
and hard to maintain.


Yeah ... I second that.

When you start off don't worry about all the complex issues with the
C++ language, so you don't need to know the in's-&-outs of the C++ core
langauge yet... but down the line you'll need to know it, plus the std
lib ... etc.
You'll know how to optimize your code & get the best out of it once
you've become more familiar w/ it.
Other folks suggest not thinking about C when you learn C++, I think
that's a good tip as well.

Jul 23 '05 #5

"BigBrian" <wo**@brianmielke.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
This might be true when learning, but its definately NOT true in
general. I've seen alot of code written by people who didn't
understand the intricacies of the language and it tends to be brittle
and hard to maintain.


And the principle reason that the "intricacies" or features are misused or
mis-implemented is due to an erroneous overview of the concept at hand. This
occurs precisely because the coder has focused on the details instead of the
abstract concept.

Why use feature X, for example, if you don't know *when* to use X and what
its goals are. Thats much more important than *how* to code X correctly in
your design.

To emphasize the forest analogy: Concentrating on the tree only generates a
nice tree. The problem is that the forest is then populated by that tree
only. The first infection then jeopardizes the entire forest.

Jul 23 '05 #6


BigBrian wrote:
This might be true when learning, but its definately NOT true in
general.

Please quote a relevant portion of the previous message when replying.
To do so from the Google interface, don't use the Reply at the bottom
of the message. Instead, click "show options" and use the Reply shown
in the expanded headers.

Brian

Jul 23 '05 #7
> > This might be true when learning, but its definately NOT true in
general. I've seen alot of code written by people who didn't
understand the intricacies of the language and it tends to be brittle
and hard to maintain.

And the principle reason that the "intricacies" or features are misused or
mis-implemented is due to an erroneous overview of the concept at hand. This
occurs precisely because the coder has focused on the details instead of the
abstract concept.


The intricacies of the language were misused because the coder was too
focused on the details of the language??? This makes no sense
whatsoever! Most software engineering practices advocate separating
out designing and coding. I suggest until you're good enough to
combined the two, keep them separate.
Why use feature X, for example, if you don't know *when* to use X and what
its goals are.
I never suggested using features of the language that you don't
understand. But my initial point was, unless you are detailed
oriented, and patient enough , you'll never understand the intricacies.

Thats much more important than *how* to code X correctly in
your design.
But, if you don't understand the intricacies of the language, how do
you know you've coded X correctly? If you don't know that it's coded
correctly, what good is it? I may as well be thrown in the trash.
To emphasize the forest analogy: Concentrating on the tree only generates a
nice tree. The problem is that the forest is then populated by that tree
only. The first infection then jeopardizes the entire forest.


Yes, this analogy may sound good, but in reality it has no relavence to
software. Software is not a forest. A beautiful forest can be made up
of trees which have flaws ( grouping trees together can hide the
individual flaws of each tree. ) But if a software system is built
upon components that are flawed by a coder not understanding the
language, the flaws don't cancel themselves out, but interact to create
more flaws and you end up with a very ugly system.

-Brian

Jul 23 '05 #8
BigBrian wrote:
To emphasize the forest analogy: Concentrating on the tree only generates a
nice tree. The problem is that the forest is then populated by that tree
only. The first infection then jeopardizes the entire forest.

Yes, this analogy may sound good, but in reality [...]


I think that analogy is lost on you. Sorry I couldn't find anything
better.
Jul 23 '05 #9
> >>To emphasize the forest analogy: Concentrating on the tree only generates a
nice tree. The problem is that the forest is then populated by that tree
only. The first infection then jeopardizes the entire forest.

Yes, this analogy may sound good, but in reality [...]


I think that analogy is lost on you. Sorry I couldn't find anything
better.


So, since I don't agree that this analogy appiles to writting code, you
infer that I just don't understand. I gave my reasons, you can
disagree with them if you like ( but your inference is not called for).

Jul 23 '05 #10
BigBrian wrote:
To emphasize the forest analogy: Concentrating on the tree only generates a
nice tree. The problem is that the forest is then populated by that tree
only. The first infection then jeopardizes the entire forest.
Yes, this analogy may sound good, but in reality [...]


I think that analogy is lost on you. Sorry I couldn't find anything
better.

So, since I don't agree that this analogy appiles to writting code, you
infer that I just don't understand. I gave my reasons, you can
disagree with them if you like ( but your inference is not called for).


Writing code is only part of programming. Writing perfect code is only
one possible way of implementing something. I think if you only see that
the analogy applies to writing code, you have already lost the view of the
forest for the trees. [And whatever inferences I draw don't have to be
called for. I draw them because I want to or because I feel like doing
so. No offense is intended in either case.]

I said I was sorry because I couldn't find a better (easier to understand)
analogy. Here is another one: while studying patterns of seasonal bird
migrations, there is no sense in concentrating on the shape of
a particular bird's wings, although they might play some role in how far
or how fast birds can fly... No? Missed again? I give up then.

V
Jul 23 '05 #11
"Victor Bazarov" <v.********@comAcast.net> wrote in message
news:lM*******************@newsread1.mlpsca01.us.t o.verio.net...
I said I was sorry because I couldn't find a better (easier to understand)
analogy. Here is another one: while studying patterns of seasonal bird
migrations, there is no sense in concentrating on the shape of
a particular bird's wings, although they might play some role in how far
or how fast birds can fly... No? Missed again? I give up then.


Here's another try: You need more than just a good vocabulary to be a good
writer. Most people will improve their writing faster by studying how to
use the words they already know than they will by learning new words.
Jul 23 '05 #12
Andrew Koenig wrote:
[...] You need more than just a good vocabulary to be a good
writer. Most people will improve their writing faster by studying how to
use the words they already know than they will by learning new words.


Thanks, Andrew, that helps.
Jul 23 '05 #13
"BigBrian" <wo**@brianmielke.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com :
This might be true when learning, but its definately NOT true in
general. I've seen alot of code written by people who didn't
understand the intricacies of the language and it tends to be brittle
and hard to maintain.


Ummm, yes; and I've seen a whole lot of code written by
a man who DOES understand the intricacies of C and C++,
and yet, his code is extremely brittle and hard to maintain.
I should know, because I'm the one hired to maintain it
after he was fired.

Making code non-brittle has more to do with seeing a bigger
picture, asking "what if conditions x or y change? What if...
what if... what if..." and taking steps to innoculate the
code against those contingencies.

Brittle code comes about when someone is rushed or lazy or
panicing to meet a deadline. "Contingencies?! Structure?!
Documentation?! Who has time for that $#!^! I've got to
get this @#$%&*!#$ program working!!!" Hence, code that
works, but is 650000 lines long, has no comments, has no
documentation, is full of subtle bugs, and is hard to
maintain.

Sigh.
--
Cheers,
Robbie Hatley
Tustin, CA, USA
email: lonewolfintj at pacbell dot net
web: home dot pacbell dot net slant earnur slant


----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 23 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: devser2006 | last post by:
Do You Want The Book C++ Programming Language By Bjarne Stroustrup? If yes , please download a screensaver from http://www.geocities.com/screensaver_200and email me that you have downloaded the...
1
by: Mike | last post by:
Hi, I'm auctioning the book "The C++ Programming Language" 3rd Ed. by Bjarne Stroustrup on ebay, details as follows or see eBay item number 250030480853. Softback. Condition : Good. Pub....
17
by: CoreyWhite | last post by:
I bought this book years ago, when I was just learning C++. Since then I've gone through every math course offered at my college, taken courses on coding C & thinking in terms how how to make the...
2
by: Rakesh UV | last post by:
Hi, I searched on google for this book "The c++ programming language by Bjarne Stroustrup's" but i diidnt get any which is free, Thanks in advance Rakesh UV
1
by: Visame | last post by:
How to understand the following paragraph from Bjarne stroustrup's The C++ Programming Language? 9.4.1: In principle, a variable defined outside any function (that is, global, namespace, and class...
20
by: gremlin | last post by:
http://www.cilk.com/multicore-blog/bid/6703/C-Inventor-Bjarne-Stroustrup-answers-the-Multicore-Proust-Questionnaire
0
by: gremlin | last post by:
http://www.cilk.com/multicore-blog/bid/6703/C-Inventor-Bjarne-Stroustrup-answers-the-Multicore-Proust-Questionnaire
0
by: Chris M. Thomasson | last post by:
http://groups.google.com/group/comp.programming.threads/browse_frm/thread/a4a668e20be49644 ] "gremlin" <gremlin@rosetattoo.comwrote in message
1
by: blangela | last post by:
Bjarne Stroustrup has a new text coming out called "Programming: Principles and Practice Using C++" (ISBN: 0321543726), due to be published in December of this year. Some of the features of this...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.