Long-term goals give quite some motivation.
The love of quality too (it's not perfectionism!). I expect quality work from others (not just in software development), so I cannot expect but the same from myself too.
If you feel losing your motivation, don't forget to ask yourself the question, what is your goal and what's the next necessary step to achieve it. Besides, you have to alter a bit what you do from time to time, to keep things interesting and also challenging.
Have a personal hero. It can be wonderwoman, it can be your father, your smart friend, maybe Aristotle. If you are about to give in, ask the question, what would X do in that situation!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.