Life Pillars

Do you take life seriously?

Do you think about the future? Perhaps even both your own, your family’s, your community’s… and so on?

I’ve found that I like developing systems and mental frameworks that I can rely on to give context and meaning to how I spend my time, and what I focus on, on a day to day and week to week basis.

The first one of these I’ve come up with is my Four+ Life Pillars.

Pillar 1: Health

Without your health, you have nothing.

And: health is at the root of all else in life. Improved health, both mental and physical, improves all other aspects of life.

Pillar 2: Relationships

Pillar 3: Education

Pillar 4: Financial Security

Chronic stress kills happiness. Financial worries causes such stress like few other things in life (health likely being one of them!).

It doesn’t take millions of dollars to be financially “secure”. (Side note: financial “independence” is a topic for another day.)

Key action items:

  • Spend less than you earn. Have a personal income and expense statement.
  • Always look to increase your earnings.

(Pillar 5: Creativity / Artistic expression)

The plus “+” signifies both that “Creativity/Artistic” is not absolutely essential, but still very valuable and fulfilling. It also signifies a wildcard, to be filled in by anyone with an extra factor that they consider critical to their future.

The Economics of Software

I’m a software engineer, and actively think about the nature of my profession and passion.

It’s interesting to ask the question: what are the distinguishing economic aspects of software?

  1. Extremely low marginal cost of production
    1. – copy paste

2. Don’t need permission

No guilds, no professional accreditation
– very low cost of input: start from a document!
– substrate (computation) is ubiquitous
– build your own tools: both the product and the tools are code!
– open source

Focus On What You Can Control

The important things in life.

Some things in life you can control, some things you cannot.

Don’t try to change what you cannot control, since by definition it won’t affect your life in any positive way, and will only detract from your resources spent on what you CAN control.

You can control:

You cannot control:
– your genetics (unless you’re reading this in the mid-late 2020s)
– the conditions of your birth, e.g. parents, location, socio-economic station, etc.

What you should do with $100MM


What you should do with $100,000,000.00 (100 Million US Dollars).

1. Focus on Life Fundamentals

This first part is inspired by my Four+ Life Pillars, described elsewhere on this blog.

Join a top-tier gym, and get a personal trainer. Benefits:

  • you’ll mingle with the rich and successful
  • you’ll get professional help assessing, improving and maintaining your physical health, which is your most important asset along with your mental health

You could even consider (occasionally) hiring a personal chef, though even at $100MM that seems like it might be a stretch.

Mental health: even without being wealthy, you could get far by simply analyzing what is causing you chronic stress, and reducing those sources in your life. Increased wealth helps here by:

  • allowing you to delegate tasks you find stressful, and that don’t require your personal attention.
  • freeing up your time, and giving you mental space to reflect on your inner world.


Barring a catastrophe, your mind is:

  • the one thing you’ll always have, even if your body is damaged,
  • the tool with which you can guide your efforts, inform your actions, and increase your value in most ways relevant in life — at least insofar as your actually capable of.

Developing your mind is perhaps the single most powerful thing you can do. This is a topic for an entire separate category of posts, but here’s a single random idea:

  • book a week-long around the world trip, or as Ross Beaty describes it here, book the “ai” trip (“eye” trip?) — Dubai, Mumbai, Shanghai — link:
  • or, if you have the time, book a long-term around the world, visit many cities, meet as many people as you can.


2. Leverage your time

Hire a small and effective staff of accountants, lawyers,

Why? One of the biggest advantages of wealth, is that it gives you more control over parts of reality. That includes paying people to work for you.

Get a travel agent

Get a back office

2. Increase your wealth

Now that you’re wealthy, it’s time to become _more_ wealthy!

3. Reflect

It took me a while to distill this part, and fully crystallize what I mean.

You’ve likely heard the stories about people who are given a large amount of wealth, e.g. by winning the lottery, and fritter it all away through various kinds of imprudence or lack of discipline.

Perhaps the essence is this: creating, maintaining and growing wealth, requires a particular mindset, a set of psychological traits and attitudes.
Given the premise of this post, you’ll need that mindset to avoid frittering away all of it, and/or being psychologically corrupted by losing your sense of discipline and prudence.

If you’re new to wealth, you’ve likely put only limited, if any, thought into what you actually want out of life. Even if you have, acquiring wealth might change your mindset.


It can be viewed as a test of character: will you sink into lethargy, or rise to discover and fulfill your potential?

Math and Code: Poisson Heart Beat

For the code, see this GitHub link:

This code models a Poisson process. As you can see at the above link, we have a PoissonHeartbeat class that prints a “ping”-type statement on every event generated by the process. Let’s look at some of the more interesting lines of code. = events 
self.lambd = lambd

Explanation: events and lambd are instance variables, since every instance will have its own specific values for these variables. Note that lambd cannot be named lambda, since that is a reserved name in Python.

intervals = [random.expovariate(self.lambd) for i in range(self.numberOfEvents)]

We’re using a list expression to generate random time intervals drawn from the exponential distribution. We sample from that distribution using random.expovariate, which takes a lambda parameter and returns a random real-valued sample from the exponential distribution fully determined by lambda.

for v in intervals:
      print "ping! after interval ", v

We use Python’s time.sleep to actually simulate the Poisson process based on the previously generated random time intervals.

Origin of the Term: “Software Engineering”

1 minute
One term I use to describe myself is “software engineer.” Today I learned (TIL) about the origin of this phrase:

“I began to use the term ‘software engineering’ to distinguish it from hardware and other kinds of engineering,” Hamilton told Verne’s Jaime Rubio Hancock in an interview. “When I first started using this phrase, it was considered to be quite amusing. It was an ongoing joke for a long time. They liked to kid me about my radical ideas. Software eventually and necessarily gained the same respect as any other discipline.”

Source: Meet Margaret Hamilton, the badass ’60s programmer who saved the moon landing

The Semantics of Depth-First Tree Traversal

Reading time: 1 minute

I learn most effectively by either visualization, verbal explanation (e.g. to the proverbial duck) or by understanding where the semantics or even etymology of how a concept, idea or theory is described. The following is example of the latter.

A week or so ago, the obvious way to semantically distinguish between different types of depth-first tree traversals suddenly (and finally!) crystallized in my mind: pre-order, in-order and post-order. The parts in bold, i.e. the prefix that semantically differentiates the approaches, refers to the relative position of the root node. Doh! Note that here the left child node comes before the right child node.

Real-Time Analytics with Apache Storm

In the world of large scale data analytics, there is batch-type processing and real-time. Sometimes, the former is fine, such as when log files need be periodically analyzed using a framework such as MapReduce. Processing data in real-time can become paramount in applications such as Advertising. This is where Apache Storm comes in.

I used Udacity’s Real-Time Analytics with Apache Storm course to work with Storm: setting up my own Topologies, going from a basic Word-count application to an application linked to the Twitter sample stream.

On testing Topologies:
Gradually construct your topology.
Starting on one node to test, then distribute the topology.

Capacity planning:
Test a sample data set on a small setup, and see whether that setup has enough throughput capacity to handle the amount of data coming through. This is done by monitoring CPU usage over several days, to capture usage patterns during a day or over the course of a week. Importantly, these CPU profiles need to show some headroom to allow for load fluctuations.
At Twitter, a particular topology will be tested like this for a few days before going to production.

Computing aggregates
If you’d like to compute say a moving average, this can be done by storing the last few minutes of data in a bolt, and periodically store an aggregate statistics into persistent key-value storage such as Redis.

Peter Thiel’s Model for Innovation in the Next 20 Years

I almost started this post by claiming that Peter Thiel is “obviously” one of the most well-known figures in Silicon Valley. Then I realized that, though quite probably the case within the Valley, he’s unlikely to be as well known outside of this geographic region.

To a broader audience, Peter Thiel (1967) is an Frankfurt, Germany-born entrepreneur, investor and businessman whose track record includes two Stanford degrees, being an early investor in Facebook, a co-founder of software company Palantir, and more.

This post is essentially about the future the way we think about the future. Specifically, Thiel posits that we should catalyze a renewed focus on technology and innovation in our society by learning from the ’50s and ’60s. We can do this by “look[ing] at all the science fiction book that were written at the time, and [..] all the things that didn’t happen, and making a concerted effort to make that happen.” Full video here.

So what did ’50s and ’60s science fiction envision that has (partially) happened?

  • computer revolution
  • the Internet

So what did ’50s and ’60s science fiction envision that hasn’t happened?

  • space travel[1]
  • robots[2]
  • underwater cities
  • flying cars[3]
  • reforestation of the desert

I’m always looking for intelligent frameworks and methodologies for thinking about the future of technology itself, and its impact on humanity. Thiel’s proposal to taking a lead from the ’50s and ’60s seems potentially quite fruitful. A quick search yields the following collection of books. Note: I’ve allowed myself to be partly biased by both Thiel’s mention of the late ’60s (for that decade), as well as titles I’ve heard described as (near-)classics before (for both decades).

  • 1953: “Childhood’s End” by Arthur C. Clarke
  • 1961: “Stranger in a Strange Land” by Robert A. Heinlein
  • 1950: “I, Robot” by Isaac Asimov
  • 1965: “Dune” by Frank Herbert
  • 1968: “Do Androids Dream of Electric Sheep?” by Philip K. Dick
  • 1966: “Flowers for Algernon” by Daniel Keyes
  • 1969: “Slaughterhouse” by Kurt Vonnegut

I can’t wait to dive into every single one at least one of these.

Note: Thiel mentions the phrase “Critical vectors of technological progress over the next 20 yeas.” At first glance, this seems like a phrase I’d like to keep a mind as a useful framework for thinking about the future of technology.

[1] SpaceX is on top of it. There is a nascent private space industry, but need MOAR.
[2] Watch this and this.
[3] Peter Thiel himself has said flying cars would be a “bad idea” since they’d never be allowed to take off.