Overload and Archive

A few years ago I adopted David Sparks' paperless workflow. I installed Hazel and TextExpander, bought a ScanSnap scanner, and started dutifully scanning all of my paper that came in the mail. I scanned the water bill, my bank statements, and notices from my son’s second grade teacher about upcoming snack days. Over the years, and 2000 documents later, I’ve got a massive database of useless facts.

Never once have I actually needed to go back and look at what my home phone bill was last September. Even less have I needed to know what the schedule was for March in the third-grade classroom. I became so enamored by the ability to save everything that I stopped thinking about what I actually needed to save. I was hoarding.

Like any hoarder, I justified my activities. Why did I spend an hour every other week scanning things into my Mac? Why, for the most basic reason of all… I might need that someday! Eventually my Spotlight searches became nearly useless, as every keyword was littered with results from my OCR’d scans, useless information I didn’t need to keep.

So, today I staged an intervention for myself. I archived everything and started from scratch1. With the help of stackexchange, I now have a sane plan for what to keep and for how long. Some things will still get scanned, like reciepts for large purchases and the kids artwork that we can’t bear to part with. For the most part though, the paper will come in, live in my drawer for a month or so, and then move on out.

The new system will take some getting used to, but in the end I think I’ll be happier and better organzied for it. There’s no need to keep things I’m never going to look at again, physically or digitally.


  1. Archived, not deleted. Oh, I’ve still got everything. I mean, I’m not crazy↩︎

Rules for Sane Living in a World of Constant Outrage

Turn it all off.

I’ve deleted the twitter apps from my phone and computer, I don’t log into Facebook anymore, and I’m limiting when I read news outside of the tech news to once a week. It just became too much, I started feeling angry all the time, and reading more news wasn’t making me feel any better about it. There was nothing I could do about how I felt, there were no actions I could take to assuage the pain. The constant flow of new events across the world to be outraged about is too much for anyone to handle.

So, I’ve started myself on a strict information diet. Unless the news is related to Apple or the tech industry, or any of my hobbies,1 I’m leaving it till Saturday morning after I’ve gone on a long run.

There is plenty of evidence that binging on news is detrimental to your health. In the past few months I’ve noticed my mental state has grown significantly more pessimistic about the state of the world, when in truth my personal circumstances have never been better.2

That’s not to say that the issues in the world right now are not serious, or that I don’t care about the many, many problems affecting our society. I do. I care enormously. I simply can’t let how much I care dictate how I feel about everything else. I’m not cutting myself off completely, I’m simply making a decision for myself about when and how much of the news I’ll allow in. When the time comes for action, I’ll take it.3 I just don’t need to be reminded about what I already know over, and over, and over.

Sometimes the best thing to do for your own mental health is to log off.

  1. Reading, writing, gardening, running, and general travel and hiking. ↩︎

  2. I work from home, in a good job, with a company that I respect and love working for. Raising four kids will always bring times of hardship and doubt, but overall we are ok. ↩︎

  3. By taking action I mean writing a letter to my senator, or participating in a march, or voting for who I feel will make the world a better place. I abhor violence. ↩︎

The Motivation Toolkit

Jump to Post

One key to mastery is what Florida State University psychology professor Anders Ericsson calls deliberate practice – a ‘lifelong period of… effort to improve performance in a specific domain.’ Deliberate practice isn’t running a few miles each day or banging on the piano for twenty minutes each morning. It’s much more purposeful, focused, and, yes painful. Follow these steps – over and over again for a decade – and you just might become a master:

Focus and mastery of your chosen craft are topics that I’m deeply interested in, so this article checked all the right boxes for me. In the age of distraction that we live in, where any hint of boredom can be quickly and easily erased by Twitter or Buzzfeed, I believe that the ability to focus, and focus intently for extended periods of time is only going to become more valuable for people who work primarily with their minds.

Each day is an opportunity to either sharpen your saw, or let it rust. Taking action to ensure that you are focusing on the right things at the right time gives you an advantage.

I’d be remiss not to mention Shawn Blanc’s “The Power of a Focused Life” course. I’ve not taken the course yet, it’s a bit pricey, but I’ve followed his work for long enough that I understand where he’s coming from. To do your best work consistently, and to always be pressing the boundaries of your capability, to always be making yourself just a little bit better every day, these are the traits of a master craftsman.

Master Plan, Part Deux - Tesla Motors

Jump to Post

However, the main reason was to explain how our actions fit into a larger picture, so that they would seem less random. The point of all this was, and remains, accelerating the advent of sustainable energy, so that we can imagine far into the future and life is still good. That’s what “sustainable” means. It’s not some silly, hippy thing – it matters for everyone.

By definition, we must at some point achieve a sustainable energy economy or we will run out of fossil fuels to burn and civilization will collapse. Given that we must get off fossil fuels anyway and that virtually all scientists agree that dramatically increasing atmospheric and oceanic carbon levels is insane, the faster we achieve sustainability, the better.

Here is what we plan to do to make that day come sooner:

Tesla is the most interesting company in America today.

BBEdit and Python Tags

I’m in the process, a very long process, of switching from Vim to BBEdit as my primary editor. The reasons are long and varied, but boil down to me being tired of screwing around with Vim’s configuration. I do a lot of work in Python now, and I’m using the experience of building and maintaining cloudchain to learn how to navigate BBEdit. Hopefully, someday I’ll be as good here as I was with Vim.

Today I learned that BBEdit ships with support for ctags, best defined by the documentation:

Ctags generates an index (or tag) file of language objects found in source files that allows these items to be quickly and easily located by a text editor or other utility. A tag signifies a language object for which an index entry is available (or, alternatively, the index entry created for that object).

