many mark reusable abstractions with @main - better to give hint of a separate main that calls the function, preferably many times with different input to test all edge cases etc
sometimes people name the function def MAXBUG with BIG letters as some often confuse the name of the algorithm with its implementation; explain this distinction on some suitable slide. Should algorithm names not be in upper case to avoid this? At least people should know that it is NOT idiomatic Scala to give functions a name in upper case
The algorithms on slides and in exercises SUMBUG and MAXBUG are printing at the end. Better to make them "real" functions (not procedures) that only have local effects, not global side effects like printing.
There are some common confusions in w02:
@main
- better to give hint of a separate main that calls the function, preferably many times with different input to test all edge cases etcdef MAXBUG
with BIG letters as some often confuse the name of the algorithm with its implementation; explain this distinction on some suitable slide. Should algorithm names not be in upper case to avoid this? At least people should know that it is NOT idiomatic Scala to give functions a name in upper case