What I did
This week I fixed two bugs that I found after opening the Special:Drilldown after a long time. When I deleted some database tables, Cargo’s drilldown feature faced some errors. Cargo code didn’t expect that user might delete tables directly from the SQL. Rather it was expected that user will use CargoDeleteCargoTable feature page of the extension.
At the beginning, I thought that the Special:Drilldown page is experiencing errors due to some of my code that got merged. Then, I went through my back trace of the error understand where it has gone wrong. Realizing what caused the error, I rushed to inform my mentor that Drilldown isn’t working as I had deleted some tables explicitly. I conveyed this, as it was my fault :( . But Yaron’s reply was pretty motivating: “This sounds like a bug”. “Phew”, I relaxed. Now knowing what the issue was due to a bug, I could focus on how to improve the code.
Due to the similar cause of deleting the table explicitly, CargoRecreatdata.php showed fatal error while recreating data for a table whose template is deleted.
The rest of the week, I spent in understanding existing code structure for Cargo query commands, which is appeared complex. It was like learning how the Cargo’s own SQL-like wrappers are working. At the end, I had started designing the control flow of handling “WITHIN” command. As I had already implemented a short ‘proof of concept’ for most of the difficult objectives, my task was reduced on figuring out a good design so that I could place my code within the existing code.
What I learnt
I learnt that even the good codes have bugs. One should always inspect his own code thoroughly, but the possibility of bugs in existing code should not be ruled out. To achieve a small goal, there will always be some other problems that will be related and which will be required to be solved before you can proceed further. Don’t be impatient and never hesitate to solve them.
Tip to future myself (and anyone else reading this post)
“Code written by anyone can have bugs, don’t think it’s always your fault… And even if it is yours this time, you can always correct them. [Unless your bug crashed a plane :( ]”comments powered by Disqus