Using ChatGPT to mentor code

I’ve got a sneaking suspicion that a mentor has used ChatGPT to critique my code. I can’t prove it and I may be insulting the mentor by suggesting it. It’s just that the mentoring doesn’t seem to line up with the code and has a strange cadence.

For example:

The use of multiple counters in the WS-COUNTERS group (WS-NUMBER-OF-TRAILING-SPACES, WS-LENGTH-OF-PHRASE, WS-LETTER-COUNT) is a bit confusing. It would be better to use more descriptive names for these counters.

I would have thought that the names were very descriptive.

You are using the INSPECT statement to remove trailing spaces, but then using the SUBTRACT statement to calculate the length of the phrase. This is an unnecessary step and can be simplified by using the INSPECT statement to calculate the length of the phrase.

Well, no, I’m not using INSPECT to remove trailing spaces. INSPECT can’t do that. And the method I’m using to calculate the length of the string is well known.

      * Get length of sentence
          INSPECT WS-PHRASE TALLYING WS-NUMBER-OF-TRAILING-SPACES
            FOR TRAILING SPACE.
          SUBTRACT WS-NUMBER-OF-TRAILING-SPACES 
            FROM LENGTH OF WS-PHRASE 
            GIVING WS-LENGTH-OF-PHRASE.

Similarly,

Instead of using two IF statements to check if the character is not a space and not a dash, you can use one IF statement with a logical OR operator.

I’m not using two IF statements: the code in question is one IF and an AND, viz

              IF WS-PHRASE(WS-TEMP-A:1) NOT = '-' AND
                WS-PHRASE(WS-TEMP-A:1) NOT = SPACE
                ADD 1 TO WS-TEMP-B
                MOVE WS-PHRASE(WS-TEMP-A:1) 
                  TO WS-PHRASE-TEMP(WS-TEMP-B:1)
              END-IF

I just went to ChatGPT and asked it to critique my code. It gave me similar answers again with the strange cadence. The same mentor gave responses to FORTRAN and Crystal exercises but without the oddities described above.

Has anyone else had a similar experience?

I had not had a similar experince but when have I not requested that much mentoring since chatgpt came out.

I can tell you that I never use chatgpt for any of my mentoring. I also belive chat-gpt should not be the main source for mentoring code on exercism. Since a student could use chat-gpt for themself in that case.

Also I have tried to challenge chatgpt with crystal stuff a few times. And it fails horrible, sure it is not simple stuff I give to it, but it gives such an incorrect answer that it should not be trusted for any crystal code.

You can mention exactly what you have mentioned here, without any accusation. And you might ask questions about the mentoring, since some mentors are mentoring to aid in their learning.

Hopefully all are, but I would assume that push back on suggestions and asking for clarification on the mentoring is always suitable.

You might even mention your prior experience with their mentoring in other languages, and that it was positive, if it was. It will hopefully keep the tone friendly, and hopefully will give the mentor the guidance they need to improve.