I Started Doing Programming With Batch Files and I'm Proud of It
The first programming language that I learned was C. It was a hell of experience. For some people maybe its not that hard. But for me, I cannot catch up. My brain just cannot understand. Or maybe just because I don't want to. On top of that my class was in Japanese, make it even harder. I'm from 3rd world country who barely can speak English, who received scholarship to pursue my degree in Japan back then. It was only until chapter Array. Its either Array or Table. It was Chapter 6 if I'm not mistaken. After that I cannot do it anymore. To be honest, the following homework I received after that I just copied what my seniors left for me. And in fact there's no place I'm using programming after I entered workforce even though I'm in "IT".
Later on my manager provided some solutions for problem in BAU for some different team. It was in just simple batch file. Powershell still early on that time. And it was eye opening actually. Not just because of the batch file, but also on the possibility that thing could do in my own work. He said batch file, or DOS commands, is just a text processor. Not really that programming. But it was easy and simple to put up. You can just double click to run it. Not like Powershell. You cannot double click Powershell file. From there, I kinda studied all the batch files he created and try to make my own. I dig around if other team also using this kind of solutions. I saw one team use more complicated batch files to process application forms, data cleanup and processing, structuring data. Some also use for our client's insurance application. I googled more about it and feels grateful I found out about this thing.
I was in Storage and Backup team. That time we still use Windows server to host share folders. Since every month we need to bring down the server for security patching activity, we need to send email to all users that was using the service. There were 4 servers that time with different different users. To do that I need to have all the user's email address. The solution that was passed down to me was really messy that time. I need to ask Messaging team to provide email address for all employee in the company. Then list out users that using the service. After that try to match it with the the email address received using Excel. As every month the numbers are not same, also there's 4 servers to entertain, I need to do this manually, the first time I did it, it took me 3 days to complete. And that was the only time I did it. After that I spend one weekend to develop a batch file that simply do this for me. The batch file will go to each server and list all user that using the service. Then it will grab the user's email address from Domain Controller. All the email address later on saved in a text file for me to copy and send email to. Thankfully I need to send 4 emails, 1 for each server. So the manual work I need to do every month now reduced to only double click the batch file and send 4 emails. Nobody knows about this. My manager just happy I didn't give him any trouble. That thing got buried when we migrated to host share folders to NAS storage by Netapp. Well that was one of the major batch file I created that I really proud of but never had a chance to talk about. Learned a lot in the process because I don't have much knowledge about it so need to always try and error to know how the things work.
Another one when after I became a manager. The team I manage suppose to do some monitoring for 24 hours on our system. The question that was asked to me was, how could I know my team really did their job. I said there's no issue reported. So now they asked what's the evidence I have that could proof my team did their job. I said I really don't have any. We no need to take it that far I said. They never asked that to the guy I replaced. To make it worse, issue occurred and my team took 4 hours to escalate. Some of my team was caught sleeping during work. This was used against me. They said it was for audit purpose too. My team also don't really have anything that we could use to defend ourself. As a prevention, they asked me to come up with something that could show and proof monitoring was done every 30 minutes to 1 hour. But I didn't receive any budget. At the same time I don't want to give a hard time to my team. So again I spend a weekend to create a batch files to try to satisfy them. I hated it, my team hated it. But it was a very thoughtful process and as a result produce a really good automation. This time a little bit combination with Powershell. Every time my team come to work, the batch file got activated, run a countdown to 30 minutes. Once it reached 30 minutes, it will minimize all active windows and open a popup as a reminder to do the monitoring and automatically open the place that they need to monitor. At here, during that time, we still need human eyes to monitor. So they will check if everything good and take some screenshots. The batch file then will automatically open an email with some words populated. Screenshots will get pasted here. Then send the email to ourself. This email then will become the evidence that my team did they job. Obviously, I really cannot control the batch file remotely. My team could always close the batch file because they hated it. They could also do something with the code too to make their life easier. But I trusted them. At least we could show something. And one more time, a batch file saved my life.