Code snippets etc...

S

Suma

Apologies for way OT q
There are a multitude of ways to code the same logic in C++.
Are there are some snippets on the book/web library perhaps, that
reflect / capture really good programming practices (C++)? Are there
some pieces that you veterans out here have looked at and said "wow
this is a cool implementation"? Any recommendations ? Books ? URL's?
some open source modules ?
This is for an intermediate C++ programmer hoping to broaden one's
coding skills.My emphasis is more on elegance than raw smarts

Adv thx
 
M

Mike Wahler

Suma said:
Apologies for way OT q
There are a multitude of ways to code the same logic in C++.
Are there are some snippets on the book/web library perhaps, that
reflect / capture really good programming practices (C++)? Are there
some pieces that you veterans out here have looked at and said "wow
this is a cool implementation"? Any recommendations ? Books ? URL's?
some open source modules ?
This is for an intermediate C++ programmer hoping to broaden one's
coding skills.My emphasis is more on elegance than raw smarts

IMO in programming, one should not be concerned with
'elegance', however attractive such a notion might be.
Instead concentrate on clarity (readability), maintainability,
and robustness.

Try the books by Scott Meyers (Effective C++, More Effective C++,
Effective STL), and Herb Sutter (Exceptional C++). They should
be easy to find with google, and available from most booksellers,
both online and off.

Also see the book reviews at www.accu.org

-Mike
 
B

benben

IMO in programming, one should not be concerned with
'elegance', however attractive such a notion might be.
Instead concentrate on clarity (readability), maintainability,
and robustness.

....which altogether constitutes elegance...
 
J

Jim Langston

benben said:
...which altogether constitutes elegance...

Agreed. When I look at C++ code I can either read it very easy (almost like
a book) or have to pick over each varible, letter, etc.. to figure out what
is going on.

What I tend to do is code something, then go back over it and read it and
figure out how easy it is will be for me to figure out what I was doing a
year from now.

Seriously, one time I revisted a piece of code I had written a year prior
(this was many many many years ago) and it took me 3 hours to figure out 5
lines of (my own) code. Since then I've learned.
 
S

Suma

Guys
Thanks I am aware of both these books - I am looking for something
different. I am looking for some non trivial implementation than
snippets of code- For eg a framework like STL for collection classes,
Document/View architecture in MFC etc - ( I list this because i am
aware of certain methodologies can "lift") - which is fairly large
chunks of code. Your mileage may vary but this is the way i would
prefer to go...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top