Functional Specification Flashcards
cowboy coding
write a function, you choose some arguments, and if you don’t like what you see, perhaps you add a new argument to that function and test again.
functional specifications
declarations about the properties of input and output of functions in a program.
In their simplest form, a functional specification can be
natural language that says what an individual function is supposed to do
static typing
allow developers to specify types explicitly
second purpose of writing functional specifications
verify that functions, their input, and their output are correct.
assertions
simplest and most widely used kinds of unit tests
Assertions consist of two things:
1) a check on some property of a function’s input or output
2) some action to notify about violations of these properties.
Error handling
includes assertions, but also programming language features like exceptions and exception handlers.