By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,557 Members | 1,416 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,557 IT Pros & Developers. It's quick & easy.

Good Programming Techniques?

P: n/a
I have seen many books that teack coding for C++. What are ways to
improve my techniques for writing larger programs. I have written many
demo programs learning some aspects of code wether it be dynamic
binding or creating function and I understand most of that but how can
I learn and employ techniques to make my programs better. I try to
employ the lessons I learn in the programs that I write. Acclerated
C++ is the best book I have found to actually write better programs.

Feb 16 '06 #1
Share this Question
Share on Google+
19 Replies


P: n/a
On 2006-02-16, JoeC <en*****@yahoo.com> wrote:
I have seen many books that teack coding for C++. What are ways to
improve my techniques for writing larger programs. I have written
many demo programs learning some aspects of code wether it be
dynamic binding or creating function and I understand most of that
but how can I learn and employ techniques to make my programs
better. I try to employ the lessons I learn in the programs that I
write. Acclerated C++ is the best book I have found to actually
write better programs.


_The Practice of Programming_ by Kernighan and Pike is filled with
practical wisdom. Most of their advice is not specifically for
large-scale software design, but it's definitely applicable.

--
Neil Cerutti
Feb 16 '06 #2

P: n/a
JoeC wrote:
I have seen many books that teack coding for C++. What are ways to
improve my techniques for writing larger programs.
If this is a question (which usually should end with a question mark),
then you can find some answers in "Large-Scale C++ Software Design" by
John Lakos. Also, check out "Code Complete" by Steve McConnell.
I have written many
demo programs learning some aspects of code wether it be dynamic
binding or creating function and I understand most of that but how can
I learn and employ techniques to make my programs better. I try to
employ the lessons I learn in the programs that I write. Acclerated
C++ is the best book I have found to actually write better programs.


It is difficult (and in some cases impossible) to teach to write "better
programs". It often comes with experience (however frustrating that might
sound). The simple recipe I know has three ingredients: practice,
practice, and practice. Some like to spice it up with peer code reviews,
but that's up to you.

V
--
Please remove capital As from my address when replying by mail
Feb 16 '06 #3

P: n/a
In article <11**********************@z14g2000cwz.googlegroups .com>,
"JoeC" <en*****@yahoo.com> wrote:
I have seen many books that teack coding for C++. What are ways to
improve my techniques for writing larger programs. I have written many
demo programs learning some aspects of code wether it be dynamic
binding or creating function and I understand most of that but how can
I learn and employ techniques to make my programs better. I try to
employ the lessons I learn in the programs that I write. Acclerated
C++ is the best book I have found to actually write better programs.


I suggest you read the following books in order:

"Large-Scale C++ Software Design" by John Lakos.

"Object-Oriented Design Heuristics" by Arthur J. Riel

"Design Patterns: Elements of Reusable Object-Oriented Software" by
Erich Gamma, et al.

"Refactoring: Improving the Design of Existing Code" by Martin Fowler,
et al. (Examples in Java but still great stuff.)

--
Magic depends on tradition and belief. It does not welcome observation,
nor does it profit by experiment. On the other hand, science is based
on experience; it is open to correction by observation and experiment.
Feb 16 '06 #4

P: n/a
I posted some of what I am working on for some advice. The stuff
dosn't work as I would like but it is still a work in progress. I also
know that unerstanding syntax is paramount but many of the programming
books are massive tomes that don;t lend themselvs to sequential study
but are good refrences if you know what you want to look up. A good
example was that I missed the extern command and how it works and some
advice dramatically improved my program and some of the debugging is
was doing. I still have a ways to go.

I have written several programs in Perl and C++ and they are posted at
www.planetsourcecode.com. I always read the advice I get very carfully
because appreciate the time it takes to respond to what I post. I also
would like to help those who I can.

Feb 16 '06 #5

P: n/a
JoeC wrote:
www.planetsourcecode.com


They don't list Python or Ruby, and then they list "Java/JavaScript" as the
same category.

Chills.

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!
Feb 16 '06 #6

