Design patterns and anti-patterns