Tactics for a happier digital life August 24, 2017

I have some beef. Rage, even. For the past decade I've owned an iPhone and had access to the infinite power of the Internet in my pocket.

Do you remember 2006? It was a year when most people looked up when they walked, when asking for directions was normal, and when there wasn't a constant temptation to hide behind a constant flow of distraction.

Then the iPhone happened. And its imitators followed. Suddenly we became a culture immersed in handheld screens. I remember, in my rebellious youth, decrying television as a tool to dumb down an entire generation. And yet, somehow, we were sold on the smartphone as some sort of revolution.

And ... it has been. Tools like Google Maps and Uber fundamentally change the way we interact with the world. I carry a more powerful digital camera in my pocket than even existed 20 years ago. Technology is powerful augmentation for the real world.

But I have a confession: Until recently, my smartphone was more a source of escape from life than an enhancement of it. I'd use it to avoid life: browsing social media, reading toxic articles by people whose main interest is selling me something, or catching up on the latest outrage porn.

"But it's just entertainment!" "It's fun!" "You're being too serious!" Then why does it seem like most of my generation is chronically depressed or anxious? I posit that all this information is doing something sinister to our minds and bodies and that the science will say so soon enough. Could it be that we'll soon find scientific consensus that chronic Internet use is as harmful as chronic sugar consumption or smoking?

So... I decided to quit. I decided it was time to turn back the clock—back to when I remember feeling more contented and less stressed and more creative. The year was 2003.

Remember 2003? There were no smartphones. The Internet was gaining in popularity. Facebook hadn't quite launched. It was a simpler time. A time when you could leave the Internet back at your house and spend your time uninterrupted. Remember?

That's why I quit all social media. I communicate with my friends just fine via SMS, email, and phone calls.

That's why I sold my iPad. I don't need another black glass distraction machine in my life.

That's why I used iOS's Restrictions to disable Safari and the App Store on my phone. I don't want infinity at the touch of a screen in my pocket anymore.

Remember when you could leave the house without getting interrupted? That's why I also disabled all my notifications on my iPhone, except for phone calls. That means no text message notifications, either. Life's just better when you're fully engaged.

That's why I'm vowing to read paper books and magazines again. I want to feel the pages on my skin. I want to feel a sense of commitment to what I'm reading. I want to know infinity isn't a home button away. I want to feel safe.

Those are my tactics for a happier digital life.

The subtle art of staying at home August 15, 2017

I have a penchant for whimsically leaving the house without cause.

Working remotely, I have the freedom to remain in the comfort of my home for as long as I like. For whatever reason, that's typically only a couple hours.

Today I'm setting the intention to occupy myself here, at home, for the duration of the day. I want to practice disciplining myself to remain in my office, for sake of improving both my productivity as well as my mindful awareness.

I was reading from the book Full Catastrophe Living over the weekend. There was a particular passage about examining the richness in every moment, no matter how mundane the moment might seem.

Of all disciplines subject to needless hurrying, computing is probably the worst. There's a tendency to attempt to complete every task in as little time as possible, without regard for the beauty of the moments during which we're acting.

I wonder whether this tendency of mine to move quickly is a fear that I'll be outmatched by one of my peers. That, if only I go faster, I can hope to retain my position among them.

Slow down. Take inventory of the task. Breathe. Enjoy the process.

Your own European safety net August 13, 2017

I stumbled into viewing Michael Moore's Where to Invade Next last night. In the film, he visits several countries—mostly in Europe—and identifies social programs other countries have from which the United States could learn.

Among these programs were eight weeks of guaranteed vacation, increased equity between workers and managers as a result of requiring workers be on corporate boards, and government-subsidized university education.

This got me thinking: We tend to measure success in business here in the United States in terms of valuation and profit, pushing aside less tangible successes like worker satisfaction, their future security, and contribution to the public good.

As a small business owner, I too have fallen into the trap of measuring my business success in terms of gross revenue, instead of in the more meaningful terms of work/life balance, savings rate, and personal satisfaction.

Being part of America's dwindling affluent upper middle class, Moore's film has inspired me to think more about money in terms of the risk it mitigates instead of the numbers in a computer. That is, to recognize that the reason I earn a living is not for sake of making my bank account balance go up, but in order to ensure a prosperous present and future.

There may be little hope for the American middle class—specifically the working class who have in so many ways been left behind in our neolibertarian wasteland—but those among us fortunate enough to secure a generous income can, if we're clever, replicate the European social safety net for our families within the American system.

By taking full advantage of programs like the 401(k), IRA, and HSA, we can minimize our tax burden in order to create a personal pension plan that will, with any luck, keep us fed, clothed, housed, and prosperous into our golden years.

