Category: General

Chasing the Rabbit

Sometimes, when working on something, you start digging into a particular technical issue.  The more you dig into it, the more it leads you away from your original goal.  I like to call this “chasing the rabbit”.  If you chase a rabbit through the woods, and only keep your eyes on the rabbit, you’ll eventually find yourself lost in the woods.

A few months back I was working on pylons.info – a website I was putting together for finding local events.  One feature of the site allows a user to post new events.  Part of adding a new event is setting the date and time of when the event starts and ends.  In trying to find a good solution, I think I must have investigated at least a dozen or so different date-time pickers for JavaScript.  Some only allowed a user to pick a date.  Others only allowed a user to pick a time.  Some had dependencies on other large libraries (like Angular).  All this digging into a single part of a single feature had me entirely consumed.  I lost sight of the big picture – getting the site up and running.

It’s easy to lose sight of the big picture when you are “chasing the rabbit”.

Passion for Learning

I hope I never grow tired of learning new things.

In some respects, this is great.  I never grow bored of life.  There’s far too many interesting things out there.  The world is filled with interesting problems, and even more interesting solutions.

In other respects, it is a bit of a curse.  Because of this, I have far too many interests.  As the saying goes, “jack of all trades, master of none”.  I sometimes feel like I don’t have the depth of knowledge that I’d like in particular subjects.

It’s amazing how deep you can go down the rabbit hole.  Let’s just take programming as an example.  For my day job I work with Python and Django, and in my spare time at home I occasionally play around with C# and ASP.Net.  There’s a ton of interesting technologies out there.  For example, suppose you are shooting for more performance for a web app, so you start digging into caching.  So you start learning about Redis, and other key-value stores.  That leads you down the path of learning about cache misses, specific implementations of hash tables, and fast hashing algorithms.  That area of computer science alone has claimed many a PhD student. 😛

I think my ultimate dream job would be where I get paid to learn, and on occasion, get to apply/unleash that knowledge on an interesting problem.

Rope Bridge Philosophy

The rope bridge philosophy is something that I discovered over at GameDev.Net a long time ago, so I can’t take total credit for it.  It goes something like this:

When you need to cross a river, you first build a rope bridge.  You don’t start with a concrete and steel bridge, because you don’t know if you will be crossing over that same river again.  By starting with just a rope bridge, you’ve spent minimal resources on a problem that you aren’t guaranteed to encounter again.  If you find yourself needing to cross that same bridge multiple times, then you can go and revise/rebuild the bridge with something stronger.  Yes, it means you’ve built the same bridge twice, but you’ve also saved yourself resources by only building what is necessary.

This is totally applicable in programming – especially something like game development.  There is often no clear “best” solution, and you face a huge number of unknown problems.  You don’t know if the game you have designed is going to be fun without getting something working first.  You only want to spend resources where they are going to matter.

Eventually, as you gain more experience, you learn when to preemptively built a bigger bridge.  Like anything else, a bit of that intuition comes from experience.  But even then, you still risk the danger of spending resources where they won’t be needed.

Something that I often tell my team is the following:

1. Make it.
2. Make it work.
3. Make it work right.
4. Make it work right fast.

Building a bigger bridge before you’ve gotten to your destination is making something work right/fast before the entire thing works.  Learning when to build something bigger than a rope bridge at start is a bit of an art.  It takes experience – but experience only comes at the cost of making mistakes.  You also need the freedom to go back and revise/refactor things once everything is working.  This is something that you often have to push for, and something that management needs to understand.

Actions -> Consequences

I think there’s something that society keeps forgetting:

You are free to choose your actions, but you aren’t free to choose the consequences.

Far too often people attempt to make up excuses on why they should somehow be exempt from whatever negative consequences they are experiencing:

“It came from my primal/animal instinct.” (Are you saying you are no better than an animal?)
“Someone else told me to do it.” (If someone else told you to jump off a bridge, would you?)
“I was drunk at the time.”  (Who’s choice was it to drink in the first place?)

Think of the law of gravity.  It has some pretty severe consequences.  If you ignore the law, you aren’t free from its affects.  You can’t simply wish that gravity isn’t there, and have it go away.

Constraints Can Be Good

