There are layoffs happening constantly, and gone are the times when people would spend years in one company and only then transition.
My condolences to all the people getting laid off, hopefully you find a better opportunity. What I wanted to know is how can one survive in this current software engineering market? The few ways I see is to either - 1) acquire knowledge that very less people in the organization have. 2) create tremendous value that everyone thinks twice to fire you
Or is the game so screwed up that there is no chance of surviving and getting fired is inevitable and one has to just keep moving on from there?
If you want to avoid layoffs, try looking for jobs at safer companies -- ones that are profitable and have a genuinely useful product. For example, choose a SalesForce over a scooter company.
As more general advice, I'd suggest working on soft skills, like managing teams, understanding product, translating business reqs into coherent tech specs, etc. It's easy to find people who can code, but it's very difficult to find people who can understand the entire business (all the way from the client thinking "I need something" to a coder writing it to a final delivery of that value).