Guowei Lv

2 minute read

One way to boost productivity in traditional factories is to use assembly line. From Wikipedia: An assembly line is a manufacturing process (often called a progressive assembly) in which parts (usually interchangeable parts) are added as the semi-finished assembly moves from workstation to workstation where the parts are added in sequence until the final assembly is produced. By mechanically moving the parts to the assembly work and moving the semi-finished assembly from work station to work station, a finished product can be assembled faster and with less labor than by having workers carry parts to a stationary piece for assembly.

Guowei Lv

4 minute read

After learning the core.async library in Clojure, I was craving for a real-world example. Now I found one from purelyfunctional.tv. The original code can be found here. The Toy Car Factory Let’s describe how a worker builds a toy car. Take a car body from the part box. Take a wheel from the part box. Take another wheel from the part box. Attach the first wheel to the body.

Guowei Lv

11 minute read

Android custom view

In this post, we will be focusing on the Paint. Color The color in Paint has 3 parts: basic color, color filter and xfermode. Basic color There are 2 ways to set color in Paint: use setColor() and use Shader. Set color directly Two methods can be used: paint.setColor(Color.parseColor("#B90E83"); paint.setARGB(100, 255, 0, 0); There is no difference, pick whichever you like. Set color using Shader There are different types of Shader, let’s look them one by one.