5 Minutes to a 5 Questions!

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Describe three different ways to find and correct errors. (CRD-2.I.5)

(1) Test cases with expected results are very effective at identifying errors. Tracing through your code step-by-step by hand is great for finding problems and thoroughly understanding what the code is actually versus what was intended to occur. (2) Many IDE (Integrated Development Environments) include visualizations and debuggers where you can step through the code line-by-line. These automated versions are similar to the hand-tracing method. (3) Using temporary DISPLAY or print statements to show intermediate values or to ensure a section of code is being executed are very helpful for finding errors.

When identifying requirements for a software application, what users should be interviewed for the project and why? (CRD-1.A.5 and CRD-1.A.6)

A variety of people who will be future users of the software should be interviewed and observed to fully understand how they would use it. People with different job responsibilities must be included, because each will have differing requirements the software needs to meet. Even people with the same job may be using existing software differently. People are inventive with figuring out workarounds, and these need to be identified and analyzed to understand why they happened too!

Why should code written by others or obtained from a library be acknowledged? (CRD-2.H.1 and CRD-2.H.2)

All code not written by the programmer should be cited in the program documentation. This is to give credit where it is due as well as to identify where code came from in the event future errors occur.

How does metadata affect the primary data? For example, if metadata about a video showing a working prototype of a new innovation includes the file size, date, and device type of the camera, what happens to the primary data if the file type of the video is converted to a new file? (DAT-2.B.2)

Fortunately, changes made to metadata do not impact or change the primary data at all. If the file type is changed, the video still shows the prototype as it did previously.

Communicating results from analyzed data is important. What common tools can help communicate this effectively? (DAT-2.D.2)

Humans are very visual, so providing a way to communicate using tables, diagrams, or interactive displays helps get the message across.

Describe three different form of input to programs? (CRD-2.B.4)

Input can come from the user typing something in using the keyboard. The is text-based input. Input can also be an image, audio, or video file. Editing software can use each of these in various ways, as can software that runs social media sites. Input can also be tactile, such as through a touchscreen or a virtual keyboard or from a game controller or sensor transmitting data as input.

Explain the significance of having two key types of data compression algorithms and when each should be used? (DAT-1.D.4 and DAT-1.D.7)

Lossless and lossy compression algorithms each have uses they were designed to meet. If you need the full file restored after compression, then a lossless compression algorithm must be used. If you don't need the full file restored and speed is an important consideration, then a lossy algorithm will result in a greater degree of compression and therefore transmit faster.

What are the limitations of lossless and lossy compression algorithms? (DAT-1.D.5, DAT-1.D.6 and DAT-1.D.8)

Lossless data compression algorithms cannot achieve the same level of compression that lossy algorithms can. Lossless must be used if want the full file restored, though. Lossy data compression algorithms can get greater levels of compression, but the original file can never be restored, because bits are discarded during the compression process. These limitations generally make it easy to pick which technique is needed for compression.

What is the definition of metadata? (DAT-2.B.1)

Metadata is data about data. Sounds like a circular argument, doesn't it? Metadata helps us find a file or tag data with possible search criteria so we get useful results. The tags we provide to images, videos, and websites are part of the metadata. Examples include the author of anything someone created, the file type, the file size, the date created, the date last modified, and even the device used to create it.

What is the benefit of using metadata? (DAT-2.B.3, DAT-2.B.4, and DAT-2.B.5)

Metadata provide a way to organize and structure the data, which helps in finding it later. In addition to finding data, metadata can also provide additional information about data. For example, if an image is the data, having the metadata of the date the image was created or the longitude and latitude of the location can be helpful.

What is output? Describe at a high level how output is produced. (CRD-2.D.1 and CRD-2.D.2)

Output is data in any form, including, but not limited to, text displayed, a sound or sounds, an image, or an event, such as setting a temperature alarm. Output is based on the input to a program. For example, temperature readings could be compared to a threshold temperature. An alarm could sound as one form of output, and a message could be sent to a variety of devices about the temperature being too high or too low as another type of output.

Are program comments the only type of documentation needed? (CRD-2.G.5)

Program comments are NOT the only type of documentation needed. Program comments are for the programmers about what the code is designed to do and how the code accomplishes it. Other documentation needed is a user guide for anyone learning to use the system. A "help" document is also needed for the users to explain errors the program was designed to identify and how to avoid them. This documentation can be online or in print form, but it is needed to ensure the programs are easy to learn and use from the user side as well as the programmer side.

