librelist archives

« back to archive

nitpicking advice for anagram

nitpicking advice for anagram

From:
David Rueck
Date:
2013-12-16 @ 22:51
Hi All,

I've come across a bunch of solutions to the anagram problem in Ruby,
JavaScript and Elixir, and many people's solutions aren't taking advantage
of the fact that comparing the sorted characters in two strings will tell
you if they are anagrams.

I'm curious what you all think is the best way to give feedback on a
solution that uses a much more complex way of determining if words are
anagrams?

Do I just tell the person about the sorting characters method, or do I just
ask them if they can think of a simpler way to do it and let them try to
figure it out?

I know in one case I just kept going back and telling this one person there
was a simpler way and they kept coming up with clever and progressively
simpler methods that were all interesting, but none was as simple as the
sorting the characters version. Eventually I just told them and it was a
crazy aha moment. Since then I've just been telling people, but I don't
know if that's the right way to go about it.

What do you all think?

-David

Re: [exercism] nitpicking advice for anagram

From:
Mark Wotton
Date:
2013-12-17 @ 01:26
I think they probably got way more benefit out of just knowing that a
simpler method was possible. If you tell them before they've struggled with
it a bit, you're robbing them of that aha moment.

cheers
Mark


On Tue, Dec 17, 2013 at 9:51 AM, David Rueck <drueck@gmail.com> wrote:

> Hi All,
>
> I've come across a bunch of solutions to the anagram problem in Ruby,
> JavaScript and Elixir, and many people's solutions aren't taking advantage
> of the fact that comparing the sorted characters in two strings will tell
> you if they are anagrams.
>
> I'm curious what you all think is the best way to give feedback on a
> solution that uses a much more complex way of determining if words are
> anagrams?
>
> Do I just tell the person about the sorting characters method, or do I
> just ask them if they can think of a simpler way to do it and let them try
> to figure it out?
>
> I know in one case I just kept going back and telling this one person
> there was a simpler way and they kept coming up with clever and
> progressively simpler methods that were all interesting, but none was as
> simple as the sorting the characters version. Eventually I just told them
> and it was a crazy aha moment. Since then I've just been telling people,
> but I don't know if that's the right way to go about it.
>
> What do you all think?
>
> -David
>



-- 
A UNIX signature isn't a return address, it's the ASCII equivalent of a
black velvet clown painting. It's a rectangle of carets surrounding a
quote from a literary giant of weeniedom like Heinlein or Dr. Who.
        -- Chris Maeda

Re: [exercism] nitpicking advice for anagram

From:
David Rueck
Date:
2013-12-17 @ 01:37
Cool, thanks for your thoughts, Mark.

-David


On Mon, Dec 16, 2013 at 5:26 PM, Mark Wotton <mwotton@gmail.com> wrote:

> I think they probably got way more benefit out of just knowing that a
> simpler method was possible. If you tell them before they've struggled with
> it a bit, you're robbing them of that aha moment.
>
> cheers
> Mark
>
>
> On Tue, Dec 17, 2013 at 9:51 AM, David Rueck <drueck@gmail.com> wrote:
>
>> Hi All,
>>
>> I've come across a bunch of solutions to the anagram problem in Ruby,
>> JavaScript and Elixir, and many people's solutions aren't taking advantage
>> of the fact that comparing the sorted characters in two strings will tell
>> you if they are anagrams.
>>
>> I'm curious what you all think is the best way to give feedback on a
>> solution that uses a much more complex way of determining if words are
>> anagrams?
>>
>> Do I just tell the person about the sorting characters method, or do I
>> just ask them if they can think of a simpler way to do it and let them try
>> to figure it out?
>>
>> I know in one case I just kept going back and telling this one person
>> there was a simpler way and they kept coming up with clever and
>> progressively simpler methods that were all interesting, but none was as
>> simple as the sorting the characters version. Eventually I just told them
>> and it was a crazy aha moment. Since then I've just been telling people,
>> but I don't know if that's the right way to go about it.
>>
>> What do you all think?
>>
>> -David
>>
>
>
>
> --
> A UNIX signature isn't a return address, it's the ASCII equivalent of a
> black velvet clown painting. It's a rectangle of carets surrounding a
> quote from a literary giant of weeniedom like Heinlein or Dr. Who.
>         -- Chris Maeda
>

Re: [exercism] nitpicking advice for anagram

From:
Katrina Owen
Date:
2013-12-17 @ 13:45
Hi,

