This Week I Learned - 2016 Week 33

Last week post or you might want to check out the whole series.

Travelling. Hence, the delay in weekly post.

The Hiperstation. Probably the cleanest and minimalist workstation station with a touch of retro feels, the VT220 terminal. Maybe I should readjust my battlestation again?


While we're on the discussion on retro hardware, how about reproducing the nostalgia bucklespring keyboard sound of IBM Model-M keyboard.

Introduction to Japanese, via HN. Comprehensive guide the Japanese language and writing system.

This Week I Learned - 2016 Week 32

Last week post or you might want to check out the whole series.

Slow week, nothing much being jot down for this week. In my process of becoming more minimalist, I've reduced a lot of "noises" in my life. This shall continue until I can reach the bare minimum necessity in my life, although this will be a life long ongoing journey.

Always use a higher-precedence operator like '||', '&&', or '^' in your return statement. Otherwise, the other expressions will be skipped. There is a Perl module, ProhibitReturnOr that does this checking.

Don't use OFFSET in your pagination SQL query but using keyset pagination. The basic concept is shown in the SQL query below. Never occurs to me to use WHERE instead of OFFSET. As I usually said, it's always nice to get more exposure with other DBMS instead of just MySQL. Further discussion via HN.
SELECT ...
  FROM ...
 WHERE ...
   AND id < ?last_seen_id
 ORDER BY id DESC
 FETCH FIRST 10 ROWS ONLY