CSC 1029 Coding Standards Quiz
20 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is one of the main objectives of coding standards for secure coding?

  • To reduce the need for comments in code
  • To identify and describe secure coding implementation (correct)
  • To increase the complexity of code
  • To make programming languages obsolete
  • Which of the following is NOT listed as a strategy for writing Clean Code?

  • Writing code only for the computer's execution (correct)
  • Focusing on precise solutions
  • Ensuring readability and maintainability
  • Paying attention to design issues
  • What is the primary goal of the SEI CERT Coding Standards?

  • To create a uniform approach to software sales
  • To promote the use of proprietary programming languages
  • To eliminate the need for coding best practices
  • To support the development of coding standards for various programming languages (correct)
  • Which programming languages are included in the SEI CERT Coding Standards?

    <p>C, C++, Java, and Perl</p> Signup and view all the answers

    According to the content, what is emphasized about programming languages and coding?

    <p>Good coding requires attention to design and problem solving</p> Signup and view all the answers

    Which of the following coding standards is focused on ensuring secure coding practices?

    <p>SEI CERT Coding Standards</p> Signup and view all the answers

    What do the C++ Core Guidelines emphasize?

    <p>Safe and efficient use of the C++ language</p> Signup and view all the answers

    Which of the following practices is recommended for coding standards compliance?

    <p>Following established naming conventions</p> Signup and view all the answers

    Which resource provides guidance on writing Clean Code across different programming languages?

    <p>A video tutorial on Clean Code</p> Signup and view all the answers

    What is considered an essential trait of a good programmer?

    <p>Focus on problem solving and precise solutions</p> Signup and view all the answers

    What is the primary purpose of coding standards in C++?

    <p>To offer a set of rules tailored for specific uses and environments.</p> Signup and view all the answers

    Which guideline specifically addresses how comments should be written?

    <p>NL.1: Don't say in comments what can be clearly stated in code.</p> Signup and view all the answers

    What is a key recommendation regarding naming conventions in C++ according to the core guidelines?

    <p>Maintain a consistent naming style throughout the code.</p> Signup and view all the answers

    What is one of the major risks associated with coding errors according to Microsoft Code Security?

    <p>Incorrect assumptions when handling user input.</p> Signup and view all the answers

    When should local variables be declared according to C++ guidelines?

    <p>In the middle of a function as required.</p> Signup and view all the answers

    Which of the following is NOT a recommendation in the C++ Core Guidelines?

    <p>Use global variables whenever possible.</p> Signup and view all the answers

    What is the main focus of the MISRA guidelines?

    <p>To establish best practices for embedded control systems and software.</p> Signup and view all the answers

    Why should developers avoid placing two statements on the same line?

    <p>It hinders readability and can confuse maintainers.</p> Signup and view all the answers

    What is an acceptable practice according to the C++ guidelines for naming identifiers?

    <p>Names should reflect their scope adequately.</p> Signup and view all the answers

    What aspect of coding standards is emphasized to prevent security vulnerabilities?

    <p>Thorough understanding of the development platform.</p> Signup and view all the answers

    Study Notes

    CSC 1029 Coding Standards

    • Course covering coding standards for secure coding implementation
    • Objectives include identifying and describing secure coding, outlining coding standards and rules, and applying secure coding principles based on industry standards
    • Week 7 agenda includes: review, clean code, SEI CERT coding standards, quality and compliance coding standards, C++ core guidelines, coding conventions, MISRA, Google C++ style guide, Microsoft secure coding, todo list and resources for help

    Good Programming Practices

    • Programs are meant to be read by humans and only incidentally by computers to execute.
    • Key attributes of good programmers include persistence, attention to design, problem-solving and precise solutions/
    • Qualities like patience, precision and design thinking are emphasized

    Review

    • Complete the 1.8 Matching exercise

    Clean Code Strategies

    • Strategies for writing clean code with links to relevant YouTube videos to aid in learning coding

    SEI CERT Coding Standards

    • The Software Engineering Institute's (SEI) CERT Coding Standards provide coding practices for commonly used programming languages like C, C++, Java, and Perl, including the Android platform.
    • These standards are developed through community and software security efforts
    • Guidelines for secure coding in C/C++, Java, Perl and Android are covered

    Coding Standards for Quality and Compliance

    • This section links to an article providing coding rules guidelines, importance of coding standards, key C++ coding standards, and static code analysis to enforce these standards

    C++ Core Guidelines

    • Coding standards are needed for specific purposes and environments in C++
    • Specific questions regarding naming conventions like namespace std, local variable declarations, and global variable usage are discussed
    • Guidelines for commenting and naming conventions are covered

    C++ Core Guidelines: Comments & Naming

    • Guidelines for comments and naming variables include specific examples and rules around avoiding obvious comments that repeat code statements and naming conventions for consistency and clarity

    MISRA

    • MISRA provides best practice guidelines for safe and secure embedded control systems and standalone software, with particular relevance in critical applications.
    • MISRA C++ was initially published in 2008

    Google C++ Style Guide

    • The style guide is available as a file that needs to be read through for guidelines

    Microsoft Code Security

    • Security vulnerabilities often result from incorrect assumptions about user input or a lack of understanding of the development platform.

    Earn Your Pre-work Grade

    • Post weekly discussion questions and research solutions in D2L.
    • Complete Week 07 Content Module in D2L to 100%

    Questions, Clarifications, and Help

    • Students can get help via appointment, drop-in times, email, and online tutoring resources.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    Description

    This quiz covers secure coding implementation, industry standards, and best practices for clean code as discussed in CSC 1029. You will explore coding conventions, quality standards, and principles that promote secure and readable code. Prepare to identify, describe, and apply the key concepts from the course material.

    More Like This

    Use Quizgecko on...
    Browser
    Browser