It is critical though, that we do so humbly and with gratitude. We ought to view our positions of financial privilege as opportunities to level the playing field—not to flaunt our affluence and status.

A recurring theme in Moore's film was the idea that countries with healthy social safety nets fought hard to maintain them. They weren't easily won without political interference; rather, they were won through difficult and strenuous organization.

I do hope the political tide turns in my lifetime and that someday the poorest of Americans won't need suffer the plights of homelessness and chronic illness. But in the meantime, those among us fortunate enough to bear the means to insure ourselves against future poverty should do so.

If each of us capable enough to buy the symbols of affluence instead chooses to buy the real thing, we will free ourselves enough to enact change for those who lack that capability.

Life ought to amount to more than eighty-odd years of accumulation of stuff. The structure of some societies seems to reflect that. We can, at best, mimic their ideas with our budgets.

Why I decided not to buy a house August 11, 2017

The rent is too damn high.

Especially here in Oregon. In Portland, rents were up 34% as of 2016.

Because of this, I've spent a disproportionate amount of my time contemplating whether I should buy a house to insulate my family from the threat of ever-increasing rents.

I called a mortgage broker. I surveyed the local real estate market here in Eugene. There are 1200 square foot houses with list prices greater than $300,000. And don't even ask about Portland, where I could barely afford a shoebox condo next to a freeway.

After seeing the San Francisco Bay Area become unaffordable even for the upper middle class, it's scary to imagine Oregon ending up in the same situation.

But then I realized something.

I don't want to own a house. Ever.

The only reason I want a house is to hedge against rising rents. I don't want to spend my weekends at Home Depot. I don't want to remodel a kitchen. And I really don't want to sink a ton of money into a house.

I like to move around. I like to live nimbly. To know I can call my landlord, pay a lease break fee, and be free to do anything I want.

A house is a prison. At least, for me. It might be a great investment for you. But I'd rather live in a micro-studio for the rest of my life than be stuck because I was afraid of rising rents.

Feeling insignificant August 10, 2017

For the past few years I've been frantically saving and investing money.

I feel fortunate that my skills are in demand and permit me to invest a large percentage of my income while still enjoying a pleasant existence today.

But despite this, I find myself feeling insignificant, and blaming the balance of my investment account for my malcontent.

Reading this interview with Derek Sivers made me realize that while owning a nice pile of stocks and bonds makes me feel more financially secure, it will never make me feel more emotionally or spiritually secure.

In the absence of conspicuous consumption and overindulgence, I will not suddenly feel connected to others. I will not, by virtue of my frugality, be generous and noble.

The only way to feel connected and generous is to do generous deeds and to connect with others.

Adding React to a Middleman project with Webpack August 5, 2017

Middleman is a static site generator written in Ruby. It's a great way to produce rich static content sites without the need for a server. Despite this, it doesn't come with internal support for modern JavaScript frameworks like React. Luckily, Middleman 4 ships with a feature called External Pipeline which allows wiring in your own external build tool like Gulp or Webpack.

Let's look at how to integrate Webpack with Middleman for the purpose of using React on our site.

Install development dependencies

First, let's install the dependencies we'll need to build our React code. Note that we're using the --save-dev flag to indicate to npm that we should append these libraries to the devDependencies section of our package.json.

$ npm install --save-dev babel-core babel-loader babel-preset-es2015 babel-preset-react webpack uglifyjs-webpack-plugin
  • babel-core is the core Babel package for transpiling ES6 and JSX into browser-friendly ES5 JavaScript.
  • babel-loader is a Webpack loader which loads files from our path into Babel.
  • babel-preset-es2015 is a preset for Babel to transpile ES6 code.
  • babel-preset-react is a preset for Babel to transpile JSX code.
  • webpack is Webpack itself.
  • uglifyjs-webpack-plugin is a Webpack plugin to uglify and compress our code for production.

Install React

Next, install the React packages, this time using --save to indicate these are runtime dependencies:

$ npm install --save react react-dom

Set up your Babel configuration file

Babel has its own configuration file inside .babelrc. Create this file in the root of your Middleman project with the following contents:

{
  "presets": [
    "es2015", "react"
  ]
}

This file tells Babel to use the es2015 and react presets we installed in the first step.

Configure Webpack

Next we'll configure Webpack with a basic configuration file that supports both development and production environments. Place the following inside the file webpack.config.js in the root of your project:

// webpack.config.js
var webpack = require('webpack');

const isProduction = process.env.NODE_ENV === 'production';

const productionPlugins = [
  new webpack.DefinePlugin({
    'process.env.NODE_ENV': '"production"'
  }),
  isProduction ? new webpack.optimize.UglifyJsPlugin({
    compress: {
      warnings: false,
    },
  }) : null,
];

