The journey of solving an Elixir exercise on Exercism and how that led me to look beyond the impostor syndrome
Recently, I got back to learning Elixir from where I had last left off earlier this year. One of the goals that I had in mind with respect to learning this language was to get a good understanding of the various functional concepts around the language like pattern matching etc., by actually solving problems so that I could internalise those concepts better. Being someone who believes a lot in learning by doing, I chose Exercism as the primary way to learn Elixir.

Given that I had previously solved a few Exercism exercises in Elixir already, I wanted to carefully chose the next exercise that I wanted to solve based on concepts I wanted to better understand. After finding this very useful discussion around the Elixir exercism track on github, I chose to work on the sublist exercise as I wanted to get a better understanding of how one can use concepts like pattern matching, recursion and lists in Elixir .

The Journey
I took a step by step approach to solve the exercise by writing the most shameless code that makes each test pass with the hope to see more light towards the end of the tunnel. I soon started with using recursion to fix one of the test cases as you can see here .

Things seemed to be going smoothly as I was fixing more tests, one step at a time. In order to handle more failing test cases the code underwent further changes that even included things like the removal of recursion as you can see here. Now came the challenge of fixing some of the more difficult test cases!
Fixing the ‘Huge sublist not in huge list’ related test
Attempt 1: I initially made an attempt to fix this test using MapSet’s subset?/2 method as part of the solution present here. This solution was able to fix this and all the other test cases for the sublist exercise except recurring values unequal
related test since Mapset’s subset function does not take into account order or duplicated items.
Attempt 2: This is when I attempted to approach this differently by trying to find the difference between two lists through this solution. This didn’t work for at least therecurring values unequal
related test case(because in Elixir it finds the difference between the lists on a per element basis and not against the entire list as a whole) and running the huge sublist not in huge list
related test via this approach took so long for me that I decided to move on.
#Elixir calculates difference between lists on a per element basis
iex(10)> [1,2,3,1,2,3,2,3,2,1] -- [1,2,1,2,3]
[3, 2, 3, 2, 1]
After two attempts of not being able to get all tests passing, a feeling of being stuck kicked in.

After a while, I thought it’s time I start looking at other people’s solutions for this exercise. The way I went about approaching this was, I started looking at the conversations around some of the solutions that were submitted by others. I soon stumbled across one such solution where another person was stuck at the same ‘huge sublist not in huge list’ related test related test case as I was and that got me more interested!

Looking Beyond Impostor Syndrome
A. Reflections

After reading the whole conversation around that solution, what I realized is that’s it’s completely okay to get stuck when solving something or even learning something like a new programming language and you don’t necessarily have to single out yourself as being the only one who is stuck on a given problem. It wasn’t until I started writing this post that made me realize that I was having the feeling of some kind of impostor syndrome. As I look back, I’m glad that feeling faded away soon and it made me think about certain things beyond impostor syndrome like:
- Have you honestly tried fixing things yourself so that you know what approach you’ve taken to working on a given thing?
- Have you found ways to get unstuck and also have you been fast enough at getting unstuck so that you could keep moving forward?
- Have you identified the missing gaps between your thought process and that of others? Something new that you could possibly use next time around when working on something similar in the future ?
- It’s completely ok to go ahead and ask for hints on Exercism and may be even otherwise when trying to solve a given problem, that definitely can give you a better idea to think in the right direction when working towards a solution. This made me realise, this is also what sometimes people end up doing in interviews and that isn’t considered a bad thing at all! I wasn’t even thinking about doing things this way but this whole experience just opened my mind to more ways of finding one’s way around the constant roadblocks that we face in life from time to time.
- Every beginner would know less than what other people know and we simply need to embrace that. After looking up more thoughts around Impostor Syndrome , I came across Alicia Liu’s insightful post on You don’t have Impostor Syndrome and I could relate a lot to her below quote in that post which said:
Learning to program is hard, as is learning to do anything worthwhile when you’re just starting out. — Alicia Liu
This diagram below by Alicia Liu conveys the same point really well -

B. My Learnings from solving this Exercise
Apart from thinking about the things mentioned above, I’ve had a lot of learnings not only around many of the different concepts of the Elixir language but also some learnings that can be applied towards being a better programmer in general. I’ve attempted to mention these learnings through conversations around each iteration of the sublist exercise starting from the one here. These learnings have been key takeaways for me.
This wouldn’t be possible without the meaningful conversations around this exercise thanks to Rasmus Larsson, Henrik Nyh, Lennart Fridén, Stefan Bauer and Aaron Bull Schaefer, as they went about passionately discussing how they could improve each of their solutions through a varying number of comments around different iterations of the Sublist exercise.
Closing Thoughts
I’m grateful to the work that Katrina Owen and so many other contributors have put in to make Exercism what it is today and for their continued work towards trying to make it better as part of Nextercism. Although I’m attempting a given problem around 3 years after when it was solved by the folks mentioned above whose conversations I’ve greatly benefitted from, my learning still feels very collaborative and exciting! It gives me something to look forward each time I pick up a new exercise I have to solve. The conversations around Exercism have been of great value!
I started off on a journey to get better at Elixir through this exercise but the learning on how this platform can help you be a better programmer in general through the insightful conversations that people have around each solution is a feeling beyond words as it resonates within me as a thought of getting mentored in it’s own way as one embarks on the quest of getting better at their craft.
Looking back at the whole experience, I’m thankful to many other people and although I may not be able to thank all of them separately, I’d like to start by also thanking those people who were involved in this github discussion that led me to pick the Sublist Exercise. I think it takes a lot of effort for someone to prepare that list and I’m thankful to Devon Estes for coming up with that list to help us better choose what kind of Exercism exercises we’d like to pick up based on the concepts we’d like to learn.
I’m thankful to those people who were courageous enough to say I’m stuck and I’m looking for hints as that in turn gave me more courage to look for help by looking for hints on what I could be possibly missing in my solution. I’m also very thankful to the people mentioned above for taking the time out to make such meaningful conversations happen on the Exercism platform. Lastly, I apologise if I have missed mentioning someone in particular that I should have mentioned.
I ended up with 5 iterations of the sublist exercise and with a tonne of learnings(have mentioned my learnings in more detail through comments on the Exercism platform) from just solving one exercise on Exercism. My learnings from the journey of going through each of those iterations is what led to my biggest takeaways. This for me was an instance of Exercism being at it’s best!

I found a lot more than what I had expected at the end of the tunnel and this reminded me that no matter what, keep moving forward! And this also made realise — The Journey is the Reward!
