Episode Transcript
Available transcripts are automatically generated. Complete accuracy is not guaranteed.
Speaker 1 (00:00):
Hello everyone,
welcome to a special episode of
Code and the Code Encoders whoCode it live at RailsWorld.
This is part three.
I am joined by Andy Kroll,chris Oliver and Alan
Reitelhoover.
Hello, gentlemen, how are youenjoying RailsWorld so far?
Speaker 2 (00:14):
Good, it's really
good, except for the fire alarm.
Speaker 1 (00:18):
Fire alarm.
I heard about this 2.30 in themorning.
Speaker 2 (00:21):
Yeah 2.30 in the
morning it had happened Tuesday
or something.
So some people didn't come downbecause they thought it was
going to be another false firealarm.
I didn't know about that andthen I ended up just hanging out
because you're wide awake afterthe fire alarm until like 4 am.
Speaker 3 (00:41):
The definition of the
alarm is that you do wake up.
Speaker 1 (00:43):
It's quite alarming,
yeah, one might say it was just.
Speaker 2 (00:47):
I thought it was just
very aggressive room service at
first you know all right.
Speaker 1 (00:54):
So so, aside from uh
a 2, 30 in the morning fire
alarm, uh, waking you up howwhat's been your favorite part
of rails world otherwise?
Speaker 2 (01:05):
just the hallway
track as always, I haven't made
it to any talks, as usual, butI'm here for the hallway track.
Well, of course.
Speaker 1 (01:12):
Yeah, you know I've
tried to make talks.
It hasn't happened.
I get like five feet.
I see someone else I want totalk to.
We're talking to this personnow.
Speaker 2 (01:20):
I managed to eat
lunch this year so that's the
pick away over last year.
Speaker 1 (01:25):
The pains of being a
celebrity is you don't even get
lunch half the time.
Speaker 3 (01:28):
Celebrities are so
slender right.
Speaker 4 (01:34):
Is that?
Speaker 3 (01:34):
how you stay so lean,
everybody wants a dog bandy.
Maintain this gun show.
Speaker 1 (01:41):
Well, you were
running this morning, I saw I
did?
Speaker 3 (01:43):
I felt incredibly
virtuous.
I went for a did?
I felt incredibly virtuous, Iwent for a run.
I said to Miles he runs.
So I was like do you want to gofor a run?
We'll go for a run.
And he's like, yeah, okay.
And then at 7 o'clock when Itexted him he was like I hate
you.
And then I said, oh, let's runto the lake.
So we're right at the top ofdowntown where the hotels are,
(02:04):
oh cool, and yeah, it's furtherto the lake than I thought it
was, but we got there just asbeautiful sunrise.
So once we got there, past theswearing and Miles silently
hating me as we, we weren'tgoing very fast, but I think we
were going slightly faster thanMiles would have preferred after
so many other fashions.
Speaker 1 (02:22):
I was going to say I
don't know how many parties you
guys made it to last night, butthere was quite a number of
things going on.
Speaker 3 (02:27):
Yeah, I mean the
whole thing around Railsworld is
great.
It's got much as someone whoorganizes conferences.
There's a real good festivalvibe to this.
It is intended that you don'tgo to all the talks, right where
you go.
Speaker 1 (02:43):
Yeah, we were talking
in the last episode about like
it feels like we're justcelebrating the new release, the
new Rails release, like that'ssort of what Rails World feels
like.
We're going to talk about thenew Rails release?
Yeah, we're going to celebrateit.
There's also some talks goingon at the same time.
If you're interested in thatkind of stuff.
Speaker 3 (03:05):
But otherwise party
time.
Yeah, absolutely yeah, it's,it's, it's catching up with
people.
Right, there was a photo aftereileen's keynote of the ruby
europe, so all the europeans whoare here got on stage and I
think they thought it was gonnabe like three or four people.
Oh my god, yeah, no, we're sortof standing there and someone
at the back is going.
Does the stage hold this much?
Speaker 2 (03:18):
human weight.
Speaker 1 (03:19):
This doesn't feel
totally stable does canada have
a fire marshal?
Speaker 4 (03:26):
Are we in trouble,
right?
Speaker 2 (03:27):
now he's busy at the
hotel, so no.
The Rails 8 release was justfire.
Yeah, super hot Bringing itback to the hotel, Alan.
Speaker 1 (03:35):
how have you been
enjoying your conference so far?
Speaker 4 (03:38):
This is amazing,
really amazing.
Energy, a lot of new people, alot of old friends.
It's been a fun couple of days.
Speaker 1 (03:51):
Have you made it to
any talks or are you just
hallway tracking?
Speaker 4 (03:53):
Yeah, Eileen's was
great I felt really seen, we
have all those problems.
It's the first talk I'm goingto share with people when I get
back Leadership included.
Yeah, leadership included, forsure.
Speaker 1 (04:08):
It's a full stack
problem in a way.
What are you most excited forin Rails 8?
Speaker 4 (04:15):
Oh gosh, I have so
many years ahead of me before I
can get there.
But I really liked the solid Qstuff.
That looked really cool.
Solid cache, solid cable thatseems like something we could
definitely take advantage of, itseems real solid.
Speaker 1 (04:36):
yeah, Thank you, Drew
.
Speaker 3 (04:40):
Listen, Jason Charns
isn't here.
Speaker 1 (04:42):
I recorded with Jason
and he took care of all the
jokes.
And now there's.
I mean I guess you could takeover on jokes.
Speaker 3 (04:48):
No, no, I basically
do swearing and my accent and
you confuse that with charmingand intelligent.
So that's all I've got.
It was quite funny.
There was a bit in Eileen'stalk where she said shit and I
was like and the crowd sort ofwent.
And there was a bit in Eileen'stalk where she said shit and I
was like and the crowd sort ofwent oh, and I was like when I
(05:09):
swear on stage, I totally getaway with it.
Speaker 1 (05:10):
It's amazing.
Yeah, yeah, I'm going to startmarking my podcast as explicit
content, just so I don't have tofilter myself anymore.
Speaker 3 (05:15):
Yeah, yeah, exactly,
it's exhausting.
We're all grown-ups here.
Yeah, I mean for somedefinition of grown-ups.
Speaker 1 (05:20):
Listen, if you're a
Rails dev, you've probably seen
a DHH keynote, so you've heardthe word fuck before yeah he is
deaf.
Speaker 3 (05:26):
You've heard it.
I mean, he squeezed it intoyesterday's keynote as well.
Speaker 1 (05:31):
Only what eight times
I actually found it.
Speaker 4 (05:34):
Because the last time
I saw him speak I did count and
that was two Portlands ago,right, and I got to 70 back in
that time, 70?
.
Speaker 3 (05:45):
He's calmed down,
he's really mellowed, he really
has calmed down, I quit countingat 70.
Speaker 2 (05:52):
I didn't have that
many fingers.
Speaker 1 (05:55):
I had my shoes on,
can't count that high.
Speaker 4 (05:58):
He only managed 15
this time.
Speaker 1 (06:00):
Okay, 15.
He's getting to be an old man,yeah.
It's tiring to do all thatstuff it's got to be.
He was jumping around all overstage too.
He was very animated he was.
Speaker 3 (06:13):
He was Almost a dance
yeah.
Speaker 1 (06:14):
I'm not going to lie
as pumped as I am for the stuff
coming out in Rails 8, I'malmost more excited about Rails
8.1.
Like, just maybe because it'sall new and shiny and I didn't
know.
Speaker 2 (06:30):
I knew a lot of the
stuff for 8 going into Rails 1.
Yeah, it was what December waswhen he wrote up the list of
stuff for Rails 8.
Speaker 1 (06:35):
Yeah.
Speaker 2 (06:36):
So we've been waiting
since December.
We've known what's coming.
Speaker 3 (06:40):
Yeah, the search
stuff is just like.
It's got that feeling of likeoh yeah, of course we should
have that.
And it's not like oh, theyshould have built it already.
It's like oh yeah, now itdefinitely feels like the time
you want that, like one of thebest things about Rails is the
API taste and like the name ithas a flavor, right, and it
(07:02):
looks like oh yeah, that's areal railsy way of doing yeah,
the 80 full-text search.
That is what you want, right,and as soon as you need
something more, yeah, then youreach something else.
But like that's just oh yeah,of course.
Speaker 1 (07:14):
Yeah, I think I think
the core team is excellent at
really spending time marinatingon naming and making sure that
the name's like I.
I think, chris, you have avideo with Casper Tim Hanson
right.
Speaker 2 (07:27):
Yeah.
Speaker 1 (07:27):
Yeah, where he like
so much of that video is him
talking about naming and likehis rationale behind naming and
like it was pretty eyeopening.
Like I've always been like, hey, naming wins, naming is super
important, but watching thatvideo was like, wow, naming is.
You should be spending moretime naming things.
Speaker 2 (07:47):
A really good example
of this is so before the
authentication generator dropped, you would use like devise or
something and you would put abefore action and authenticate
user for maybe your applicationcontroller.
But if you needed to break outof it you would skip before
action.
But they just made a classmethod and call it allow
(08:09):
unauthenticated access.
And now that's what you see inyour controllers and it's
wonderfully named.
There's no extra skip beforeaction nonsense there.
It's just we slapped a name ontop of that.
That's all the code is and it'sreally elegant to read and use
and it's one of those examplesthat's like dang it, why didn't
(08:29):
I think of that?
And you might think of it more.
If you're building a library,but you can do the same thing in
your own application, you justnever think about doing it, for
whatever reason, like I don't.
Speaker 3 (08:40):
At least One of the
things I sort of took away from
Eileen's talk is all thismodularization stuff.
It's actually just about naming.
It's about getting yourconcepts.
Some of the problems that themodularization is trying to
solve are things that are Do youknow what the actual work here
is?
To look at these 17 models andgo, do you know what that's
(09:00):
called the wrong thing?
This attribute's in the wrongplace.
This thing has got a bunch ofstuff in it that we threw there
because we were building fast.
The work is what she claimed,which is do the hard work, do
the hard yards of being asoftware engineer.
Being a software engineer islike migrating stuff from one
box to another.
I mean, that's what we do ismove that stuff around, and the
(09:24):
solution is not more around.
The solution is not more rules.
The solution is more judgment,more time and that sort of thing
More craftsmanship, morecraftsmanship, yeah, and in all
the positive sides of that.
Speaker 4 (09:37):
I have a pattern, a
design pattern, that I like to
use.
It's registering classes into afactory just using the class
method on the base class, andthat allows me to say this class
either handles something orprepares something or belongs to
(09:59):
something, just exactly thesame way you use belongs to or
before action.
And I think that's part of thereason why Rails is so
successful is that it leveragesthose parts of Ruby that make
things so expressive and so easyto use and the developer
experience ends up so much justa pleasure to use.
Speaker 2 (10:26):
Yeah, yesterday I was
talking to somebody and it was
like you know, oftentimes youmight have a model where there's
like this group of threemethods is related to
authentication and the nextthree are like billing related,
and then watching 37sign Signalspublish Campfire and even just
(10:46):
the Rails source code, it's likeaction controller base is just
include these 15 modules andthere's no other code in the
class.
And it's like if you take thosethree methods for billing and
just move it to a module andinclude that module, you've now
given it a name, whereas justbeing in the user model you've
(11:06):
got a comment maybe that saysthis is the billing code, when
you could extract it to anotherfile, give it a name and then
all of a sudden you have nowintroduced this concept to your
code.
That was missing.
That now makes it much easierto find and rationalize about
and it's more organized.
And those are the little thingsthat go a crazy long way to
(11:27):
make something I can come backin 18 months.
Forget every single thing thatthis app does, but jump right in
, fix a bug and move right backon to whatever I was doing.
Speaker 3 (11:38):
It is absolutely okay
to junk draw, as long as you
put a label on the draw.
Speaker 1 (11:43):
Right, it really is
like, hey, we have a bug in X.
Well, okay, let me open all thefiles that relate to X, and I
should.
If you're like, hey, I have aproblem with billing and you
have to open I don't know user,maybe you can make that
correlation, but I'd rather opena billing module or a payments
(12:06):
module or something that feelsmore related.
It's just less tracking downfiles for where something might
be and more like it makes sensefor it to be here, or make it
Chris's problem.
Or make it Chris's problem.
Speaker 4 (12:22):
I actually have kind
of a hot take on this.
When you put things in modules,you're leaving everything in
that same scope as the classthat you're in, and so one of
the problems we see with that isthere will be a method or
excuse me, an instance variabledefined in the controller, for
example, that the module thentakes reference on, but now it's
(12:44):
a mystery guest inside themodule and you don't know where
it came from.
Or vice versa there's avariable declared in the module
and now the controller's usingit.
You don't know where it comesfrom.
So my preference is always touse a class to encapsulate that
stuff rather than a module.
It's the same thing.
I want the billing class Toorganize my code that way.
(13:07):
What do?
Speaker 2 (13:11):
you guys think yeah,
I'm generally thinking of
concerns for models when I'mtalking about that.
But in a controller that ismuch messier, where you've got
the action defining variables,and then if you're going to
reference them in a controllerconcern, then it gets murky,
which is why the authenticationgenerator will put everything in
(13:33):
the current class with currentattributes, which is that
pattern.
That's like we're not justmoving this code somewhere else,
it's actually organized and canbe reasoned about independently
, which I think is veryimportant.
With that, if you're going tomove the code, just don't just
move it.
Make sure it's encapsulated.
(13:55):
This is the responsibility.
It can be rationalized aboutindependently, which helps,
because otherwise you've justmade it murkier by.
These things are still.
You've entangled them Exactly.
So it's just like moving yourspaghetti a little bit off to
the side and you're like it'sstill all tangled together,
hiding it in another file.
(14:15):
Yeah, yeah, you don't want that.
That makes a lot of sense.
Speaker 3 (14:20):
I kind of think I can
make a case for both, Like
sometimes you just want a bigslice of spaghetti.
Speaker 2 (14:28):
I was going to say I
love Italian.
Speaker 3 (14:32):
But I think again, it
always boils down to this is
the work of the people, rightTrying to apply blanket rules.
Speaker 1 (14:40):
Even with myself.
Speaker 3 (14:40):
I find myself doing
it.
I'm like I always do this.
I'm like, why do I always dothis when I can?
This could just be a methodhere, and sometimes I will feel
the need to like, oh, I can justextract that and that's.
You know, the concept.
There is this, but it's likeknowing it's having that feeling
of when the concept deservesthat special treatment rather
than it just being.
(15:01):
There's absolutely nothingwrong with a couple of methods
within a class.
That's the judgment that you'reapplying.
Speaker 2 (15:08):
And that's like I
don't fully understand the end
goal yet, so I got to put itsomewhere for now and then I
might figure it out six monthslater, actually, where it needs
to be organized.
But it's okay.
Speaker 3 (15:21):
The spaghetti is
still boiling yeah.
If you want to stretch andcompletely destroy this metaphor
and then eventually to stretchand completely destroy this
metaphor.
Speaker 2 (15:29):
let's do that, and
then eventually it's underneath
the chicken parmesan.
Speaker 3 (15:35):
And it's cold, and it
moves its arm Bye.
Speaker 1 (15:36):
So, we only have
today left because it's a
two-day conference.
Is there anything that you guysare hoping to do, see anyone
that you haven't met yet thatyou're like?
I want to make sure on day twoat some point today?
Speaker 3 (15:57):
I'm going to meet.
I really wish that was the case, but yesterday I was just like,
is so-and-so here?
And they were like, yeah, theywere here all day.
I saw them several times.
It's just a really bigconference.
It is a very big conference.
Speaker 2 (16:10):
It is.
Speaker 3 (16:11):
And so for me it's
just like I've been coming to
these sorts of things for awhile and so I know a bunch of
people either well or somewhat,or say hi to or just know them
from the internet, and I'm justlike I've sort of let myself
know that it's okay that there'sgoing to be some folks who I
like and who I've chatted withbefore and who I'm just not
(16:33):
going to have the time to see orI'm just not physically going
to be in the same room at thesame time, because there's like
five or six different areas,right.
It's kind of like a you go to amusic festival with your
friends and then you don't seethem because you get lost on the
way to the bathroom.
Speaker 1 (16:48):
Everyone's doing
something different.
Speaker 2 (16:54):
Chris, you got
anything on your list?
No, I think I'll end up in thehallway.
I will aim to get lunch todayagain.
That's my main goal.
Speaker 1 (17:03):
Got to eat, got to
eat.
Speaker 2 (17:04):
Keep energized
because same thing.
But I always get very swampedat these, which is great because
I get to meet all these peoplewho have watched Go Rails or
used Hatchbox or Jumpstart orsomething that I may not ever
get to talk to them online or weonly have a brief thing over
email or something, and so it'sso awesome to put faces to names
(17:27):
and meet people in person.
So I just like we'll post up inthe hallway somewhere, make it
five feet, end up talking tofive more people, make it
another five feet, and just keepdoing that until, uh, until
you're at the lunch table or,like last year, until the lunch
is being taken away, you're justgrabbing it on the way out.
Speaker 1 (17:48):
Yeah, yeah, alan,
what do you got on your agenda?
Speaker 4 (17:52):
I'm really looking
forward to Robbie yelling at us
about TechNet.
Okay.
Speaker 1 (17:57):
Robbie will fall on
TechNet.
All right, is everyone makingit to the Shopify after party?
Speaker 4 (18:02):
Yeah, at Shopify
headquarters, toby's house, it's
Toby's house.
Speaker 1 (18:07):
Shopify headquarters
Toby's house Same basic concept.
Speaker 3 (18:10):
We're all in.
Speaker 1 (18:11):
Toby's house now,
yeah, I guess.
Speaker 2 (18:12):
Alan, are you?
Speaker 1 (18:13):
making it tonight.
I've got a flight.
Oh my God.
Well, at least we're getting tosee you now Getting to spend
time.
Anything else springing outthat we want to make sure
everyone who isn't here ishaving super FOMO about they
should be here.
They should be here, you'reright, but it is incredibly
difficult to get a ticket, sonot everybody could make it All
(18:36):
right, cool.
Well, thanks for coming on.
Guys Appreciate it.
Enjoy.
Enjoy your day, too Cool.