The main lesson here is to leave a company that doesn't pay you immediately. The rest of the lesson is only for the idiots who didn't do that like the author.
The problem is that most contractors will feel trapped by the sunk costs -- fallacy or not.
If you've put a month of work towards something, and they say "funding's coming through, give us a couple weeks for the first payment," you have two choices: keep working and have a chance that you'll get paid, or stop working and be guaranteed you'll never be paid for that month you put in.
Or you can refuse to start work without a deposit or payment up front. It's really that simple.
The life of a small shop requires you get paid before you do the work. You tell the client that you'll pass the savings in your nonexistent collections department on to them. If they won't do it walk away, since fucking this concept up is the fastest known way to kill your business.
If you've put a month of work towards something, and they say "funding's coming through, give us a couple weeks for the first payment," you have two choices: keep working and have a chance that you'll get paid, or stop working and be guaranteed you'll never be paid for that month you put in.