don't delete your code, even if you think it's useless

i have made this mistake over and over, if i don't like the code, i just delete it (or used to do so), but that's a foolish mistake. after learning the hard way, i found that i should store whatever piece of code i write, in a separate git repository if it's a neat project or in some common dump repository. this way it will not be lost.

countless times i have needed the same piece of code and i was like "holy shit! i deleted that last week". code is an asset when you are able to look into it and recall things, it's a liability when it's running on other's system, so in that case producing too much code is not a good idea if you can go by in less.