Why should program documentation about the code and how it was developed be written? (CRD-2.G.1 and CRD-2.G.4)

Program documentation is needed and should be kept up-to-date as programs are modified or updated. It helps anyone, including the original programmer, to understand the purpose and flow of a program. If a couple of weeks or months go by, it can be difficult to remember exactly how and why you wrote code a certain way. Anyone picking up the code to modify it will appreciate the documentation versus having to take additional time to figure out how the code works or was intended to work.

Does it matter when documentation is written as long as it is written? (CRD-2.G.3)

Program documentation should be written as the program is being developed because people forget details or reasons why something was done in a certain way. The documentation will be better prepared and more thorough if it is written as the code is written. When projects are behind, writing documentation is often one of the areas that is cut. If the documentation wasn't already created as the program was written, it definitely gets minimum attention and then is minimally useful.

Why are descriptive variable names an important feature of programs? (AAP-1.A.2)

Programmers decide on names for variables. Giving a variable a name that describes the data it holds help make the program easier to understand.

What is the testing strategy identified in the design phase? (CRD-2.F.7)

Since the requirements for the program or programs have been identified, the testing strategy should be documented to ensure each requirement is included and the code is working correctly. Programmers are an optimistic group and often assume code is working correctly when the output appears reasonable. That's why the test plan is needed with expected results to ensure the actual results match.

Describe how strings are similar to lists. (AAP-1.C.4)

Strings are a sequence of characters, and lists hold a sequence of values. You can reference each letter of a string or an element of a list using the index. stringName[index] listName[index]

What must happen before a program with syntax errors can run? (CRD-2.I.2)

Syntax errors must be corrected before a program will run. Syntax errors break the "grammar" rules for the programming language and include things such as missing punctuation, mismatched parentheses, or a typo in a variable name.

What is the purpose of the design phase? Describe three steps a design phase may include. (CRD-2.F.6 and CRD-2.F.7)

The design phase determines how the requirements will be met. Common steps include: Brainstorming Storyboarding Creating mock-ups of the user interface, and Outlining the program modules and their functionality

Name the four different data types used in most programming languages, and describe the type of data each one holds. (AAP-1.A.3)

The four different data types used in most programming languages are: Numbers, which can be integers (whole numbers) or real numbers (with decimals). Strings, which are text fields. Even if a number appears in a string, it is considered text, and mathematical operations cannot be performed on it. Booleans, which are values that are either true or false. Most used Boolean operators are AND, OR, NOT or AND NOT, and NOR. Lists, which are collections of data stored within one variable name.

Draw a picture of analog data and a picture of digital data. Describe how the digital representation of analog data is an abstraction. (DAT-1.A.8 and DAT-1.A.9)

The graphs help us to see that the analog and digital data representations are not exactly the same. The digital data are discrete points and approximate the analog data. All the values from the analog data are not represented and have been simplified in the digital version, which is the definition of abstraction.

What is the purpose of the investigative phase of the development process? (CRD-2.F.1 and CRD-2.F.2)

The investigative phase is where the requirements are identified. It is important that the project team understand the requirements and not just write them down. Additionally, constraints, risks, and concerns should be identified during this step.

What is the largest decimal number that can be written with a byte, and why is it the largest? (DAT-1.A.4)

The largest decimal (base 10) number that can be converted to binary and written using a byte (8 bits) is 255. Starting in the ones column on the far right, each power of two increases by one, which doubles the value from the column to its immediate right. If you add all the values together, you will get 255, the largest number that can be represented in 8 bits. 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. Another way look at it is 28 is 256. The is the ninth bit, so the largest number that 8 bits can hold is one less than the next column, or 255 in this case.

There are many ways data can be grouped and filtered using iterative processing. What is the point of this data maneuvering? (DAT-2.E.5)

The point is to identify patterns that can lead to insights into the data. Programs can sift through data and process the data multiple times with different criteria to group and filter the data, searching for new patterns. Further analysis can determine if the identified pattern is new and valid information. This provides organizations with opportunities to do things better or in new ways to make their business more valuable.

What should be identified and included in the program specification? (CRD-2.F.4 and CRD-2.F.5)

