There's no way to avoid politics to avoid getting fired, it just means that when you get laid off you picked the wrong thing, and basically did it incidentally because you refused to forecast what project was going to be culled. Most software projects fail, and working harder on a failure won't get you anywhere.
If you find the personal part difficult then what I recommend folks dodo is pay attention to the flows of money, time, and communication that happen. Most of the time analyzing the patterns of how work is accomplished will tell you just as much about who is going to come out on top in a new paradigm as anything else.
If you find the personal part difficult then what I recommend folks dodo is pay attention to the flows of money, time, and communication that happen. Most of the time analyzing the patterns of how work is accomplished will tell you just as much about who is going to come out on top in a new paradigm as anything else.