Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention Code Complete as a resource. #10898

Merged
merged 3 commits into from
Sep 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions doc/doxygen/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -907,3 +907,12 @@ @article{melenk2001hp
year = {2001},
doi = {10.1023/A:1014268310921}
}



@Book{CodeComplete,
author = {Steve McConnell},
title = {Code Complete},
publisher = {Microsoft Press},
year = 2004,
edition = {second}}
9 changes: 9 additions & 0 deletions examples/step-1/doc/intro.dox
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,15 @@ are worthwhile browsing through before you start any large-scale programming:
do I debug scientific computing codes?" or "Can I train myself to write code
that has fewer bugs?".

- You will benefit from becoming a better programmer. An excellent
resource to this end is the book
[Code Complete](https://en.wikipedia.org/wiki/Code_Complete)
by Steve McConnell @cite CodeComplete . It's already
a few years old, with the last edition published in 2004, but it has
lost none of its appeal as a guide to good programming practices,
and some of the principal developers use it as a group reading
project with every generation of their research group members.

- The <a href="http://software-carpentry.org/">Software Carpentry project</a>
that provides introductions to many topics that are important to dealing
with software, such as version control, make files, testing, etc. It is
Expand Down
22 changes: 13 additions & 9 deletions examples/step-26/step-26.cc
Original file line number Diff line number Diff line change
Expand Up @@ -434,11 +434,11 @@ namespace Step26
// <code>goto</code> is hard to understand. In fact, deal.II contains
// virtually no occurrences: excluding code that was essentially
// transcribed from books and not counting duplicated code pieces,
// there are 3 locations in about 600,000 lines of code; we also
// use it in 4 tutorial programs, in exactly the same context
// as here. Instead of trying to justify the occurrence here,
// let's first look at the code and we'll come back to the issue
// at the end of function.
// there are 3 locations in about 600,000 lines of code at the time
// this note is written; we also use it in 4 tutorial programs, in
// exactly the same context as here. Instead of trying to justify
// the occurrence here, let's first look at the code and we'll come
// back to the issue at the end of function.
template <int dim>
void HeatEquation<dim>::run()
{
Expand Down Expand Up @@ -644,10 +644,14 @@ namespace Step26
// to read or understand than a <code>goto</code>.
//
// In the end, one might simply agree that <i>in general</i>
// <code>goto</code> statements are a bad idea but be pragmatic
// and state that there may be occasions where they can help avoid
// code duplication and awkward control flow. This may be one of these
// places.
// <code>goto</code> statements are a bad idea but be pragmatic and
// state that there may be occasions where they can help avoid code
// duplication and awkward control flow. This may be one of these
// places, and it matches the position Steve McConnell takes in his
// excellent book "Code Complete" @cite CodeComplete about good
// programming practices (see the mention of this book in the
// introduction of step-1) that spends a surprising ten pages on the
// question of <code>goto</code> in general.


// @sect3{The <code>main</code> function}
Expand Down