Conventions and The Friendly Manual(s)

The conventions you can expect and the reference materials you can count on.

Table of Contents

  1. RTFM
  2. Secondary Sources
  3. Help Improve These Notes
  4. Documentation Conventions
  5. Code Conventions
  6. Run Code Samples in Your Browser

RTFM

“Learning to program is an iterative, systematic process of eliminating magic.”source

And how does one eliminate magic? By learning to Read The Friendly Manual.

These notes are to be considered the manual for this course. Reference these notes first before turning to Google or Stack Overflow.

Secondary Sources

These secondary sources should also be considered manuals you should consult before Goolging:

Help Improve These Notes

You can help improve these notes in three ways:

  1. If there are topics you feel are missing from these notes please inform your instructor.
  2. Anytime you come here looking for an answer that you then cannot find, email kgeske@rrc.ca.
  3. You can submit a pull request to fix typos, debug code samples, and update explanations using the “Edit this page on Github” link at the bottom of every page.

Documentation Conventions

Through the notes you will see the following three types of labels.

🎵 Note:

Notes add important information you don’t want to miss.

⚡ Warning:

Warnings are provided to prepare you for common bugs and “gotchas”.

💡 Best Practice:

Best practices used in industry will also be highlighted.

⏳ Wait For It:

Sometimes you just need to wait until later in the notes to learn more. :)

Code Conventions

Source code in the notes will be syntax highlighted like so:

#include <iostream>

int main() {
  int ghostQuota = 37;
  int ghostsCaught = 12;

  if (ghostsCaught > ghostQuota) {
    std::cout << "You are done for the day.\n";
  } else {
    auto ghostsRequired = ghostQuota - ghostsCaught;
    std::cout << "You need to find " << ghostsRequired << " more ghosts. 👻\n";
  }
}

Run Code Samples in Your Browser

Code blocks that include an int main() entry point include a link to run the code in your browser using Compiler Explorer.

Try clicking the “🚀 Run on Compiler Explorer” link at the bottom of the above code block.

If you don’t see a link, let Kyle know by submitting an issue.