Skip to content

Week 11: Finalizing the activities

Thursday, 8 September 2022 | Samarth Raj


Current progress

The coding period is coming to an end in a few weeks, and this is the time for complete devotion towards making the activity ready to be merged. The visual representation of the activity is close to completion, and the working of a few parts is left. The implementation of the idea is improved significantly with the help of mentors. One thing I learned when implementing something in the code is that the activity should be “scalable” for the future. It should adapt to the requirements.

In sub-activity 2, the representation is now done using “repeater.” Initially, it was three separate blocks of the same component which wasn’t the most effective way. The dataset in sub-activity one is modified. Now the dataset is more adaptable to adding new levels, and the calculation of the number of levels is more efficient than in the previous implementation. The dataset has three options, options 1 and 2 have two levels each, and 3rd option has three levels. In the first option, the user would have to find the 10’s complement of a number greater than five and the 10’s complement of a number smaller than 5 for the second option. The third option is the combination of the first and second. When all the options are selected, sub-activity 1 consists of 7 levels.

Challenges Faced and learnings

One major challenge I faced, and it was one of the most fruitful learning too, was using a repeater for display. Although there was an “easy” implementation for it, too, mentors said I could do it using it anyway. I thought to attempt to do it the “best” way first, and if I’m unable to do it, I will do it the brute force way, which is not very ideal for scalability but fulfills the purpose. 

To understand the implementation of “repeater,” I read the official documentation, understood very little, and then watched 1-2 youtube videos and saw some current implementation of the “repeater.” in “analog electricity” and “categorization” activities. Then I started implementing initially, which was difficult, but eventually, I could implement repeater.

I made a few mistakes while implementing it, but my mentors helped me correct them.

And another very useful thing I learned is when we populate the array with values, we should always add only the required values in them. In the previous implementation, I was first adding decoy values and later modified them to suitable values, which is not the correct way.

What’s next?

  • Clean up the code for all three activities, and make it ready to merge.
  • Resolve all the open comments on the merge request.
  • Briefly test the activities and check the room for improvement.