I had been planning to kick start the mini project of renaming Perl6 to Raku on the official website of “Perl Weekly Challenge”. And the side project to this, shouldn’t it be called “The Weekly Challenge - Perl & Raku”? This is sticky area and needed more time to go through various aspects. Renaming project wasn’t too difficult to deal with but I was looking for some FREE time to do it properly.

What better time do it during the Christmas and New Year break. Unfortunately my whole family was fighting with Flu one by one all through the holiday. Whatever little time, I had was taken by routine task for running “Perl Weekly Challenge”. In short, I couldn’t do it during the break as planned. So where am I now? Well I took whole day Saturday (4th) and night Sunday (5th) (I know I am breaking my new year resolution of not doing late nights). It had to be done before I am back to my daily work routine.

So what exactly was required?

I was more focussed on the Charts where the term Perl5 and Perl6 was all over the places. Since it was driven by the data generated by a very complex parser I wrote sometimes ago, I had to make sure while changing the text, I don’t create issue with the number generation. It was a big challenge. In fact, I was using 3 different parsers, one for Leader board, second for Team members overall stats and the third (most important) for handling weekly contributions (current and past).

I don’t know about others but every time, I revisit my old code, I found too many design issues in my own code and doubt my ability of thinking straight. I questioned few design decisions in my old parser but couldn’t get convincing answer. So decided to scrap and start fresh. The motto was to keep it simple and easy to maintain. It didn’t took long to get the fundamentals ready. The code looked lot cleaner and readable. Thanks to the use of CPAN module File::Iterator. In the design, I kept the room to accommodate the other two parsers. So that I have only parser to maintain at the end of the day. There was one sticky issue I came across though. Sometimes member submits solutions to the past week challenges. It was very important that the design should be able to handle this without any issue. In the past, I would generate the entire stats to be consistent with number. I decided it wasn’t ideal to re-generate the stats of the week untouched. The new design handled such use case very nicely. I can now tell the parser to only re-generate the stats where new changes came in and leave everything else untouched. This is a big improvement, in my opinion. It was much faster than before.

It was time to move on to Leader board parser. My initial thought, it would be straight forward to port to new design. But life is never so simple as you expect it to be. The first run gave me garbage data back and it was getting darker as well with everyone around me coughing. I took short break and gave my brain some rest. After the break and I immmediately found the issue, I was missing the third layer in the computation. The basic structure: first layer (week number), second layer (member) and third layer actual contributions (code and blog). Finally I had matching numbers as in production environment.

Moving on to the last bit, team overall stats in group of 30. I again faced issues with splitting source data. First run, showed 120 members in the first block rather than 30. The other tabs still had 30 each, not sure where they were getting the data. I was now getting into the midnight zone now. The good thing was kids were asleep by now. I turned on TV and put on Indian News showing current political debates. I enjoy it the most and follow the Indian political scenes very closely. It took my attention away for little while to give my brain break. The short break did the trick and I solved the splitting issues in no time.

By now, I have now incorporated all three parsers into one common design pattern. The codes are nicely laid out as well. I loved the final version. I know if I revisit it again in 6 months time, I will definitely find un-answered questions again. For now I was happy with the end result. The Chart page now have Perl and Raku in the right place.

It was time to look any other place where Perl5 or Perl6 still hanging around. I found FAQ page still using the old name. It wasn’t difficult to update. I then found another blog How to contribute? using the old name, so updated that as well. By now, I was confident that I am done as far as this mini project is concerned. Before I made official annoucement, I noticed the README for “Perl Weekly Challenge Club” GitHub profile still using old name. So I fixed that as well.

It was time to announce the changes (02:38 AM, January 5, 2020).