Bad Rails conventions got me a weekend stay with the CEO of Airbnb
blog.josephofiowa.com
blog.josephofiowa.com
A few things can be true at the same time:
- Airbnb is an inspiring story for any entrepreneur
- it has had arguably detrimental impacts
- the founders came from privileged backgrounds
- they also worked their ass off and are fiercely intelligent and risked plenty
On the tech side - it’s always funny to hear the (correct) critiques of early Rails. It reminds me of when I was talking trash about Java as a kid. My boss laughed and said “Java bought me my house, so it’s good in my book”. Or the first Tesla I ever saw with the license plate “PHP LOL” in the Facebook parking lot.
Pragmatism must beat idealism. In business and in database primary keys and everything in between.
Though perhaps there are things they risked that I am not familiar with.
Sure, they could pay a study group to do that. But doing it themselves will probably let them make better decisions overall.
To address these leaks, one option is to generate synthetic keys for each resource. However, this method is costly because it requires indexing the new key alongside the primary key (PK). Indexing is not without overhead, and synthetic keys are often larger, like 128 bits for UUIDs or ULIDs compared to a 64-bit numeric PK. This means that every record insertion necessitates dual indexing. Generating UUIDs can sometimes be challenging too because of reasons.
An alternative involves obfuscating the ID in such way that can be easily reversed in the server. Effective algorithms for this purpose are "squids" [1] (the second version of "hashids"), Skip32 Cypher [2] and ... more math :-p [3] [4]. Chaining both algorithms could provide an additional layer of obfuscation.
Before someone mentions this, yes, obfuscation is not encryption, so not a thorough security measure. But I think obfuscation is a practical way to prevent casual URL leaks, even though more determined attackers may attempt to reverse-engineer the IDs.
More options:
* Add a "salted hash" to the id, ex: website.com/thing/1-hash/children, "hash" could be something like SHA-256("--{id}--{salt}--"). Now the "attacker" would need to know how to generate the hash if trying the id "2". Could also be combined with ID obfuscation as mentioned bedfore. "salt" would be a single string per resource type, or even for the whole app.
* Encrypt the ID: only the server would know the password to decrypt the ID, so this would be secure as long as the password and method of encryption is not leaked.
--
2: https://stackoverflow.com/a/4200193
3: https://github.com/c2h5oh/hide
4: https://en.wikipedia.org/wiki/Modular_multiplicative_inverse
> It's wild (vulnerable, transparent, kind, generous, and humbling) for the CEO of a $60B company to welcome complete strangers into his home to host them – including cooking together and showing them the city – for a weekend.
This phrase is outright insulting in my view. Do you really think you will be in the company of a billionaire (and CEO of a PUBLIC company) without even basic vetting? Give me a break.
Some main weaknesses, if I recall correctly, is that's incremental ids make scraping pretty easy, or guessing content outside of a URL given explicitly by the service (like here).
Wheres my billion dollars
https://krebsonsecurity.com/2018/04/panerabread-com-leaks-mi...
Otherwise, you typically either want to make your URLs intuitively discoverable or not discoverable at all. An incrementing ID like this is neither, so it sits in a weird middle ground that probably satisfies nobody (except those trying to get things done who don't care, I guess).
Be born to the right people and toe the party line. That’s what Brian’s story will show you. But that’s basically a cliche right now so I doubt you’re in any way surprised
I personally don't get this business at all. Staying in a stranger's house is even more disconcerting that renting out a house to strangers. I'm mind-boggled at home much business they get.
Still, some people love this sort of random interaction. Hostels are popular in some crowds. And I remember, when biking across Canada, a random couple in their 60s stopped me, in Northern Ontario(very rural!) and asked me if I wanted to stay the night.
Part of me wondered if their very nice roast and potatoes, would be my last meal.
But they just were bored, and wanted to talk, and were just nice folks not afraid of strangers. Good people.
So some like it random. Enjoy divergent personalities.
I think their biggest issue now is that the renters got more greedy and airbnbs start to cost more than hotels. Which atleast around me didnt use to be the case.
"I told him it's a bad idea. I didn't think it was going to work, and I didn't really understand it. If he listened to me, Airbnb wouldn't be here now.""
I mean, in the end, isn't it turning out to be a bad idea? Removing homes from the rental market, increasing housing prices. Encouraging more treatment of housing as an investment.Sometimes, Brian, your mom is right.
You would think so, but in the US's tightest property markets its basically impossible to build new housing due to some combination of zoning, local review boards, NIMBY activists, and onerous environmental regulations (thing will this increase school demand not will it spew toxic waste).
Not for Brian, no.
Even if Airbnb ceases to exist tomorrow, I am fairly certain that Brian is gonna be in a better spot than he would have been in if he listened to his mom.
Perhaps under a different name with a different path, but I am fairly certain that the ending would have been the same. And there are definitely lessons to be learned form this. And honestly, it could've been much worse, so I am ok with those lessons being learner earlier rather than later. I think they were pretty useful.
I'm sure Brian's mom is happy she was wrong and doesn't share your negative assessment.
> Removing homes from the rental market, increasing housing prices. Encouraging more treatment of housing as an investment.
This is a policy failure. We need to build more housing. Zoning, taxes, and NIMBYism are to blame.
Supply and demand curves are the law of the land. Add more supply and the problem is solved.
Wow, I didn't know this! How are housing costs going in cities that have banned or highly regulated Airbnb, like NYC or Paris? I suppose these are highly affordable cities with falling rents?
And we can say good idea/bad idea all you'd like, that's just opinion at the end of the day, the truth is there was a market for his idea, a huge one, and the market isn't mound by any sort of moral or ethical or even logical means, so applying those things in order to support a notion of 'good' or 'bad' isn't going to yield truth by any measure.
I think what you're seeing, mostly, with short term rentals, is a lack of housing inventory being created. We've got plenty of space to build, but, for a litany of reasons, it's not being built, and in a general sense, the solution to this problem is to solve those problems that're in the way of adding inventory.