"When I arrived in San Francisco, it seemed that the majority of twentysomethings I met were in the same boat," he wrote. "However, today it seems that starving young artists and writers like myself are a dying breed."

He moved four times in five years, hanging on by sharing rooms with others.

Salesforce, Twitter, and dozens of other companies grew up, bringing tens of thousands of new tech workers into the city.

A small startup scene ballooned. Workers for the giant tech companies south of the city started to move to San Francisco and commute, often in luxury buses provided by their employers.

And the already expensive real-estate market in San Francisco became so unaffordable that Krantz found himself homeless, sleeping on the beach.

Until he landed a contract job at the San Francisco startup Zenefits. He was hired as a copy editor to answer questions related to human resources. For the first time, he could genuinely afford to rent a home in San Francisco, he writes. Now the problem was, he couldn't find one.

Talking to co-workers, I began to see that most of my fellow employees had moved to San Francisco within the last six months. So it appeared that many of my incoming counterparts were filling up potential rooms before I had a chance at them.

A month and half after starting the job, he "caught a break when a room opened up in a friend's household" and he "thought he had it made."

But two days later Zenefits ended his contract, letting him go.

That was it — game over. Not even spared a few minutes to say my goodbyes, I was promptly escorted out of the building. I went from homeless but employed to being housed but jobless in less than a week.

A taste of financial stability was enough to make him rethink his life, he writes. He doesn't want to live hand-to-mouth each month any more than he wants to work for a company "I don't believe in."

In the end, he's looking to leave San Francisco, he says, and write his novel, perhaps returning when he can really afford to live there.

Zenefits confirmed that Krantz was hired on a short-term contract but had no further comment. We reached out to Krantz for further comment and will update when we hear back.