What I did
Finally, I completed the patches for Special:CreateTemplate and Special:CreateClass and got them merged into the master. This marked the end of the mere basics of the project. Now everything was “almost” working :D
The hierarchy structure input was not yet been validated and was on my to do for a long time. The validation rules required some discussions and many rules required to be changed again and again during code reviews.
I also completed the first iteration of the documentation. The requirement for the Special:Drilldown page enhanced and it was required to hide node with 0 matched counts and define a LocalSetting parameter $wgCargoMaxVisibleHierarchyDrilldownValues which sets an upper limit on the number of values printed in the filter line of the hierarchy. The other was about making the drilldown behaviour - truly a ‘drill down’ in case of hierarchy fields. By truly ‘drill down’, I mean to say, when a value is clicked upon in the hierarchy filter, the next page should come up with filter line consisting of only children values of the clicked value and the value itself.
It looked like everything was in place but there were some more corner cases to take care of. So I created a template with a total of six fields. Two were hierarchy fields holding a single value, other two were hierarchy fields holding a list of values, one holding non-hierarchy single values and the last one holding non-hierarchy list of values. During testing, I found some bugs in case of SQL queries. Fixed them. There was another issue of multiple filters not getting applied, which I fixed successfully.
Later I realized, during the early stage of development I had written the parsing code to be dependent on the order of “hierarchy” keyword in the template definition. I discussed with my mentor and concluded that it needs to be fixed. I fixed this and some other bugs that were found by Yaron that week.
What I learnt
Creating a software that is perfect in the first iteration is impossible. There will always be some aspects which will be missed. I realized that I had already done all the project in 4 iterations.
- Planning and discussion - (I read about approaches, discussed them and documented)
- Implementing the ‘Proof of Concept’
- Building a minimum viable product
- Improvising it to meet the needs
Tips to future myself (and anyone else reading this post)
“Strive to create a minimum viable product in the least time, it will buy you time to perfect your work. Some times you need more than one iteration to get the picture of what you are doing, and then you are in a state where you understand all the dots and can improve.”comments powered by Disqus