Menu
Sign In Search Podcasts Libraries 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

Why is this question mark in here?

3504.207 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

Because it just reads so nicely.

3505.809 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

If user admin question mark.

3508.834 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

That's a very human phrase, but it gets better.

3511.377 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

You can turn this around.

3516.207 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

You can have your statement you want to execute before the conditional.

3518.031 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

You can do user.upgrade.

3523.183 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

Let's say you're calling an upgrade method on a user.

3526.591 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

Space if, space user.admin question mark.

3529.879 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

We do the thing if the thing is true.

3534.095 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

Instead of saying if the thing is true, do the thing.

3537.219 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

But it gets even better.

3540.022 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

This is why I love this example with the conditional, because you can keep diving into it.

3541.243 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

So let's flip it around.

3544.487 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

User dot downgrade if exclamation point not user dot admin.

3547.611 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

Right.

3555.399 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

That'd be a typical way of writing it.

3555.58 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

Ruby goes, that exclamation point is light noise.

3557.872 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

Why do we have if and then an exclamation point?

3561.8 View full episode β†’
Lex Fridman Podcast
#474 – DHH: Future of Programming, AI, Ruby on Rails, Productivity & Parenting

That's ugly.

3564.305 View full episode β†’