DoCP: Lesson 1
20 Mar 2014#####Notes - Test driven - Extreme value - lexigraphic ordering - use the comparator function, not the item itself - computing v.s. doing - computing: return result, pure functions - doing: doesn’t return result, inpure functions or subroutines
It's easy to test pure functions
#####Python features:
- Same function can have different return type(dynamic typing system)
- The use of ‘–234’.index(r)
- The use of list.count
- list: reversed
#####Refactoring
- DRY: don’t repeat yourself
#####Lesson Learned
- understand
- define pieces
- reuse
- test
- explore the design space
- correctness
- efficiency
- elegance
- features
Your Comments
comments powered by Disqus