Sometimes software projects are great and wonderful. You start from the proverbial blank sheet of paper, and you "do it right". You understand your features, and you write your unit tests, and you set up continuous integration from the beginning. You even write your documentation as you go along! The whole team is happy, productive, and proud of their work.
Other projects aren't as nice.
You start with inherited code that you only sort of understand. Most of what you know is that its resemblance to a plate of spaghetti is remarkable. There aren't really any requirements or stories, the documentation and tests are sketchy at best, and this project just sucks.
You start making it better, one thing at a time. A little refactor here, some documentation there, a new continuous integration server that actually builds the monstrosity... errr.... project.
A few months down the line, some things are better. The project is starting to shape up a little bit. You're not out of the woods yet, though.
This is the point at which morale starts to decline.
You've been working on this nasty project for what feels like ages, and it still sucks! There are still classes there that no one understands. The test coverage is still spotty at best. The documentation represents a best guess, but no one really thinks it's accurate. And every week there's still some new discovery that customer X really needs an extension to feature Y.... and you didn't even know there was a feature Y.
If you were two years old, you'd have a temper tantrum right about now.
It's up to us to keep ourselves out of the doldrums and to get morale back up so we can keep going.
And here's the speech:
"Yes, this project sucks. You know what? It used to be worse."
That's pretty much the whole thing. Back it up with "remember how it used to.....?" comments - as many as you can.
The key to getting out of this kind of a morale dip is refocusing not on how bad things are now, but on how far you've come. Take a few minutes and remind yourself of the "bad old days". It'll make the present look a whole lot better.