At the end of the day you should shrug, warn of missing deadlines (if that doesn't change their mind) and start again on the new requirements.
You are paid for the work, that's where the value is - not in the end product/deployment which may never be used.
Once you have that mindset you never feel emotionally attached to work being thrown away.
But I still prefer that my code be used, not just thrown away. I want my work to matter for something, for someone, not be just a paycheck. In the short run, sure, things get thrown away. Over a long time, I'll gravitate to situations where my work is used.
> At the end of the day you should shrug, warn of missing deadlines (if that doesn't change their mind) and start again on the new requirements.
Be sure you warn in a way that leaves a paper trail. You're going to need it to protect you from the higher-ups trying to blame you for missing the deadlines.
Like I'd love to work for Google or Amazon on cutting edge shit - but I'd rather make half the pay to avoid the clown-brained managers, useless politics, and soul-crushing waste.
My solution btw is a simple one: managers should be forced to find executive coaches outside their org. Leadership and management can be learned from a good coach – and BAD leadership/management is, IMO, responsible for most problems inside an org. Not shifting market conditions, not complex tech, not incompetent engineers – but bad leaders.
Measure it with peer rating systems. Simple questions like "Would you follow this leader if they moved to a different company?" should make that manager's skills or progress pretty clear, pretty quick.
I work at a “big tech” company working on cutting edge shit but I’m with you. So done with this bullshit. It’s not worth the extra money.
If I do a weeks work on getting a feature ready, and then product decide to change all the requirements around and it needs redone. Why do I care ? I still get paid for that weeks work...
Next week I'll rework the requirements, and I'll get paid for that weeks work too!