On 12/16, David Rueck wrote:
> Do I just tell the person about the sorting characters method, or do I just
> ask them if they can think of a simpler way to do it and let them try to
> figure it out?

I've been trying really, really hard to learn how to ask good leading
questions.

It's not necessarily that I always have *the* answer, but I get really
excited about some point, and then I often end up blurting it out, and
the other person doesn't have a chance to chew on it. If I give it to
them, they don't own it. If they struggle a bit and have an AHA moment,
they truly own that concept and will apply it across a much more broad
set of situations.

So far I'm kind of terrible at it, but I think that it's one of the most
important things that I can improve about how I give feedback.

Katrina

Re: [exercism] nitpicking advice for anagram

From:
Date:
2013-12-17 @ 14:02
I agree with both of Mark’s comments.  I’ve had situations where I’ve had 
a solution in mind that I thought was simpler, and I tried to guide the 
participant towards that solution.  We’ve had some good discussions, and 
I’ve seen some good stuff as the person goes through their own discovery.
Sometimes I learned stuff along the way.  Other times I’ve had someone try
to lead me in a direction that I disagreed with.  In the spirit of 
exploration I would go down that path, but still not quite get where they 
were trying to lead me.

I think it all comes down to that exploration aspect.  Both sides are 
trying to explore the exercise and possible solutions.  That’s what makes 
this so special, too.

~Barrett

On Dec 17, 2013, at 7:45 AM, Katrina Owen <_@kytrinyx.com> wrote:

> Hi,
> 
> On 12/16, David Rueck wrote:
>> Do I just tell the person about the sorting characters method, or do I just
>> ask them if they can think of a simpler way to do it and let them try to
>> figure it out?
> 
> I've been trying really, really hard to learn how to ask good leading
> questions.
> 
> It's not necessarily that I always have *the* answer, but I get really
> excited about some point, and then I often end up blurting it out, and
> the other person doesn't have a chance to chew on it. If I give it to
> them, they don't own it. If they struggle a bit and have an AHA moment,
> they truly own that concept and will apply it across a much more broad
> set of situations.
> 
> So far I'm kind of terrible at it, but I think that it's one of the most
> important things that I can improve about how I give feedback.
> 
> Katrina
> 

Re: [exercism] nitpicking advice for anagram

From:
David Rueck
Date:
2013-12-17 @ 18:58
Thank you all for your thoughts on this!

I really appreciate the idea of not automatically assuming that the way I
did it is the inherently best way. The thought that the person whose code
I'm reading could have already considered the method I thought was best and
rejected it for a valid reason is a good thing to keep in mind in
evaluating code in general.

Asking (leading) questions, or just taking the more humble approach seems
like the idea way for both parties to potentially learn the most.

Cool, thank you all very much.

-David





On Tue, Dec 17, 2013 at 6:02 AM, <barrett.clark@mac.com> wrote:

> I agree with both of Mark’s comments.  I’ve had situations where I’ve had
> a solution in mind that I thought was simpler, and I tried to guide the
> participant towards that solution.  We’ve had some good discussions, and
> I’ve seen some good stuff as the person goes through their own discovery.
>  Sometimes I learned stuff along the way.  Other times I’ve had someone try
> to lead me in a direction that I disagreed with.  In the spirit of
> exploration I would go down that path, but still not quite get where they
> were trying to lead me.
>
> I think it all comes down to that exploration aspect.  Both sides are
> trying to explore the exercise and possible solutions.  That’s what makes
> this so special, too.
>
> ~Barrett
>
> On Dec 17, 2013, at 7:45 AM, Katrina Owen <_@kytrinyx.com> wrote:
>
> > Hi,
> >
> > On 12/16, David Rueck wrote:
> >> Do I just tell the person about the sorting characters method, or do I
> just
> >> ask them if they can think of a simpler way to do it and let them try to
> >> figure it out?
> >
> > I've been trying really, really hard to learn how to ask good leading
> > questions.
> >
> > It's not necessarily that I always have *the* answer, but I get really
> > excited about some point, and then I often end up blurting it out, and
> > the other person doesn't have a chance to chew on it. If I give it to
> > them, they don't own it. If they struggle a bit and have an AHA moment,
> > they truly own that concept and will apply it across a much more broad
> > set of situations.
> >
> > So far I'm kind of terrible at it, but I think that it's one of the most
> > important things that I can improve about how I give feedback.
> >
> > Katrina
> >
>
>

Re: [exercism] nitpicking advice for anagram

