My template to reject fundamentally flawed papers

From time to time, I am invited to review papers that are fundamentally flawed. Those papers are written so poorly that I can decide their fates in 1 minute. To save myself from typing again, below is a template. I will just copy and paste.

This paper is very poorly written.
1. Lack of background from the biology problem to the computing counterpart to help broader audiences understand the problem.
2. Equations without explanation of the variables used.
3. No clear distinction between previous work and the authors' contribution(s).
4. Typesetting making reading extremely difficult, e.g., lengthy English phrases in math/italic fonts.
5. Too many English problems.

Quick reference examples for Amazon AWS Glacier command line interface (CLI)

I do not use Amazon AWS Glacier very often. I backing up my files to Glacier every a few months. So I hate to check the manual all the time. Hence, this blog post.


Make sure that you have the ~/.aws/config and ~/.aws/credentials configured. In terms of how to set up, look at here:

I would also assume that you are familiar with the terminology of AWS Glacier.

Listing vaults

In case that you forget what vaults you have in an AWS data center, do this:

aws glacier list-vaults  --account-id - --region us-east-2 --output table

Initiating a job for inventory retrieval

Basically if you wanna know what is in a vault, you do this.

aws glacier initiate-job --account-id - --vault-name myvault --region us-east-2 --job-parameters "{\"Type\": \"inventory-retrieval\", \"Format\":\"CSV\", \"Description\":\"what's in my Neuro vault?\"}"

For more details, refer to and

To my surprise, I don't need to specify which profile to use. The AWS CLI seems to automatically find the profile/credential that match the data center and vault name.

Listing jobs

Fetching the inventory is a job. In case the job ID is lost, here is the way to get it back.

aws glacier list-jobs --account-id - --region us-east-1 --vault-name myvault --output table

I always prefer table-format output.

Fetching job result

Either archive retrieval (download the file uploaded to the vault) or inventory retrieval is a job. You need to fetch the result after the job is done. Depending on the type of job, you will either get an inventory in the format specified (JSON by default) or the file uploaded to the vault. Be sure to specify the correct job ID.

aws glacier get-job-output --account-id - --region us-east-1 --job-id xxxyyyzzz --vault-name myvault data.txt

Deleting an archive

aws glacier delete-archive --account-id - --vault-name myvault --archive-id xxxyyyzzz

Friendship before mentorship

"You should run your startup like a cult" -- Peter Thiel, "Zero to One"

Short version: If you are a graduate student who do not want to become friends ever with your PhD advisor, then my lab is not a good place for your PhD study.

When it comes down to what graduate students to work with, I am very picky.

I believe that a graduate student and his/her advisor (note not a supervisor) should at least be friends. Otherwise, they shouldn't work together. Of course, there are many positions and professional relationships that are not like that. But I cannot work with people who just treat me as another piece of equipment.

By friend, I mean a person that you feel comfortable sharing the following information with:
1. I had a dog when I was 5. And the dog passed away tragically. (because you seek sympathy from a friend)
2. I broke up with my girlfriend last week. (because you seek support from a friend)
3. I got Nobel Prize in 2017! (because you share happiness with a friend, or you just wanna show off)

You don't have to be a friend with me right now. But if you anticipate that you cannot become a friend with me after a semester, maybe you shouldn't walk into my office and ask "Are you taking any graduate students?"

Tuning Grub 2, the bootloader

Below of some useful tips for Grub2, the open source bootloader. You are to edit the file /etc/default/grub. After you are done with any of the changes below, run
sudo grub-update
to apply the change.

1. Get rid of the submenu:

Add a line:

2. Set the default entry:

3. If you want your Linux system to book into text mode/console/command line, just follow this Basically, you need to make the following changes.

3.1 Uncomment or enable the line GRUB_TERMINAL=console
3.2 Commend or disable the line GRUB_CMD_LINE_LINUX_DEFAULT="quiet splash" or whatever value on the right hand side of the equal sign.

