The learning objective is to give you some exposure to a widely used
industry coding style guideline and reflect upon its contents.
- Compute a random number based on your name modulo 10 using Wolfram Alpha.
4.1 Consider the Embedded C Coding Standard from Barr Group (https://barrgroup.com/Embedded-Systems/Books/Embedded-C-Coding-Standard).
We recommend you at least skim through the whole thing, but the questions below
apply to a specific section. (Strictly speaking some of these rules are more
about language use, but the point is that this is a language use guide directed
toward programmers rather than toward language specifications.)
- 4.1a (1 point) In your assigned section per your scenario number, which
rule do you most agree with (e.g., which rule do you think will help prevent
the most bugs). Include both the rule number and a summary or quotation of the
rule in your answer. (In this case it is OK to use a quotation if you like.
This is a subjective answer and almost any answer will be OK, but see the next
question... )
- 4.1b (4 points) WHY do you think the rule you gave is the most effective
rule? (Again this is a subjective answer, but give a substantive answer that is
reasonable.)
- 4.1c (1 point) In your assigned section, which rule do you most disagree
with (e.g., which rule do you think won't improve software quality, or might
even degrade quality?) (Again, this is a subjective answer.) If you can't find
a single rule you disagree with in your assigned section, say so and offer a
rule that you really hate from another section.
- 4.1d (4 points) WHY do you think the rule you gave in the preceding
question is the least effective rule or even a harmful rule? (Again this is a
subjective answer, but give a substantive answer that is reasonable.)
Assigned sections are per scenario numbers below:
- 1. Sections 1.2-1.5 (General Rules)
- 2. Sections 1.6-1.8 (General Rules)
- 3. Sections 2.1-2.2 (Comments)
- 4. Sections 3.1-3.3 (Whitespace Rules)
- 5. Sections 3.4-3.6 (Whitespace Rules)
- 6. Sections 4.1-4.4 (Module Rules)
- 7. Sections 5.1-5.5 (Data Type Rules)
- 8. Sections 6.1-6.3 (Procedure Rules)
- 9. Sections 7.1-7.2 (Variable Rules)
- 0. Sections 8.1-8.5 (Statement Rules)
Rubric
- One slide in standard format with your name, etc.
- One bullet listing your scenario number and section (copied from above
list)
- Four bullets answering questions 4.1a through 4.1d
Supplemental Material: