Notes

What is the default value of Chrome’s minimum font size?

Background

One fine day at work, I took up a task which involves reducing the font size of a text from the current 12px to 9px. From my experience, this won’t turn up well in some versions of Chrome, as Chrome imposes some minimum font size, when the browser is set to a specific language. This minimum font size restriction, apparently, is controllable at the browser settings (ref 1, ref 2).

Question

I would go and raise this issue to the designer and product manager, but one question popped up:

What is the default value of this minimum font size setting?

What is the default value of Chrome’s minimum font size? Read More »

Escalators in the Shopee building

On Elevator, Escalator, and Progress

In the new Shopee (Singapore) building, my desk is located on the 4th floor. I usually entered the building from the 1st floor (there is another entrance on the 3rd floor).

After I enter the building, it is still the public area, I have two choices of going to the staff-only area: through the gantry gates on the 1st floor, or through the 3rd floor. Going to the 3rd floor on the public area requires taking two flights of escalators.

If I enter the staff-only area from the 1st floor gantry gate, I will take the elevator (lift) to the 4th floor; but if I enter from the 3rd floor gantry gate, I will take the stairs to my floor (since the difference is only by a single floor).

On a normal day, I will always take the escalators to the 3rd floor, enter the staff-only area, and then take the stairs to my floor.

I have a theory on why I prefer this, and I think, it is the classic “loading screen experience” happening in real life.

Waiting for elevator to arrive is just like a progress bar that stopped progressing for unknown period of time (and users don’t know when it will continue to progress). On the other hand, riding escalators and taking stairs give the users a sense of physical progress and therefore a more pleasant experience.

While it may take longer to reach my floor, I don’t need to wait for something out of my control to happen, and that’s a better experience rather than waiting for uncontrollable elevator to arrive.

That’s why I prefer taking escalators and stairs rather than elevators. Unless I’m peer-pressured by my colleagues. 😅

On Elevator, Escalator, and Progress Read More »

Learn to Count in JS!

In the past few weeks, I suddenly recalled of an interesting problem I faced during my days in Competitive Programming world. It was called “Make*me-an+[integer!]“, a problem posted in Internet Problem Solving Contest 2015 problemset (link to problem)

The gist of the problem statement is as such:

Output a list of valid ECMA-262 expression of the number 0 to 1000 (inclusive) using only the characters !, [, ], +, , and/or *, in which the correctness is determined by the value and the type of the expression itself.

For example, !![] evaluates to the number 0 (this is a valid output), and +!![]+[+[]] evaluates to string “10” (this is invalid, as the output type need to be evaluated as type number too).

The problem has two subtasks: the easy subtask is to produce the outputs where each expression uses no more than 200 characters; and the hard subtask limits the expression to use no more than 75 characters.

During the competition itself, I solved the easy subtask, but now I was quite interested in solving the hard subtask because … why not? Hahaha. In total, I spents around 2 weeks (including the many off days in between as I wasn’t in the mood for coding).

So, let’s get into the problem.

Learn to Count in JS! Read More »

This is not a thought

18 March 2018

Zen, isn’t it?

Recently, I have some encounters of this zen topics: on YouTube video, on a Geekcamp 2017 talk, and on a podcast.


Kurzgesagt: Emergence

The YouTube video that I encounter was a video by Kurzgesagt on the topic of emergence. It talks about when a living being is by itself, it is pretty stupid, but when it become collective, intelligence emerged.

  • There is no wet, but collectively, there is wetness.
  • There is no city, but collectively, there is a city.
  • There is no society, but collectively, there is a society.

Geekcamp: meta-circular programming language interpreter.

What if we make a programming language interpreter, using the programming language itself, and later use this interpreter to interpret it’s own source code. This is what is meant by meta-circular.

There is no program, the source code is representation of the program.

Similarly, there is no interpreter, the source code is representation of interpreter. Hence, if a source code of an interpreter of a language is written on the language itself, theoretically, it should be able to interpret itself, right?


Podcast. Radiotopia Showcase: Ways of Hearing.

The podcast series is about analog and digital recording.

Digital audio is for machine. Song recorded using analog recorder could have a faster beat around chorus. Digital made it even and regular, made the beats tied to a clock.

A record is a performance of the song at that time of recording. This means that there is no song, there is a representation of a song.


This is not a thought. This is a representation of a thought itself.

 

This is not a thought Read More »

Code Practice

9 March 2018

Recently, at work, I have been participating in a big feature project; and halfway through, after the UIs were implemented, I swapped place with a colleague (i.e. his part become mine, and mine become his). Man, it was really hard to complete the rest of the code using his. It’s just that his style of code writing is so much different from mine. …

Code Practice Read More »