Blog

Installing Kanboard on macOS

Kanban is a lean method for project management that has been popular in software development and knowledge work. Recently, after reading a bunch of blog articles and technical booklets, I came up with an idea to use the Kanban method to manage my scientific projects. After all, speaking of the production of knowledge work, scientific research is analogous to manufacturing. I came across a powerful open source Kanban software — Kanboard. It’s PHP and SQLite powered; and it has an intuitive user interface. It does not say that macOS is supported. But since PHP and Apache Web Server are shipped with macOS, there is no reason it cannot be installed on macOS.

Why Python's ZeroDivisionError for floating-point type is a bad and unnecessary feature

In Python 2.7 and 3.6, dividing a floating-point number by zero results in a ZeroDivisionError: >>> 1. / 0. Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: float division by zero This is not consistent with mathematics, given that $1 / 0 = \infty$. Wouldn’t it be better to just return inf? In fact, the exception “division by zero” has been stipulated to return infinities in the IEEE 754 standard for floating-point arithmetic [1]:

The Sieve of Eratosthenes in Haskell: A naive implementation

I have been learning Haskell for a while. The more I am exposed to this language, the more I am amazed by the elegance of the functional programming paradigm. List comprehension is one of the beautiful things that I like in Haskell. Coming from Python, I am familiar with it. But the list comprehension in Haskell feels more natural because it is closer to what you would write in mathematics.

Merge multiple EPS subfigures into a single figure using LaTeX Beamer

Some academic journals require all subfigures to be combined as one single file for submission. This may not be easy to do if you don’t have a professional software (often proprietary) to edit vector maps, e.g., EPS and PDF. I found a convenient way to deal with in LaTeX Beamer. The idea is to create a beamer slide and insert your subfigures with the command \includegraphics{} in the same figure environment. This beamer slide will then be the combined figure.

Adding section numbers to LaTeX floats numbering and other tips

I have been learning to use LaTeX for some time. Now I do most of my homework assignments in LaTeX. It wears quite well on me. I have encountered some issues, but most of the time I was able to find elegant solutions on TeX StackExchange. Here are a few tips I learned recently. 1. Show chapter or section numbers in equation/figure/table numbering By default, LaTeX assigns equation numbers continually across different sections. If you need the equation to be numbered like “Eq. (3.5)” for the 5th equation in section 3, add this to the preamble: