Edited, memorised or added to reading queue

on 14-Oct-2019 (Mon)

Do you want BuboFlash to help you learning these things? Click here to log in or create user.

Flashcard 4466540940556

Tags
#has-images


Question
Qual o plano estratégico, tático ou operacional e qual o tempo



statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 4466558242060

Question
Can overridden methods differ in return type?
Answer
Java supports* covariant return types for overridden methods. This means an overridden method may have a more specific return type.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
java - Can overridden methods differ in return type? - Stack Overflow
;A for Work Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Learn more [emptylink] [emptylink] [emptylink] [emptylink] First 10 Free <span>Can overridden methods differ in return type? Ask Question Asked 6 years, 8 months ago Active 2 months ago Viewed 142k times 125 55 Can overridden methods have different return types? java methods overriding share |improve this que







Flashcard 4466564533516

Question

What is the difference between Factory and Strategy patterns?

A factory pattern is a creational pattern. A strategy pattern is an behavioral pattern.

Factory pattern is used to create objects of a specific type.

Strategy pattern is use to perform an operation (or set of operations) in a particular manner.

In the classic example, with animals and actions, qué haría cada patrón?

Factory [...] , while a Strategy [...] .

In fact the two can be used [...] .


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
java - What is the difference between Factory and Strategy patterns? - Stack Overflow
w Tags Users Jobs Teams What’s this? Teams Q&A for Work Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Learn more First 10 Free <span>What is the difference between Factory and Strategy patterns? Ask Question Asked 10 years, 7 months ago Active 2 years ago Viewed 45k times 130 37 Can any one explain the difference between factory and strategy patterns? For me both are looking sa







Flashcard 4466650516748

Question
A new detector is calibrated when the scientist observes its responses to known input signals. The results of this calibration are compared against the [...] .
Answer
expected response

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
01_episode
sistent testing we can have no confidence the the accuracy of a piece of code. Why Test?¶ Before relying on a new experimental device, an experimental scientist always establishes its accuracy. <span>A new detector is calibrated when the scientist observes its responses to known input signals. The results of this calibration are compared against the expected response. An experimental scientist would never conduct an experiment with uncalibrated detectors - that would be unscientific. So too, simulations and analysis with untested software do not cons







Flashcard 4466653400332

Question
The collection of all of the tests for a given code is known as the [...]
Answer
test suite

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
01_episode
ed before they have a chance to cause a paper retraction. In software tests, just like in device calibration, expected results are compared with observed results in order to establish accuracy. <span>The collection of all of the tests for a given code is known as the test suite. You can think of the test suite as a bunch of pre-canned experiments that anyone can run. If all of the test pass, then the code is at least partially trustworthy. If any of the tests







Flashcard 4466655759628

Question
You can think of the test suite as a bunch of pre-canned [...] that anyone can run
Answer
experiments

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
01_episode
t like in device calibration, expected results are compared with observed results in order to establish accuracy. The collection of all of the tests for a given code is known as the test suite. <span>You can think of the test suite as a bunch of pre-canned experiments that anyone can run. If all of the test pass, then the code is at least partially trustworthy. If any of the tests fail then the code is known to be incorrect with respect to whichever case failed. After t







Flashcard 4466659429644

Question
The first step toward getting the right answers from our programs is to assume that mistakes will happen and to guard against them. This is called [...] and the most common way to do it is to add alarms and tests into our code so that it checks itself.
Answer
defensive programming

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
02_episode
ching: 5 min Exercises: 0 min Questions What are tests? Objectives Understand what a test does. Understand the place of testing in a scientific workflow. Understand that testing has many forms. <span>The first step toward getting the right answers from our programs is to assume that mistakes will happen and to guard against them. This is called defensive programming and the most common way to do it is to add alarms and tests into our code so that it checks itself. Testing should be a seamless part of scientific software development process. This is analogous to experiment design in the experimental science world: At the beginning of a new project







Flashcard 4466662313228

Question
Exceptions and Assertions: While writing code, exceptions and assertions can be added to sound an alarm as [...] . These kinds of tests, are embedded in the software iteself and handle, as their name implies, exceptional cases rather than the norm.
Answer
runtime problems come up

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
02_episode
l discuss today brieflt today but is covered in greater detail in this episode. There are many ways to test software, such as: Assertions Exceptions Unit Tests Integration Tests Regresson Tests <span>Exceptions and Assertions: While writing code, exceptions and assertions can be added to sound an alarm as runtime problems come up. These kinds of tests, are embedded in the software iteself and handle, as their name implies, exceptional cases rather than the norm. Unit Tests: Unit tests investigate the behavior of units of code (such as functions, classes, or data structures). By validating each software unit across the valid range of its input a







Flashcard 4466664672524

Question
Define a unit test.
Answer
Unit tests investigate the behavior of units of code (such as functions, classes, or data structures). By validating each software unit across the valid range of its input and output parameters, tracking down unexpected behavior that may appear when the units are combined is made vastly simpler.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
02_episode
to sound an alarm as runtime problems come up. These kinds of tests, are embedded in the software iteself and handle, as their name implies, exceptional cases rather than the norm. Unit Tests: <span>Unit tests investigate the behavior of units of code (such as functions, classes, or data structures). By validating each software unit across the valid range of its input and output parameters, tracking down unexpected behavior that may appear when the units are combined is made vastly simpler. Integration Tests: Integration tests check that various pieces of the software work together as expected. Regression Tests: Regression tests defend against new bugs, or regressions, whi







Flashcard 4466667293964

Question
Define integration tests.
Answer
Integration tests check that various pieces of the software work together as expected, i.e. make sure that code units work together properly.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
02_episode
software unit across the valid range of its input and output parameters, tracking down unexpected behavior that may appear when the units are combined is made vastly simpler. Integration Tests: <span>Integration tests check that various pieces of the software work together as expected. Regression Tests: Regression tests defend against new bugs, or regressions, which might appear due to new software and updates. Key Points Tests check whether the observed result, from







Flashcard 4466669653260

Question
Define regression tests.
Answer
Regression tests defend against new bugs, or regressions, which might appear due to new software and updates, i.e. they ensure that everything works the same today as it did yesterday.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
02_episode
r that may appear when the units are combined is made vastly simpler. Integration Tests: Integration tests check that various pieces of the software work together as expected. Regression Tests: <span>Regression tests defend against new bugs, or regressions, which might appear due to new software and updates. Key Points Tests check whether the observed result, from running the code, is what was expected ahead of time. Tests can be written before the code they are testing is written (Test Dri







Flashcard 4466675420428

Question
Think of how to write an error message alongside an assert statement in Python.
Answer
assert len ( sample ) != 0 , "Unable to take the mean of an empty list."

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
03_episode-soln
ample) return sample_mean We can further improve the function by adding an error message to our assert statement: def mean(sample): ''' Takes a list of numbers, sample and returns the mean. ''' <span>assert len(sample) != 0, "Unable to take the mean of an empty list." sample_mean = sum(sample) / len(sample) return sample_mean Run each of these functions to identify where the error message is displayed. Checking type def mean(sample): ''' Takes a list







Flashcard 4466679614732

Question
If we want to compare two floats we must not test 'equality' but 'proximity', and can do this with numpy's [...] function
Answer

assert_almost_equal

(found in numpy.testing)


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
03_episode
g 'near equality': Numpy to the rescue¶ Thankfully we do not have to worry about how to deal with numerical recision ourselves. The wonderful numpy developers have provided a module to help us. <span>We we want to compare two floats we must not test 'equality' but 'proximity'. We can do this with numpy's assert_almost_equal function: In [39]: from numpy.testing import assert_almost_equal assert_almost_equal(0.1, 0.1) assert_almost_equal(0 + 0.1, 0.1) assert_almost_equal(0.1 + 0.1, 0.2) assert_almost_equal(0.1 + 0.2







Flashcard 4466691935500

Question
[...] and [...] can often be considered the atomic units of software because they are indivisible.
Answer

Functions

methods


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
06_episode
gle unit test. Understand how test fixtures can help write tests. Unit tests are so called because they exercise the functionality of the code by interrogating individual functions and methods. <span>Functions and methods can often be considered the atomic units of software because they are indivisible. However, what is considered to be the smallest code unit is subjective. The body of a function can be long are short, and shorter functions are arguably more unit-like than long ones. T







Flashcard 4466694819084

Question
Robert C. Martin, the author of “Clean Code” said : “The first rule of functions is that they should be [...]
Answer
small

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
06_episode
ecall that humans can only hold a few ideas in our heads at once. Paragraphs in books, for example, become unwieldy after a few lines. Functions, generally, shouldn’t be longer than paragraphs. <span>Robert C. Martin, the author of “Clean Code” said : “The first rule of functions is that they should be small. The second rule of functions is that they should be smaller than that.” (Unit) Testing encourages good code design The desire to unit test code often has the effect of encouraging both







Flashcard 4466697178380

Question
The desire to unit test code often has the effect of encouraging both the code and the tests to be as [...] , [...] , and [...] as possible.
Answer

small

well-defined

modular


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
06_episode
“Clean Code” said : “The first rule of functions is that they should be small. The second rule of functions is that they should be smaller than that.” (Unit) Testing encourages good code design <span>The desire to unit test code often has the effect of encouraging both the code and the tests to be as small, well-defined, and modular as possible. In Python, unit tests typically take the form of test functions that call and make assertions about methods and functions in the code base. To run these test functions, a test framework







Flashcard 4466699537676

Question
Unit Tests Are Just [...]
Answer
functions

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
06_episode
gether. For now, we’ll write some tests for the mean function and simply run them individually to see whether they fail. In the next session, we’ll use a test framework to collect and run them. <span>Unit Tests Are Just Functions¶ Unit tests are typically made of three pieces, some set-up, a number of assertions, and some tear-down. Set-up can be as simple as initializing the input values or as complex as creati







Flashcard 4466701896972

Question
In unit testing, the test ultimately occurs when an assertion is made, comparing the [...] and [...] values.
Answer

observed

expected


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
06_episode
eces, some set-up, a number of assertions, and some tear-down. Set-up can be as simple as initializing the input values or as complex as creating and initializing concrete instances of a class. <span>Ultimately, the test occurs when an assertion is made, comparing the observed and expected values. For example, let us test that our mean function successfully calculates the known value for a simple list. In ipython run the following: In [1]: from mean import * In [2]: def test_ints







Flashcard 4466705829132

Question
Regression tests assume that the [...] is “correct.”
Answer
past

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
09_episode
t the expected result should be, regression tests look to the past for the expected behavior. The expected result is taken as what was previously computed for the same inputs. The Past as Truth <span>Regression tests assume that the past is “correct.” They are great for letting developers know when and how a code base has changed. They are not great for letting anyone know why the change occurred. The change between what a code produ