The program specification should include: The requirements Describe how the program or application will work at a high level, and Include any required user interactions the software needs to accommodate

If a program only works for certain input, should other values even be tested? Why or why not? (CRD-2.J.2)

Yes, programs should always account for invalid input data and either provide a prompt to reenter with valid data or end the program gracefully with a clear error message rather than crashing. Programs should also carefully test for "boundary" conditions. This means if a condition is true when a value is less than 100, be sure to test the values 99, 100, and 101 to ensure the code does not run one too few or one too many times. This is a common error for both new and experienced programmers.

Give an example of a logic error. When do logic errors occur, and why can they be difficult to recognize? What is the best way to identify logic errors? (CRD-2.I.1)

An example of a logic error is using the wrong variable in a calculation or as output. Another example is using the wrong mathematical operation in an equation, such as addition rather than multiplication. Logic errors occur when a program is running. A syntax checker will not identify these because they are valid commands. Additionally, the section of code with the error may not run each time. It may only run when a certain situation occurs. This makes them difficult to identify. That is why the test plan is so important. It shows us the expected output values for certain input. If we compare these with the actual output and they are different, we know to start looking for the logic error!

Describe how all values are represented at the computer's lowest level. (DAT-1.A.2 and DAT-1.A.3)

At the lowest level, all values are represented by a series of 0s and 1s, or binary digits. These binary digits, called bits for short, represent electrical current or no electrical current running through a hardware circuit. They represent numbers, characters, sounds, and colors, among other types.

Describe how bias is introduced into a dataset. Can additional data balance out the bias? (DAT-2.C.5)

Bias can be included in a dataset or software without people being aware that it is happening. Sometimes it occurs because people select from data that is available to them. That data can already include bias in what or who the data is about. For example, data about employee tenure at a company may include gender. If a great deal of historical data is included, fewer women could be included, especially if the data includes employees in management positions. In this case, pulling in additional years of data from the same company would include the same bias issues. If the study is less about this company and more about working women instead, additional data from other sources could be available and useful or simply provide more bias. Project teams have to be very comfortable about this, and having a diverse team can help identify or prevent bias in the data used or software written.

State at least three types of values bits can represent. Describe how the computer determines when a binary value represents different types. (DAT-1.A.6 and DAT-1.A.7)

Bits can represent a variety of data, including numbers, colors, sounds, characters, and machine instructions. The software in use knows how to interpret the bits for its program instructions. For example, image-editing software interprets the bits as colors for the pixels in the image. The software for a podcast knows the bits represent sounds. Software performing a math equation interprets the bits as numbers.

Compare and contrast the iterative development process and the incremental development process. (CRD-2.E.3 and CRD-2.E.4)

Both the iterative and incremental development processes include testing and feedback throughout the processes. The iterative process tests and obtains feedback and then revises the code through additional iterations of coding, testing, and feedback until the code works and the users accept it. The incremental process keeps breaking the problem into smaller chunks until a section is small enough and definable requirements to code. Each section is tested, and feedback is provided until it is working and approved. The pieces are then combined into the whole program or application, and their interfaces with other modules are tested. Programming each module in the incremental process will also use the iterative process to test and revise until completed.

When should a program comment be used? (CRD-2.G.2)

Comments should be used at the top of a program to include the programmer's name, the date the program was written or modified, and a description of the purpose of the program. Comments should also be included to document procedures and any section of code that is complicated, tricky, or key to the functioning of the program.

Data is just a series of numbers or characters. Describe how computers make it meaningful. What do we call meaningful data? (DAT-2.A.1 and DAT-2.A.2)

Computers can help identify patterns in data that people could not identify. People get tired and bored and miss things. Computers are perfect for work like this. Once patterns are identified, people can analyze them to identify information. This is when data can be used for making decisions and ultimately becoming knowledge.

Summarize the key factors used when making something abstract. How are abstractions useful? (DAT-1.A.5)

Creating an abstraction involves removing or hiding features that are not important to this abstraction so the focus can be on one or the few relevant details. This reduces the complexity of the abstraction, making it easier to understand and work with. For example, if you saw this image, you would know it is not a real house but an abstraction of one. The details are removed, and it is the general representation.

What impact do events have on program flow? (CRD-2.C.5)

Events cause certain segments or modules of code to run when they occur. After the device is turned on and initialized, it waits with nothing happening except checking for events to occur. There is not a sequential flow to the program.

