I am studying patterns and anti-patterns. I have a clear idea about patterns, but I don\'t get anti-patterns. Definitions from the web and Wikipedia confuse me a lot.
<
A pattern is an idea of how to solve a problem of some class. An anti-pattern is an idea of how not to solve it because implementing that idea would result in bad design.
An example: a "pattern" would be to use a function for code reuse, an "anti-pattern" would be to use copy-paste for the same. Both solve the same problem, but using a function usually leads to more readable and maintainable code than copy-paste.