Design pattern learning