Write code for yourself first. If it works for your task, share it. If other people use it, all the better. It's important to have side projects. Even if you never plan on sharing them. They will make you a better coder, and increase your understanding of the magic of computers.