4. Leave you a timeout for changing Grub at system boot

Remember to always set a non-zero value for GRUB_TIMEOUT, e.g.,
in case something goes wrong.

But it is not terribly bad if you mess up. Just mount the drive in which you Ubuntu is installed, go to /boot/grub/grub.cfg to edit the settings.

Connecting to a WiFi network on Linux at startup without GUI

Many embedded Linux platforms are expected to connect to a WiFi network at startup automatically. And the Linux system is booted into multi-user model, i.e., no GUI, X window, or desktop environment. A lot of the solutions, e.g., making a connection available for all users, floating on the Internet are for Linux systems that boot into a desktop environment. In those cases, the nm-applet, which has an icon sitting in the tray area of the desktop environment, handles the connection to WiFi.

The discussion below applies to Ubuntu 15.04+, which uses systemd to manage initialization process.


NetworkManager is a daemon that manages networking devices on Linux systems. It has become the de facto network managing program for Linux since its introduction in 2004. See more at Wikipedia:

Since it is a daemon, users interact with it via other applications. On most modern Linux distributions, you see an icon on the tray area, that once clicked, will give you a list of WiFi network IDs (SSIDs). This application is called nm-applet. NetworkManager also has a command line interface called nmcli.

Easy solution: Connect once and remember.

NetworkManager will automatically connect to a WiFi network that was connected to previously. So, you can connect to a WiFi network under a desktop environment using nm-applet, or use command line (see below), then boot into no-GUI (e.g., system level 3) forever, and enjoy the same WiFi network forever.

If you've connected to multiple WiFi networks before, it's very hard to say which one will be connected to in the future, supposing they will all be available. Most likely, the very last one connected to will be the top candidate. If unsure, see the next two sections.

In case you need to connect to a WiFi network via command line

There are many cases that you want to specify which WiFi network to connect to, e.g., the first time or you want to switch the network. The command to connect to a WiFi SSID uses the following syntax:
nmcli device wifi connect $SSID
For example,
nmcli device wifi connect Haha
where H360 is the SSID.

Specifying the WiFi network to connect to at startup

As mentioned earlier, if you have connected to multiple WiFi networks before, NetworkManager will use an algorithm, which is unfortunately unclear and thus underterministic to me, to pick one (assuming that they are all still available) the next time. To ensure to connect to a particular network, you can create a startup service for systemd, the initialization manager of modern Linux, to be executed at system startup.

Let's call the service mywifi. Create a file called mywifi.service under
with content like this:
Description=Connect to Haha

ExecStart=/usr/bin/nmcli device wifi connect 


As you can see, the command to connect to a network called H360 is to be executed at startup, only when the system is booting into multi-user level (see the Red Hat doc for levels.)

Then enable this service and finally reboot
systemctl enable mywifi

By "enable", we mean automatically running this service at startup without logging in.

Troubleshooting: device unavailable

I had some rare cases that a WiFi interface device is unavailable. Simply stop and restart the NetworkManager service may solve the problem:
systemctl stop NetworkManager
systemctl start NetworkManager

Some examples for using nmcli

forrest@A785GM-M:~$ nmcli device status
DEVICE           TYPE      STATE        CONNECTION 
wlx001478962ea6  wifi      connected    Haha 4     
en2s0            ethernet  unavailable  --         
lo               loopback  unmanaged    --         
forrest@A785GM-M:~$ nmcli general status
connected  full          enabled  enabled  enabled  enabled 
forrest@A785GM-M:~$ nmcli radio wifi
forrest@A785GM-M:~$ nmcli dev wifi
*  Haha            Infra  1     54 Mbit/s  100     ▂▄▆█  WEP          
   TP-LINK_6DFF    Infra  5     54 Mbit/s  100     ▂▄▆█  WPA1 WPA2 
   --              Infra  10    54 Mbit/s  100     ▂▄▆█  WPA2      
*  Haha            Infra  1     54 Mbit/s  99      ▂▄▆█  WEP