P: n/a
Daniel T. wrote:
[snip]
I suggest you read the following books in order:

"Large-Scale C++ Software Design" by John Lakos.

[other books snipped]

I liked this book. But I would very much like to see it updated
to include the more modern aspects of C++. (Unless it has
been so updated, in which case somebody please grab the
clue bat and en-clue me abruptly.) For example, it didn't
have much to do with templates and the STL and such
like considerations.
Socks

Feb 16 '06 #7

P: n/a
Puppet_Sock wrote:
"Large-Scale C++ Software Design" by John Lakos.
I liked this book. But I would very much like to see it updated
to include the more modern aspects of C++. (Unless it has
been so updated, in which case somebody please grab the
clue bat and en-clue me abruptly.) For example, it didn't
have much to do with templates and the STL and such
like considerations.


The core of that book - inside all the ultimately irrelevant guidelines - is
the methodology that produced the guidelines.

Read between the guidelines.

And read /C++ Coding Standards/ by Sutter & Alexandrescu a modern checklist.

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!
Feb 16 '06 #8

P: n/a
I was privileged enough to see John Lakos present at the C++ Developers
Conference in Vegas this last october, and was given a teaser chapter
from : "Large Scale C++ Software Development".

Notice the last work is Development, not Design. There is a focus on
Test Driven Development, and other larger scale issues when working
with C++ code in larger projects, than just the practical inheritance,
dependencies, and linkage issues he focused on in the first book.

-Art

Feb 17 '06 #9

P: n/a
JoeC wrote:
I have seen many books that teack coding for C++. What are ways to
improve my techniques for writing larger programs. I have written many
demo programs learning some aspects of code wether it be dynamic
binding or creating function and I understand most of that but how can
I learn and employ techniques to make my programs better. I try to
employ the lessons I learn in the programs that I write. Acclerated
C++ is the best book I have found to actually write better programs.


The following book is a good place to start:
C++ Coding Standards : 101 Rules, Guidelines, and Best Practices {Herb

Sutter, Andrei Alexandrescu}

I also recommend the following books:

Effective C++ by Scott Meyers
More Effective C++ by Scott Meyers
Exceptional C++ by Herb Sutter
More Exceptional C++ by Herb Sutter
Effective STL by Scott Meyers
Programming languages - C++ STANDARD ISO/IEC 14882:1998(E)
C++ Programming Language Special Edition, The by Bjarne Stroustrup
Efficient C++ by Dov Bulka & David Mayhew
Modern C++ Design by Andrei Alexandrescu

Feb 17 '06 #10

P: n/a
On 16 Feb 2006 11:18:06 -0800, "JoeC" <en*****@yahoo.com> wrote:
I have seen many books that teack coding for C++. What are ways to
improve my techniques for writing larger programs. I have written many
demo programs learning some aspects of code wether it be dynamic
binding or creating function and I understand most of that but how can
I learn and employ techniques to make my programs better. I try to
employ the lessons I learn in the programs that I write. Acclerated
C++ is the best book I have found to actually write better programs.


For more basic C++ things, definitely read everything you can find
written by Scott Meyers: especially "EFfective C++", "More Effective
C++" and "Effective STL". Also, all the other books mentioned in this
thread are important to read...especially the "Design Patterns" book
as well as just about anything written by Martin Fowler.

Finally, google for "Rational Unified Process" or "RUP". Lots of
software companies use this methodology in their projects. Doesn't
hurt to know what it's all about, even if you don't end up doing
something exactly that way. Of course, RUP isn't specifically about
writing programs in C++, but consists of guidelines of general
principles which can be applied to every programming language. There
are links on the IBM web site to papers (PDF and HTML) with extensive
documentation which can be viewed for free.

--
Bob Hairgrove
No**********@Home.com
Feb 17 '06 #11

P: n/a