The tag file serves two purposes. First, BBEdit will use the tags to allow you to jump to the point in your project where the selected function was defined. Second, if you copy the tags file to a specific spot, BBEdit will use that file for code autocompletion.

  • ⌘- -> Find the definition of the selected function.
  • ⌘⎇[ -> Jump back to the point you were at in the previous file (if the function was defined elsewhere).

To generate the tags file, open your project directory in Terminal and run bbedit --maketags. Then copy the resulting tags file to ~/Application Support/BBEdit/Completion Sources/Python/tags. Quit and restart BBEdit and autocompletion and function definition should both work.

Trump’s Boswell Speaks - The New Yorker

Link

He saw Trump as driven not by a pure love of dealmaking but by an insatiable hunger for “money, praise, and celebrity.” Often, after spending the day with Trump, and watching him pile one hugely expensive project atop the next, like a circus performer spinning plates, Schwartz would go home and tell his wife, “He’s a living black hole!”

It’s a shame that the people who need to hear this message the most are the ones least likely to be reading The New Yorker on a regular basis.

CloudChain

Today, the team I’m a part of at TargetSmart is releasing our first open source project, a bit of Python I like to call “cloudchain”. cloudchain is designed to make it easy to store and retrieve secrets using AWS. cloudchain relies on the AWS Identity and Access Management (IAM) Key Management Service (KMS) to securely store and manage access to encryption keys, and stores the encrypted secret in a DynamoDB table.

Part of the reason, if not the biggest reason, we are open sourcing this project is to request feedback from the community. cloudchain itself is only a few lines of glue plugging together a few AWS services, but its the idea itself that I’d like vetted. We are using this in a few projects internally, and so far it’s worked out. However, I know that there are things I haven’t thought of, and ways to improve the process, so I’m hoping others will be able to look at the project with fresh eyes and see things we haven’t.

There are three steps in the process. First, cloudchain retrieves an encryption key from KMS and uses it to encrypt the plain text secret. The boto3 library used returns a dictionary with a “Ciphertext” entry containing the encrypted key. cloudchain then base64 encodes the encrypted key into a string, and saves that string to a DynamoDB table named, by default, “safedb”.

Setup

pip install cloudchain

A new encryption key should be created in KMS. Using the console makes this easy, and sets up permissions to the key using IAM users or Roles. IAM users should be given permission individually, while instances launching in AWS should be identified by a role.

A new DynamoDB table should be created as well. Run this command using the AWS CLI tools:

aws dynamodb create-table \
--table-name safedb \
--attribute-definitions \
AttributeName=Service,AttributeType=S \
AttributeName=Username,AttributeType=S \
--key-schema \
AttributeName=Service,KeyType=HASH \
AttributeName=Username,KeyType=RANGE \
--provisioned-throughput \
ReadCapacityUnits=1,WriteCapacityUnits=1 

This will create the DynamoDB table with two attributes: Service and Username. cloudchain assumes that the combination of a service and a username will require a unique secret. The first time a secret is written to the table the third “Secret” attribute is created.

Configuration

The cloudchain cli, cchain, looks for a configuration file at ~/.cchainrc. This should be a standard Python ConfigParser compatible file with the following format:

[dynamo]
region_name = us-east-1
endpoint_url = https://dynamodb.us-east-1.amazonaws.com
tablename = safedb

[IAMKMS]
keyalias = alias/key

The “keyalias” should be the name of the KMS encryption key created during the setup, prefixed by “alias/”. The “endpoint_url” should point at the closest HTTPS endpoint, or at localhost if using a local development environment.

Import cloudchain as a Module

Both the test.py unit tests and the cchain cli import cloudchain.py. After importing, cloudchain expects four variables to be set:

  • region_name
  • endpoint_url
  • tablename
  • keyalias

Reasonable defaults are mentioned in the configuration section above, but the keyalias must be unique.

After importing, cloudchain can be called on to encrypt and decrypt secrets:

To Encrypt:

cloudchain.savecreds(args['service'], args['user'], args['save'])

To Decrypt: cloudchain.readcreds(args['service'], args['user'])

Where:

  • service = The service name the username and secret are associated with
  • user = The username
  • save = The unencrypted secret to encrypt

Command Line Use

The command line script supports five arguments:

  -h, --help            show this help message and exit
  -u USER, --user USER  User name
  -e SERVICE, --service SERVICE
						Service or application
  -s SAVE, --save SAVE  Save password to the safe
  -r, --read            Read password from the safe
  • The --save and --read arguments are mutually exclusive, and cannot be used at the same time.
  • --save expects the unencrypted secret as an argument, and requires both --user and --service flags.
  • --user expects the username as an argument.
  • --service expects the service name as an argument.
  • --read requires no arguments, and requires both --user and --service flags.

Examples

To save a secret:

./cchain -u testuser --service testservice --save testsecreet

To retrieve a secret:

./cchain -u testuser --service testservice --read

We hope this is useful, and that we can continue to make cloudchain better, easier to use, and more secure as development continues.

Worlds apart - All this

Jump to Post

I, of course, am stuck in the past, not willing to give up—or even share—the ownership of my words. Still clinging to a publishing model that may soon be as outdated as print. Erik’s hybrid system is probably the right way to accomodate the new realities while still maintaining control. But I’m not a fan of the new realities. I know the niche I’ve carved out is vanishingly small, but it’s all mine.

I keep this site for many of the same reasons Dr. Drang mentions. It’s all mine, a little piece of the internet that belongs only to me.