wesley tanaka


Unicode is Base 1114112


During my years as an engineering leader, I've worked with developers who do not have a mental model of Unicode beyond "they're special characters". This sometimes causes them to create and run into difficulty solving bugs due to confusion between bytes, UTF-8, and Unicode code points.

What is a variable?


You can visualize a variable1 as a box that contains a thing2. For example, this variable called x contains an integer 0:

x = 0

This other variable called most_recent_email contains a pointer (more below) which we draw with an arrow.

Using Packer and Ansible (instead of Dockerfile) to create Docker Images


Docker contains a feature, the Dockerfile, for automating the creation of images. However, packer can also be used to create docker images, and does so in a way that's generalizes to creating virtual machine or cloud images too.

Here is an example packer file that will create a docker image using an ansible playbook, and tag the image so that you can use it locally.

Parallel Stream Processing with Apache Beam, Flink, and Kafka


Apache Beam is a programming model and an associated SDK that lets you write software programs that work with large or possibly unbounded data sets. Beam code is reminiscent of using lazy evaluation in functional programming languages to operate on infinitely large data structures.

For example, this code reads lines forever from a Kafka topic, groups the lines into windows of 10 seconds, counts the number of instances of each word in the group, and outputs the words with their counts to another Kafka topic.

What is Apache Beam?


(Update 2017 May 25) A more detailed and refined description is available at https://wtanaka.com/beam.

Apache Beam is a formal definition of a few core data structures:

Notes about using HTTP/2



Generic https notes

There's a useful cipher suite generator at https://mozilla.github.io/server-side-tls/ssl-config-generator/

How do I find which AWS IAM user owns an AWS Access Key

  • pip install awscli
  • for i in `aws iam list-users | grep UserName | cut -d\" -f4`; do aws iam list-access-keys --user-name $i; done

strace equivalent in Mac OS X


Recent versions of Mac OS X have a System Integrity Protection feature which breaks the dtrace implementation installed on Mac OS X. In order to use dtrace functionality you first need to disable a portion of System Integrity Protection.

  1. Restart computer
  2. Hold down Command-R while computer boots
  3. Launch Terminal from the Utilities menu
  4. csrutil disable
  5. csrutil enable --without dtrace
  6. Restart again

Now you can use dtrace command line tools such as:

Generating grpc stubs for Python from the command line


The GRPC quickstart guide refers to generating GRPC stubs using python code similar to run_codegen.py

When you look in this file, you see what appears to be a command line like: protoc --python_out=. --grpc_python_out=. myfile.proto

However, if you actually try to execude that command line with either protoc 2.6.1 or 3.0.0, you get this error:

Understanding protocol buffer version compatibility issues in Python


There are multiple protocol buffer and protobuf-related software packages available in multiple versions, as well as two major protocol buffer syntax releases. Forward compatibility does not exist, so the error messages that appear require research to understand:

Syndicate content Syndicate content
by Wesley Tanaka