Everybody knows that debugging is a lot harder than writing code and every code needs to be debugged sooner or later. If not debugged you will certainly need to read it, maintain it, update it or optimize it. Let me ask you a question: If you are as clever as you can when you write the code, how you’ll be able to debug it? Debugging is a lot harder than writing code! You will need to be a lot smarter than you were when you wrote the code.
My advice is: don’t be clever! Write code in such way that anybody can read it, write the most simple code you can and even so, the debugging will give you some headaches. Don’t try to be a smartass. Write your algorithm as clear and simple as possible. Coding is not a contest, nobody will think you are limited because you don’t write some obfuscated condition. Be clear and concise, your code should be readable by your grandmother, don’t make simple things complicated, don’t be clever!