Bob Hairgrove escreveu:
On 16 Feb 2006 11:18:06 -0800, "JoeC" <en*****@yahoo.com> wrote:
I have seen many books that teack coding for C++. What are ways to
improve my techniques for writing larger programs. I have written many
demo programs learning some aspects of code wether it be dynamic
binding or creating function and I understand most of that but how can
I learn and employ techniques to make my programs better. I try to
employ the lessons I learn in the programs that I write. Acclerated
C++ is the best book I have found to actually write better programs.
For more basic C++ things, definitely read everything you can find
written by Scott Meyers: especially "EFfective C++", "More Effective
C++" and "Effective STL". Also, all the other books mentioned in this
thread are important to read...especially the "Design Patterns" book
as well as just about anything written by Martin Fowler.


Also anything by Herb Sutter, Nicolai Josuttis and Andrei Alexandrescu.

Finally, google for "Rational Unified Process" or "RUP". Lots of
software companies use this methodology in their projects. Doesn't
hurt to know what it's all about, even if you don't end up doing
something exactly that way. Of course, RUP isn't specifically about
writing programs in C++, but consists of guidelines of general
principles which can be applied to every programming language. There
are links on the IBM web site to papers (PDF and HTML) with extensive
documentation which can be viewed for free.
In this line of indications I would also suggest:

- Agile Software Development: PPP by Robert Martin
- Applying UML and Patterns by Craig Larman

--
Bob Hairgrove
No**********@Home.com

HTH,

Marcelo Pinto.

Feb 17 '06 #12

P: n/a
I guess there is quite a bit out there. I realy havn't had any formal
programming training only what I learn out of books. I wonder how
useful class would be but I think would be more helpful would be
knowing other people who know somthing about programming and the
exchange of ideas. I is very challenging trying to learn all of this
on my own. I think I will take a break for a while untile I get some
ideas for programs. I am going to have to come up with a better way of
writing my current project or come up with an idea for a new project.

I always like to ask what are some tips and tricks to learning
programming? Reading through those large tomes or are there some
resources better than others?

Feb 18 '06 #13

P: n/a
In article <11**********************@z14g2000cwz.googlegroups .com>,
"JoeC" <en*****@yahoo.com> wrote:
I guess there is quite a bit out there. I realy havn't had any formal
programming training only what I learn out of books. I wonder how
useful class would be but I think would be more helpful would be
knowing other people who know somthing about programming and the
exchange of ideas. I is very challenging trying to learn all of this
on my own. I think I will take a break for a while untile I get some
ideas for programs. I am going to have to come up with a better way of
writing my current project or come up with an idea for a new project.

I always like to ask what are some tips and tricks to learning
programming? Reading through those large tomes or are there some
resources better than others?


I haven't had any formal training either. Actually, that isn't true, but
my formal training came *after* I learned how to program.

Write lots of programs, even trivial stuff. If you see someone else's
program and you think you could write something like it, do it. Also,
help all the college students in this group (and comp.lang.learn.c-c++)
with their homework. Do the homework yourself, and then give them hints
that you think will lead them to the answer.

--
Magic depends on tradition and belief. It does not welcome observation,
nor does it profit by experiment. On the other hand, science is based
on experience; it is open to correction by observation and experiment.
Feb 18 '06 #14

P: n/a

JoeC wrote:
I have seen many books that teack coding for C++. What are ways to
improve my techniques for writing larger programs. I have written many
demo programs learning some aspects of code wether it be dynamic
binding or creating function and I understand most of that but how can
I learn and employ techniques to make my programs better. I try to
employ the lessons I learn in the programs that I write. Acclerated
C++ is the best book I have found to actually write better programs.


One of the most important aspects of building large systems is physical
design. Physical design focuses on building software from a
fine-grained hierarchy of reusable components, packaged into a
hierarchy of libraries. There is no better book (perhaps no other book)
explaining physical design than Lakos' Large-Scale C++ Software Design.
Some of the more interesting chapters describe techniques for
re-factoring software to break dependencies between comonents caused by
common misimplementations such as improper encapsulation and
long-distance friendships.

Feb 18 '06 #15