From:
Henrik Nyh
Date:
2013-12-17 @ 06:21
In a similar situation, I hinted that there was a simpler solution and 
said they were free to ask if they wanted a stronger hint. Leaves it up to
them. 

Skickat från min iPhone

> 16 Dec 2013 kl. 23:51 skrev David Rueck <drueck@gmail.com>:
> 
> Hi All,
> 
> I've come across a bunch of solutions to the anagram problem in Ruby, 
JavaScript and Elixir, and many people's solutions aren't taking advantage
of the fact that comparing the sorted characters in two strings will tell 
you if they are anagrams.
> 
> I'm curious what you all think is the best way to give feedback on a 
solution that uses a much more complex way of determining if words are 
anagrams?
> 
> Do I just tell the person about the sorting characters method, or do I 
just ask them if they can think of a simpler way to do it and let them try
to figure it out?
> 
> I know in one case I just kept going back and telling this one person 
there was a simpler way and they kept coming up with clever and 
progressively simpler methods that were all interesting, but none was as 
simple as the sorting the characters version. Eventually I just told them 
and it was a crazy aha moment. Since then I've just been telling people, 
but I don't know if that's the right way to go about it.
> 
> What do you all think?
> 
> -David

Re: [exercism] nitpicking advice for anagram

From:
Mark IJbema
Date:
2013-12-17 @ 07:23
I think it's best to ask people why they do a certain thing. for instance,
you can generate a histogram containing character counts, and this is more
complex, but actually more performant for long strings. I think the latter
might be a good reason not to sort the word. By going this way you might
both learn something, the submitter that there is an easier solution, and
you that there is a more performant solution. Lots of times when reviewing
I encountered alternatives, which had merits I didn't think of.

Mark


On Mon, Dec 16, 2013 at 11:51 PM, David Rueck <drueck@gmail.com> wrote:

> Hi All,
>
> I've come across a bunch of solutions to the anagram problem in Ruby,
> JavaScript and Elixir, and many people's solutions aren't taking advantage
> of the fact that comparing the sorted characters in two strings will tell
> you if they are anagrams.
>
> I'm curious what you all think is the best way to give feedback on a
> solution that uses a much more complex way of determining if words are
> anagrams?
>
> Do I just tell the person about the sorting characters method, or do I
> just ask them if they can think of a simpler way to do it and let them try
> to figure it out?
>
> I know in one case I just kept going back and telling this one person
> there was a simpler way and they kept coming up with clever and
> progressively simpler methods that were all interesting, but none was as
> simple as the sorting the characters version. Eventually I just told them
> and it was a crazy aha moment. Since then I've just been telling people,
> but I don't know if that's the right way to go about it.
>
> What do you all think?
>
> -David
>

Re: [exercism] nitpicking advice for anagram

From:
Henrik Nyh
Date:
2013-12-17 @ 07:43
That's a good point, Mark. I try to phrase feedback as "did you consider
x", not "you should do x". Gives the other person an opportunity to explain
that they did consider and reject it, for example.


On Tue, Dec 17, 2013 at 8:23 AM, Mark IJbema <markijbema@gmail.com> wrote:

> I think it's best to ask people why they do a certain thing. for instance,
> you can generate a histogram containing character counts, and this is more
> complex, but actually more performant for long strings. I think the latter
> might be a good reason not to sort the word. By going this way you might
> both learn something, the submitter that there is an easier solution, and
> you that there is a more performant solution. Lots of times when reviewing
> I encountered alternatives, which had merits I didn't think of.
>
> Mark
>
>
> On Mon, Dec 16, 2013 at 11:51 PM, David Rueck <drueck@gmail.com> wrote:
>
>> Hi All,
>>
>> I've come across a bunch of solutions to the anagram problem in Ruby,
>> JavaScript and Elixir, and many people's solutions aren't taking advantage
>> of the fact that comparing the sorted characters in two strings will tell
>> you if they are anagrams.
>>
>> I'm curious what you all think is the best way to give feedback on a
>> solution that uses a much more complex way of determining if words are
>> anagrams?
>>
>> Do I just tell the person about the sorting characters method, or do I
>> just ask them if they can think of a simpler way to do it and let them try
>> to figure it out?
>>
>> I know in one case I just kept going back and telling this one person
>> there was a simpler way and they kept coming up with clever and
>> progressively simpler methods that were all interesting, but none was as
>> simple as the sorting the characters version. Eventually I just told them
>> and it was a crazy aha moment. Since then I've just been telling people,
>> but I don't know if that's the right way to go about it.
>>
>> What do you all think?
>>
>> -David
>>
>
>