00:00:18.860
okay so my name is Ida hee and I want to
00:00:22.320
talk to you today a little bit about
00:00:24.800
refactoring yeah right that's that's
00:00:31.770
kind of kind of how I feel about it too
00:00:35.520
so I feel like when it comes to
00:00:38.940
refactoring there's two camps you either
00:00:41.790
love it or you hate it or you might be a
00:00:44.879
little bit like me and fall somewhere in
00:00:46.589
between so I've only been programming
00:00:50.519
for about a year and I've been working
00:00:52.350
with Ruby and I love it but when it
00:00:54.809
comes to refactoring I have mixed
00:00:56.729
emotions so usually for me I'm not as
00:01:00.659
good of a developer as I want to be that
00:01:03.210
I can refactor my own code usually what
00:01:05.309
happens is I show my code to someone yes
00:01:09.210
and then they turn it into something way
00:01:13.440
more concise and clearer and sometimes
00:01:18.990
sometimes even elegant and on the one
00:01:24.060
hand this is really really magical to
00:01:28.380
see that transform and see your code get
00:01:31.440
turned into something so beautiful well
00:01:34.070
so magical but we're developers which
00:01:38.400
means that there's an inherent element
00:01:40.350
of self-loathing and self-deprecation
00:01:43.040
right when someone else can turn your
00:01:46.200
code into something so beautiful I don't
00:01:48.360
know about you but for me I just can't
00:01:51.270
help thinking oh my god why did my code
00:01:53.790
not look like that to begin with so I
00:01:57.060
just I want my code to be that elegant
00:02:00.240
to start with and it's really hard for
00:02:02.970
me to accept that that's just not how
00:02:05.130
refactoring works and I've come to
00:02:08.700
realize that there are lots of different
00:02:11.370
types of refactoring and there's one
00:02:13.200
type of refactoring that all of us do in
00:02:14.909
this room despite whatever our skill
00:02:17.640
level might be and this is a ruby
00:02:19.800
conference so you know probably where
00:02:21.749
I'm going with this yes I'm talking
00:02:23.790
about self
00:02:26.800
self-right the context that you're in
00:02:30.110
the receiver of whatever message you're
00:02:33.560
sending it and the really amazing thing
00:02:36.860
about self and the amazing thing about
00:02:38.720
ruby is that you can't always see it
00:02:42.230
it's implicit but it's always around so
00:02:47.690
when we're refactoring our code it's our
00:02:50.629
code that's the receiver of our
00:02:52.190
refactoring it's our code that's
00:02:53.599
transforming but what about when we're
00:02:56.510
refactoring self what is self I know I
00:03:00.049
love that question I ask myself that all
00:03:01.819
the time
00:03:02.269
so what is self when we're factoring
00:03:05.660
self well in our quest to be better
00:03:09.230
developers there's one thing we all do
00:03:11.959
right
00:03:12.500
we keep on learning in fact that's
00:03:15.349
probably what brought most of us here
00:03:17.239
today we thought we'll learn new tips
00:03:19.970
and tricks and skills and technologies
00:03:22.430
and we'll add them to our tool belt of
00:03:24.379
knowledge and then we'll go back and
00:03:26.660
we'll look at our code and it'll be
00:03:27.950
magical and it'll just look so great
00:03:29.900
because we'll take all those new things
00:03:31.609
we learn and implement them we're always
00:03:34.190
striving to improve self we're iterating
00:03:36.470
on self we want to be better we want to
00:03:41.690
strive towards our perfect iteration of
00:03:44.690
self but here's the thing
00:03:47.060
just like with code you're never really
00:03:50.000
gonna be satisfied right you're gonna
00:03:52.790
keep going towards your perfect
00:03:54.500
iteration of self but you're never
00:03:55.970
really gonna get there but what do we do
00:03:58.790
with code we ship imperfect code all the
00:04:01.849
time all the time and we do the same
00:04:07.519
thing as developers right we show up
00:04:09.530
with our imperfect selves and our
00:04:12.079
imperfect code and we keep trying to be
00:04:15.019
better so one of the things that I've
00:04:19.459
realized is that the way that we
00:04:21.889
approach code is the same way that we
00:04:23.539
should approach ourselves as developers
00:04:26.380
we have to keep striving to be better
00:04:28.669
and keep iterating and deploy fast
00:04:31.880
deploy quickly make tweaks but then
00:04:35.479
accept the fact that you're never gonna
00:04:37.849
really get where you want to be but that
00:04:39.910
shouldn't stop you so now when I do
00:04:42.850
something like right the entire group by
00:04:45.310
method without knowing that the group by
00:04:46.840
method exists I actually get motivated
00:04:50.170
because then I see somebody refactor my
00:04:52.180
code and then I remember that
00:04:53.970
I'm just iterating I'm learning and I'm
00:04:57.340
getting to the point where one day I'll
00:04:59.140
also be as good of a developer as they
00:05:01.060
are and even though I might not be
00:05:04.060
refactoring my code as well as I want to
00:05:06.340
there is one thing that I'm refectory
00:05:09.420
myself and honestly refactoring of self
00:05:13.870
is probably the most important type of
00:05:15.520
refactoring that any of us can do thank
00:05:18.250
you