P: n/a
I always appreciate the help and advice I get. I do read books and
keep trying to expand my programming knowlege. The best and most
practicle resource I have found is Acclerated C++ and I like their
other book as well. That book has some very intersting and powerful
ways of doing things but I have trouble translating that material into
any of my projects. Once I wrote a color mixing program that did
somthing like color(int, int, int) color(color, color). I often do
little demos but don't use that stuff much in any larger projects that
I do.

Feb 18 '06 #16

P: n/a
In article <po******************************@news.east.earthl ink.net>,
"Daniel T." <po********@earthlink.net> wrote:
In article <11**********************@z14g2000cwz.googlegroups .com>,
"JoeC" <en*****@yahoo.com> wrote:
I have seen many books that teack coding for C++. What are ways to
improve my techniques for writing larger programs. I have written many
demo programs learning some aspects of code wether it be dynamic
binding or creating function and I understand most of that but how can
I learn and employ techniques to make my programs better. I try to
employ the lessons I learn in the programs that I write. Acclerated
C++ is the best book I have found to actually write better programs.


I suggest you read the following books in order:

"Large-Scale C++ Software Design" by John Lakos.

"Object-Oriented Design Heuristics" by Arthur J. Riel

"Design Patterns: Elements of Reusable Object-Oriented Software" by
Erich Gamma, et al.

"Refactoring: Improving the Design of Existing Code" by Martin Fowler,
et al. (Examples in Java but still great stuff.)


Another great book I forgot to mention the first time around. "The
Pragmatic Programmer" by Andrew Hunt, and David Thomas.

--
Magic depends on tradition and belief. It does not welcome observation,
nor does it profit by experiment. On the other hand, science is based
on experience; it is open to correction by observation and experiment.
Feb 19 '06 #17

P: n/a

JoeC wrote:
I guess there is quite a bit out there. I realy havn't had any formal
programming training only what I learn out of books. I wonder how
useful class would be but I think would be more helpful would be
knowing other people who know somthing about programming and the
exchange of ideas. I is very challenging trying to learn all of this
on my own. I think I will take a break for a while untile I get some
ideas for programs. I am going to have to come up with a better way of
writing my current project or come up with an idea for a new project.

I always like to ask what are some tips and tricks to learning
programming? Reading through those large tomes or are there some
resources better than others?


[Please, cote the post you are replying to in order to give some
context (if you are using google, chose "show options" and then
"Reply", and the original post will appear in your reply like it did in
this post)]

I believe the greater value you may get from a course is direction. You
probably will not 'learn' the subject until you practice it, and in a
course you usually don't have the chance to really practice. I didn't
get formal training in programming, I just read and practiced thru it.
I believe you learn a lot reading others' code, and reading a newsgroup
like this one.

If you have a mentor avaiable to give you the best advices and
directions, then you are in the best place to learn and improve.

HTH,

Marcelo Pinto

Feb 20 '06 #18

P: n/a
I recommend reading...
C++ Coding Standards : 101 Rules, Guidelines, and Best Practices
by Herb Sutter and Andrei Alexandrescu

The following is my top 10 C++ programming books I recommend to all
professional programmers:
Effective C++ by Scott Meyers
More Effective C++ by Scott Meyers
Exceptional C++ by Herb Sutter
More Exceptional C++ by Herb Sutter
Effective STL by Scott Meyers
C++ Coding Standards : 101 Rules, Guidelines, and Best Practices
{Herb
Sutter, Andrei Alexandrescu}
Programming languages - C++ STANDARD ISO/IEC 14882:1998(E)
C++ Programming Language Special Edition, The by Bjarne Stroustrup
Efficient C++ by Dov Bulka & David Mayhew
Modern C++ Design by Andrei Alexandrescu
They're listed in the order of my personal preference. 8)
http://www.devplug.com
Feb 24 '06 #19

P: n/a
It took a bit but I got my program to do basically what I want. Still
I am always looking for better ways of doing thing and having my
programs run smoother.

Feb 25 '06 #20

This discussion thread is closed

Replies have been disabled for this discussion.