We often think of constraints as being a bad thing.  Far often we don’t recognize that constraints force us to grow.

Let’s say you are writing a video chat program.  With no restrictions, you would likely require a gigabit internet connection with zero lost packets and a sub 50 millisecond ping, and you’d write it in whatever language you want.  But let’s say that you now have a set of restrictions on it: suppose that it has to run on a mobile device.

  • You will likely be CPU limited, bandwidth limited, and have a maximum camera resolution that you can use (as well as a maximum display resolution).
  • You will have to be aware of power consumption and battery life.
  • You will likely be restricted to a subset of programming languages and APIs.

Restrictions like this are going to force you to be more efficient and more creative in how you solve the original problem.  As a result, whatever solution you end up creating will likely be a lot more interesting than if you had unlimited CPU/bandwidth.

I have a huge amount of respect for those early programmers that had to deal with very tight constraints who still managed to create some amazing programs and games.

Economics Are Weird

There’s been a lot of talk lately about things like automation and machine learning taking everyone’s jobs, and governments then providing a “Universal Basic Income”.  I have a few thoughts on the subject.  Forgive my rambling, but it’s nice to actually write things down as I ramble.  I don’t profess to be an economist or anything of the sort, so take whatever I say as you want.

Let’s go back to the very basics.  Let’s imagine a small society of a few humans who are living hand-to-mouth, and who’s goal is to become morbidly obese (just stay with me here!).  Day to day, they go and try to find food.  Each of them does basically the same thing, and as a result, they all have about the same level of plumpness.  One day, they discover that human A is better at hunting, and human B is better at making spears.  Because of this, A goes out and does more hunting while B makes spears.  It doesn’t take long before humans C, D, and E also discover this.  So instead of B going out to hunt, he stays at home making spears while A, C, D, and E trade some of their kill for those spears.  B has a skill that has made him more valuable.  Everyone still has to eat, and everyone does.  But because of B’s skill, he is is now getting more food than he previously got, and as a result, is getting fatter.

Next, human D discovers that he is better at growing potatoes than he is at hunting.  Some of the other hunters acquire a taste for potatoes (especially deep fried ones), and trade their meat for some of D’s potatoes.  Human C then discovers that he’s got a knack for rendering down fat from killed animals.  He trades it to D, who in return gives him some of the potatoes, fried in C’s rendered fat.

Now A, B, C, and D are all doing different tasks.  Everyone is still eating, and everyone is slowly getting more and more fat.  There’s a certain amount of specialization that is going on, and as a result, their society, as a whole, has become more productive than if they were each doing their own thing.

Now let’s fast-forward time to a later date.  Instead of just a single person being specialized at a given task, we’ve got lots of people making spears, lots of people growing potatoes, and lots of people rendering animal fat.  Life is good, until someone discovers an alternative to hunting that still brings in meat (raising animals for food – we’ll call it ranching).  It turns out that this way is easier than hunting, and more productive, and it no longer relies on making spears.  So now those that were making spears have an option – they can continue to make spears, or they can help those ranchers in some other way (making fences, gathering hay).  They’ve essentially become obsolete.  They, as individuals, are still alive, and still have demands on society.  They still need to eat.  But not everyone who is making spears will be good at making fences or gathering hay.  In order to eat, they still need to do something valuable in their society.

There’s a critical shift that happens in the society that has now given the ranching humans in this little simulation a huge advantage.  As a result, the ranchers become morbidly obese, and eat only the richest, greasiest fried potatoes that their society can provide.  In fact, they can’t even eat all the fried potatoes that they can purchase.  In the mean time, there are a few former spear-makers that aren’t very good ad making fences or gathering hay, who are getting skinnier day by day.

Now let’s fast forward even further in time.  We’ll assume that those humans who weren’t able to be very good at making fences or gathering hay have found other niches in society, but still aren’t thriving in the same way others are.  Now let’s introduce another technological shift.  One of the humans makes a robot that can do ranching, potato growing, and potato frying.  He shares these robots with a few – but only a few – other humans.  Now they have an advantage over anyone else, and as a result, are getting very fat.  Everyone else has to find other niches to fulfill.

