Programming is an art, in the sense, there is no one way to do things correctly. There are always multiple ways to complete a given task. There are however differences between good code and bad code. Depending on the programmer background and experience, the code written can be good or bad. The following list are signs that the code written are bad :
- Inability to reason about code
- Poor understanding of the language’s programming model
- Deficient research skills / Chronically poor knowledge of the platform’s features
- Inability to comprehend pointers
- Difficulty seeing through recursion
- Distrust of code
While all of them are logical and we may think we did not made it, a good benchmark would by to ask our peers to grade our codes. I am sure you are going to be amazed at things that are uncovered by our peers.
The list above are taken from Software Engineering Tips “Signs that you’re a bad programmer“. I strongly suggest you read the entire page to help you understand the reason, symptoms and remedies for bad codes.