Design patterns source code