It might not help now but I would highly advise you learn how to budget better and grow a sizable emergency fund.
I genuinely have a hard time believing someone is living paycheck to paycheck (even in the bay area with two kids - where housing is extremely expensive) on a senior software engineer salary at a startup. ($180k/yr) I know people who manage it. It's not a comfortable life but it's stable and they can still save. I mean, they have to. They're not gonna be able to buy their options when they quit if they didn't save.
Genuinely wondering, do you think that this insight simply hasn't occurred to him? The obstacles to someone spending less money are generally more complicated — even when they're within the person's control at all — than simply "start budgeting better." You're being condescending and providing no value.
Also, I bet that you know more people living paycheck-to-paycheck than you realize.
I've met enough people in this field who are completely inept when it comes to anything that doesn't involve typing code.
There's this duality where we appreciate there are many out there who truly cannot downsize their lifestyle to accommodate, and we should sympathize. But of the people I know personally in these scenarios, all of them could easily budget better. And again, in my personal experience, its always a pretty simple evaluation and decision. Its deeply frustrating to see someone I know complaining about how tight things are, but then buying a better car than me, better computer than me, better phone than me. Going out to eat all the time. Etc ad infinitum. So while certainly there are factors outside our controls, I'd wager a lot that the average high salary earners (e.g., HN crowd) do have simple budgeting choices they aren't making. I won't presume much about OP, this is mostly in response to your comment about it being condescending. It is. But, in reality, for many and perhaps most high earners, it really is simple, and sometimes people do need to be called out to realize it.
Nonetheless shouldn't the society tell you something like this?
OP, I'm sorry to hear about your situation. I hope you can find a new position soon. Try to stay positive - this too shall pass.
It is a hard job. We are expected to know everything related to software: you have to know a bit about graphics design, UI and UX, be a writer, a project manager, site reliability and devops engineer , infosec expert, understand encryption and networking, be a QA specialist, know back-end and front-end, understand hardware, operating systems, databases, distributed systems, know concurrency, be a manager and a lead and a good team player, be an expert of a few and be familiar with a dozen of programming languages, understand different paradigms - OOP, logic and relational, functional, stack-based, etc. You have to be consistently and continuously learning new things. You cannot ever stop. And we love that.
Very often you have to pay the price for that love. You get neck and back problems, RSI, myopia, excess body fat, swollen hemorrhoids, gastritis, depression, etc.
And you can never expect to hear praise for anything you do. Programming is extremely subjective when it comes to evaluating the quality of work done. It is so easy to criticize. I have seen people criticizing code written by Linus Torvalds, John Carmack, Richard Stallman, Rich Hickey, and others. No one ever said: "look at this piece of code; this is so deep and profound, it should be carved in stone."