exercism/perl5

What was it like to learn Perl 5?

ErikSchierboom opened this issue · 4 comments

We’ve recently started a project to find the best way to design our tracks, in order to optimize the learning experience of students.

As a first step, we’ll be examining the ways in which languages are unique and the ways in which they are similar. For this, we’d really like to use the knowledge of everyone involved in the Exercism community (students, mentors, maintainers) to answer the following questions:

  1. How was your experience learning Perl 5? What was helpful while learning Perl 5? What did you struggle with? How did you tackle problems?
  2. In what ways did Perl 5 differ from other languages you knew at the time? What was hard to learn? What did you have to unlearn? What syntax did you have to remap? What concepts carried over nicely?

Could you spare 5 minutes to help us by answering these questions? It would greatly help us improve the experience students have learning Perl 5 :)

Note: this issue is not meant as a discussion, just as a place for people to post their own, personal experiences.

Want to keep your thoughts private but still help? Feel free to email me at erik@exercism.io

Thank you!

As a very experienced Perl developer, I can share my experience, not learning so much, but checking my knowledge and practicing.
This might apply to other language tracks as well: one of the difficulties in solving the problems was when there was no "get started" file for the solution, and the interface required was not obvious. It then takes enough knowledge to parse out the test files to see what classes / methods they expect. With my experience, I could do that, but I imagine it might stop people trying to learn. On the other hand, it's kind of like a lot of real-world programming experience - I just don't know if that's what your aim is :-)
The other thing was a couple of exercises (Phone Number stands out!) where the test was written in such a way as to require very specific diagnostics. The problem expressed in the README could be solved in a few minutes, but then it was very trying to come up with all the failure modes and messages the test expected. Unless the problem is specifically to provide complete diagnostics for invalid cases, this is problematic at best. The test for the particular problem mentioned practically dictated the implementation, which a good test should never do.

When I said I was looking at Perl and asked for tips, I was told that scalar and list contexts would be a very important concept. I don't recall how much I used the concept when I was working through the Exercism Perl 5 track.

I had trouble with:

How to differentiate between arrays and array references.
How to differentiate between hashes and hash references.

Perl 5 was my first language, and I picked it up on the job doing snippets of code within templates.

Referencing was something that took me a while to grasp, and contextual sigil changes still trip me up now and then to this day (although switching between Perl 5 and 6 may be responsible for that in part).

Perl 5 has a selection of interesting features accessible via the use feature pragma, which a fair few people sadly seem to miss (there was recently an article about Perl 5 which mentioned a lack of signatures, despite it being a feature available in the language for the past 5 years).

The biggest boost I had with learning Perl was completing the training courses at http://geekuni.com/

@dmaestro I'm intending to get all exercises on this track updated to have stubs provided to learners with all the necessary subs predefined. Hopefully it won't take too long to have them all sorted out!

We're closing this issue as it was part of our research for the v3 version of Exercism which has just been released.

Thanks everyone for chipping in! It has been greatly appreciated.