Learning from Requests Source Code

Requests (https://github.com/kennethreitz/requests) is a popular http request handling package. Its code is supposed to be well written and pythonic. So I decided to learn from it and improve my Python programming. Here is something that I learned or re-learned.

Read More

Why I fart? (or how small data changes life)

I have had gas problem for quite a while. Usually, right after I have lunch, gas starts to accumulate in my belly. Then comes the fart. It was really annoying, especially when you sat in the front row of a class. Sometimes it was even painful as there are too much gas in the belly that somehow couldn’t get out.

Read More

My Approach To Reproducible Research

The goal is simple. During my research, I often need to run a lot of different workloads, plot the results and write some analysis text. My goal is to:

  • find out parameters I used to generate the results. So I can answer questions “why I see an outlier in my figure?”
  • find out the script that I used to generate the plot. So I can improve the figure for publication.
  • rerun the whole program and get the results. So I can produce new results by changing the old one.
Read More

How to Add New System Calls to Minix 3.1.8

There are some tutorials on the Internet. However, they are not up-to-date. Currently Minix has the latest version 3.1.8. It has some changes, say a virtual file system. So a  newer tutorial is necessary. This article also includes a part for adding system calls to servers that are not visible to users. For example, users cannot call the functions in MFS directly because there is a middleware layer, VFS, between them. In order to call some function in MFS, one need to add a system call to MFS and then call it from VFS. The steps of adding system calls to MFS is slightly different.

Read More