Explain ways feedback can be provided to a programming team? (CRD-1.B.1)

Feedback to the programming team needs to be constant during the design and coding/testing phases. The use of online tools makes providing feedback easier. People who are not in the same physical location can provide feedback using a shared document, an audio file, or, most effectively through a video recording showing their screen at the same time that they are discussing features to help others understand their point.

Describe how the assignment statement works, and provide an example. (AAP-1.B.2)

For this course, the ← symbol is used to indicate assignment. The right-hand side of the ← is solved if it is an equation or condition. The result is then stored in or "assigned to" the variable on the left of the ←. In math, you can write an equation in either format, but in programming, the variable receiving a new value is always on the left. areaCircle ← 3.14 * (radius * radius)

Explain how you can determine when an overflow error has occurred. (DAT-1.B.1)

Programmers should start looking for possible overflow errors when dealing with very large numbers that take many bits to represent. This includes negative numbers because the the same number of bits are required to represent the negative version of a number as the positive number. There is a "sign bit" before the number that indicates if a number is positive or negative. An overflow error occurs when more digits are needed than are available to represent the number. The value overflows into the sign bit and flips it from positive to negative or vice versa. Therefore, if you are expecting a very large positive number but you end up with a very small negative number, check for an overflow error. Similarly, if you expect a small negative number but end up with a large positive number, check for an overflow error.

Describe how raw data is processed to start finding possibilities for new insights. (DAT-2.E.2, DAT-2.E.3, and DAT-2.E.4)

Programs are used to clean digital data, meaning identifying incomplete data and removing it along with duplicates and making the data uniform. After the data has been cleaned up, other programs can start classifying data into clusters or groups where it belongs for various analyses. Different groups within an organization may want to use the same data but in different ways. Each will provide the filtering and grouping criteria, and programs will be written to process the data in ways that will hopefully lead to new insights that can be used by the organization.

What are examples of issues with raw data? What, if anything, should be done about these issues? (DAT-2.C.2, DAT-2.C.3, and DAT-2.C.4)

Raw data is data that comes in from any source. It could be incomplete or invalid, or it could be a duplicate, among other issues. Data provided by multiple people have greater opportunities for differences in how the same data is represented. If I write Dr., it could be Drive in an address or Doctor as an abbreviation. The data would need to be cleaned to ensure the correct meaning of Dr. is consistently used or spelled out to avoid confusion.

Describe how real numbers are stored in computer memory, and provide an example. What impact, if any, could this have on a program's results? (DAT-1.B.3)

Real numbers, or those with decimals, have an approximate value in computer memory. For example: num = 0.1 + 0.1 + 0.1The variable num should have the value 0.3 but could be stored in computer memory as 0.2999999998 or 0.3000000004. This approximation could produce inaccurate results in a program. A program could compare our variable, num, to 0.3 and it would evaluate to false when it should be true. If (0.3 = num)The result will be false if num is not exactly 0.3.

Why can runtime errors be hard to identify? (CRD-2.I.3)

Runtime errors occur when the program is running, hence the name. Depending on the input, a runtime error may not occur each the program executes, making it harder to find. An example is when a variable is used as the divisor and sometimes has the value zero. The runtime error would occur when it's zero because you cannot divide by zero, but the program would execute successfully with other values.

Describe the testing process. (CRD-2.J.1)

The testing process includes unit testing, which corrects syntax errors (the grammar rules for the programming language) and ensures correct output is produced by the code. Integration testing is the term used when all the modules making up the functionality are tested to ensure that they work together correctly. For example, a program may have one module for shopping, one for ordering, one for shipping, and one for updating inventory. These are tested individually in unit testing, and then integration testing makes sure they interact correctly with calls to modules, passing arguments to procedures, error handling, and output. Acceptance testing is when clients start using the software with sample data to test the accuracy of the system. After any needed updates are made, the users sign off that the application is ready to be in "production" mode. There are many other types of testing as well, but you should always do these tests at a minimum, plus more depending on the type of software and its planned use.

Name each of the three types of computing innovations, and give an example of each. (CRD-1.A.2)

The virtual reality headset or a GPS (Global Positioning System) are examples of computing innovations that are physical. They are real objects to hold. Any software program, such as a computer game, is a nonphysical innovation. E-commerce and crowdfunding are examples of nonphysical computing concepts that are computing innovations.

