What does literature got to do with coding?
What does literature has to do with coding? I was looking at the course requirement for those who are interested to take up IT coding course in polytechnic.
The teacher was explaining that literature is a course requirement. Yet, all along I thought it is just maths and logically thinking in order to do well in coding.
It was an use case that I encountered at work that made me realised that literature or rather imagination is another key component to do well in coding.
I have worked on an excel vba coding for my project and it’s near completion. Then my colleague enquired, if it is possible to add a column to further analyse the data.
I looked into the code, to insert the column affects 80% of the code that is already written. Furthermore, there are different developers who had worked on the code. Adding additional column will take up considerable time and effort for the whole team. However, we have many other projects to work on and could not spare the time and resources to accommodate this.
Yet my colleague insisted that the additional column is necessary. To a non coder like my colleague, adding one column is to insert a new column in the existing worksheet, it should be an easy task to do. However, to coders, it entails looking at each line of code and see how it can impact the rest of the codes.
To solve this, I looked into a workaround. In literature, we imagine what we have read and think of the possibilities on how the story can evolve. In coding, everyone will write the codes their way and the code will evolves to how we can make it work.
My workaround was simple. Write a code to remove the additional column before running the automation. Then after the automation has ran, put back the column.
The process flow goes like this. Each user has an excel template without the additional column. In order for the workaround to work, everyone will get the new template with an additional column. The users who need to input their data into the new column will do so in their own template. Everyone will submit their templates to the share folder. The new macro will pull each of the templates and remove the additional column. The original macro will run without the additional column. Once the original macro has ran it’s course, the new macro (i.e workaround) will add back in the additional column and populate all the data from different worksheet into one final workbook together with the additional column with different users’ inputs.
To the user, it does not matter how the code works. They just want the final output. My workaround has solved this without needing the whole development team to relook into the code.
As I heaved a sigh of relief that my workaround has succeeded, I was then greeted with another request. Another user has requested to add another column in this worksheet.
Bring it on, this is what I am thinking. I am up for the challenge on any new requests and I have thank my teacher for teaching me literature. Lol.