learning notes on design patterns