What is the way users interact with a program called? What is the way a program performs while executing called? (CRD-2.B.4)

The way users interact with the program is through the user interface. Time needs to be included in the project plan for designing the user interface and obtaining feedback on how well it works. A software application may be great, but if it is difficult to use or not clear about how to proceed, then it is doomed to fail by those who have to interact with it. The way a program performs and the way users interact with it are included in the description of the program's behavior.

Describe how data compression algorithms work. What determines the degree of compression that can be obtained by the algorithm? (DAT-1.D.2 and DAT-1.D.3)

There are different data compression algorithms. They generally look for repeating strings of values in a dataset and replace them with a shortened code to represent them. The new smaller dataset is a compressed version of the original. Datasets that have more repeating values can be compressed more than ones that have few patterns in their values.

Why were development processes created? What steps are generally used in most development processes? (CRD-2.E.1 and CRD-2.E.2)

There are many software development processes. Some have come in and out of favor as new ones become available. The point of having one is to follow a structured process to ensure that steps are not forgotten. Most of them include the following steps: Investigating and reflecting--ensuring the requirements are identified and understood Designing--creating a solution to meet the requirements and obtaining user feedback and approval Prototyping--developing a mock-up or sample code without all the features to obtain feedback from users before going further Testing--creating the test plan to know expected results for comparison to the actual test results. There are many forms of testing, including, unit testing, where the programmer runs the code to get any errors or "bugs" out, integration testing of all the modules used, and acceptance testing by the user.

What is a benefit for programmers using pair programming to work together to create a program? (CRD-1.B.2)

There are several benefits to using pair programming. One is the collaboration that will occur as the two people share their ideas and discuss their use. Another benefit is having a second set of eyes to help prevent or find errors in the code. Two heads really are better than one! We know what we meant to type, so it can sometimes be hard for the original programmer to see an error.

Describe three methods that could be used in the investigative phase to gather information. (CRD-2.F.3)

There are several commonly used methods to gather information. The use of some of these depends on factors such as time available or the proximity the development team has to the users. Direct observations are always very valuable. Programmers have the chance to immediately ask users questions for clarification about how they are currently doing the process that will be automated or updated. Surveys are useful, and the programming team can refer back to the data collected as needed. However, the survey must be comprehensive or combined with additional methods to fully identify the requirements. It's easy to make invalid assumptions when writing the survey questions. Interviews can also provide the opportunity for follow-up questions, but the questions asked may unknowingly miss some of the user requirements if interviewing is the only method used.

How can you retrieve a former value in a variable after an assignment statement loads a new value? (AAP-1.B.3)

This is a bit of a trick question because you can't retrieve a previous value from a variable that has been overwritten with a new value. If you need the old value later in the program, create another variable to copy the previous value to before assigning the new value.

If computer processing of data shows a correlation, how can you confirm the relationship exists between the data values? (DAT-2.A.3 and DAT-2.A.4)

To determine if a correlation does exist, see if one event actually does cause the other. To fully analyze the possible correlation, data from several different sources may be required to make a conclusion. Additional data form the same source do not provide the same level of assurance as data from a different source to confirm the correlation.

How can diverse collaborative teams help reduce or eliminate bias? (CRD-1.A.3 and CRD-1.A.4)

When a team is diverse, people bring different knowledge and experiences with them. Their differing perspectives help identify potential issues and when or where they could occur to prevent bias from inadvertently being included in the final product.

Describe the process to convert analog signals to digital data. (DAT-1.A.10)

When analog data is converted to a digital version, samples of the analog data are taken and represented digitally. When samples are taken more frequently, a closer approximation to the analog data is achieved. With music, when the samples are taken often enough, the human ear cannot distinguish the difference between the analog and digital versions.

Describe what an event is in terms of program input, and give two examples?(CRD-2.C.2 and CRD-2.C.3)

With event-driven programming, the program continuously waits for an event to occur to trigger certain code to execute. Examples of events include a swipe across the screen or the pressing of a button, virtually or physically, or a command sent through a game controller.


Ensembles d'études connexes

Environmental Engineering Lab Final

View Set

MCB 410 Exam 1 Lecture Questions

View Set

Chapter 8 Review Questions From Book

View Set