Menu
Sign In Search Podcasts Charts People & Topics Add Podcast API Blog Pricing

David Heinemeier Hansson (DHH)

๐Ÿ‘ค Speaker
4269 total appearances

Appearances Over Time

Podcast Appearances

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

That's the bedrock of all programming languages.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

They have the if conditional.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

If you take most programming languages, they all have if.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

That's basically the same in almost every language.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

Space, start parentheses.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

We all do that.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

And then you have, perhaps let's say you're calling a object called user.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

dot isAdmin, close parentheses, close parentheses, start brackets, and here's what we're going to do if the user's an admin, right?

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

That would be a normal programming language.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

Ruby doesn't do it like that.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

Ruby boils almost all of it away.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

We start with the if.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

Okay, that's the same.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

No parentheses necessary because there's no ambiguity for the human to distinguish that the next part is just a single statement.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

So you do if space user dot admin question mark.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

No open brackets, no parentheses, no nothing.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

Next open line, here's your conditional.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

That question mark means nothing to the computer, but it means something to the human.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

Ruby put in the predicate method style purely as a communication tool between humans.

Lex Fridman Podcast
#474 โ€“ DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

It's actually more work for the interpreter to be able to see that this question mark is there.