Ekow's Reading Notes

Bookmark this to keep an eye on my project updates!

View on GitHub

Class 06: Ten Thousand Game 1

Based on the readings for this class, the important concept here is to understand how to incorporate all programming concepts learned from prior classes into a full python program. These concepts include:

A new concept introduced is Risk Assessment.

[1] How can the random module be utilized in Python to generate random numbers or make selections from a list, and what are some common functions available within the module?

Python’s random module generates pseudorandom numbers, meaning they are not truly random but are determined by a mathematical algorithm. Use of the module is generally suitable for most practical applications.

Module Usage

To use Python’s random module, you would:

import random

[2] In the context of software development, what is risk analysis, and what are the key steps involved in conducting a risk analysis for a software project?

According to the article What is Risk Analysis, risk analysis is the process of identifying and prioritizing risks in software applications. It involves assessing the likelihood and impact of potential problems so that they can be mitigated. Risks can arise from a variety of factors, such as new technology, tight deadlines, or incomplete requirements. By identifying and addressing risks early in the development process, software testers can help to ensure that the software is delivered on time and within budget.

There are three key steps involved in conducting a risk analysis for a software project:

  1. Searching for the risk.
  2. Analyzing the impact of each individual risk.
  3. Taking measures for the risk identified.

[3] What is test coverage and why is it an important (or potentially misleading) metric in software testing?

Test coverage is a metric that measures the percentage of code that is covered by tests. It is often used as a way to gauge the quality of a test suite, but it can be a misleading metric.

There are a number of reasons why test coverage can be misleading. First, it is possible to achieve high coverage numbers with low-quality tests that do not actually test the important parts of the code. Second, focusing on coverage can lead developers to write tests that are simply designed to increase the coverage numbers, rather than tests that are designed to find bugs. Third, high coverage numbers can give a false sense of security, leading developers to believe that their code is well-tested when it may not be.

Despite these limitations, test coverage can still be a useful tool if it is used correctly. It can help to identify areas of code that are not being tested, and it can be used to track progress over time. However, it is important to remember that test coverage is just one metric, and it should not be used as the sole measure of the quality of a test suite.

Big O notation is a mathematical notation used to describe the approximate growth of the time or space complexity of an algorithm as its input size (n) increases. It focuses on the worst-case scenario, helping us understand how an algorithm might scale as it handles larger inputs. Big ‘O’ doesn’t provide exact timings, but rather a way to compare the efficiency of different algorithms.

Common Big O Notations

Everyday Example of O(n) Time Complexity

Task: Waiting in a single-line queue to buy tickets.

Input size (n): Number of people in the queue ahead of you.

Time complexity: O(n) because the time you spend waiting increases linearly with the number of people ahead of you.

Explanation:

If there’s one person ahead of you, you’ll wait for their transaction. If there are five people, you’ll wait for five transactions. The time you spend grows directly proportional to the number of people in the queue.

Sources

Things I want to know more about

Nothing at this moment.