Algorithms¶
Learning objectives
- Understand design by contract
- Understand algorithm names increase expressiveness of code
- Understand difference between
if
andassert
in function writing
Intro¶
How do I write functions [1] that are:
- easy to use
- correct
- fast [2]
References;
- [1] For now, we use
algorithm == function
, as the definition of an algorithm is 'a step-by-step procedure for solving a problem or accomplishing some end' @dictionary_algorithm -
[2] pick any vague definition
- assert
- Recursive algorithms
Discuss¶
- Function design is hard
- Documentation helps
- TDD helps
assert
helps
Course material¶
Description | HTML | QMD | |
---|---|---|---|
Algorithms lecture | algorithms_lecture.pdf |
algorithms_lecture.html |
here |
the
code layout
-ed items will become links in the future
- GitHub repository with exercises: https://github.com/richelbilderbeek/programming_formalisms_algorithms