module.exports = {
  entry: './assets/javascripts/index.js',
  devtool: isProduction ? false : 'source-map',
  output: {
    library: 'MyApp',
    path: __dirname + '/tmp/dist',
    filename: 'bundle.js',
  },
  module: {
    loaders: [
      {
        test: /\.js$/,
        loader: 'babel-loader',
        exclude: /node_modules/
      }
    ]
  },
  plugins: isProduction ? productionPlugins : []
};

Notice that we use the isProduction flag to toggle the use of the UglifyJsPlugin as well as whether we use a devtool to provide us with source maps for debugging.

Configure Middleman to build Webpack

Now that we've configured Webpack, let's tell Middleman to execute it whenever it rebuilds. To do this, we'll activate the external pipeline plugin in our config.rb and point it at the Webpack executable:

# config.rb

activate :external_pipeline,
  name: :webpack,
  command: build? ?
  "NODE_ENV=production ./node_modules/webpack/bin/webpack.js --bail -p" :
  "./node_modules/webpack/bin/webpack.js --watch -d --progress --color",
  source: "tmp/dist",
  latency: 1

When we run middleman build, we run Webpack with NODE_ENV=production. This triggers our production build options in our Webpack configuration.

When using middleman server though, we tell Webpack to --watch for changes and automatically rebuild.

Middleman will look for the result of our built assets inside tmp/dist. Let's go ahead and create that directory now:

$ mkdir -p tmp/dist

Build an example React component

Now that we've got our tooling configured, let's create a simple React component to test that everything works. First, create a directory to store your Webpack JavaScript assets. I place these files in assets/javascripts since Sprockets looks inside source/javascripts, and I don't want Sprockets to attempt to build my React code.

$ mkdir -p assets/javascripts

Next, let's sketch out a React component. Note that from index.js I'm exporting a function renderHello which renders the HelloWorld component to a DOM element specified by ID. This allows us to call upon fragments of React code from within existing pages.

// assets/javascripts/index.js

import React from 'react';
import ReactDOM from 'react-dom';

const HelloReact = props => (
  <div>Hello, React!</div>
);

function renderHello(id) {
  const el = document.getElementById(selector);
  ReactDOM.render(<HelloReact />, el);
}

export default {
  renderHello
}

Mount the component

Finally, mount the component onto an existing DOM element on a page. First include the built bundle.js file. Then, call renderHello:

  <body>
    <div id="hello">
    </div>

    <%= javascript_include_tag  "bundle" %>
    <script type="text/javascript">
      MyApp.default.renderHello('hello');
    </script>
  </body>

Other resources

When you forget why August 1, 2017

I don't ever want to forget why.

There are so many layers in what I do. From the sales process to the technical work to the administrative work.

It's easy to get caught in a cycle of continuing to do what you've always done without looking up from your work.

It's easy to forget that all this work is a means toward an end and not the end itself.

The end is my family.

The end is a cup of coffee enjoyed in tranquility on my porch.

The end is the cool breeze as I ride my bicycle along the river.

I want to serve others. But I'll serve them better if I serve myself.

Addicted to advice July 31, 2017

Self-help books. Articles on Medium and Thought Catalog. Top ten lists. Seminars. Order my monthly coaching package.

And in rushes the anxiety. Are you doing everything you could be? Are you doing enough? Do you have what it takes? What will happen if you don't act now? Are you falling behind?

Are we addicted to advice? Are we listening too much too often to the babble of other people who tell us they know better how to be?

I challenge myself today to rely on instinct. To act on intuition. To beat my own drum and to listen to the song.

I'm Teejay, and I'm a recovering advice addict.

Integrity July 31, 2017

Integrity is a virtue.

There are a million ways to make your website convert better. But some of them abuse the visitor and dangle carrots that don't help them.

I can't remember the last time I saw an on-exit popup that made me smile.

It's easy to make a living selling the idea of becoming rich or famous and then not deliver.

It's harder to make a living encouraging someone to do their best and genuinely help them get as far as they can.

I don't want to sell shovels to miners. My vow to my clients is simple: I will always act in your best interest.

Fighting the urge to remain in motion July 29, 2017

Do you ever find yourself involuntarily trending toward making life more difficult than it need be? To crave change and excitement—the very same that you were trying to eradicate through the simplicity and calm you now inhabit?

I've felt that way recently. A drive to shake things up for the sake of shaking them up. Funny though; where I am now was a dream only a year ago.

It pays to reflect on our journey occasionally to recognize our progress. But fighting the urge to remain in motion is futile until we reach the grave.