Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSC309 Lecture 01

CSC309 Lecture 01

Software Engineering II
Course Presentation
(202301)

Javier Gonzalez-Sanchez

January 09, 2023
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. jgs
    CSC 309
    Software Engineering II
    Lecture 01:
    Course Presentation
    Dr. Javier Gonzalez-Sanchez
    [email protected]
    www.javiergs.com
    Building 14 -227
    Office Hours: By appointment

    View full-size slide

  2. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 4
    Dr. Javier Gonzalez-Sanchez
    [email protected]
    www.javiergs.com
    javiergs
    @mscjaviergs
    @mscjaviergs
    Contact Information

    View full-size slide

  3. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 5
    www.javiergs.com/teaching/
    At CSU:
    * Software Engineering
    (CSC 307, 308, 309, 509)
    * Applied Affective Computing
    (CSC 570)
    Teaching

    View full-size slide

  4. jgs
    Guidelines

    View full-size slide

  5. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 7
    Office Hours
    Tuesday and Thursday 3 - 5 pm
    But an appointment required
    Sent me an email – [email protected]

    View full-size slide

  6. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 8
    Guidelines
    Time per Week

    View full-size slide

  7. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 9
    Guidelines
    Late Assignments

    View full-size slide

  8. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 10
    Guidelines
    Read the Syllabus

    View full-size slide

  9. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 11
    Canvas

    View full-size slide

  10. jgs
    Course Content

    View full-size slide

  11. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 13
    Course Content
    This is NOT a web development
    course. That one is CSC 437

    View full-size slide

  12. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 14
    Key Ideas CSC 308

    View full-size slide

  13. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 15
    1. Programming in the Large vs Programming in the Small
    2. Code is meant for human consumption and it’s meant for computer
    consumption.
    3. Assigning Responsibility - together but not scrambled
    Key Ideas CSC 308

    View full-size slide

  14. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 16
    1. Implementation, integration, and maintenance of large software
    systems – reuse, modifiability, and extensibility.
    2. Software quality - verification, validation, testing
    3. Technical presentation
    Key Ideas CSC 309

    View full-size slide

  15. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 17
    Key Idea 1: Technical Debt

    View full-size slide

  16. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 18
    Key Idea 2: SVVT
    idea
    requirements
    architecture
    design
    code
    unit testing
    integration
    testing
    system testing
    operation
    validation
    validation
    verification
    verification
    quality measure

    View full-size slide

  17. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 19
    Key Idea 3: Debugging

    View full-size slide

  18. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 20
    Grading
    Team Project 30%
    20%
    Assignments
    20%
    Labs + Quizzes
    20%
    Final Exam
    5%
    Attendance &
    Participation
    5%
    Self / Peer Evaluation
    100%

    View full-size slide

  19. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 21
    Grading
    100%
    A
    >= 96.5
    A-
    >= 93.0
    B+
    >= 89.5
    B
    >= 86.0
    B-
    >= 82.5
    C+
    >= 79
    C
    >= 75.5
    C-
    >= 72.0
    D+
    >= 68.5
    D
    >= 65.0
    D-
    >= 61.5
    F
    < 61.5

    View full-size slide

  20. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 22
    References

    View full-size slide

  21. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 23
    Questions

    View full-size slide

  22. jgs
    CSC 309
    Software Engineering II
    Lecture 02:
    Software Metrics: Code Quality
    Dr. Javier Gonzalez-Sanchez
    [email protected]
    www.javiergs.com
    Building 14 -227
    Office Hours: By appointment

    View full-size slide

  23. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 26
    Key Ideas CSC 309
    idea
    requirements
    architecture
    design
    code
    quality measure

    View full-size slide

  24. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 27
    code
    Key Ideas CSC 309
    idea
    requirements
    architecture
    design
    quality measure

    View full-size slide

  25. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 28
    Metrics
    Size
    LOC
    eLOC
    lLOC
    Understandability
    Comments
    Whitespaces
    Complexity
    Average, Max, Min LOC
    Interface Complexity
    Cyclomatic Complexity
    Software Metrics

    View full-size slide

  26. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 29
    § Knowing what is inside your source code is the first step in assessing the
    quality of the software product.
    § Knowing the quantity of work performed in generating the source code is
    the first step in determining the productivity of your software team.
    Software Metrics

    View full-size slide

  27. jgs
    Software Metrics
    Size

    View full-size slide

  28. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 31
    § LOC – Lines of Code Metric. Including lines of a single brace or
    parenthesis
    § LOC are used to create time and cost estimates.
    § LOC are a tracking tool to measure the degree of progress on a module or
    project.
    § An experienced developer can gage a LOC estimate based upon
    knowledge of past productivity on projects.
    Size Metrics

    View full-size slide

  29. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 32
    § eLOC – effective Lines of Code Metric. Only code statements
    § An effective line of code or eLOC is the measurement of all lines that are not
    comments, blanks or standalone braces or parenthesis. These can
    inflate LOC metrics by 20 to 40 percent.
    § This metric more closely represents the quantity of work performed.
    Size Metrics

    View full-size slide

  30. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 33
    § lLOC – logical Lines of Code Metric.
    § These statements are terminated with a semi-colon.
    § The control line for the "for" loop contain two semi-colons but accounts for
    only one semi colon.
    Size Metrics

    View full-size slide

  31. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 34
    Example

    View full-size slide

  32. jgs
    Software Metrics
    Understandability

    View full-size slide

  33. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 36
    § Comment Line and Comment Percent Metric
    § The degree of commenting within the source code measures the care taken
    by the programmer to make the source code and algorithms
    understandable.
    § Poorly commented code makes the maintenance phase of the software life
    cycle an extremely expensive adventure.
    § Comments can occur by themselves on a physical line or be co-mingled
    with source code. The sum of the lines of code, comments and blank lines
    often exceeds the physical line count. This is expected a when comments
    are co-mingled with source code.
    § Comment Percent = Comment Line Count / (LOC) x 100
    Understandability Metrics

    View full-size slide

  34. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 37
    § Blank Line and White Space Percent Metric
    § The number of blank lines within source code determines the readability of
    the product. White space accents the logical grouping of constructs and
    variables. Programs which use few blank lines are difficult to read and
    more expensive to maintain.
    § It counts the spaces and characters within the source code. The white
    space percentage metric is another measure of readability for the source
    product.
    § White Space Percentage =
    (Number of spaces / Number of spaces and characters) * 100
    Understandability Metrics

    View full-size slide

  35. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 38
    § Average LOC per Function Metric. An accepted industry standard of 200
    LOC per function is desired as the average LOC per function
    § Maximum LOC per Function Metric.
    § Minimum LOC per Function Metric. A minimum LOC per function of 2 or
    less can indicate functions that may have been prototype but not yet
    complete..
    Function Metrics

    View full-size slide

  36. jgs
    Software Metrics
    Complexity

    View full-size slide

  37. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 40
    § Cyclomatic Complexity. It is a quantitative measure of the number of
    linearly independent paths.
    § Paths occur when "while,” "for,” "if,” "case," and "goto" keywords appear
    within the function.
    § If the source code contained no control flow statements (conditionals or
    decision points), the complexity would be 1
    § If the code had one single-condition IF statement, there would be two paths
    through the code: one where the IF statement evaluates to TRUE and
    another one where it considers to be FALSE.
    § Two nested single-condition IFs, or one block with two conditions, would
    produce a complexity of 3.
    Function Metrics

    View full-size slide

  38. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 41
    Cyclomatic Complexity
    CC = Edge - Node + 2
    Or
    CC = ConditionalNodes + 1

    View full-size slide

  39. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 42
    i = 0; n=4;
    while (ij = i + 1;
    while (jif (A[i]swap(A[i], A[j]);
    }
    i=i+1;
    }
    // CC = 9 - 7 + 2 = 4
    // CC = 3 + 1 = 4 (Condition nodes are 1,2 and 3 nodes)
    // A set of possible execution path of a program
    // 1, 7
    // 1, 2, 6, 1, 7
    // 1, 2, 3, 4, 5, 2, 6, 1, 7
    // 1, 2, 3, 5, 2, 6, 1, 7
    Cyclomatic Complexity

    View full-size slide

  40. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 43
    Complexity Number Meaning
    1-10 Structured and well written code
    High Testability
    Cost and Effort is less
    10-20 Complex Code
    Medium Testability
    Cost and effort is Medium
    20-40 Very complex Code
    Low Testability
    Cost and Effort are high
    >40 Not at all testable
    Very high Cost and Effort
    Cyclomatic Complexity

    View full-size slide

  41. jgs
    CSC 309 Software Engineering II
    Javier Gonzalez-Sanchez, Ph.D.
    [email protected]
    Winter 2023
    Copyright. These slides can only be used as study material for the class CSC308 at Cal Poly.
    They cannot be distributed or used for another purpose.

    View full-size slide