I bit my nails for 15 years before I stopped. Part of it was that I played the cello and needed short nails, but it was mostly just habit.
Now that I no longer play the cello, my nails are nice. I tend to be pretty vain about my nails now, and keep them well-manicured and polished.
Many people have asked me how I broke my nail biting habit. But I honestly have no idea. It's like one day I just woke up and stopped nibbling on them. Seriously.
The only times in recent memory that I've had short/bitten nails were: I spent 2 months living in Wyoming taking a geology field course; the week my senior thesis was due, I was terribly stressed and bit my nails.