The problem with this is that there’s now lots of other people looking for work, and who still need to eat.  Those that aren’t able to work have a few options – they can try to find some other niche work (like maintaining the robots).  This is difficult because there are now a lot of other humans trying to do that same thing.  Another option is that they could introduce a tax on the humans who are producing, and live off the tax – essentially trying to redistribute the wealth.  They could also live off borrowed potatoes – essentially promising to do work for the humans that own the robots in turn for a few potatoes each week.  They could also try to grow their own potatoes instead of doing work for those that do.  There’s problems with all of these.

The first option – trying to find niche markets – is probably the most viable.  But this also requires each human to develop a set of skills to survive in unique situations.  This requires the most work of each human, and is probably the most difficult.  But it is also probably the best long-term strategy.  This is what originally happened to those humans who made spears – they adapted to do other jobs.  They found ways of becoming valuable to those that had resources.  It’s a bit like ants and plants, and a mutually beneficial exchange between the two.  The plants provide food to the ants, and the ants provide protection to the plant.

The next option – a tax.  Essentially the humans who have the most resources are socially forced to give some of those resources to the humans who don’t have any resources.  Whether this becomes something that is socially accepted by the wealthy and the poor is up to the individual culture of the people.  But taking this to an extreme may have detrimental effects (see below).

Living off borrowed potatoes – this is a terrible short term solution to a long term problem.  But it is one that plenty of people seem to be taking.  Here in Alberta, consumer debt is continually pushing an all-time high.  By making purchases on credit, people are continuing to drive themselves further into debt.  Eventually something has to fail – and it usually does in the form of bankruptcy.

Growing their own potatoes – this works if a person has the resources to grow their own potatoes.  Not everyone does, and not everyone has the skills to do this.  Similarly, even if a human could grow their own potatoes, they still don’t have the rendered fat to fry them, so the quality of living isn’t as good as what it could be.

Universal Basic Income – the idea of taxing those who have and giving it to everyone, is a bit of a dangerous game.  The danger in this is two-fold:

1. You risk imploding the entire economy because everyone stops working.  If you were already getting everything you needed, would you continue to work as much as you currently do?  I highly doubt it.  Maybe at first you’d continue to work the same amount, but eventually it gets easier and easier to not work.  You are in no risk of starving, so why bother spending your time doing something you don’t necessarily want to do?  Why not sit at home all day watching cable TV in your underwear while drinking your favourite beverage?

2. More importantly: you are taking away the need for people to work, which is a psychological need.  Take a look at Maslow’s Hierarchy of Needs.  By taking away the need to work, you are potentially eliminating the top two items in the pyramid – esteem and self-actualization.  How can you feel good about yourself when you aren’t doing anything?  How can you reach your full potential when you aren’t being a productive member of society, in some form?  Long story short, you can’t.

Lately I’ve been watching Star Trek: the Next Generation.  I find it an interesting view of a theoretical Utopian society where everyone works for the better good of humanity without money.  This sounds nice, but I think people forget that everyone on the Enterprise has a role to fulfill – everyone has do be doing their part.  Those that aren’t up to snuff, or those that fail to perform their duties are removed from the ship.  We can’t really do that with the unproductive members of society.  To a certain extent, we’re all in this together.

The way I see it, we are entering another shift in economics.  The industrial revolution was similar in a sense, but this shift toward automation has the potential to disrupt even more, as it will likely affect multiple industries at once, not just manufacturing.  The best thing that a person can do is become as skillful and as valuable as possible.  If they are made redundant through automation, it is up to the individual to find a niche where their knowledge and skills are of value to someone else who has resources.

I have been blessed

Last night I watched the following video about Bill and Melinda Gates, and what they are doing to prevent infant mortality:

They’ve managed to potentially prevent millions of children from dying in the first 24 hours birth.  Part of what they did was actually ask parents for permission to autopsy deceased children.  You can’t see much in the video, but it was still pretty heartbreaking to see a little plastic wrapped bundle, knowing that it was someone’s child.  It made me realize how blessed I am.  I actually had to get up and check on my two little girls and wife that were asleep, just to make sure they were still well.  To think that I’ve got a wife, two amazing little girls, a house, a job, supportive family members, etc…. and I don’t have malaria.  It’s videos like this that make me really realize how blessed I am.  And it motivates me to try and find ways that I can help others.