This happens to me most of the time. After I have finished writing some code, I get this feeling that it is not the optimum code or there is a better way of writing the same code. Perhaps someone else is more intelligent than me who can implement the same alogrithm in more smarter way.
This sometimes let me down and sometimes leads to depression. Is it just me or has anybody else felt this same way? What do you do in such case?
Update: I do not know why this question was closed? I still think it is relevant to 'programming'. Does anyone thing this question is not as good as 'What’s your favorite “programmer” cartoon?'. Sorry but a bit dissaponited now.