Rules for being happy in software
1a. There's always someone smarter than you.
2. Never ask the questions "How hard can it be," or "What's the worst that could happen," unless you really want to know the answer.
3. Don't become overly attached to your job.
3a. It's better to be laid off early than late; you have a better chance of getting a severance, and there may still be jobs out there.
4. QA is not the enemy. Neither is the customer. Management occasionally is, but not that often, and to make up for they sometimes provide free pizza.
5. All programming languages suck. All platforms suck. All development environments suck. All text editors suck. All compilers suck. All database engines suck.
6. At some point in your career, you will come up with a brilliant idea that has nothing but disastrous consequences and will wind up as an entry in The Daily WTF. Accept that this will happen.
6a. You're never as brilliant as you think you are.