## Locality Sensitive Hashing: Minhash vs Simhash

Locality-sensitive hashing (LSH) reduces the dimensionality of high-dimensional data where LSH differs from conventional and cryptographic hash functions because it aims to maximize the probability of a “collision” for similar items. The most widely used hashings to detect near duplicate text documents are min-hash (by Border) and sim-hash (Charikar). In this series, we study min-hash and sim-has in details.

• On the resemblance and containment of documents
Broder gives insight how min-hash works from engineering pespective.

• Similarity Estimation Techniques from Rounding Algorithms
Charikar gives methematical idea of simhash and general property of locality sensitive hashing.

• Finding Near-Duplicate Web Pages: A Large-Scale Evaluation of Algorithms
Google did experiment comparing minhash and simhash on large scale.

• Min-Wise Independent Permutations
Broder and Charikar provide maths proof for min-hash upper and lower bounds.

• Detecting Near-Duplicates for Web Crawling
Google paper to address Hamming Distance Problem once a hashing is decided, i.e. given a collection of f-bit fingerprints and a query fingerprint $\mathcal F$, identify whether an existing fingerprint differs from $\mathcal F$ in at most $k$ bits.

### On the resemblance and containment of documents

1997 Andrei Z. Broder

#### Resemblance and Containment

Define resemblance $r(A, B)$ of two documents, $A$ and $B$, is a number between 0 and 1, such that when the resemblance is close to 1 it is likely that the documents are roughly the same. Similarly, the containment $c(A, B)$ of $A$ in $B$ is a number between 0 and 1 that, when close to 1, indicates that A is roughly contained within B.

The idea of approaching resemblance and containment is to keep $k$ sketches of each document $A$

$S_A = (sketch_1, sketch_2, \cdots, sketch_k)$

Then resemblance of $A$ and $B$ becomes
$$r(A,B) = \frac{\vert S(A) \cap S(B) \vert}{\vert S(A) \cup S(B) \vert}$$

and containment becomes
$$c(A,B) = \frac{\vert S(A) \cap S(B) \vert}{\vert S(A) \vert}$$

#### Shingling

A contiguous subsequence contained in $D$ is called a shingle.

For example,

$D=(a, rose, is, a, rose, is, a, rose)$

then, $S(D,w=4)$, 4-shingling of $D$ is the bag

${(a, rose, is, a), (rose, is, a, rose), (is, a, rose, is), (a, rose, is, a), (rose, is, a, rose)}$

There are 2 options to derive $S(D,w)$

• Option A: labelled shingling, count occurrence number
$S(D,w=4) = {(a, rose, is, a, 1), (rose, is, a, rose, 1), (is, a, rose, is, 1), (a, rose, is, a, 2), (rose, is, a, rose, 2)}$
• Option B: only occurrence, not count
$S(D,w=4) = {(a, rose, is, a), (rose, is, a, rose), (is, a, rose, is)}$

Once selecting one option, resemblance and containment are defined as
$$r_w(A,B) = \frac{\vert S(A,w) \cap S(B,w) \vert}{\vert S(A,w) \cup S(B,w) \vert}$$

$$c_w(A,B) = \frac{\vert S(A,w) \cap S(B,w) \vert}{\vert S(A,w) \vert}$$

#### Estimating Resemblance and Containment

Let $\Omega​$ be the set of all labelled or unlabelled shingles and $\Omega​$ is totally ordered. Fix a parameter $s​$, for a set $W \subseteq \Omega​$, define
$$MIN_s(W) =\begin{cases} \text{the set of the smallest s elements in W, if \vert W \vert \ge s; } \ \text{W, otherwise.}\end{cases}$$

For a set $I \subseteq \mathcal N$
$$MOD_m(I)=\text{the set of elements of I that are 0\mod m.}$$

Theorem: Let $g : \Omega \to \mathcal N$ be an arbitrary injection, let $\pi : \Omega \to \Omega$ be a permutation of $\Omega$ chosen uniformly at random and let $M(A)=MIN_s(\pi(S(A,w)))$ and $L(A)=MOD_s(g(\pi(S(A,w))))$
1. ​
$$\widehat r_w(A,B) = \frac{\vert MIN_s(M(A) \cup M(B)) \cap M(A) \cap M(B) \vert}{\vert MIN_s(M(A) \cup M(B)) \vert}$$
is an unbiased estimate of the resemblance of $A$ and $B$.

2.
$$\widehat r_w(A,B) = \frac{\vert L(A) \cup L(B) \vert}{\vert L(A) \cap L(B) \vert}$$
is an unbiased estimate of the resemblance of $A$ and $B$.

3.
$$\widehat c_w(A,B) = \frac{\vert L(A) \cap L(B) \vert}{\vert L(A) \vert}$$
is an unbiased estimate of the containment of $A$ and $B$.

#### Implementation Issues

Instead of keeping each shingle as it is, which cost much in storage, we first associate to each shingle a (shorter) id of $l$ bits, and then use a random permutation $\pi$ of the set ${0, \ldots, 2^l -1 }$. Fix $\pi$ and let it be $f$:

$f: \Omega \to {0, \ldots, 2^l -1 }$

Then the estimated resemblance is
$$r_{w,f}(A,B) = \frac{\vert f(S(A,w)) \cap f(S(B,w)) \vert}{\vert f(S(A,w) )\cup f(S(B,w)) \vert}$$

In implementation, Rabin fingerprints are used because their probability of collision is well understood and can be computed very efficiently in software.

### Similarity Estimation Techniques from Rounding Algorithms

2002 Moses S. Charikar

#### Definition of Locality Sensitive Hashing

A locality sensitive hashing scheme is a distribution on a family $\mathcal F$ of hash functions operating on a collection of objects, such that for two objects $x$, $y$,
$$\mathbf {Pr}_{h \in \mathcal F}[h(x)=h(y)] = sim(x, y)$$
where $sim(x, y) \in [0, 1]$ is some similarity function defined on the collection of objects.

The paper proves property for certain similarity function that leads to existance of locality sensitive hashing scheme.
For example, for Jaccard coefficient of similarity
$$sim(A,B) = \frac{\vert A \cap B \vert}{\vert A \cup B \vert}$$
min-wise independent permutations scheme allows the construction of a distribution on hash functions $h: 2^U \to U$ such that
$$\mathbf {Pr}_{h \in \mathcal F}[h(x)=h(y)] = sim(x, y)$$

#### Random Hyperplane Based Hash Functions for Vectors

Given a collection of vectors in $R^d$, we consider the family of hash functions defined as follows: We choose a random vector $\vec r$ from the $d$-dimensional Gaussian distribution. Corresponding to this vector $\vec r$, we define a hash function $h_{\vec r}$ as follows:
$$h_{\vec r}(\vec u) =\begin{cases} 1 & \text{if \vec r \cdot \vec u \ge 0 } \ 0 & \text{if \vec r \cdot \vec u \lt 0 } \end{cases}$$

Then for vectors $\vec u$ and $\vec v$:

$$\mathbf {Pr}_{h \in \mathcal F}[h(\vec u)=h(\vec v)] = 1 – \frac{\theta(\vec u, \vec v)}{\pi}$$
where $\theta$ is
$$\theta = \cos^{-1}\left(\frac{\vert A \cap B\vert}{\sqrt {\vert A \vert \cdot \vert B \vert }} \right)$$

#### The Earth Mover Distance and Rounding Scheme

Earth Mover Distance Given a set of points $L={l_1, \ldots, l_n}$, with a distance function $d(i, j)$ defined on them. A probability distribution $P(X)$is a set of weights $p_1, \ldots, p_n$ on the points such that $p_i \ge 0$ and $p_i = 1$. The Earth Mover Distance $\mathbf {EMD}(P,Q)$ between two distributions $P$ and $Q$ is defined to be the cost of the min cost matching that transforms one distribution to another.

Theorem 1. The Kleinberg Tardos rounding scheme yields a locality sensitive hashing scheme such that

$$\mathbf {EMD}(P,Q) \le \mathbf E[d(h(P), d(h(Q)))] \le O(\log n \log \log n) \mathbf {EMD}(P,Q)$$

Kleinberg and Tardos rounding algorithm can be viewed as a generalization of min-wise independent permutations extended to a continuous setting. Their rounding procedure yields a locality sensitive hash function for vectors whose coordinates are all non-negative. Given two vectors $\vec a=(a_1, \cdots, a_n)$ and $\vec b=(b_1, \cdots, b_n)$, the similarity function is
$$sim(\vec a, \vec b) = \frac{\Sigma_i \min(a_i, b_i)}{\Sigma_i \max(a_i, b_i)}$$
Note that when $\vec a$ and $\vec b$ are the characteristic vectors for sets $A$ and $B$, this expression reduces to the set similarity measure for min-wise independent permutations.

### Finding Near-Duplicate Web Pages: A Large-Scale Evaluation of Algorithms

2006 Monika Henzinger

Google did experiment comparing the two algorithms on a very large scale, namely on a set of 1.6B distinct web pages. The results show that Charikar’s algorithm finds more near-duplicate pairs on different sites, it achieves a better precision overall, namely 0.50 versus 0.38 for Broder et al. ’s algorithm but neither of the algorithms works well for finding near-duplicate pairs on the same site.

Furhter they gave a combined algorithm: First compute all B-similar pairs. Then filter out those pairs whose C-similarity falls below a certain threshold.

### Min-Wise Independent Permutations

2000 Andrei Z. Broder, Moses Charikar, Alan M. Frieze, Michael Mitzenmacher

#### Definition

We say that $\mathcal F \subseteq S_n$ is min-wise independent if for any set $X \subseteq [n]$ and any $x \in X$, when $\pi$ is chosen at random in $\mathcal F$ we have

$$\mathbf {Pr}(min{\pi(X)} = \pi(x)) = \frac{1}{\vert X \vert}$$

In other words we require that all the elements of any fixed set X have an equal chance to become the minimum element of the image of $X$ under $\pi$.

#### Approximation

We say that $\mathcal F \subseteq S_n$ is approximately min-wise independent with relative error ε if for any set $X \subseteq [n]$ and any $x \in X$, when $\pi$ is chosen at random in $\mathcal F$ we have
$$\left\vert \mathbf {Pr}(min{\pi(X)} = \pi(x)) – \frac{1}{\vert X \vert} \right\vert = \frac{\epsilon}{\vert X \vert}$$
In other words we require that all the elements of any fixed set $X$ have only an almost equal chance to become the minimum element of the image of $X$ under $\pi$. The expected relative error made in evaluating resemblance using approximately min-wise independent families is less than ε.

### Detecting Near-Duplicates for Web Crawling

2007 Gurmeet Singh Manku, Arvind Jain, Anish Das Sarma

#### Hamming Distance Problem

Given a collection of f-bit fingerprints and a query fingerprint $\mathcal F$, identify whether an existing fingerprint differs from $\mathcal F$ in at most $k$ bits.

#### Algorithm

Build $t$ tables: $T_1, T_2, \ldots, T_t$, table $T_t$ is actually a table keeping all re-ordered bits of all fingerprints, where the entry of the table is bit segment taken from original one. For example:

$$b_1, b_0, \ldots, b_{t_1}, b_{t_2}, \ldots, b_{t_p}, b_m, b_{m+1}, \ldots, b_f \to$$
$$\text{key in table: } b_{t_1}, \ldots, b_{t_p} \text{value in table: } b_1, b_0, \ldots, b_m, b_{m+1}, \ldots, b_f$$

So associated with table $T_i$ are two quantities: an integer $p_i$ (table key bit length) and a permutation $\pi$ over the f bit-positions.

Given fingerprint $\mathcal F$ and an integer $k$, we can now probe these tables in parallel:
Step 1: Identify all permuted fingerprints in $T_i$ whose top $p_i$ bit-positions match the top $p_i$ bit-positions of $\pi_i(\mathcal F)$.
Step 2: For each of the permuted fingerprints identified in Step 1, check if it differs from $\pi_i(\mathcal F)$ in at most $k$ bit-positions.

So we expect $2^{d-p_i}$ fingerprints as matches, if we seek all (permuted) fingerprints which match the top $p_i$ bits of a given (permuted) fingerprint.

#### Example

Consider $f = 64$ (64-bit fingerprints), and $k = 3$ so near-duplicates’ fingerprints differ in at most 3 bit-positions. Assume we have 8B = 234 existing fingerprints, i.e. $d = 34$.

We split 64 bits into 4 blocks, each having 16 bits. There are ${4 \choose 1}= 4$ ways of choosing 1 out of these 4 blocks (3 bit can only be scattered in other 3 blocks). For each such choice, we divide the remaining 48 bits into four blocks having 12 bits each. There are
${4 \choose 1} = 4$ ways of choosing 1 out of these 4 blocks. The permutation for a table corresponds to placing the bits in the chosen blocks in the leading positions. The value of $p_i$ is $28 =16+12$ for all blocks. On average, a probe retrieves $234−28 = 64$ (permuted) fingerprints.

# Ceph Distributed Storage

Ceph is a distributed file system pioneered by Sage A. Weil which maximizes distributed capability of file storage in three aspects
3. Autonomic Distributed Object Storage

Ceph’s essence is CRUSH (Controlled Replication Under Scalable Hashing) algorithm, a probabilistic hash algorithm (think of consistent hashing) based on RUSH algorithm, allowing all clients to compute location of any file data segment without centralized service (name node, typically, HDFS). CRUSH algorithm evolves from prior pseudo-random data distribution algorithms described below. Note that all papers list below in this blog are from SSRC (Storage Systems Research Center), University of California, Santa Cruz.

# Consensus Theory

Recently, I studied a series of influential papers regarding consensus. Consensus under non-Byzantine circumstance is the theory backing up distributed systems such as Chubby (Paxos), etcd (Raft) and Zookeeper (Zab). These algorithms, together with their correctness reasoning are hard to interpret but worth the effort.

Bloom Filter is a probabilistic set data structure used to test whether an element is in a set or not.  It has the advantage of fast operation over traditional set data structures but at cost of sacraficing correctness: false positive matches are possible, meaning that a query returns either “possibly in set” or “definitely not in set”. A bloom filter leverages predetermined k hash functions, each of which maps to a location of the underlying bit array for every item added. It’s like sampling of each element and loses precision during the process. Natrually, only add operation is supported but not remove. Not surprisingly, the more elements added into the set, the larger probability of false positives.

To pick up k independent while uniformly distributed hash functions is non trial. But a simplified version of Java implementation described in the blog adopts double hashing strategy, code available @ my github Bloom Filter.

## Elements of Implementation

• The actual data structure representing a bloom filter is a bit array, or in Java, the BitSet of length bitSize.
• To obtain k distint hash values for each item using double hashing
h_i(key) = h_1(key) + i*h_2(key)

## Probabilistic relations

• Optimal number of hash functions (in Wikipedia) with given input entries and bits size, which would make the false positive probability lowest
k=(bitSize)/(estimatedEntries)*ln2
• Optimal bits size with given input entries and expected false positive probability
bitSize=-(estimatedEntries*ln(fpp))/(ln2)^2
• False positive probability based on given input entries and bits size, corresponding optimal number of hash function k
E|fpp| = (1-1/(bitSize))^(k*estimatedEntries)

The github project also includes a test that computes real false positive probability of this implementation.

## Core Code Illustrated

    public BloomFilter(int expectedEntries, int byteSize) {
if (!(expectedEntries > 0)) {
throw new IllegalArgumentException("expectedEntries should be > 0");
}
this.expectedEntries = expectedEntries;
this.numHashFunctions = optimalNumOfHashFunctions(expectedEntries, byteSize << 3);
this.bitSet = new BitSet(byteSize * 8);
}

int hash1 = hash32;
int hash2 = hash32 >>> 16;

for (int i = 1; i <= numHashFunctions; i++) {
int combinedHash = hash1 + (i * hash2);
// hashcode should be positive, flip all the bits if it's negative
if (combinedHash < 0) {
combinedHash = ~combinedHash;
}
int pos = combinedHash % bitSet.size();
bitSet.set(pos);
}
}

public boolean testHash(int hash32) {
int hash1 = hash32;
int hash2 = hash32 >>> 16;

for (int i = 1; i <= numHashFunctions; i++) {
int combinedHash = hash1 + (i * hash2);
// hashcode should be positive, flip all the bits if it's negative
if (combinedHash < 0) {
combinedHash = ~combinedHash;
}
int pos = combinedHash % bitSet.size();
if (!bitSet.get(pos)) {
return false;
}
}
return true;
}



Screen snapshot in ME-Mydoc

Although Hbase has intrinsic non async client API, an async client API derived from OpenTSDB OpenTSDB/asynchbase outperforms the former.
In this blog, we demonstrate its basic put and scan async API which return Deferred object, the equivalent one to Java 8 CompletableFuture.  The code demo does the following 3 operations in sequential order.

1. Verify specified table and column family of a hbase cluster
2. Puts several number of records asynchronously
3. After put operations succeed, perform a total scan
    public static Deferred putData() throws Exception {
String rowKey = UUID.randomUUID().toString();
String data = "value " + counter.incrementAndGet();
PutRequest putRequest = new PutRequest(tableName.getBytes(),
rowKey.getBytes(), columnFamily.getBytes(),
qualifier.getBytes(),
data.getBytes());
arg -> {
System.out.println("put data: rowkey=" + rowKey + ", value=" + data);
return null;
},
new Callback<Object, Exception>() {
@Override
public Object call(Exception arg) throws Exception {
arg.printStackTrace();
return null;
}
});

}


To coordinate the order of verify phase and put phase, CountDownLatch is used whereas Deferred.group for put and scan coordination.

        List<Deferred<Object>> putDeferredList = new ArrayList<>();
int total = 100;
for (int i = 0; i < total; i++) {
}
cb -> {
System.out.println("All put finished");
startProcessScan();
return null;
}
);


Screen snapshot of the code in ME-Mydoc

Inspired by Paper we love, in this blog I listed selected papers that are read, and to be read systematically in 2016.  The list is continuously growing, reflecting my explored and conquered topics in 2016.  Most of the papers fall in the category of distributed computing including classic theoretical researches and well-known system design and implementation.

# Distributed Computing Theory

 1978 Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport 1985 Distributed snapshots: determining global states of distributed systems KM Chandy, L Lamport 2007 Paxos Made Live – An Engineering Perspective Tushar Deepak Chandra, Robert Griesemer, Joshua Redstone 2012 CAP Twelve Years Later: How the “Rules” Have Changed Eric Brewer 2014 In search of an understandable consensus algorithm D Ongaro, J Ousterhout

# Distributed Systems

 2003 The Google file system S Ghemawat, H Gobioff 2004 MapReduce: Simplified Data Processing on Large Clusters Jeffrey Dean, Sanjay Ghemawat 2006 The Chubby lock service for loosely-coupled distributed systems M Burrows 2007 Dynamo: amazon’s highly available key-value store G DeCandia, D Hastorun, M Jampani… 2008 Bigtable: A Distributed Storage System for Structured Data F Chang, J Dean, S Ghemawat et al. 2008 Bitcoin: A Peer-to-Peer Electronic Cash System S Nakamoto 2010 The Hadoop Distributed File System Konstantin Shvachko, Hairong Kuang, Sanjay Radia, Robert Chansler 2010 Hive – A Petabyte Scale Data Warehouse Using Hadoop A Thusoo, JS Sarma, N Jain, Z Shao 2010 Spark: Cluster Computing with Working Sets M Zaharia, M Chowdhury, MJ Franklin et al. 2010 ZooKeeper: Wait-free coordination for Internet-scale systems P Hunt, M Konar, FP Junqueira 2010 Finding a needle in Haystack: Facebook’s photo storage D Beaver, S Kumar, HC Li, J Sobel, P Vajge 2010 Cassandra: a decentralized structured storage system A Lakshman, P Malik 2011 Kafka: a Distributed Messaging System for Log Processing J Kreps, N Narkhede 2011 Mesos: A Platform for Fine-Grained Resource Sharing in the Data Center Benjamin Hindman, Andy Konwinski et al. 2013 Apache hadoop yarn: Yet another resource negotiator VK Vavilapalli, AC Murthy, C Douglas… 2013 Scaling Memcache at Facebook R Nishtala, H Fugal, S Grimm, M Kwiatkowski

# Stream Processing and Database

 1993 The Volcano Optimizer Generator: Extensibility and Efficient Search G. Graefe, W. J. McKenna 1996 Implementing data cubes efficiently V. Harinarayan, A. Rajaraman, J. Ullman 2013 MillWheel: Fault-Tolerant Stream Processing at Internet Scale T Akidau, A Balikov, K Bekiroğlu et al. 2015 The Dataflow Model: A Practical Approach to Balancing Correctness, Latency, and Cost in Massive-Scale, Unbounded, Out-of-Order Data Processing T Akidau, R Bradshaw et al. 2015 Lightweight Asynchronous Snapshots for Distributed Dataflows P Carbone, G Fóra, S Ewen, S Haridi et al. 2016 SamzaSQL: Scalable Fast Data Management with Streaming SQL M Pathirage, J Hyde et al.

# Functional Programming

 1989 Why Functional Programming Matters J Hughes 1992 The Essence of Functional Programming P Wadler 1995 Monads for functional programming P Wadler

# Algorithms

 1985 Random Sampling with a Reservoir Jeffrey Scott Vitter 1985 Self-Adjusting Binary Search Trees DD Sleator, RE Tarjan 1995 On-line construction of suffix trees Esko Ukkonen 2011 A Comprehensive Study of Convergent and Commutative Replicated Data Types Mark Shapiro, Nuno Preguiça, Carlos Baquero, Marek Zawirski 2015 Efficient Range Minimum Queries using Binary Indexed Trees M DIMA, R CETERCHI

The union-find is a classic data structure used in lots of algorithms, for instance, cycle detection in undirected graph, Tarjan lowest common ancestor.  The code illustated in this blog passes AOJ Disjoint Set: Union Find Tree and available at Github AlgImpl.

## The Problem

Given n elements, initially each element is in a different set, {1}, {2}, …, {n}.
Two operations are supported on the sets by union-find, which are union and find.

• A union operation combines two sets into one.
• A find operation identifies the set that contains a particular element.

An intermixed sequence of union and find operations is performed. We need to devise most efficient algorithm for union and find operations.

## Set Representation

An int array id is a parent-link reprensentation of a forest of trees. A concrete example is shown below

 idx 0 1 2 3 4 5 6 7 8 9 parent 0 1 1 8 3 0 5 7 8 8

Thus, each set can be represented by the ancestor of the tree. This is the meaning of what Find returns.

## Optimizations

Two optimizations are applied to boost performance.

1. Make trees Weighted in order to append lighter tree to heavier one.
2. Path compression to flatten tree

These two tricks result in amortized time complexity of find and union to be almost O(1), or to be more exact, inverse of Ackermann’s function.

## Full Java Code

public class UnionFind {
int[] id;
int count;
int[] weight;  // size indexed by root id

public UnionFind(int n) {
id = new int[n];
weight = new int[n];
count = n;
for (int idx = 0; idx < id.length; idx++) {
id[idx] = idx;
weight[idx] = 1;
}
}

public void union(int p, int q) {
int pRoot = find(p);
int qRoot = find(q);
if (pRoot == qRoot) {
return;
}
// make smaller root point to larger one
if (weight[pRoot] < weight[qRoot]) {
id[pRoot] = qRoot;
weight[qRoot] += weight[pRoot];
} else {
id[qRoot] = pRoot;
weight[pRoot] += weight[qRoot];
}
count--;
}

// path compression
public int find(int p) {
if (id[p] != p) {
id[p] = find(id[p]);
}
return id[p];
}

public boolean connected(int p, int q) {
return find(p) == find(q);
}

public int count() {
return count;
}
}


## Code in ME-Mydoc

Dijkstra single source shortest algorithm in adjacency list form, which passes AOJ Single Source Shortest Path Problem is available @Github

The algorithm works like Prim algorithm of generating minimal spanning tree in that each round a vertex is added to the spanning tree. The rule of determining next vertex is minimal total weight from source vertex.

## Pseudo algorithm

• distTo[] is total weight of each vertex from source vertex.
• minHeap is a min binary heap keeping track of total weight of all vertices not in the spanning tree.
distTo[] initialized to INFINITE
create the minHeap
while(!minHeap.isEmpty) {
Vertex minVertex = minHeap.removeMin
foreach edge incident to minVertex {
if (the other vertex has shorter distance) {
update distTo[edge.destVertex]
update minHeap of edge.destVertex
}
}
}


## Technicalities

PriorityQueue in java.util is used as the binary heap but it lacks update(key, newValue) API. We wrap a PriorityQueue to mimic the bahavior by first removing the object if it is the queue and add to the queue again.

## Complexity Analysis

Time complexity of Dijkstra is O(E*log(V)) because at most E edges are iterated and at most V vertices in the binary heap.

## Core Java code

public static class DijkstraShortestPath {

Integer[] distTo; // index is vertex
Integer[] edgeTo;

public DijkstraShortestPath(WeightedDigraph graph, int sourceVertex) {
distTo = new Integer[graph.numVertex];
edgeTo = new Integer[graph.numVertex];

distTo[sourceVertex] = 0;
edgeTo[sourceVertex] = sourceVertex;
MinPriorityQ&amp;lt;PathWithV&amp;gt; minPQ = new MinPriorityQ&amp;lt;PathWithV&amp;gt;(new Comparator&amp;lt;PathWithV&amp;gt;() {
@Override
public int compare(PathWithV o1, PathWithV o2) {
return o1.path - o2.path;
}
});
PathWithV p = new PathWithV(sourceVertex, 0);
while (!minPQ.isEmpty()) {
int vertex = minPQ.remove().vertex;
for (WeightedDigraph.Edge edge : graph.srcEdges[vertex]) {
Integer targetVertexPath = distTo[edge.targetVertex];
if (targetVertexPath == null || distTo[vertex] + edge.weight &amp;lt; targetVertexPath) {
distTo[edge.targetVertex] = distTo[vertex] + edge.weight;
edgeTo[edge.targetVertex] = vertex;
p = new PathWithV(edge.targetVertex, distTo[edge.targetVertex]);
}
}
}
}
}


## Screenshot in ME-Mydoc

This is part 3 of Story told by an entrepreneur of becoming %1 (Part 1 Story) which is originally posted at How can one become part of the 1%?.  The author offers a list of books he recommends.

PPS, since many of you have asked what books to read, or books that I found useful or influenced my thinking, I have decided to compile a short list here. This list will probably get updated from time to time since I am constantly reading new books.

This is actually the very first book I have ever read in my life, I read it in Chinese when I was seven. It left an everlasting impression on me to be strong, independent and having the courage to seek out adventures. Come to think of it, I will have to go visit Christmas Island one of these days.

This is bordering on the cliche now, I read this book on my second year in college and I knew right away my goal of being an engineer was over. I wanted to go to Wall Street. This all time classic made me a big fan of Michael Lewis and it changed my life.

I read this book when I was twenty, it was still in its first print at the time. I had very foggy concepts about finance, markets and money at the time but it got me very very fascinated about what traders do. There are several follow-ups books, all very worthwhile to read. The stories of some of the traders foreshadowed the ups and downs I was going to have in my life as a trader as well. Spooky!

I read this book when I got serious about trading, it inspired me to be an independent thinker and ignore all the noise that is Wall Street. All the lessons taught in this book is just as relevant today.

Jesse Livermore is perhaps the greatest trader ever, but a tragic life nonetheless. This book inspired me to get into the trading business, but the tragedy that is Jesse Livermore also made me quit and pursue my current business.

This biography of Warren Buffett is a must read for just any aspiring person who wants to get into business or investments. This book deeply influenced my current approach to business as well as investments. I am not sure I would have appreciated the lessons in this book when I was younger though.

Not the most entertaining read but the concept of margin of safety is hugely important.

Consider me a fan of Nassim Taleb, the man is prescient. This book actually saved my current business as it served as a massive warning right ahead of the collapse of 2008-2009, I hunkered down and did everything I could to stay in the game.

A very sobering book that uses a great deal of statistical concepts to teach us about the probabilities in life and business. It drastically changed my view of success and failures. I only wished this book was around I was much younger.

I consider this book the bible for all startup guys out there. The concepts laid out in this book taught me to look beyond the obvious and look for ways to compete more effectively.

Don’t be a victim, learn from past masters on how to play the game in business and life.

You will learn that good ideas are products of accidents, errors and slow hunches. The key is to open-minded.

An absolutely fascinating read about one the greatest conquerors in history, it is full of lessons how to to be an upstart that can go big.

This biography of Putin is full of lessons on survival and the rise of an unlikely startup.

Mr. Munger is Warren Buffett’s sidekick, and probably the more intellectual of the two. This book is full of lessons on business and investments.

Another story of an unlikely upstart guy who ended up as a giant in history. Full of tales of survival, redemption, and human tragedy. I learned a great deal of modern Chinese history from this book.

The story of Blackberry is still ongoing, and it is full of what not to do in business.

I had very little knowledge or understanding of the Middle East until I read this book.

Wow! But wait a minute, so Elon Musk wasn’t a prodigy? Yeah, the story of Elon Musk gives all of us mere mortals hope. You too can dream big and do great things.

The underbelly of America.

The Innovators( How a Group of Hackers Geniuses and Geeks Created the Digital Revolution)[INNOVATORS][Hardcover]: WalterIsaacson: Amazon.com: Books

The history of Silicon Valley.

Just about everyone has heard of Charles Ponzi of the Ponzi scheme, but the story of Ivar Kreuger is simply incredible. A great study of human greed.

Most Westerners still don’t get China, this book opened my eyes despite the fact I was from China and frequently visit.

An all time classic, a must read to understand ourselves better.

A compelling read about actual survival when in physical danger, some very interesting insights into human behavior.

I found plenty of similarities when compared to my own experiences of running a startup.

This book gave me insight on why and how people make choices, including myself.

The insight on crowd psychology from nearly 150 years ago is just as relevant today.

A very fascinating book about different cultures.

A different way of looking at human history.

If you don’t believe in climate change, this book will make you think twice.

It is utterly incredible that someone with no technical knowhow succeeds by sheer will and leap of faith, in an incredibly cut-throat and political environment that is China.

Just when you are depressed about the world around you, this book will give you context.

I highly recommend the audiobook version of this book, I share much of the same views of Mr. Vaynerchuk.

I consider books like this entertainment, but not without some valid points.

Sobering book.

Phil Knight’s amazing story of how he built Nike. Great writing, great story telling 🙂

Want to build mental toughness? Read this book!

The Joy of x: A Guided Tour of Math, from One to Infinity: Steven Strogatz: 9780544105850: Amazon.com: Books

Math is the key to the understanding of so many things in life, this book is easy to read and a great refresher in case you forgot what you learned in school.

Grit: The Power of Passion and Perseverance: Angela Duckworth: 9781501111105: Amazon.com: Books

Although I didn’t exactly follow what the book prescribes, but my overall direction and actions fits the bill. Persisting, sacrifices, and being optimistic and hopeful did help get me where I am today. This book attempts to have a “scientific” approach to validate these points, which I find somewhat dubious, but it is a good read nevertheless.

A Little History of Philosophy: Nigel Warburton: 2015300187793: Amazon.com: Books

I took a few philosophy classes in college, totally unnecessary towards whatever major I thought I wanted to pursue at the time, but it did teach me to be a skeptical, independent thinker. This is a great “Cliff Notes” approach of philosophers, easy to read and digest but still makes you think.

How Not to Be Wrong: The Power of Mathematical Thinking by Ellenberg, Jordan (2014) Hardcover: Jordan Ellenberg: Amazon.com: Books

A thoroughly fun book on everyday life and how math get entangled in it, it will shed light on an average person’s silly biases and lack of understanding handicapped by poor math. It will help you make better decisions.

This is part 2 of Story told by an entrepreneur of becoming %1 (Part 1 Story) which is originally posted at How can one become part of the 1%?. A bunch of guidelines are provided by the author and they deserve thoughtful reading.  In addition, indexes into each piece of advice are listed.

I know I went long with my crappy writing. But here are some of my lessons for myself, you can take away whatever you can from my ups and downs. If you want to be part of the 1% you have to do the following:

During my early days of trading, when I just tasted a bit of success, I thought to myself this is it! My life is going to be a success from here on. Then I read more and more about successful traders in history, it seemed without exception all of them have gone through stretches of devastation failure, often lead to bankruptcy. I thought it would never happen to me, because….I am reading and learning from their mistakes aren’t I? I don’t think there was anything out here that can adequately prepare me for the multiple failures I was going to have since. I have been warned, but it still took some desperate soul searching moments to prevent me from doing something even more stupid during my dark times. I don’t mean to scare you, but whether you choose to pursue your goal or not, life can deal you a nasty hand sometimes. You better learn to toughen yourself up early and often.

2. Live within your means. Don’t be an idiot like me. Spend money that helps you get ahead, don’t spend money that makes you look like you are already ahead, unless that is part of your business model or tactic (most smart people can see through that right away).

In business this means don’t get ahead and do the “business” make believe things first, like getting an expensive lease, fancy office furniture store and so on. I have ran across so many failed businesses with great ideas and willing founders that made this mistake it is saddening. Make sure you have a long enough runway to see your ideas through, don’t burn your own bridge. This has nothing to do with not being afraid or not being optimistic, it is about being fiscally responsible.

3. Learn how to make money, not how to save money. You will never save your way to riches. Again, this doesn’t mean you need to be an idiot with money! Learn to understand how business, the economy and ultimately the world actually works. The old cliche “follow the money” is absolutely true. Be inquisitive and always ask yourself what is the business model, cash flow, personal motivation in all encounters you run into. That means the businesses, stores, restaurants, the management and so on, what makes them tick when it comes to money. I have been doing this for nearly 30 years now, I can quickly assess how a business makes money, how much money, the key drivers of them making money, the kind of people involved an so on. You will be blown away once you get this level of understanding that a lot of so-called “successful” businesses are actually quite lousy, and a lot of seemingly boring ones are cash cows. It will absolutely give you a different perspective on people and life.

I guess what I am trying to say is make sure you understand the difference between probabilities vs. possibilities in your approach on making money. In my long rambling answer it is easy to think, sure, everything is possible. The truth of the matter is you need to be absolutely hard-nosed to assess the probabilities, not just fantasize about possibilities. Unfortunately there seem to be too many of those “dreamer” type that only think about possibilities and spend very little time to work out the steps that can actually increase their probabilities.

4. Learn how to scale yourself and the business. This means learning how to delegate, how to motivate others and recruit great talent to do works you don’t know how or can’t. My company is filled with people I recruited and most of them are unconventional successes as well. My sales guy Joe is a great example of this. Without the efforts of others, there is no way I am where I am today. People always tell me but I don’t know how to start to leverage and motivate people! I laugh, this isn’t true at all. Have you ever tried to get a bunch of classmates, friends together? Have you tried to round up a bunch of people to go see a movie together? Guess what? You are doing motivation (the event, the movie, etc) already, and the effort of organizing, telling people what to do is the most basic form of management. So it is in all of us. You do enough of this from the small scale, pretty soon you will have authority and clout to do it on a bigger scale and you will be amazed people will naturally gravitate towards the person who is organizing all of this, yes, you the leader.

5. Learn all the time, I read 10-20 books on Kindle or Audible a month.

​I know of no better way to stay ahead and improve yourself better than reading. You probably hear the cliche that you should “invest” in yourself, HELLO! If learning and acquiring knowledge isn’t THE investment in oneself, I don’t know what is.

Looking back the past 30 years, I have witness an explosion of demand for college education. There was virtually no such thing as for profit colleges 30 years ago, now they are all over the place. Needless to say it is due to no small part of the massive inflation for college tuitions. Let me let you in a little secret, most of your college education is wasted time and money and grossly overpriced. I am saying this not because I didn’t finish college myself (I have more than 250 college credits, more than enough to graduate), it is strictly due to my own personal experience and the people I have hired. With the exception of a few electrical engineering, legal and computer science majors, most of the people I hire are working in fields that has little or no resemblance to what they majored. The best employees I have are the ones who can quickly learn on the job and eager to learn more!

I am not at all disputing with the fact that better paid and upwardly mobile people in this world have better education, but it doesn’t mean the said advancement is due to the traditional education at all. Your income and achievement gap has everything to do with your overall education, and this has little or nothing to do with how long and/or where you went to school. It has to do with habit of life long learning. For most of us, learning used to come in only one form, which is reading.

With the abundance of information all over the place these days, especially if you have learning challenges like me, you don’t have to resort to just reading. There is so much free and amazing educational content on Youtube, blogs and even video games, it is a paradise for the learning addicted! My significant other has complained that I spend way too much time reading and learning that I am not paying enough attention to her! Can you blame me? What’s more sexy than knowledge?

6. Learn from history and previous success as well as failures. Some of my favorites books are biographies, you get to learn a great deal about some of the greatest characters in history. Don’t be surprised to learn that a lot of successful people in history had to overcome a tremendous amount of adversity and failure before accomplishing greatness. For example, I learned several key attributes from Genghis Khan, the greatest conqueror in history, and apply them in my business. 1. Genghis Kahn was pragmatic, wherever he went, he tend to kill ideologues and kept the craftsmen who did real work. 2. He tolerated different religions in his regime and employed based on competence. 3. He preferred to fight with a nimble and lean force that is resourceful, instead of having a large supply line. 4. Genghis Khan also recognized that sometimes the best way to win is to feign defeat first to lure your opponents into complacency. The list goes on and on. The point is, I am particularly interested in upstarts overcoming great odds, it serves both as a guide and inspiration for me. If you study the great characters enough, the lessons and examples they have set can be just as valuable today.

7. Ask a lot of whys. Usually 5 whys in a row will help you dig out the truth of the matter. I stole this idea from how Toyota run their production lines. Asking whys can come across as challenging the status quo, or it might be downright uncomfortable depending on your personality, but it is critical you get over it. If not, at least explore the deeper meanings and answers at your own private time, do not ever assume. I am know I can get annoyed by people asking whys sometimes, but what is more disappointing are people who lack curiosity. I am brutally honest when it comes to hiring, I will not hire people who aren’t intellectually curious.

8. Work with smarter people, people who like to hack mostly. Learn, steal their ideas, they won’t mind. It would be the most flattering thing you can do. How else do you stand on the shoulders of giants? Do not fall into the trap of hanging around with people who are dumber than you, sure it might make you feel smug, but eventually you will be left behind. Steve Jobs, Bill Gates and others aren’t genius in any one thing, what they are great at was their ability to recognize their own limitations, so they go out of their ways to work with talents who are smarter, better than themselves. It is always tempting and at times we unconsciously hang around people who aren’t any smarter than ourselves, we sure feel superior and smug, but it leads to what Steve Jobs a Bozo explosion (A quote by Guy Kawasaki ).

When you are starting out at the bottom, you obviously have little choice in who you work for and work with, but you need to understand it is far more valuable to work smarter people. So even if you don’t have much job mobility, you should always be on the lookout for better opportunities, I don’t mean only opportunities for better pay and so on, but most importantly, opportunities to work with people you can learn from. I cannot stress this enough. I would be more than happy to take pay cuts even to work with great talent.

9. Travel as much as you can afford, you will have a much broader perspective. I have learned so much even as a casual tourist from different parts of the world that ultimately helped my business thinking, it makes the airfare and trip costs bargains! How much does a typical college in US costs a year these days? $30–40,000? I doubt very much traveling will cost you anywhere as much, but the lessons and outlook you learned will be far more valuable.Go get your passport already! Here are some pictures I took while running around the world. 10. Laugh at adversity, have fun. Life can be really hard, don’t take it personally, even Bill Gates has really really shitty days. It always gets better. Ask yourself a very simple question when things gets really tough, “is this the end of the world for you?” I am absolutely certain the answer will always be no. If it isn’t, then why are you wasting time wallowing in your self-pity? Get up and fight! As I get older, I realized that get to be more philosophical. I had no idea some of the mental attitudes I have acquired fits right in line with Stoicism. Stoicism has enjoyed somewhat faddish reemergence of late, especially among the Silicon Valley crowd. Fad or not, this approach in life should help one keep perspective in times of adversity. 11. Don’t be a victim, don’t make excuses. Nobody gives a shit about your problems. As a person who grew up in China, this is the part that drives me crazy. As a group of people, we dwell on the fact how China was a victim in recent history (like the past two hundred years) and so on. That’s fine and all, but how is that going to solve any of my problems? I can’t live off whining about how life isn’t fair! Some say inequality is a fact of life, but I never wasted much time bemoaning it. Embrace your dire circumstances and make the best of it, adversity is a blessing in disguise. But most importantly, don’t make excuses. I can find no one who likes someone making a lot of excuses. Excuse making is a common flaw that I see both here in US and China. If you own up to mistake, even mistakes you aren’t 100% responsible for, it will absolutely help you win people over. The time and energy you spend on making excuses could be spent fixing the problem already. 12. Learn a trade that can make you money in good times and bad. I personally can always fall back on my trading no matter what. This makes me fearless. For that matter, I can fall back on all kinds of jobs and functions I have done. I can work as a bookkeeper, a stockbroker, a trader, a salesperson and so on. I almost certainly can start another business and build it up from scratch, I am the jack of all trades. 13. Find an outlet for your stress. When I really really feel like I can’t deal with things anymore, or just don’t want to face anything, I get in my car and go on a road trip, all by myself. I am fortunate to live in one of the most beautiful part of the world, so I don’t have to venture far to find peace. Some of my favorite places to drive have been Death Valley, Highway 1 up and down the West Coast of USA. The other option for me is to go sea kayaking. There is no way I am going to get stressed when I am sitting down in a kayak paddling around the ocean. ​When I didn’t have much money, I spent my zen time listening to music, mostly classical music to escape. But please, drinking and doing drugs isn’t an outlet for your stress, it will just make matters worse. 14. It’s good to have a chip on the shoulder, it gets you motivated. But it is an annoying personality quirk too, so balance it well. 15. Maybe you are just not born with it, I mean motivation. My brother is nothing like me, he is perfectly happy being average and couldn’t give a shit about my struggles and successes. Don’t stress yourself out even more, if you aren’t motivated, learn to be content. If you are however, never satisfied with what you are being told to do, and firmly believe you can do better, you just might be “born with it”. I have always been obnoxious ever since when I was a kid. I constantly challenged the elders, the status quo and always wanted to do one better. I don’t think it has changed even all these years later. As my wealth and the resources available to me has grown, I want to do even more. People around me are used to me saying “why not” all the time. Why can’t you do it this way? Why can’t you do better? Why not me? Where are you weak? But there is another way to get yourself motivated, I mean even for those who just aren’t born with it. Human beings, regardless of culture, are naturally motivated when we feel like it is our choice, our decision to go forth, or in so many words, when we feel like we are in control. None of us like to be told what to do. The secret to motivation then is clear, get control of your own situation; Push, explore, push some more of your boundaries! I am certain the more you push, the more likely you will find new capabilities that you didn’t know you had. Pretty soon this becomes a positive feedback loop that propels you to accomplish bigger and greater things in life. This is precisely why I choose to be a handoff manager and foster the environment of freedom and respect at my businesses. People around me surprise me all the time when given the space to bloom! 16. One of the reason the West lead in development for the past few centuries is the fact for the first time in mankind’s history they allowed the creative class, the entrepreneurs to actually keep their money. This allows wealth creation and built in motivation for people from all walks of life to strive to push themselves to accomplish more. Unfortunately confiscation and coercion that loots the fruit of labor are still going on in much of the world today, if you find yourself in this kind of oppressed environment, you have to decide whether you want to stay and fight the system, or just leave. I was fortunate to be able to thrive and prosper in what I consider the best system in the world, I certainly couldn’t have done as well in the old China I left behind. Even in US there lies a great disparity in the odds of startup success. I was fortunate to be at the right place at the right time in many occasions, being in the Great Seattle area surely helped. If you are trying to do a startup in Mississippi, good luck. You might want to move to a better state. 17. Don’t believe the BS about inequality. The real inequality is the level of personal drive and intelligence. I came from nothing, dropped out of college with IQ no higher than George Bush. If I can join the 1% 3 times, so can a lot of people. The populists would like you to believe there is less social mobility these days. Really? Would the 1950s have been better? Say I am a minority in US with no “proper” education, no capital, no connections and so on, could I have accomplished what I did? How about going back to the 1850s? Slavery in America and much of the world, was that a golden era for the underdogs? My point is, if you want an excuse, you don’t even need to come up with one yourself. There will be plenty of people out there helping you to whine. And what does that accomplish? It will just help you maintain the status quo, which is poor, uninformed and down. Don’t fall prey to that. Every time there is an election cycle in the US, politicians would like us to harken back to a time when there is a large middle class, as if that is the golden era of mankind. Fact is, even the poor in US today enjoys a better standard of living than the upper class in the 1950s. It is human nature that whenever there is a comparison, you will not care about where you stand on an absolute level, you will almost certainly measure your wellbeing on a relative level. There is no question the so-called middle class is shrinking, I am not going to spend time and effort here to debate the causes. This answer is about how to get to the 1% after all, aiming for the comfortable middle is easy. We are statistically born average anyways. Decrying in equality almost certainly put yourself in a worse off position, at least psychologically. Throughout history there is always this fantasy of having some kind of utopia where most everyone is equally happy. I don’t know about you, I lived through that fantasy, it was communist China, where everyone was equally miserable and poor. There was less envy for sure, but human beings will find other ways to tip the scale to make things unequal. For sometime in America and certainly in Asia, there has been what I consider a fraudulent marketing of higher education, all based on this unspoken notion that advanced education is the key to break the strangle hold of “inequality”. The thinking goes that rich people have better access to a better education, therefore they will do better in life. So it makes sense for a middle-class person/family to go in debt to get one of those fancy education. If you really believe in that, you might as well believe in the tooth fairy and Santa Claus. In my years of doing business and functioning as an employer, I see next to no correlation between advanced education, particularly ones from pedigreed schools vs. job performance and success. What I do see is more narcissistic and overconfidence from those with the pedigreed backgrounds, some of them carry themselves with this badge. I have been a fierce advocate of lifelong learning, heck, learning all the time for that matter. With the internet and abundance of freely available information, even courses from fancy Ivy League institutions freely available online, the so-called inequality in learning is gone. Do you and your family need to go in debt and pay what is essentially highway robbery kind of pricing for advanced education? Is that really the difference maker? How is that any different than any other form of conspicuous consumption? If I am sounding like someone who is self justifying my own failure in standardized education, perhaps I am, but I suspect I am not in the minority. There are plenty of people like who cannot pass the rigors of the status quo, do we write those people off at an early age and condemn them as a life failure? Is that really equality? You know my answer. 18. Yes, it is you against the world. There will be all kinds things that “conspire” to put you down, but so what? But even at my darkest moments, there are inspirations I look for to lift myself up. Here is my favorite poem, you might find it a bit cliche, nevertheless, here is what English poet William Ernest Henley wrote while suffering from severe tuberculosis (lead to leg amputations and so on) ​Out of the night that covers me, Black as the pit from pole to pole, I thank whatever gods may be For my unconquerable soul. In the fell clutch of circumstance I have not winced nor cried aloud. Under the bludgeonings of chance My head is bloody, but unbowed. Beyond this place of wrath and tears Looms but the Horror of the shade, And yet the menace of the years Finds, and shall find me, unafraid. It matters not how strait the gate, How charged with punishments the scroll, I am the master of my fate: I am the captain of my soul. 19. Learn how to sell. This is perhaps one of the easiest way to get above everyone else. Whether you are a doctor, lawyer, accountant or any other professional, you will notice the ones on top are usually people who can sell. They sell themselves, they sell their ideas, they sell and motivate others to do their bidding (this is scaling). Bottomline, sales people are some of the highest paid out there, and it requires no specialization or education. I know some of you look down upon salespeople, some of that might be the result of a bad experience or encounter. For others, even some of my family members, salespeople are somehow “lower class”. I am a pragmatist, so I will say get over it. All businesses are in the business of sales, period. If you want to succeed, you need to learn how to sell and do it well. I have been asked quite a few times in the comments section of this answer about sales books. When I started out selling nearly 30 years ago it was full of the old school salesbooks espousing the virtures of “Glengarry Glen Ross”, things like always be closing, it is a numbers game and so on. This is one of the biggest reasons I quit my job as a stockbroker. I despised the social engineering, high pressure and ultimately stupid approach of the old school of selling. If cold-calling 300 times a day resulting in maybe one to two prospects isn’t terrible non-scalable yield, I don’ know what is. Calling it a numbers game simply means you are doing the same stupid thing over and over and expecting a different result is just insane! Sales isn’t magic. There are very few things that works. In this day and age where consumers have so much more access to information, the BS meter is always on. So here are a few things I found that works: Be competent. Know your stuff, know your product or services that you are trying to sell. Know your competitors, know your customer’s alternatives well. There is no quicker way to lose credibility when you aren’t prepared and exposed to be a know-nothing bullshitter. This is perhaps the biggest reason a lot of salespeople fail. They don’t put in the work in the first place and somehow expect to wing it. Know the different between being enthusiastic and pushy. Enthusiasm can be quite infectious, but being pushy simply means you are trying to impose your own interests, your own agenda onto others. No one likes being told, harassed, or tricked into doing anything, even if it might be in their best interests. Think of it this way, would you rather go to a party or a school assembly? You customers always have options. Even if they don’t at the moment and had no choice but buy from you, the moment they do have a better option they will leave. So never, ever make them feel like they have no choice, instead make sure you are always their best option, but make sure they come to that conclusion themselves. Service your customer like they are the most important person in the world. Think how you would behave when you are in the same room with the President of the United State. Yeah, treat your customer that way 🙂 Make darn sure you actually have something better or different you are selling. It doesn’t always have to be the main and obvious features or benefits. People have assumed that the reason my company is successful is because we have some amazingly fantastic technology, or we have some incredible handsome salespeople, or we have the right connection or relationships, so on and so on. When I tell them it is actually our attitude that sales, they always look puzzled. Imagine you have a life threatening disease, and you have this world class doctor who can cure you, yet this doctor never comes across as a savior or condescending but instead behaves like your servant. How would that make you feel? Selling is about story telling. I don’t care what culture what country you come from, as human beings, we all share one trait, that is we enjoy stories. Great salespeople and effective leaders know this all too well. We don’t buy products or services, we buy from people. Ultimately we want to be able to relate to one another. There is no better way than to tell stories to reveal the personality of you, your product or services. I am not suggesting you make up some BS story or some canned pitch. It has to be authentic. This is another reason I tell people to read, read a lot. You can’t help but come away with all kinds of stories, anecdotes, “junk knowledge” that you can infuse in your story-telling. You should practice telling stories on random strangers, and you will be surprised to hear and learn all kinds of new stories from others this way. I know some of you are introverts, so this might be a challenge. But learn to open yourself up and be vulnerable, share your experiences and stories. You will be shocked a lot of times people buy from you even if you haven’t pitched anything yet. Again, people buy from people. Don’t be a robot, don’t be a pitching machine. Be human. 20. Don’t take yourself too seriously. Make sure you are having fun. The American cliche about working on something you love or having passion is grossly overrated. It is far easier to find something you can fun in. Business can certainly be fun. Often times fun and not taking yourself too seriously can be the key differentiator for your business success. Who wants to do business with a bunch of boring and sour puss? 21. For most people this is the part that is hard to take: you will never get rich working for someone else. You might still be able to join the 1% if you have a highly paid job, but you are still someone else’s wage slave. Fair or not, capitalism is about the ownership of capital, the means of production. In a world where long term growth stagnates (Europe, Japan and even America), ownership takes on even more importance because access to capital is constrained and return on capital is low (try to get a small business loan these days). So the only way out for most people is through entrepreneurship. Try and figure this out early in your life. I got lucky because I didn’t arrive at this notion twenty years ago through thought and analysis, it was pure drive. 22. I am probably going to offend a lot of people with this one. Yes, I am Chinese, or what might be considered a minority in US. But I never view myself as such. I mean I never considered myself as Chinese, Asian, yellow-skinned and so on. I feel no superiority or inferiority, I am human no different than anyone else. It absolutely helps to be in a country such as US where there is such a mix of race and culture. BUT, the race and culture aspect has been played far too much by the minority groups, including the Chinese. I am not suggesting there isn’t racism, nor am I saying there isn’t a glass ceiling for some. You can decry all the “unfairness” that is in life or you can ignore it and fight on anyways. I am grateful for the likes of MLK who helped to pave the way for minorities and the disadvantaged, but life is short, you don’t want to wallow in your self-pity just because your circumstances. Race, skin color, where you are from are just some of the small bumps in your long struggle in life, so get over it. I have personally experienced what some might considered racism, but I never let it get to me. I simply try harder. You will be surprised that even a racist appreciates someone who doesn’t give a fuck and simply out hustles. Effort is infectious! 23. You have to know how badly you want to succeed. Some of the comments I see out there regarding this more or less suggests that I am not the norm and I got to where I am by luck. I will admit that I have been incredibly fortunate, but much of it had to do with the desire to succeed. I went through high school and college years never going to parties, never drank, never touching drugs, never traveled and so on. I simply worked and worked some more. Any spare time was spent learning and reading. This in hindsight is perhaps a tall order for most people, but it laid the foundation for where I am today. You have to be honest with yourself just how badly do you want it? In most Western countries, it isn’t that hard or terribly uncomfortable to be average, so the journey to success might not be worth the price for a lot of people. Lastly, it takes a saint to live with someone like me. Some of hours and some of the ups and downs are absolutely brutal on relationships. If you don’t have someone who can understand and tolerate it, you are looking at years of lonely struggle with no real prospect of paying off. Some might find my story as inspirational, but it is also a warning. Even with the best of intentions, it can wreck your life too. Just because you want to succeed badly, or what I call desire, it might not take you very far. I see this on Quora all the time. “I want to be a billionaire when I am 30”, “I want to be such and such in the next five years”, “I want to be able to buy this or that”, “I want to get this job or that job”, “I want to make $$” And so on. Do not mistake desire and ambition. Most everyone has desires, but few has ambition. It is easy to see a fancy car, a big house or someone with stature and desire to acquire or be that position. This is your reptilian brain doing its work. The work and effort to satisfy those desires might still be quite arduous, but they seldom lead to to long term success. I have experience that for sure. The high you get from accomplishing material success is fleeting, it might lead to an ultimate crash like I did. But ambition is another thing entirely. Ambition will drive you far beyond the trappings of material wealth and success. Wealth will be merely just means to an end for your ambition. Look at people like Steve Jobs, Elon Musk, Bill Gates and so on. Material wealth isn’t what they are after, material wealth is a byproduct of their ambition. Ultimately even having all the desire and ambition in the world without a practical day to day approach won’t get you far. All those Quora questions of “I want to be$$$$rich or successful” are what psychologists call high level goals. Psychologically it is comforting to ourselves to daydream about those high level goals, we can all fantasize how wonderful life would be if we reached those goals, there is almost this level of innocence to it. Kids do it all the time, and we find it absolutely charming. But the harsh reality is that fantasizing with high level goals without implementing with a long series of mundane lower level goals will eventually leave you with nothing but “potentials” unfulfilled. We all know those older people talking wistfully about what could have been their life, or what they wanted to pursue but didn’t. I hate to sound harsh, but I really have very little sympathy and time for those people, because they didn’t want to put in the effort to do the real work, or lower level goals that could have led to those higher level goals. So there, I might have burst your bubble a bit, but the good news is if you do the real work, you will have already set yourself apart from the 80–90% out there. If you want so badly to succeed, make a list of all the things and goals you want, then take a long hard look at this list and reduce it down to less than half a dozen, then ask yourself what are the concrete steps you need to make day in and day out for the rest of your life to get there. Don’t be surprised to find out the steps are absolutely boring and repetitive, be brutally honest with yourself. You have a choice to make right here, right now, do you still want to go forward? If not, at least make peace with yourself that there is still a great deal of joy and peace in life to live for, perhaps more average than extraordinary. You will be happier that way. 24. It’s OK to be a generalist. In my case, I probably have a case of attention deficit disorder. I could never sit still for long, I get bored and distracted easily. It is very very difficult for me to focus on any one thing. While I am writing this, I am listening to music, got some news feed going, stock tickers and live stock charts going, and two dozen browser tabs open on various things like photography, business news, travel and gadgets. This inability to focus has costed me in some ways but it has also allowed me to pick up on so many seemingly disjointed and unrelated know how and skills. My parent’s generation liked to label people. You are a doctor, lawyer, engineer and so on. When I came to Seattle when I was sixteen, my uncle was still working at Boeing as an engineer. He was someone I looked up to and wanted to model my life after. That thought went out of the window when Boeing did a round of layoff in the early 1990s and my uncle took the early retirement package. He was still in his mid 50s at the time and he has never worked since. I even went so far to try and apply for some engineering oriented colleges and somehow managed to get accepted by Caltech. I think they made a mistake, because in hindsight I really sucked at math by the time I got to college and I didn’t at all enjoy any of the engineering classes. I would have failed miserably. Fortunately I was too poor to be able to afford Caltech anyways, I went to University of Washington instead, but even then I didn’t finish. Looking back, my work involved in sales, finance, trading, business development, accounting, HR and management. My titles were all over the place. I was a “courtesy clerk”, back wall clerk, salesman, stockbroker, financial consultant, investment advisor, hedge fund manager, startup CEO and now a venture capitalist, and maybe something else in the future. If you asked me what is my specialty, I have no idea. For years my parents just assumed I BS for a living, they didn’t want to introduce me to their friends, what do you tell others just exactly what I did for a living anyways? I have only recently gained respectability in their eyes because our office is larger in a nicer building. Truth is, all of my experiences brought me here today. No one should copy me. It would be almost impossible anyways. I suppose it is a recent fad that generalists like me are not acceptable but somehow thought as being a positive attribute. Being a generalist because I tried and failed at so many things is the real reason I am where I am today, but being able to synthesize all the things I learned from different aspect of work and life is the ultimate triumph. 25. Pursue what you love is so overrated. First of all, what you loved to do in your earlier life might have little or nothing to do with your love and interests later in life. If I were to be left to my own devices, I probably would have pursued something in the arts. My parents and my brother are all classical musicians. I grew up listening and loving music, I painted, I spend a lot of time and a small fortune on photography. But most of these pursuits would have easily landed me in the poor house. My burning desire to succeed in business is what will actually allow me to pursue what I love, now that I have the time and resources. But does this mean I hated what I did all these years? Absolutely not. I loved trading, I love being engaged and building business, I love motivating people and see them do amazing things with abilities they didn’t think they had. I loved the process of building a business. I absolutely despised the little tasks required to get there though. I don’t care for accounting at all, yet I have no qualms spending a ton of time reading financial statements and reports to spot opportunities. I guess what I am trying to say is that one needs to have an open mind and learn to love and enjoy the process of a business, even if you rather pursue your “passion” somewhere else. If you get some success in business, you will have far more resources and time to go after your real love. 26. If you are a young man just starting out in life, this is the advice I got from someone years ago and I still try to live by it today: Try everything in your twenties, you aren’t going to be any good at anything anyways, people have low expectations from you so don’t worry about failing or being lousy at what you do. Have fun, try everything! Try and figure out what you are good at in your thirties. Maximize what you are good at in your forties. Since I am still in my forties, I guess I can’t really tell you any more! The advice above is important, especially when you are starting out in life. I talked about having higher level goals in life and doing the mundane work to fulfill the lower level goals that help make the higher level goals possible. Here is the rub though, even if you are telling yourself that doing all the “boring” chores are necessary, and it will be for your own good and so on, few people will have the passion to do that day in and day out. This is why experimentation early on in life is so hugely important. I tell people to be different in business and life for a reason, the world interest originated from Latin “interesse”, or different. You need to be trying out different things early in life to find what really interests you, hopefully you find that one thing that get your juices flowing that you are willing to devote countless hours and sacrifices to become that master some day. This is why I find the conventional education system, especially the Asian system that I grew up in appalling, it manages to kill imagination and curiosity early on. The more promiscuous you are in your interests early on, the better! 27. It really is okay to start later in life. I didn’t start the company that transformed my life (in terms of wealth) until I am 36, by age 40 I was homeless and living in my office closet. So by Silicon Valley standards, that is just ancient. You read all about these late teen or young twenty something that is somehow taking over the world all the time these days (UNDER 35 AND CRUSHING IT: Meet the most ambitious young founders in New York who are building the next giant companies) Guess what? My parents used to guilt me about some prodigy getting into college in their early teens, as if this is somehow going to motivate me and transform into a prodigy. But the truth of the matter is, life is all about how you finish, NOT how you start. I have met several of those prodigies, they end up no different than anyone else. This is why I love the story of Sidney Frank ( The Cocktail Creationist). He didn’t get his start until well into his 50s, but the man never gave up. His best days was certainly in his later years. Keep the thought that you will be judged after you expire, not all the days in between your birth and deathbed. So if you didn’t get your life figured out until you are at a later age, don’t fret. Everybody is different, you might well be a late bloomer. 28. If you are starting at the bottom, regardless of your age, remember this one simple rule: always deliver more than what is expected. I don’t care what job, what industry, or just how menial the task is, go above and beyond what is required. If you always do more, or delivering more value to your boss, your employer, your partner, your significant other, there is no way you won’t succeed at what you are working on. Keep in mind this doesn’t necessarily mean working long hours and working late, working smart matters even more! Success in one small task can lead to success in something much bigger down the road. It is the mental attitude that you are just going to do more, offer more, keep coming up with more that will impress people and make them want to work with you and offer more opportunities to you. I still remember at my first job at Safeway, I knew I was taking on the work load of 2-3 more people without getting paid more. It got me a quick promotion and raise from$3.50 an hour to $5.25 an hour. It taught me that effort does lead to recognition and payoff. Of course, if your employer doesn’t recognize this, he/she is an idiot, you should move on. 29. Please keep your envy in check. Yes, envy is jealousy without the sexual tension, and it is really really stupid. Envy is what gets what seemingly reasonable people into deep trouble, the younger me was an easy prey for this. Envious of someone getting more success (job, money, etc) faster, younger and so on drives people to do stupid irrational things. If you are a trader, you saw someone else with a bigger house, flashier car, so you think you “must” have it too and soon! It leads you to over trade, over leverage and take on unreasonable risks. If you are a businessman, you think your competitor is getting all the attention and press, so you want to “prove” you are more deserving, so you jump up and down and do the “I can do better” deal (Microsoft to Acquire aQuantive, Inc.) So stay away from silly articles like The richest person in their 20s, 30s, 40s, and up It will surely mess up your head. Envy is toxic, it can wreck your wealth and good fortune, not to mention sanity faster than just about anything else in life. I am all for being competitive, but not envy. 30. Be different, even if it means being different for spite. For someone who grew up in a culture where conformity is expected, this is hard. It meant being an outcast, rebellious and being disagreeable a lot of times. But there is a real purpose and benefit by being different. In business, companies are being told to be innovative, differentiated in order to be more appealing to consumers and be better competitors. Unfortunately most people and companies still make the same mistakes over and over again, namely copying others, especially people and companies that society deem “successful”. The problem is this, the people and businesses who are already “successful” are good at being themselves, and most likely already have more skills and resources perfecting what made them successful. If you copy what they do, you are merely trying to play a game that is perfected by them! Even if you are good, work hard and so on, you are not likely to beat them at their game. You should play a different game, a game played on your terms, perfected by you! This is why I intentionally look for and hire people who are considered misfits, weirdos, and malcontents. It is awfully hard to be “innovative” when surrounded with a bunch of generic, “boring” people, isn’t it? 31. Money doesn’t define you. Please learn from my mistakes! When I was this raging asshole with money back in my late 20s, I was foolish enough to think money is my identity. Plenty of people make this same exact mistake. You see them everywhere. They carry themselves based on how much money they have, here is one example Dan Bilzerian (@danbilzerian) • Instagram photos and videos Although I went nowhere near as far as Mr. Bilzerian, I can identify with the attitude. The problem with having your ego tied up with money is that when you fail, like I did, your ego will get crushed along with it too. Not everyone can get up like I did, (and boy was it difficult to get back the first few rounds) then what? It might well ruin you for good. Looking back, I am proudest of the periods of my life when I was down and out, not my douchebag days 🙂 32. Learn to say no. Most of us want to be loved, approved of, fit in, popular and so on. Unfortunately this also means saying a lot of yes when you really don’t want to for fear of offending others. I am not a baseball fan, but there is this expression in baseball called the “fat pitch”. It basically means as a batter you don’t swing at every pitch that is coming at you, you patiently wait for the statistically high probability pitch because you only have limited chances at swinging. You need to think life and business the same way. There are too many distractions and low quality encounters, you cannot partake in all of them, otherwise you will be dragged down. Constantly ask yourself if what you are about to spend your time on actually help you advance your cause, if not, why are you doing it? I have trained my sales staff to fire customers, yes, fire customers. If the customer isn’t economically viable for us to service, we are doing them a disservice by hanging on. We would certainly not able to run a business in a sustainable manner either. With people it is the same, you want to get ahead, then spend time with quality individuals, do not tolerate mediocrity. If you find yourself the lowest caliber person in the group, that would be fantastic! You can learn from the rest of the group. If the opposite is true, you need to move on. I absolutely despise the Chinese expression 比上不足比下有余, which means when compared to those who are better, you can’t measure up, but compare to those who are worse, you are doing just fine. No, you can always do better. Take charge of your time and effort. 33. What if you are just not smart! Don’t sweat it! Well, I am not so sure there is a strong correlation between monetary success and intelligence. If anything, there might even be somewhat of inverse correlation! This is not to say the dumber your are the more likely you will succeed. I am not particularly smart, considering the fact I couldn’t finish college, it is further proof I am your typical slacker in school. When I was a trader, I noticed a clear pattern. The “smarter” ones, you know the ones with advanced degrees, went to the right Ivy League schools and so on are usually lousy traders. When I was a broker, we laughed at the doctors and engineer types because they are usually terrible investors. The head of my company’s engineering is a brilliant fellow, but he is a terrible investor. Again, this might just be all anecdotal, but there might be something to it. A lot of the rich and successful people I met aren’t exactly the sharpest tool in the drawer, but why? Over and over again, the “smarter” ones tend to be too logical, which leads to analysis to paralysis, and they miss great opportunities because opportunities don’t always present themselves as fully formed and obvious. Smart people also tend to want to pursue an “edge”. You will hear a lot of traders and hedge fund types go around and around looking for one. Meanwhile, the dumber ones like me understand the real tangible value isn’t always an edge. Persistence and doing the things that just aren’t glamorous can pay off big too, but it tend to take time. I used to scoff at the turtle vs. hare story and thought I rather be the hare. Now that I am much older, I realize the secret to enduring success is winning over time. 34. Always be long term greedy! Most people are selfish and greedy, they just don’t want to admit it. I have no problem with being greedy. But what I cannot stand is being short term greedy. Coming from China to Seattle, a place that has a relatively sparse population (compared to most places in China) made me realize the vast difference in business mentality. When you do business in China, or when you encounter a typical Chinese businessman, the common scene is right on the surface. The Chinese business or businessman always asks how much business are you going to bring to them, what is the quantity, how fast and so on. They want to gauge the upfront upside for them before they will commit. They usually couldn’t care less about the “long” term. This is what I call short term greedy, which leads to businesses that are transaction oriented. To me the reason why is simple. There is a lot of people in China (duh!), customer service and long term value isn’t so important, because there is always more coming! Meanwhile, in slow going Seattle, or much of the West for that matter, you don’t have the vast pool of people you can dip into. You are forced to value longer term relationships, hoping for more businesses over time. As it turns out, this isn’t a bad way to do business at all! Because all businesses need to acquire customers, so there is this cost of actually getting a paying customer which we call customer acquisition cost. It can be in the form of advertising, personal selling and so on. The stereotypical Chinese businesses is very much like a hamster on a wheel, it needs to be acquiring new customers all the time because they are disposing the old ones fast! If you do the opposite, which is take care of the customer with great service and humility, you don’t actually need to be spinning your wheels all the time because they come back over and over, thus reducing your overall customer acquisition costs! So is it a wonder Seattle is the home of some of the most customer friendly businesses in the world? Costco, Nordstrom, Starbucks, Amazon, and REI all started here, and they all have one thing in common, great customer service! Being long term greedy means you do the things that might not pay off right away but it will help you build sustainable business and hopefully wealth over time. If you treat your relationships with people with this mentality, you will be far less stressed out (you are not spinning your wheels all the time). Always ask yourself when you engage with people in business and life, am I being short term greedy or long term greedy? Do I want a transaction or do I want a relationship? 35. Money is a tool. When I first arrived in US, I was blown away by the wealth of this great country, I fantasized one day being able to reach middle class status. I saw this ad for the Washington State Lottery, which only had a top prize of$1M at the time, and I thought to myself if I had that amount of money I would be completely set for life! I would have a house, a nice car and never have to work again! This is all before I really had a real job or made any money of course. I suspect most people, even middle class people think along this same logic, only if I had XX amount of money! I can buy this or that! Wrong! As I have suggested earlier in my story, yes money can buy you stuff, and the pleasure that comes with it might be great, but as time goes on, the amount of pleasure diminishes, so you look for more and more expensive items to buy to get that some amount of pleasure as before. I have never done drugs, but I suppose that is pretty much what a drug addict must feel like. Unfortunately, your desire for material goods might run faster than your ability to make money, it certainly happened to me! So eventually I got into trouble. When I was going through all this, my mom asked me just how much was enough, I never gave it much thought then, it seemed no amount of material possessions was enough. It wasn’t until years later, after my struggles of building my current business that I finally got it. I didn’t need all that much money to build the business (remember, it took us $45,00 to build what is now a$100M business), I didn’t need all that much material possessions to feel safe and secure, but why am I still trying to make so much money?!!! The answer is simple, it really isn’t about the money, it is about having the tool to do things. I never thought I could be in my position today, a guy with no formal degrees in anything running a software company. But here I am tinkering, wondering about possibilities everyday with my staff, my friends, the startups I have invested in, possibilities of doing this and that. As of this writing, I am working on four companies and nearly 10 different products at the same time. I am having the entrepreneur’s high everyday! I don’t need a venture capitalist, I am my own venture capitalist! I don’t need approval from anyone to see if my idea is sound, we simply brainstorm and start going at it. I am more engaged and having so much more fun today than I have ever been. Sure, I am not an engineer, but it hasn’t stopped me from coming up with all kinds of wild and crazy ideas and pursue them. Having the means to pursue all the crazy ideas but more importantly keep having the means is more important than ever. I sincerely believe we live in a fantastic age of technology renaissance, the pleasure I derive from expressing creativity using technology is a much better high than I can get from anything else. I now understand why Richard Branson gets into so many businesses! It is just plain fun!

36. Don’t do business with dodgy people. You know who those people are, most of us can feel it in our bones. Due to circumstances, we sometime overlook and override our gut instincts and end up doing business with questionable people. It will unfortunately boomerang and come back to bite you, just like what happened to us. We did business with questionable customers that nearly killed us. Ever since that episode, I am vigilant with people or businesses that I find questionable. When in doubt, get out! Of course, some of those dodgy people will make excuses to continue to fool people. But here is a line I heard from somewhere else: There is no such thing as laps in integrity, you either have it or you don’t.

37. Are you a choice maximizer or a choice satisfier? In Barry Schwartz’s The Paradox of Choice: Why More Is Less(Barry Schwartz), he posited that there are two types of people, choice maximizers and choice satisfiers. The concept is simple. Some of us agonize over decisions on all things in life, then there are people like me, able to make snap decisions and be perfectly happy with our choices. The folks who agonizes over things will spend a great deal of time doing research, slicing and dicing over their decisions to make sure it is the “right” one. Often times, even after the decision is made, they will spend a lot of time second guessing their choices. Needless to say, these people tend to be unhappy, unsatisfied a lot of times. I am not sure if there is a right way or wrong way to be an entrepreneur, but based on my own experiences and watching others, I prefer to stick being a “choice satisfier”. Yes, I make bad choices all the time, since I am your snap judgement type. But I view nothing as life or death decisions, and I am perfectly comfortable to be wrong all the time, if not most of the time, the quick decisions allow me to have more “at bats” in life. At bats is a baseball term, it just means you have more chances at trying whatever you are doing. I believe my quantity of experiences and mistakes actually allow me to learn fast, make mistakes fast and get ahead even faster. Needless to say I am far happier as a result since nothing really bothers me. So, are you are choice maximizer or satisfier?

