Engineer – work like a software developer – whyClickIfYouCanScript

3 Jan, 2023
Frederik Vanhee

So, why do we script? The first thing which typically comes to mind is automation. By creating a script we can invest time upfront and later profit from that investment: we get a return on our investment. And that return is not only the time we save ourselves, but also the time saved by your colleagues when using the script. Sort of like a financial leverage, but then with time. A common pitfall is that we automate too much, and never get our initial time investment back. The trick is to find a good balance between automating certain parts and keeping other parts manual. Think of it as the Pareto principle: maximum gain with minimal effort. This balance is personal and depends on your situation. But time isn’t everything! Even if you’ll never get you initial time investment back, you might still learn new techniques by writing the script or the mere satisfaction of running a script instead of doing it by hand.

A second important advantage of scripting is traceability. Let me explain this a bit more what I mean with traceability. When you create your analysis using the software GUI, the end result is a state, a collection of objects in the software GUI or database as I like to call it. And while you can see what’s in that software’s database by clicking through all the objects via the GUI and inspecting them, there is no way of telling how we got to that state, you only see the end result. When using scripts to build your analysis on the other hand, we automatically create a record of how we got to that state. We can still see what’s in the software’s database by clicking through all the objects but we can now also look at the scripts and see the road we took to the end result. Especially as a checker of the analysis and report I find it much easier and faster to read the scripts instead of manually checking the final state in the GUI.

And as a last advantage I would like to point out the ability to capture and transfer knowledge. Writing scripts captures your knowledge which makes it much easier to transfer that knowledge to you colleagues. So by sharing your scripts you actually share your knowledge. It’s not only your knowledge, but also the company knowledge as the analysis workflow is also implicitly captured by these scripts. This makes it much easier for people to learn or get started with an analysis they have never done before and it will help them avoiding rookie mistakes.

So as a final promotion to scripting: don’t forget to also take into account the time your colleagues will save and the secondary benefits of traceability and knowledge transfer.

Hello, I’m Frederik. Get In Touch Anytime!