Sitemap

A PhD Examined: Workflows

How I Streamlined Things I Couldn’t Automate

Joe Riad
7 min readDec 15, 2024

In a previous article, I talked about how I try to use scripting to automate as many repetitive tasks as I can to speed up my work reliably. The problem is that a lot of things are not easy to automate. Not every recurring task can even be done digitally; think of house chores for example. I found that I needed a more streamlined approach to such tasks too so that I could finish them more efficiently.

The approach I found that worked for me was to create a workflow. Once I found a way that worked for a particular routine task, I would stick to it to ensure it worked consistently every time I had to repeat it. In this short article, I will talk about my experience doing that and give some examples of things you might want to create a workflow for.

Photo by on

My Experience

To consistently produce high-quality graphics for my presentations and articles, I relied on a LaTeX package called . It can plot mathematical functions or data points that it reads from a file. The problem was that there was a lot of boilerplate code to write every time I wanted to plot a new data set. I found myself repeating it every time: code to set up the appearance of the graph, set up reading the data from the file and then plotting it. To make matters worse, I had to do the same kind of plot many times with different data. It was very tedious and had lots of room for error.

My response to this was to turn to scripting. I factored away the common elements of this process and encapsulated them in a Python script. The end result was a template that I only had to fill with any new information (such as the name of the file the data were saved in, the color of the plots, the name of the graph,…) and Python would fill in the rest and produce the graph for me. This completely eliminated any kind of decision making about the graphing process. All I had to do was provide the data. This gave my graphs a consistent look throughout all my work and eliminated a lot of potential errors. More importantly, it showed me that I was able to streamline a task that I couldn’t completely automate with a script. This opened the door for me to look for any other similar opportunities.

Another thing I had to do multiple times during grad school is get a visitor visa to Europe. This process of course was not amenable to scripting, but I found it best to create a workflow for it to make sure I never missed an important step. I wrote down everything I needed in a checklist (with links to relevant websites) and I even saved an email template to request a letter from my university stating my student status. Whenever I needed to apply for a visa, I didn’t have to think or search anymore, the process was neatly outlined for me step by step.

This kind of approach has really helped me throughout grad school and still helps me manage my repetitive tasks to this day. With a personal wiki, I have a trusted place to document all these processes and checklists so I can refer to them whenever the need arises.

Photo by on

What Makes a Good Workflow

From my experience, a good workflow should have the following
properties:

  • It should be well-documented in a trusted and easily accessible place. This way, I don’t have to remember the process in my head and can quickly pull it up when I need to.
  • It should distill the common elements of a repetitive task as generally as possible and avoid details that change from instance to instance. With my graph-plotting example above, this meant the script had to make as few assumptions as possible about the kind of graph I was creating. I could then create separate templates for the different types of graphs and I made sure that my script was general enough to work with all of them.
  • It should be for a task that will get repeated often, otherwise it’s not worth the time to set it up.
  • It should be as automated as possible. I use code whenever I can, and I make templates in case each instance of the flow requires some additional decisions that can’t be automated or made upfront. I also include links to relevant websites, phone numbers, e-mail addresses, etc… so the work I have to put in to use the flow is minimized.
Photo by on

Examples of Workflows

To give you more examples (and hopefully inspiration), here are some things I have created workflows for that you might want to think about for yourself.

  • Submitting a homework assignment. In most classes I took, I had to include a cover page with the academic honor code and my signature below it. I created a template for that cover page and scanned a copy of my signature and added it to the template. The template would automatically be filled in with the day’s date and all I had to do was generate the pre-filled template and add that cover page to my solutions.
  • Writing an article. I also had a template in place for this, usually provided by the publication I was targeting for the article and I had wokflows for creating figures and plots as I mentioned before.
  • Entering expenses into my budget. This is a workflow that I’m still honing to this day, but the basic routine is that I would download my bank statement periodically and use a script to help me classify the expenses into different budget categories (semi automatically).
  • Taking notes in class. I was fortunate enough to have a tablet and stylus during grad school and I downloaded an app (no longer maintained, sadly) that allowed me to annotate PDF documents with the stylus. My flow was to download the lecture slides the day before, put them in the app and take notes directly on the slides during the lecture.
  • Adding an entry to my personal wiki. This is something that occurs very often and needs to be as effortless as possible (so I can keep doing it!) and I have made it a quick keyboard shortcut away.
  • Routine chores such as doing groceries, cleaning my home, and cooking. An especially helpful habit I got into for cooking was meal planning, where I would pick a recipe and cook a big portion of it on Sunday then divide it up into single servings and freezing them for the rest of the week. For other chores, I have fixed a day of the week for each of them, and I try to stick to the same process of doing them every time.
Photo by on

Benefits

While having things planned out this way may sound too mechanical, I find a lot of benefits to it.

  • It tends to reduce , which means that if you have to make a lot of decisions, the quality of your decisions starts deteriorating. If all the trivial repetitive decisions are already made for me, it makes it much easier to focus on the decisions that count. It also makes the task much easier to start.
  • Having a pre-planned template/process reduces the possibility of error and lets me produce quality work consistently.
  • It frees up my mental energy from having to focus on trivial or cosmetic details and lets me think more on big-picture things like how to structure an article I’m writing or how to improve my budgeting and spending habits.
Photo by on

Concluding Thoughts

It can be tremendously helpful to pre-plan for the repetitive and mundane tasks you’re faced with all the time. In my experience, this improves your quality of work, productivity, and overall satisfaction. Consider doing this for one or two of your routines to see if it works for you as well.

No responses yet