38. Learn how to spot opportunity. This one is actually not all that hard. Life can throw you a wrench sometimes to make you feel miserable. But it does the same to the rest of the world as well! In the past 30 years I have been in US, I have witnessed the crash of 1987, the bear market of 1990-1991, the stealth bear market of 1994 (Orange County bankruptcy), the 1997-1998 Asian/Russian currency crisis, the 2000-2002 dotcom crash, the 2008-2009 Great Recession. Not to mention all the ups and downs in my personal life and the troubles in other people’s lives. In retrospect, these were all opportunities! Why? When the whole world is in crisis mode, people and businesses are in turmoil, as humans, we simply want someone, something to step up and turn things around. If you are an entrepreneur, there is no better time to start or invest in your ventures when there is a crash or recession because pretty much everything is cheaper and you will have far fewer competitions! You will be able to attract better talents too! But what if you are simply working as an employee and the company is in crisis mode? Even better. Your boss might be in a jam and panicking, someone needs to step up and doing something to right the ship. Look at sports teams, over and over again we see new stars being made became some veterans got hurt. Think of it this way, the world or the business you work in is having a problem precisely because the incumbents screwed it up! It is the perfect time for you the newbie to shine! As of this writing, it appears we are heading towards another recession/crisis. China’s economy is slowing, the stock market there and perhaps the rest of the world is heading towards a bear market. There might be a lot of chaos and confusion ahead, so will be a lot of fear. I view it as a golden opportunity as I have been preparing for just this for the past several years. You should view it as such too. Keep calm and get ready to step up!

39. If you are aiming to get into the 1%, you are aiming too low. A lot of the comments I received from readers both from Quora and Chinese sites seems to give the impression that I got to where I am today because I worked my ass off. That is only partially true. I absolutely did worked like a dog in my early days, but simply working like a dog with minimum pay isn’t going to get you far. This is also the same reason the most working class people around the world are stuck making no forward progress. The real reason I am where I am today has a lot to do with my choice of industries I trafficked in. In much of the 1980s and 1990s, Wall Street was enjoying one of the greatest bull markets in history, if you worked on Wall Street, there was money to be made. Unwittingly, I made a simple choice because I read Liar’s Poker (Michael Lewis) and got absolutely fascinated and opted to work on Wall Street. By the early 2000s, precisely because I lived in Seattle, one of the biggest technology hubs in the world, I sensed that is where the opportunities are. In hindsight, I got very lucky and got my choices right. So I was at the right place at the right time. But that isn’t really my point at all. My point is, at the current time, I believe we are at the golden age for entrepreneurs. There has never been a time one can have so much access to computing power, exponential scalability and the abundance of cheap capital, resources. If you work hard, work as an individual contributor, you can get to the 1%. I did that when I worked in sales, in trading and running a small hedge fund. But ultimately, it didn’t scale. Not only that, I didn’t really solve other people’s problems, I solved my own, which is strictly financial. If you really want to go far beyond just the 1%, you should aim much much higher. Aim to solve problems on a massive scale, because the resources are there for the taking. Unlike the industrial age, you don’t need a ton of oil, iron ore, coal and transportation or even an army of workers to get things done. You can now harness the easily available computing power and bandwidth from the likes of Amazon Cloud to solve problems in all aspects of life and make immediate impact. I will repeat the old cliche in business, if you solve people’s problems, money will come. If you solve massive problems, you can expect massive wealth too.

40. I don’t know why it took me this long to get to this point, which is be persistent. This isn’t a secret. Persistence wins by default. Think about it, you don’t have to be good, you just have to be around when everyone else gives up. That is what happened to my company during the “Great Recession”. I intuitively know if we persists, we will be fine, or even thrive because our competitors will have thinned out. Think about anything significant you want in life, if you don’t make the initiative and persists, would someone simply hand it to you? Even if someone does hand it to you, would you treasure it? I very much doubt it. Persistence does something else too, instead of worry about being judged based on someone’s disadvantaged beginnings, you now have control on how you finish. Are we all going to be judged based on how we finish? You don’t get medals for how fast you start at a marathon. I really resented all the “child prodigies” when I was a kid (Chinese culture seems to have a perverse affliction on this, just read all the nut job Tiger Mom). Those early expectations place unrealistic demands and stress on an individual, when in reality pacing and nurturing ones talents is far more important. I have no idea what my talent is, since I exhibited nothing special at an early age, my exasperated parents probably wrote me off because the only attribute that I had was constantly asking why and rebelled. Turns out, the persistent defiance is probably what got me here. It is the same defiance that allowed me to press on when no one believed in me. So yes, persistence = defiance. Of course, how loud or quiet you want to be in being defiant is entirely up to you 🙂

41. Beware of lists of “what successful people do” 🙂 The irony of it all! I see these silly clickbait lists more and more these days. List like: 5 things successful people do in the morning; 10 things successful people never say!; 7 habits of successful people. So on and so on. Please stop and think for a moment, you are NOT them! I am almost certain all those successful people didn’t get to where they are by blindly following some do or don’t do lists! The biggest irony for all those well-meaning list maker is that they have in effect reinforce the notion of conformity. Conformity is almost always a losers game, success hardly ever comes because you conformed. We all need to find our own way. Don’t be intimidated just because you somehow don’t fit any of those lists.

42. I wish I was taught statistics at an early age. I believe the education system worldwide is doing a great deal of disservice when they don’t teach kids and adults the basics of statistics. It is so much more relevant than say another foreign language or even advanced math, we would all be so much better off if we aren’t mislead by things in everyday life if we have a basic understanding of statistics. Perhaps the most important idea out of statistics is this, correlation doesn’t equal causation! Here I am dispensing what I thought is true to my so-called success, but it could easily be a mistaken case of correlation and nothing to do with causation! Here are some correlations that are popular today but may have nothing to do with causation:

Bill Gates, Mark Zuckerberg, Steve Jobs all dropped out of school and became successful billionaires, so I am going to do the same.

The French eat a lot of cheese and drink wine and they are not obese like a lot of Americans, so I am going to drink a lot of wine and indulge in cheese!

A lot of CEOs came out of Ivy League schools, so in order to be successful, I need to have an Ivy League MBA.

A lot of successful startup founders came of Stanford, so if I can get in Stanford, it will increase my odds of success.

Facebook did this and this and they are super successful, if my company copied what Facebook did, we will be successful. Of course, before Facebook there was Google, Microsoft, IBM, Xerox…..

My point is, DO NOT be easily swayed by what appears to be the causes of success, often time it is nothing more than correlation. You need to be engaged in critical thinking and do your own thing. Blindly copying someone who has mastered their own game only means you will always be inferior to the said master. Be a master of your own game.

43. Grades isn’t everything. Actually, what I am really trying to say is that you should value what you have learned, how much you have retained more than the grades you are getting. We all know those people in school that don’t study most of the time but managed to scramble at the last minute and magically getting As. Well, I wasn’t one of those, I didn’t really envy those people either. But society in general surely liked them because they are able to do very well at tests. The whole time I was in school, I was far more interested in learning how things worked, this also meant I skipped a lot of things that I didn’t find important. Needless to say it didn’t help my grades. But years later I still remember all the lessons and steps on things that interested me. I value how knowledge of one aspect lead to another, how basic foundations are laid.

I am not advocating you goof off in school and get lousy grades, I am advocating you devote the time and energy to learn about things you are really interested in, and better yet, gain and understanding how it can lead to body of know-how that is useful and meaningful to you. If it means not getting good grades, so be it. You are only being graded in school, the grades you are getting later is the life you build for yourself. You should value life long learning instead of standardized testing scores.

44. Be generous. Offer more, give more, and do more. I don’t think anyone likes stingy people, and I don’t mean just the monetary stingy kind. “Letting it rain” is also stupid, it is nothing more than showing off. But the authentic kindness with your time, money and efforts goes a long way. Generosity really means you have no expectations of a return on your efforts. It took me a long time to learn this. I must admit that when I was poor and struggling, it was quite difficult to even think about generosity. But looking back at all the opportunities and breaks I got, I was on the receiving end of the generosity of others. Most of those people I have either lost track or are no longer in contact with, and they certainly had little to no gain from my success, yet I was offered chance after chance. Just the thought of it humbles me. I hear all kinds of sales pitches these days, the most common one in technology startup pitches is this line “we make the world a better place….” Here is my pitch to you and a reminder to myself, be generous, you will make the world a better place for all. It doesn’t take much. If anything, you will make the world around you a better place.

45. Know which pool you swim in and choose for yourself. I am obviously not politically correct, some have accused me of not favoring my own “people”, others have suggested that I am a Social Darwinist. I like to consider myself an optimist who happens to be highly skeptical. Having gone through enough for my age, I have some observations about people and the environment, namely what I consider the pool we happen to swim in either by choice or circumstance. When I was starting out in the work place, my first few jobs were entry level, manual labor type jobs. The businesses that employed me were mostly “cost-plus” type establishments, with a simple business model. Since they are cost-plus, which means they source goods or materials then apply some basic labor or shelf space then turn around to resell, there is very little value added to the end product. This meant the profit margins are low, and it almost certainly means the few ways to improve margin is to either improve work place efficiency or cut costs. If you are an employee in such a work place (consider just about all factory, service level type jobs), you are constantly being squeezed. I will use Starbucks, which is considered by many a more humane company to work for as an example. A typical Starbucks generates $750,000 to$1M revenue per location. A typical location can staff up to a dozen employees or more (different shifts and so on). This means revenue per employee is less than $100,000. Real estate costs (such as lease), raw material costs (coffee beans, milk, etc) and other inventory can easily be$250,000-$500,000 per year per location. If you take the top line number of$750,000-$1M and subtract all the costs except labor, you will be left with no more than$500,000. Take the no more than $500,000 and divide it by a dozen, you will be left with barely$40,000 per employee. This is a number that includes benefits! Stop and pause for a moment, now put yourself in the shoe of the company. Where are you going to squeeze out more profits from this picture? Do you squeeze suppliers? Or do you squeeze out of your labor cost? The labor cost is by far the biggest component in this equation, so would it surprise you a business like Starbucks tend to draw a hard and stingy line on labor? If you are an employee at such a place, how much upside can you really expect?

If you know your upside in terms of compensation is limited, and you are smart and ambitious, would you really want to work in a place like Starbucks (I mean the stores, not headquarters)? I suspect not. So what kind of people, in terms skills, caliber and so on end up working at service level or factory jobs? You can draw your own conclusions. If you are going to be stuck working with people with limited skills, how much can you learn from your peers to help advance yourself? I am certain by now I have angered or insulted a lot of people with my line of reasoning. This does not mean I look down on entry level jobs, I was there myself. But if you are going to get ahead, use it as a stepping stone.

