Examples and practice with various design patterns