1. There are degrees of mutability; "changeable" versus "hard-coded" is a false dichotomy. For instance, I can increase my arithmetic ability with practice, but I'm never going to be able to improve it so much that I can diagonalize huge matrices faster than a computer.
2. Whether or not a belief is depressing has no bearing on whether or not it is true.
So I would reframe the question a bit: to what extent can IQ be changed? How reliable are the tests? And if we can improve IQ, what's the best way to do it? For example, childhood malnutrition can lower IQ, so improving childhood nutrition can pay off big. The Flynn effect -- the rise in IQ scores over time -- suggests that there are other things that can raise people's IQ as well, so if we can find and exploit those, and they actually raise intelligence, then that would be great.
Now, there is a flaw in the point that you can train for tests - if you trained in this task, then the task has no diagnostic meaning for you. But if you genuinely start working with more spatial reasoning gear - say you become a mechanic of some sort - you get better at recognising how things fit together spatially. You have, in effect, trained yourself to be better at spatial reasoning in general, and would do better at the subtest.
But the important thing to note here is that your intelligence has improved in that way - your ability to reason spatially has improved; you are actually able to cognitively do more than you could previously.
Likewise with the (culturally-referenced) verbal tests. Someone might get an IQ test at 20, then 'find books' and become a voracious reader. Tested a couple of years later, their vocabulary and verbal reasoning has been significantly exercised and improved. With an improved vocabulary, you are better able to express or consider more advanced concepts, so again, that aspect of your intelligence has actually improved.
Has it been tested whether training for the spatial reasoning tasks on an IQ test will make someone better at other spatial reasoning tasks (like being a mechanic)?
I don't know if you could say "would mean you would make a good mechanic" based on that one test because that involves other aspects, not just spatial reasoning, but being a mechanic would mean you (probably) deal with spatial reasoning more often than say a journalist or call-centre worker.
Anyway, clearly "IQ" isn't hard-coded. People get different scores on different days on different tests, and people tend to get higher scores over time as they get better at solving the dozen or so standard classes of problem that you tend to get (just ask me what this cube looks like unfolded!)
On the other hand, there is a very real phenomenon called "intelligence", and people have it to varying degrees (so do animals, to even more widely varying degrees), its effects are well known to everybody from our experience in the real world, and IQ tests are vaguely correlated with it. And it does seem to be largely genetic.
Depressing? Yes. That's just the way life is.
What is even more depressing is that some people think you can will yourself to be smarter, and if you don't, you are just lazy.
What this study seems to say is that IQ is more variable over time than first thought.
Perhaps the variability over time is itself hard-coded.
Regardless of the cause of this variability over time, I do hope that this study leads to more open-mindedness, and less labelling of kids based on early academic performance or single cognitive scores.