I am doing this exercise for you so you can understand and be aware of the various businesses and their business models and choose for yourself. If you want to get ahead, you need to look for businesses that can either generate a high level of profits, or have very high value-add. This means they will require employees who are either highly skilled or the business itself is run by very smart and/or innovative managers. If you work in such a business, you can be compensated well for your efforts and you are almost certainly going to learn a great deal. This is why the most successful companies tend to be technology companies, but tech companies do not have a monopoly in being great businesses. What technology and other creative type businesses have in common is that labor costs can be highly flexible, this means the businesses (the smart ones at least) aren’t too sensitive about their labor costs, because the revenue and profits they can generate from their creative labor forces is at least 2-3X if not 10-100X. Revenue per employee for successful technology companies tend to be $500,000 or more. Google for example is around$1.2M. My company is even better than Google 🙂 This is why a startup like Instagram was able to sell itself for $1B when it only had a dozen employees, and in hindsight they sold way too low! In the future, do this mental exercise when you encounter a business and you will be able to quickly figure out whether the business is an elite one or just an also-ran. Find out the total revenue (addressable, not some passthrough ones) and divide it by the total number of employees. The higher the number the more likely the business has defensible value-add, and mostly likely the more flexibility and upside for its employees. If you want to start a business of your own, the high revenue per employee type of businesses are exactly the ones you want to learn from. This is probably the most valuable and simplistic lesson I have learned from studying all kinds of businesses, and it is applicable no matter which part of the world you live in. If you are an investor, this also works. High revenue per employee businesses tend to have high net income and/or cash flow as well, and they tend to have very defensible “moat” as Warren Buffett would like to call it. It shouldn’t be a shocker to anyone if you find such a list it will have some familiar names in it, names like Apple, Exxon Mobile, ConocoPhillips, Gilead Science and Everest RE. To simplify, you currently have technology, bioscience, energy and insurance type of businesses dominating the high revenue/employee and high profitability list. My personal goal for my businesses is to have revenue per employee exceed$2M per year. This is a very tall order, and I am using what is commonly considered 2nd or 3rd string players to do the job. So it is a challenge and a worthwhile project for me. How do I get my so-called 2nd or 3rd string personnel and have them far exceed what they thought is possible?

So ask yourself a simple question, am I swimming in a “shallow” pool or do I want to swim in an ocean? If you are stuck in a shallow pool, what capabilities and skills will you need to get out and go for a larger pool and prepare you for the vast ocean? Where can I learn and acquire these capabilities?

46. The most successful people in the world didn’t get there because of better education, higher IQ or some magical upbringing, these people have a different mindset. I am not a religious person, I imagine what goes on in my head and others who are successful isn’t all that different from a person going through a religious experience, meaning we all take a leap of faith. The difference being that faith rests in ourselves instead of some higher being. You might call this blind faith, but after encountering so many “extraordinary” people in my life that are only extraordinary in retrospect, I cannot help but come to the conclusion that the willingness to fool oneself into doing great things despite humble backgrounds is precisely why humans are so incredible.

47. Choose yourself. Coming from a Chinese upbringing, the explicit message from an early age is clear, conform, obey, follow and respect authorities, get good grades, get to the right college, work for the right/large entity and your life will turn out good. Your family, especially your parents will be proud.

The harsh reality is this: I probably have attention deficit disorder, and a lot of you out there might have the same thing. I cannot sit still for long periods of time, my mind wonders, I pick out flaws, inconsistencies from elders and authorities, my grades weren’t that great in school, I have other challenges in life and so on. Well, this is starting to sound like a long list of excuses, but the bottom line is, I wasn’t going to be able to fit into the standard mode and be successful in the conventional ways anyways. This leaves a very obvious choices, you either choose yourself or give up and be mediocre. I chose myself because I had no choice. Industrial capitalism by nature want the masses to fit in, to conform. Ask yourself a simple question, do you aspire to be a cog when you grow up? Do you get excited and feel another connection when your interests are shared by millions of other people, say Justin Bieber music? Or do you actually feel more of a connection with another human when you are both fans of a some obscure musician? I wager the latter. There is a pendulum swing in the world today that not only allow, but actually encourages individualism that caters to the obscure. There are platforms of expression and networks that allows connection that make creating and even creating your own job, space, art and what have you possible.

So the choice is clear, you have to choose yourself. Your dreams, your aspirations might not match up to what your parent, spouse or friends want. That’s quite alright. Will they be doing all the heavy lifting and live in your shell for you? Of course not. My independence, my divorce, my own ups and downs is what brought me here today. Yes, it is terribly selfish, but I am living my own life, my path, and finally comfortable in my own skin. Because I picked myself.

48. Know how to position yourself. Those of you who took MBA type classes know a thing or two about product positioning, yet few people think about their own personal situation in the same way. When you are younger, you probably get asked about what you want to be when you grow up. When my son was little, he wanted to be a fireman. When he got older and hung around business people in way too many occasions, he said he wanted to be a corporate lawyer. After getting interested in sports as a teenager, he now want to be a sports agent. I am sure he will change his mind some day. Whatever he chooses to do in life, I will be supportive. That said, I want to engage him at an early age and start thinking about how he wants to position himself, regardless the career path. I believe everyone needs to think through this type of questions about their career, business and personal life as well.

Let’s say you went to school, got a job and worked hard at your job, but have you not noticed that some people in your organization have much bigger titles and compensation even though they aren’t much older than you? What gives? Is it because they went to a better school? They performed some brilliant task that made a huge difference in the business? Maybe, maybe not. Often times, it has nothing to do with any of the above. It has everything to do with how they position themselves. It is a mindset switch. I am the CEO of my company not because I went to the right school, performed some amazing magic trip to change the business. I am the CEO because there really wasn’t anyone else around at the time, I learned and grew into the job. I positioned myself to be the CEO by default. You don’t always have a chance or choice to start your own business, that doesn’t mean you can’t position yourself to advance the success ladder faster.

Let’s say you are at the lower end of the totem pole at your large company, by switching yourself to a smaller company or upstart, albit not without its risks, you will be able to drastically climb to the upper end of the pole. If you are a dentist, how are you going to stand out in a crowded city with a lot of dentists? You have to find a position that you are the undisputed expert. My company has struggled for years against our competitors, companies with far more resources, connections and experiences. It wasn’t until we changed our positioning, a position that actually doesn’t talk about our products or services, instead, we emphasized our attitudes towards problems solving and responsibilities that we began to gain traction in the market place. These days our customers and prospects no longer compare us against our former competitors, they do business with us not because our products features and benefits, they do so because where we stand as a group of individuals.

Knowing your positioning in your jobs, business, your relationship can set you on a clear path forward. The courage to do something about that knowledge will be the starting point of your future success.

I should add this little tidbit. My son was diagnosed with a rare form of blood disease in 2009, while I was going through my divorce. He nearly died if not for the efforts of Children’s Hospital in Seattle. He spent a month in chemo at the time he is now in remission. I am not exactly an old man yet, so this may be presumptuous at this point. If I get to stay in the 1% and even get to be a billionaire, I have no intentions of going back to my former young and stupid lifestyle again. I’m living in a middle class neighborhood this time around in an apartment smaller than 1500 square foot. I don’t have multiple properties or a bunch of fancy cars. My only splurge is travel. I want to live way beneath my means and leave all of my money to Children’s Hospital when I die. This doesn’t mean I won’t do my best to make as much money as I can at the meantime 🙂

I ran across http://www.death-clock.org/

The other day. Out of curiosity I answered all the questions, it tells me I should expire at age 92, which puts me at exactly at the half way mark as of today. I have much to be grateful that I made it this far, I can honestly say if I get run over by a bus tomorrow I would go out having a life well lived. It isn’t about what I have or have not accomplished, which is what the contentious debate about getting to the 1% is focused on. It is absolutely the wrong focus. The goal is to live life and reach your full potential, whatever your goal may be. Just because you struggle and follow paths like mine to strive for financial success, you will not be guaranteed of success. You will be guaranteed of discovery, I promise you that. If you push yourself you just might find the most interesting dazzling person yet, so go ahead, start digging. If this all sounds a bit narcissistic, so be it. I can’t wait what adventures lies ahead for me for the next 46 years.

Postscript:

Thanks to one of the readers, my way too long answer got translated into Chinese and found its way onto various Chinese websites. Sure enough some people who knew me read it, including my own family members. Needless to say it has brought on some awkward acknowledgements from them. Airing ones “dirty laundry” in public with no payoff seems stupid, and it probably is. Which brings on the question as to why I wanted to write this answer in the first place.

Looking back, I wrote it on a lark because I felt there was too much backlash against the so-called 1%, and there were simply too many misconceptions about the “rich”. I am not an apologist for the rich by any stretch of the imagination, but like a lot of things in life, there is always another side of the story. My story is just that, one man’s perspective, one man’s experiences, and certainly one man’s bloated opinion of himself. Needless to say, there is a great deal of “survivorship bias” in my story as well.

Reading the commentary on various Chinese websites gave me a sense that there is a clear difference between Chinese readers and the rest. Most of the commentaries on Quora are positive and supportive, but I can’t say the same about the Chinese comments. To say they are somewhat less charitable would be an understatement. It does make me feel sad that as a group that my own race seem to be some of the most negative people out there, and it just reaffirms just how difficult for a lot of people to get started on their own entrepreneurial journeys. I was taken aback that some Chinese commentators more or less consider me a traitor, or I must hate being Chinese. Fact is, being raised Chinese probably gave me some small edge, meaning I am terribly pragmatic and resilient. Do I think there is anything special about being Chinese? The answer is a resounding NO. I have been living in a diverse country for the past 30 years and traveled all over the world, my own observation from working with all kinds of people is that people are all the same. The sooner you understand and come to terms with that, the more open-minded you will be. It will go a long way towards making you a better entrepreneur. If some people think you are a sellout, that is really the least of your worries on your way to success.

Some thought I made up this entire story, I am sure to some it sounds like a bad Hollywood script, unfortunately, it is my life. Others simply want to bash what I did, whether it was trading, selling or doing what I am doing now, most if not all are not exactly conventional routes for Chinese upbringings. Of course there are those who thought I was looking for a way to brag. Sure, I am human, I am vain. But telling the good, bad and the very ugly about myself is one lousy way to accomplish that.

So am I bothered by the negative feedbacks? Not one bit. Not after what I have already gone through in life. I have already been beaten up, kicked on, spit on by life to not care about the haters. You simply can’t please everyone. I have learned a long time ago to run the other way from negative people. But some people did ask a fair question as to why am I willing to go through what I go through to get to where I am now, and where is the end?

I can probably sell the business and live comfortably for the rest of my life as of now, but I have tried the so-called “retirement” before. I don’t play golf, I don’t fish, even travel can take toll on you, and pretty soon it will get boring too. I am at the end of the day a people person. But most importantly, I learned to understand myself better over the years. Just like for the longest time I couldn’t understand why mountain climbers risk their lives to summit some of the most dangerous peaks in the world and do it over and over. I asked one and got a very simple answer, because it is there.

Those who know me know that I am not motivated by money, I am more motivated by what is possible. By any stretch of the imagination I have come far based on my limited intelligence, but through luck and persistence, I am here. With even more resources and capabilities than I have ever had, why not try to do more? Why not push oneself further? Why not see what is more inside? Why not explore more of your own limits?

Perhaps what I am doing is also a function of age. When you are younger, you are unsure of things. People around you try to tell you what to do, people of my age or older tell you how the world is like, people have something to sell try to tell you what is cool, how to conform, how to behave. The “authorities”, whether it is your family, your boss, or your schoolmaster try to tell you how to fit in. Basically, you live in self doubt when you are young. As you get older, trust me, the twenty-year-old version of me would find someone who is in their middle ages disgustingly old, there is this magic, you get comfortable with yourself. You grow a gut, figuratively or literally 🙂 You get comfortable in your own skin, and you start not to give a fuck, so to speak, as to what others think. I have had the good fortune to not to give a fuck about what others think a lot of time ever since I was much younger, and I am lucky enough to have survived this long, so it is perhaps instructive that you should actually care about what you think at an earlier age. Learn to like yourself, accept yourself, get comfortable earlier so get you over the doubts and start living already. In a world that expect conformity, the act of actually give a fuck about oneself is rebellious enough. So do just that, respect yourself and make the best of yourself.

Lastly, if you do find my story helpful, good. I merely wanted to convey what is possible in all of us. If you are so inclined, whatever your aspirations are, you owe it to yourself to at least find out what is possible for you.

Page 1 of 3