The evil and immoral cruise line business

I had my first cruise trip not long ago. It wasn't a pleasant experience. The food was good. The room was good. The view was good. So why wasn't it pleasant? The way that the service staff were treated by the company.

The food and stateroom service staff were talking to me as if I was the king and they were my peasants. I couldn't stand it. They acted like people who were not as equal as me, but inferior to me. I speculated that the company put lots of pressure on them to behave like that. I'd feel more comfortable should they interacted with me like how American hospitality works interact with me.

Now I feel morally wrong to take cruise trips. I wish the cruise companies could behave as hiring someone on American soil, e.g., a McDonald's garnisher. Technically, the cruise was on US water. So I don't know why they were treated so badly.

Crowdfunding first time: BreadShield for Arduino

tl;dr: Jump to here: https://www.crowdsupply.com/loser/breadshield

I prototype a lot in Arduino and breadboard. But quite often, I end up with a jumper wire mess or spaghetti, like the one below:



And more important, I cannot use any shield boards jointly with my circuit on the breadboard -- jumper wires take all the spots.

One day I thought, what if I could replace the mess with a shield board? So BreadShield was born.

Take a look:


And here is a comparison:



Once the campaign concludes, I will open up the Github repository with all KiCAD files. It is open hardware.

If you also think it can save you a lot of time, go grab one now https://www.crowdsupply.com/loser/breadshield. It's just 7 dollars each (or 15 dollars for 3) and free US shipping is included. Thank you!

A filesystem being mounted as either ext4 and ext3?

I came across a very interesting problem on my computer today when moving my Dropbox folder as Dropbox is dropping support for non-ext4 filesystems on Linux now. I wasted a lot of time on this as I always believed that this partition was in ext4. So I couldn't figure out why I couldn't get expected by following instructions.

I could mount a partition on my hard drive as either ext4 or ext3 format. Dropbox's daemon is not stupid. If the partition is mounted as ext3, it will complain.

So here is the details. If I do not specify the format, it will be mounted as an ext3 partition.

forrest@test:~$ sudo mount  /dev/sdd1 /mnt/test/
forrest@test:~$ mount | grep sdd1
/dev/sdd1 on /mnt/test type ext3 (rw,relatime,data=ordered)

If I specify the ext4 format, it will be mounted as an ext4 partition.

forrest@test:~$ sudo umount /dev/sdc1
forrest@test:~$ sudo mount -t ext4 /dev/sdd1 /mnt/test/
forrest@test:~$ mount | grep sdc1
/dev/sdd1 on /mnt/test type ext4 (rw,relatime,data=ordered)


I don't know why. But it confused me quite a bit.

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.

Preparation


Make sure that you have the ~/.aws/config and ~/.aws/credentials configured. In terms of how to set up, look at here: http://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html

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 http://docs.aws.amazon.com/amazonglacier/latest/dev/api-initiate-job-post.html and http://docs.aws.amazon.com/cli/latest/reference/glacier/initiate-job.html

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