Re: [testdrivendevelopment] "I think the community needs more explicit direction...."

"Charles Gallo" <[email protected]> Mon, 25 Nov 2019 11:40:33 -0500
Newsgroups gmane.comp.programming.test-driven-development
Message-ID <[email protected]>
I will say it is so good to see so many of the =E2=80=9Cold names=E2=80=9D =
here.

I remember the old SD Mag form on CIS, and then it going to the web. Is th=
ere any place like that today? I feel like I have no place where I can talk=
 with folks to kick things around=20

=E2=80=94
Charlie
73 de KG2V

> On Nov 25, 2019, at 11:11 AM, Charlie Poole <[email protected]> wro=
te:
>=20
> =EF=BB=BFHi Frank,
>=20
> Interesting thoughts. I have noticed the problem but thought it might
> just be my own attitudes as I get older!
>=20
> As I think about it, folks of my generation had to climb a very steep
> learning curve just to write our first programs. I learned about
> refactoring back in the 90s, by which time it seemed like a way to
> make my work easier, not harder. The same was true for all the XP
> practices at the time... but times have changed.
>=20
> One thought on teaching this stuff... use at least some commonly
> reversible refactorings. For example... convert to method vs convert
> call to inline code. I talk about "forces" in this context, in the
> same way I teach architectural patterns. In different contexts, the
> forces want to resolve in different ways. When I make __choosing__ the
> refactoring seem more intellectually challenging than doing it ('cause
> it is!) I find that at least some folks start paying attention.
>=20
> Another think I believe strongly is that folks should learn
> refactoring first __without__ tooling to do it for them. Once they do
> a few of them by hand, particularly if they are wide-ranging in the
> code, they end up with a better understanding about what the tool
> needs to do. This also gives the opportunity to talk about how the
> presence of tooling changes the balance of the above forces. They also
> need to learn about the danger of limiting oneself to only those
> refactorings supported by the IDE.
>=20
> Charlie
>=20
>> On Mon, Nov 25, 2019 at 1:59 AM Frank Carver via Groups.Io
>> <[email protected]> wrote:
>>=20
>> I teach programming at the local university and have found that one of =
the biggest mental blocks which students need to overcome is the assumption=
 that there is only one way to solve any problem, and that the job of a pro=
grammer is to find that way.
>>=20
>> This mindset makes it really hard to teach refactoring, particularly in=
 the context of eager new practitioners of TDD who want to rush on to the n=
ext test as soon as the first one passes.
>>=20
>> I'm not sure where this attitude comes from. Perhaps the way that progr=
amming and/or software development has been reframed as "coding", and the i=
mplications of the name, or maybe that first experiences in the field often=
 come from poking at HTML and CSS with a stick to get something that looks =
right, and then copy/pasting a bit of Javascript or PHP to make something h=
appen, or perhaps the prevalence of fill-in-the blanks frameworks, or perha=
ps that so many students prefer to learn by following a linear set of steps=
 from YouTube, Who knows
>>=20
>> I'd love to investigate this in more detail, as I too, can see how much=
 new developers struggle with the concept and skills of refactoring.
>>=20
>> If it helps, I have found that I get slightly better traction if I lead=
 with the idea of "code smells."
>>=20
>> Frank Carver
>>=20
>=20
>=20
>=20


-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#35770): https://groups.io/g/testdrivendevelopment/mess=
age/35770
Mute This Topic: https://groups.io/mt/61850834/3268755
Group Owner: [email protected]
Unsubscribe: https://groups.io/g/testdrivendevelopment/leave/6156322/74455=
6386/xyzzy  [[email protected]]
-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-