Logic Patterns In Programming