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

So that takes all of these elements we've just talked about and turned them up to 11.

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

I'll explain metaprogramming real simple.

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

Metaprogramming is essentially a version of the 5.days.

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

You get to add keywords to the language.

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

Active record is the part of Rails that communicates with the database.

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

This is a system where every table in the database is represented by a class.

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

So if we take the user example again, you do class user descends from active record base.

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

And then the first line you can write is this.

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

I want my users to have many posts or have many comments.

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

Let's do that.

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

We're making some system where users can make comments.

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

The very next line is has underscore many space

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

colon comments.

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

Now you've set up a dependency between users and comments that will give you a whole host of access and factory methods for users to be able to own comments, to create comments, to update comments.

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

In that line alone has many

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

looks like a keyword.

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

It looks like it's part of the Ruby language.

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

That's metaprogramming.

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

When Rails is able to add these elements to how you define a class, and then that runs code that adds a bunch of methods to the use of class, that's metaprogramming.

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

And when metaprogramming is used in this way, we call it domain-specific languages.

4264.799 View full episode β†’