Why you should master strategy and factory pattern