I’ve started doing introductory Codeforces and CSES problems recently. The language I picked is C++. The typical workflow is to write the script, compile it, run it with the example input file and check the output. I wanted to make this whole process more automatic.

Hence the following shell script:

#!/bin/bash# make sure we have two arguments
if [ “$#” -ne 2 ]; then
echo “Need 2 parameters, got $#”
exit 1
# get the file path
if [ ! -f “$src_file_path” ]; then
echo “$src_file_path does not exist”
exit 1
if [ …

I’ve been learning vim for quite some time now. I had vim set up on my Mac and tried to use it as much as possible. I did all of my AOC 2020 puzzles in my tmux + vim set up running in Alacritty.

Alacritty + tmux + Vim

I heard many good things about Neovim and decided to give it a shot. Setting up Neovim is relatively easy considering I already had experience with .vimrc and vim-plug. Here is a breakdown of all the steps, in case I forget about them in the future.

  1. Install Neovim on Mac. I used Homebrew so I just…

I finished all 25 puzzles in AOC 2020 just before the new year. It was an enjoyable and informative experience. I had great fun solving/learning from others on how to solve these puzzles. Here is a short summary from me about AOC 2020.

  1. I solved about 15 problems out of the 25 without any struggle. Looking back at my notes along the process, I think at least the first 10 puzzles are quite approachable. For the remaining 10 problems, I solved the first part for the majority. For the problems I really got stuck on, I usually sought help on…


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store